/* faro.dk: shared by index.html, en.html and 404.html */

@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/familjen-grotesk-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin.woff2) format('woff2');
}

:root {
  --bg: #0b0d12;
  --bg-2: #10141c;
  --line: #1f2530;
  --line-strong: #2c3442;
  --text: #e9ecf1;
  --text-2: #9aa3b5;
  --text-3: #7d8799;
  --accent: #f0b429;
  --accent-dim: rgba(240, 180, 41, 0.14);
  --sans: 'Familjen Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --max: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --nav-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}
/* Panels snap into place on desktop, and only when they can fit the viewport.
   Below the height guard (short laptops, zoomed pages) snapping would trap content;
   on mobile the hero alone is taller than the screen, so there is no snapping at all. */
@media (min-width: 901px) and (min-height: 700px) {
  html { scroll-snap-type: y mandatory; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- fine engineering grid over the whole page ---------- */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 20%, transparent 80%);
}

/* ---------- fixed nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 0.7rem; font-weight: 600; font-size: 1.15rem; letter-spacing: 0.01em; }
.mark { width: 26px; height: 26px; display: block; }
  .mark .stem { fill: var(--text); }
  .mark .arm { fill: var(--accent); }
.nav-links { display: flex; align-items: baseline; gap: 2rem; font-size: 0.95rem; color: var(--text-2); }
.nav-links a { padding: 0.3rem 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.nav-links a:hover { color: var(--text); border-bottom-color: var(--accent); }
.nav-links .lang { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--text-3); }

/* ---------- full-screen panels ---------- */
.page { position: relative; z-index: 1; }
.panel {
  min-height: 100svh;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  padding-top: var(--nav-h);
}
.panel + .panel { border-top: 1px solid var(--line); }
.panel > .wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: clamp(2rem, 5vh, 4rem); padding-bottom: clamp(2rem, 5vh, 4rem); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 3rem;
  align-items: center;
}
/* mono kicker used by eyebrow, principles and pricing */
.k {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-3);
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 1.6rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
h1 {
  font-size: clamp(2.6rem, 6.2vw, 5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 14ch;
}
h1 em { font-style: normal; color: var(--accent); }
.lede {
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-2);
  max-width: 52ch;
  text-wrap: pretty;
}

.hero-art {
  display: block;
  aspect-ratio: 1 / 1;
  width: min(100%, 480px, 62svh);
  justify-self: end;
}

/* ---------- section heads ---------- */
.section-head {
  display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: baseline;
  margin-bottom: clamp(1.5rem, 4vh, 3rem);
}
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.section-head p, .service p, .principle p, .contact p { color: var(--text-2); text-wrap: pretty; }
.section-head p { max-width: 58ch; }
.service p, .principle p { font-size: 0.95rem; }

/* ---------- services ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); }
.service {
  padding: 1.4rem 1.6rem 1.6rem 1.4rem;
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.9rem;
  transition: border-color .2s;
}
.service:hover { border-left-color: var(--accent); }
.service .icon { width: 34px; height: 34px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 1.5; }
.service .tags { margin-top: auto; padding-top: 0.5rem; font-family: var(--mono); font-size: 0.72rem; color: var(--text-3); line-height: 1.9; }
.service.own { background: var(--bg-2); border-left-color: var(--accent); }

.pricing {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.6rem 2.5rem; align-items: baseline;
  color: var(--text-2); font-size: 0.95rem;
}
.pricing strong { color: var(--text); font-weight: 500; }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }
.principle .k { margin-bottom: 0.6rem; }
.principle h3 { margin-bottom: 0.4rem; }
.principle p { max-width: 44ch; }

/* ---------- contact ---------- */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: clamp(2rem, 5vw, 3.5rem);
}
.contact p { margin-top: 0.8rem; max-width: 46ch; }
.person {
  justify-self: end;
  display: flex; align-items: center; gap: 1.2rem;
}
.avatar {
  flex: none;
  width: clamp(72px, 9vw, 104px); height: clamp(72px, 9vw, 104px);
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
  border: 2px solid var(--line-strong);
  transition: border-color .2s;
}
.person:hover .avatar { border-color: var(--accent); }
.who { display: flex; flex-direction: column; gap: 0.25rem; }
.who .name { font-weight: 500; color: var(--text); }
.who .role { font-size: 0.9rem; color: var(--text-2); margin-top: -0.1rem; margin-bottom: 0.15rem; }
.big-mail {
  font-family: var(--mono); font-size: clamp(1.05rem, 2.2vw, 1.6rem); color: var(--accent);
  display: inline-block; border-bottom: 1px solid var(--accent-dim); padding-bottom: 0.15rem;
  width: fit-content;
}
.person:hover .big-mail { border-bottom-color: var(--accent); }
.who .note { margin-top: 0.35rem; font-size: 0.9rem; font-style: italic; color: var(--text-2); text-wrap: pretty; }

/* ---------- footer, one line, sits at the bottom of the contact panel ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0;
  font-family: var(--mono); font-size: 0.78rem; color: var(--text-3);
  letter-spacing: 0.02em;
}
footer .meta { display: flex; justify-content: center; align-items: center; gap: 0.4rem 0; }
footer .meta > span { white-space: nowrap; }
footer .meta > span + span::before { content: "·"; margin: 0 0.9em; color: var(--line-strong); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; }
  .hero-art { width: min(100%, 320px, 40svh); justify-self: start; }
  .section-head, .contact { grid-template-columns: 1fr; gap: 1rem; }
  .person { justify-self: start; }
  .services { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; gap: 1.6rem; }
  .nav-links { gap: 1.2rem; font-size: 0.9rem; }
}
@media (max-width: 560px) {
  .service { padding: 1rem 0 1rem 1rem; }
  /* one line per item instead of separators that would wrap onto their own line */
  footer .meta { flex-direction: column; }
  footer .meta > span + span::before { content: none; }
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .nav-links { gap: 1rem; font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- 404 ---------- */
body.notfound {
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 2rem;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  text-align: center;
}
.notfound .code { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--accent); }
.notfound h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: 0.8rem 0 0.6rem; }
.notfound p { color: var(--text-2); }
.notfound p + p { margin-top: 0.8rem; }
.notfound a { color: var(--text); border-bottom: 1px solid var(--accent); }
.notfound a:hover { color: var(--accent); }
