/* ============================================================
   LA MEDIA — cinematic monochrome
   Palette: void black · anthracite panels · silver · chalk white
   Type: Anton (display) · Archivo (body) · JetBrains Mono (utility)
   ============================================================ */

/* ---------- Self-hosted fonts (no Google servers → GDPR-safe, faster) ---------- */
@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/anton-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/archivo.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/jetbrains-mono.woff2') format('woff2');
}

:root {
  --void: #050506;
  --ink: #0a0a0b;
  --panel: #111113;
  --panel-2: #17171a;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --silver: #9a9a97;
  --silver-dim: #7d7d7b; /* ≥4.5:1 on void — WCAG AA for the small mono labels */
  --chalk: #f4f4f2;

  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --edge: clamp(1.25rem, 4vw, 4rem);
  --maxw: 1360px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(90% 55% at 50% -10%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(255, 255, 255, 0.025), transparent 55%),
    var(--void);
  background-attachment: fixed;
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--chalk); color: var(--void); }

/* ---------- Ambient silver beams (behind content) ---------- */
.beams {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
  filter: blur(12px);
  opacity: 0.74;
}

/* ---------- Film grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}
/* Animate background-position (cheap) instead of transforming a huge fixed layer */
@keyframes grain {
  0% { background-position: 0 0; }
  25% { background-position: -30px 20px; }
  50% { background-position: 20px -30px; }
  75% { background-position: -20px -10px; }
  100% { background-position: 30px 10px; }
}

/* ---------- Viewfinder overlay ---------- */
/* The hero video carries its own camcorder UI, so this frame fades in only past the hero.
   Defaults to visible: without JS it simply stays on. */
.viewfinder { position: fixed; inset: 0; z-index: 8; pointer-events: none; transition: opacity .45s var(--ease); }
.vf {
  position: absolute; width: 26px; height: 26px;
  border: 1.5px solid var(--line-strong);
}
.vf--tl { top: var(--edge); left: var(--edge); border-right: 0; border-bottom: 0; }
.vf--tr { top: var(--edge); right: var(--edge); border-left: 0; border-bottom: 0; }
.vf--bl { bottom: var(--edge); left: var(--edge); border-right: 0; border-top: 0; }
.vf--br { bottom: var(--edge); right: var(--edge); border-left: 0; border-top: 0; }
.vf-rec {
  position: absolute; bottom: var(--edge); left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.25em;
  color: var(--silver-dim); display: flex; align-items: center; gap: 0.5em;
}
.vf-rec i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--chalk);
  animation: blink 1.6s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }

/* ---------- Reusable ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--silver);
  display: flex; align-items: center; gap: 0.4em 0.6em; flex-wrap: wrap;
  margin: 0 0 1.4rem;
}
.eyebrow .idx {
  color: var(--chalk);
  border: 1px solid var(--line);
  padding: 0.15em 0.5em;
  border-radius: 2px;
}
.eyebrow__sep { color: var(--silver-dim); }

.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.95em 1.5em; border-radius: 2px;
  border: 1px solid var(--line-strong);
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
  cursor: pointer;
}
.btn--solid { background: var(--chalk); color: var(--void); border-color: var(--chalk); }
.btn--solid:hover { background: transparent; color: var(--chalk); }
.btn--line { background: transparent; color: var(--chalk); }
.btn--line:hover { background: var(--chalk); color: var(--void); border-color: var(--chalk); }
.btn--full { width: 100%; justify-content: center; }
.btn__wa { width: 1.05em; height: 1.05em; fill: currentColor; }


/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem var(--edge);
  background: linear-gradient(to bottom, rgba(5,5,6,0.96) 40%, rgba(5,5,6,0));
}
.nav__brand { display: flex; align-items: baseline; gap: 0.35em; font-family: var(--font-display); letter-spacing: 0.02em; }
.nav__mark { font-size: 1.5rem; }
.nav__word { font-size: 1.5rem; color: var(--silver); }
.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--silver); position: relative; padding: 0.3em 0;
  transition: color .3s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--chalk);
  transition: width .4s var(--ease);
}
.nav__links a:hover { color: var(--chalk); }
.nav__links a:hover::after { width: 100%; }
.nav__links a.active { color: var(--chalk); font-weight: 700; }
.nav__links a.active::after { width: 100%; }

/* ---------- Mobile menu toggle (hamburger) ---------- */
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0; margin: -8px -10px -8px 0;
  background: none; border: 0; cursor: pointer;
  position: relative; z-index: 21;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav__toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--chalk);
  transition: transform .38s var(--ease), opacity .2s var(--ease);
}
/* fold the three bars into an X (top+bottom rotate, middle fades) */
.nav__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Mobile menu overlay ---------- */
.mobile-menu {
  display: none;
  position: fixed; inset: 0; z-index: 15;
  background:
    radial-gradient(100% 60% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 60%),
    var(--void);
  flex-direction: column; justify-content: center;
  padding: 6rem var(--edge) 3rem;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .4s var(--ease), transform .5s var(--ease), visibility .4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu__nav { display: flex; flex-direction: column; }
.mobile-menu__nav a {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(2.1rem, 11vw, 3.4rem); line-height: 1.05; letter-spacing: -0.01em;
  color: var(--chalk); display: flex; align-items: baseline; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), color .3s var(--ease);
}
.mobile-menu.open .mobile-menu__nav a { opacity: 1; transform: none; }
.mobile-menu.open .mobile-menu__nav a:nth-child(1) { transition-delay: .10s; }
.mobile-menu.open .mobile-menu__nav a:nth-child(2) { transition-delay: .16s; }
.mobile-menu.open .mobile-menu__nav a:nth-child(3) { transition-delay: .22s; }
.mobile-menu.open .mobile-menu__nav a:nth-child(4) { transition-delay: .28s; }
.mobile-menu.open .mobile-menu__nav a:nth-child(5) { transition-delay: .34s; }
.mobile-menu__nav a:active { color: var(--silver); }
.mm-idx { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--silver-dim); }
.mobile-menu__foot { margin-top: 2.4rem; display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-start; }
.mobile-menu__mail { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; color: var(--silver); }
body.menu-open { overflow: hidden; }

/* ---------- HERO video background ---------- */
/* Breaks out of the hero's max-width so it spans the full viewport. */
.hero__video,
.hero__scrim {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100vw; height: 100%; z-index: 0; pointer-events: none;
}
.hero__video {
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(0.78);
}
/* Keeps the huge type readable: darker on the left where the copy sits. */
.hero__scrim {
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.8) 0%, rgba(5, 5, 6, 0.5) 48%, rgba(5, 5, 6, 0.28) 100%),
    linear-gradient(to top, rgba(5, 5, 6, 0.88) 0%, rgba(5, 5, 6, 0.15) 38%, transparent 60%);
}
/* Content sits above the video layer */
.hero__eyebrow, .hero__title, .hero__foot, .hero__scroll { position: relative; z-index: 1; }

/* ---------- HERO ---------- */
.hero {
  min-height: 100svh;
  padding: 8rem var(--edge) 2.5rem;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
}
.hero__eyebrow { justify-content: flex-start; }
.hero__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.9rem, 9.4vw, 8.5rem);
  line-height: 0.92; letter-spacing: -0.01em;
  margin: 0.25em 0 0; text-transform: uppercase;
}
.hero__title .line { display: block; overflow: hidden; padding-top: 0.22em; margin-top: 0; }
.hero__title .line--out { color: var(--silver); }
.hero__title .line > span { display: inline-block; }
.hero__foot {
  display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: flex-end;
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding-top: 1.8rem; border-top: 1px solid var(--line);
}
.hero__lead { flex: 1 1 320px; max-width: 44ch; color: var(--silver); margin: 0; font-size: 1.05rem; }
.hero__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero__scroll {
  position: absolute; right: var(--edge); bottom: 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.2em;
  color: var(--silver-dim); text-transform: uppercase;
}
.hero__scroll-line { width: 1px; height: 46px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll-line i { position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--chalk); animation: scrolldot 2.2s var(--ease) infinite; }
@keyframes scrolldot { 0% { top: -50%; } 100% { top: 100%; } }

/* ---------- Section base ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(5rem, 11vw, 10rem) var(--edge);
  border-top: 1px solid var(--line);
}
.section__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.4rem, 7vw, 5.5rem); line-height: 0.92; margin: 0; letter-spacing: -0.01em;
}

/* ---------- PAIN ---------- */
.pain__title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.6rem, 9vw, 7rem); line-height: 0.9; margin: 0 0 2rem; letter-spacing: -0.01em;
}
.pain__list { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.pain__list li {
  display: flex; align-items: baseline; gap: 1rem;
  font-size: clamp(1.3rem, 3.2vw, 2rem); line-height: 1.35;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line); color: var(--chalk);
}
.pain__list .tick { font-family: var(--font-mono); color: var(--silver-dim); font-size: 0.9em; }
.pain__pay { font-family: var(--font-mono); color: var(--silver); letter-spacing: 0.08em; margin-top: 2rem; text-transform: uppercase; font-size: 0.85rem; }

/* ---------- SERVICES ---------- */
.services__list { list-style: none; margin: 0; padding: 0; }
.svc {
  display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 2rem; align-items: center;
  padding: clamp(1.6rem, 3.5vw, 2.6rem) 0; border-top: 1px solid var(--line);
  transition: padding-left .5s var(--ease);
}
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc__no { font-family: var(--font-mono); font-size: 0.78rem; color: var(--silver-dim); letter-spacing: 0.1em; }
.svc__name {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.6rem, 4.5vw, 3rem); line-height: 1; margin: 0 0 0.4rem;
  transition: color .4s var(--ease);
}
.svc__desc { color: var(--silver); margin: 0; max-width: 52ch; }
.svc__meta { font-family: var(--font-mono); font-size: 0.72rem; color: var(--silver-dim); letter-spacing: 0.12em; text-transform: uppercase; text-align: right; white-space: nowrap; }
.svc:hover { padding-left: 1.2rem; }
.svc:hover .svc__name { color: var(--chalk); }
.svc:hover .svc__no { color: var(--chalk); }

/* ---------- WHY ---------- */
.why__title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 4.8rem); line-height: 0.98; margin: 0 0 clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.01em;
  color: var(--silver);
}
/* emphasised words: brighter + an underline that draws in on reveal */
.why__title .uline { color: var(--chalk); position: relative; display: inline-block; }
.why__title .uline::after {
  content: ""; position: absolute; left: 0; bottom: -0.14em; height: 0.08em; width: 100%;
  background: var(--chalk); border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.7s var(--ease) 0.35s;
}
.why__title.in .uline::after { transform: scaleX(1); }
.why__title.in .uline--2::after { transition-delay: 0.62s; }
.why__grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.why__text p { margin: 0 0 1.2rem; color: var(--silver); max-width: 48ch; }
.why__text strong { color: var(--chalk); font-weight: 700; }
.why__text em { color: var(--chalk); font-style: italic; }
.why__video { margin: 0; }
.videoframe {
  position: relative; aspect-ratio: 4 / 5; border: 1px solid var(--line-strong);
  background: radial-gradient(120% 80% at 50% 30%, var(--panel-2), var(--ink) 70%);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.4rem;
  overflow: hidden;
}
.videoframe::before, .videoframe::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; height: 1px; background: var(--line);
}
.videoframe::before { top: 1rem; } .videoframe::after { bottom: 1rem; }
.videoframe__label { position: absolute; top: 1.3rem; left: 1.4rem; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.2em; color: var(--silver); }
.videoframe__tc { position: absolute; bottom: 1.3rem; right: 1.4rem; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.15em; color: var(--silver-dim); }
.videoframe__play {
  width: 74px; height: 74px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  background: rgba(0,0,0,0.2); color: var(--chalk); display: grid; place-items: center; cursor: pointer;
  transition: transform .4s var(--ease), background .4s var(--ease), border-color .4s var(--ease);
}
.videoframe__play svg { width: 26px; height: 26px; fill: currentColor; margin-left: 3px; }
.videoframe__play:hover { transform: scale(1.08); background: var(--chalk); color: var(--void); border-color: var(--chalk); }
.videoframe__note { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--silver); }

/* ---------- WORK ---------- */
/* Editorial grid: the portrait reel spans both rows on the left,
   the two landscape videos stack on the right in their native 16:9. */
.work__grid { display: grid; grid-template-columns: 2fr 3fr; gap: 1.5rem; }
.proj { }
.proj--portrait { grid-row: 1 / 3; display: flex; flex-direction: column; }
.proj--portrait .proj__thumb { flex: 1; min-height: 0; aspect-ratio: auto; }
.proj__thumb {
  aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--panel);
  display: grid; place-items: center; overflow: hidden; position: relative;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.proj__thumb::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,0.02) 14px 15px);
}
.proj:hover .proj__thumb { border-color: var(--line-strong); background: var(--panel-2); }
.proj__meta { padding: 1.1rem 0.1rem 0; display: flex; flex-direction: column; gap: 0.25rem; }
.proj__meta h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.05rem; margin: 0; }
.proj__meta p { margin: 0; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--silver-dim); }

/* video project card */
.proj__thumb--video { display: block; width: 100%; position: relative; padding: 0; overflow: hidden; cursor: pointer; }
.proj__thumb--video::after { display: none; }
.proj__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  filter: grayscale(1) contrast(1.05) brightness(0.82);
  transition: filter .6s var(--ease), transform .7s var(--ease);
}
.proj__play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.proj__play svg {
  width: 54px; height: 54px; fill: rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.55));
  transition: transform .4s var(--ease);
}
.proj--video:hover .proj__img { filter: grayscale(0.1) contrast(1.05) brightness(1); transform: scale(1.04); }
.proj--video:hover .proj__thumb--video { border-color: var(--line-strong); }
.proj--video:hover .proj__play svg { transform: scale(1.12); }
.proj__thumb--video:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }

/* video lightbox */
.vbox {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: var(--edge);
  background: rgba(3, 3, 4, 0.92);
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.vbox.open { opacity: 1; visibility: visible; }
.vbox__inner { width: min(1040px, 92vw); }
.vbox__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000;
  border: 1px solid var(--line-strong); border-radius: 4px; overflow: hidden;
}
.vbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vbox__close {
  position: absolute; top: var(--edge); right: var(--edge);
  width: 44px; height: 44px; background: none; border: 0; color: var(--chalk);
  font-size: 2.2rem; line-height: 1; cursor: pointer; transition: transform .3s var(--ease);
}
.vbox__close:hover { transform: scale(1.15); }
/* consent notice shown instead of the embed when cookies were declined */
.vbox__notice {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem; text-align: center; padding: 2rem;
}
.vbox__notice p {
  font-family: var(--font-mono); font-size: 0.85rem; letter-spacing: 0.04em; line-height: 1.7;
  color: var(--silver); max-width: 42ch; margin: 0;
}
.vbox__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }

/* ---------- PROCESS FLOW (snake with arrow connectors) ---------- */
.flow { position: relative; max-width: 940px; margin: 1.5rem auto 0; }
.flow__lines {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; z-index: 1; pointer-events: none;
}
.flow__lines .flow__conn {
  fill: none; stroke: rgba(255, 255, 255, 0.32); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 1s var(--ease);
}
.flow__lines .flow__conn.drawn { stroke-dashoffset: 0; }
#flowArrow path { fill: none; stroke: var(--chalk); stroke-width: 1.4; }

.flow__step { position: relative; z-index: 2; width: min(62%, 440px); }
.flow__step.flow--left { margin-right: auto; }
.flow__step.flow--right { margin-left: auto; }
.flow__step + .flow__step { margin-top: 92px; }

.flow__box {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--ink));
  border-radius: 10px;
  padding: clamp(1.2rem, 2.5vw, 1.6rem) clamp(1.3rem, 3vw, 1.9rem);
  transition: border-color .6s var(--ease), box-shadow .7s var(--ease);
}
/* boxes light up (monochrome glow) once they scroll into view */
.flow__step.in .flow__box {
  border-color: var(--line-strong);
  box-shadow: 0 0 55px -6px rgba(255, 255, 255, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: flowGlow 4.6s ease-in-out infinite;
}
.flow__box:hover { border-color: var(--chalk); box-shadow: 0 0 85px -2px rgba(255, 255, 255, 0.3); }
@keyframes flowGlow {
  0%, 100% { box-shadow: 0 0 42px -8px rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.04) inset; }
  50%      { box-shadow: 0 0 70px -3px rgba(255, 255, 255, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.06) inset; }
}
.flow__no { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--silver-dim); }
.flow__box h3 {
  font-family: var(--font-display); text-transform: uppercase; font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2.2rem); line-height: 1; margin: 0.35rem 0 0.55rem; letter-spacing: -0.01em;
}
.flow__box p { margin: 0; color: var(--silver); max-width: 42ch; }

/* reveal: boxes slide in from their side */
.flow__step[data-reveal] { opacity: 0; }
.flow__step.flow--left[data-reveal] { transform: translateX(-40px); }
.flow__step.flow--right[data-reveal] { transform: translateX(40px); }
.flow__step[data-reveal].in { opacity: 1; transform: none; }

@media (max-width: 680px) {
  .flow__step { width: 100%; }
  .flow__step.flow--left, .flow__step.flow--right { margin-left: 0; margin-right: 0; }
  .flow__step + .flow__step { margin-top: 66px; }
}

/* ---------- CONTACT ---------- */
.contact__title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3rem, 12vw, 9rem); line-height: 0.88; margin: 0 0 1rem; letter-spacing: -0.01em;
}
.contact__lead { color: var(--silver); max-width: 40ch; margin: 0 0 clamp(2.5rem, 5vw, 4rem); }
.contact__grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.cform { display: flex; flex-direction: column; gap: 1.1rem; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field__label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver); }
.field__label i { color: var(--silver-dim); font-style: normal; text-transform: none; letter-spacing: 0; }
.field input, .field textarea {
  background: var(--panel); border: 1px solid var(--line); color: var(--chalk);
  font-family: var(--font-body); font-size: 1rem; padding: 0.95rem 1rem; border-radius: 2px; resize: vertical;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--silver-dim); }
/* Keep the outline: the global :focus-visible ring must stay reachable for keyboard users. */
.field input:focus, .field textarea:focus { border-color: var(--chalk); background: var(--panel-2); }
.cform__hint { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; color: var(--silver); min-height: 1.2em; margin: 0.2rem 0 0; transition: color .3s var(--ease); }
.cform__hint[data-state="ok"] { color: var(--chalk); }
.cform__hint[data-state="ok"]::before { content: "✓ "; }
.cform__hint[data-state="error"] { color: var(--chalk); }
.cform__hint[data-state="error"]::before { content: "⚠ "; color: var(--silver); }
/* Honeypot — visually removed but present for bots (not display:none on purpose) */
.cform__hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cform__privacy { font-family: var(--font-mono); font-size: 0.66rem; line-height: 1.55; letter-spacing: 0.02em; color: var(--silver-dim); margin: 0.9rem 0 0; }
.cform__privacy a { color: var(--silver); text-decoration: underline; text-underline-offset: 2px; transition: color .3s var(--ease); }
.cform__privacy a:hover { color: var(--chalk); }
.contact__side { display: flex; flex-direction: column; gap: 1rem; }
.contact__card {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 1.4rem; border: 1px solid var(--line);
  border-radius: 2px; transition: border-color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease);
}
.contact__card:hover { border-color: var(--line-strong); background: var(--panel); transform: translateY(-2px); }
.contact__k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--silver-dim); }
.contact__v { font-family: var(--font-display); font-size: 1.6rem; text-transform: uppercase; }
.contact__sub { font-size: 0.85rem; color: var(--silver); }

/* ---------- Einzugsgebiet map (self-drawn, monochrome) ---------- */
.geo { position: relative; cursor: pointer; user-select: none; perspective: 900px; outline: none; }
.geo__inner {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(180deg, var(--panel), var(--ink));
  height: 118px;
  transition: height .55s var(--ease), border-color .4s var(--ease), transform .25s ease-out, box-shadow .5s var(--ease);
  transform-style: preserve-3d;
}
.geo:hover .geo__inner { border-color: var(--line-strong); box-shadow: 0 0 45px -10px rgba(255, 255, 255, 0.14); }
.geo:focus-visible .geo__inner { outline: 2px solid var(--chalk); outline-offset: 3px; }
.geo.open .geo__inner { height: 250px; }

.geo__map { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s var(--ease); }
.geo.open .geo__map { opacity: 1; }
.geo__radius { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; stroke-dasharray: 4 5; opacity: 0; transition: opacity .6s var(--ease) .2s; }
.geo__radius--in { stroke: rgba(255, 255, 255, 0.09); stroke-dasharray: 3 6; }
.geo.open .geo__radius { opacity: 1; }
.geo__route {
  stroke: rgba(255, 255, 255, 0.3); stroke-width: 1.2;
  stroke-dasharray: 130; stroke-dashoffset: 130;
  transition: stroke-dashoffset .85s var(--ease) .15s;
}
.geo.open .geo__route { stroke-dashoffset: 0; }
.geo__route--2 { transition-delay: .3s; }
.geo__city { fill: none; stroke: var(--silver); stroke-width: 1.5; opacity: 0; transition: opacity .4s var(--ease) .55s; }
.geo.open .geo__city { opacity: 1; }
.geo__label {
  font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px; fill: var(--silver);
  opacity: 0; transition: opacity .4s var(--ease) .65s;
}
.geo.open .geo__label { opacity: 1; }
.geo__home { fill: var(--chalk); opacity: 0; transition: opacity .3s var(--ease) .1s; }
.geo.open .geo__home { opacity: 1; }
.geo__pulse { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; opacity: 0; transform-origin: 150px 118px; }
.geo.open .geo__pulse { animation: geoPulse 2.6s ease-out .4s infinite; }
@keyframes geoPulse {
  0%   { transform: scale(0.4); opacity: 0.6; }
  100% { transform: scale(2.3); opacity: 0; }
}

.geo__scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 8, 9, 0.94) 0%, rgba(8, 8, 9, 0.25) 45%, transparent 72%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.geo.open .geo__scrim { opacity: 1; }

.geo__body { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 1rem 1.1rem; }
.geo__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.geo__icon { width: 17px; height: 17px; fill: none; stroke: var(--silver); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s var(--ease); flex: none; }
.geo:hover .geo__icon { stroke: var(--chalk); }
.geo__badge {
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--silver-dim); border: 1px solid var(--line); border-radius: 999px; padding: 0.3em 0.65em; white-space: nowrap;
}
.geo__place {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: 1.5rem; line-height: 1; margin: 0; color: var(--chalk);
  transition: transform .35s var(--ease);
}
.geo:hover .geo__place { transform: translateX(3px); }
.geo__coords {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.05em; color: var(--silver);
  margin: 0; max-height: 0; opacity: 0; overflow: hidden;
  transition: opacity .4s var(--ease) .2s, max-height .45s var(--ease), margin .45s var(--ease);
}
.geo.open .geo__coords { opacity: 1; max-height: 2.4em; margin: 0.4rem 0 0; }
.geo__rule {
  display: block; height: 1px; margin-top: 0.6rem;
  background: linear-gradient(90deg, var(--chalk), transparent);
  transform: scaleX(0.22); transform-origin: left;
  transition: transform .45s var(--ease);
}
.geo:hover .geo__rule, .geo.open .geo__rule { transform: scaleX(1); }
.geo__hint {
  position: absolute; left: 50%; bottom: -1.35rem; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.56rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--silver-dim); white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .3s var(--ease); margin: 0;
}
.geo:hover .geo__hint { opacity: 1; }
.geo.open .geo__hint { opacity: 0; }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) var(--edge) 2rem; max-width: var(--maxw); margin: 0 auto; }
.footer__top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: clamp(3rem, 6vw, 5rem); }
.footer__k { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--silver-dim); margin: 0 0 0.8rem; }
.footer__col p { margin: 0; color: var(--silver); line-height: 1.8; }
.footer__col a { transition: color .3s var(--ease); }
.footer__col a:hover { color: var(--chalk); }
.footer__wordmark {
  font-family: var(--font-display); text-transform: uppercase; text-align: center;
  font-size: clamp(4rem, 22vw, 20rem); line-height: 0.8; letter-spacing: 0.01em;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong);
  margin: 0 0 1.5rem; user-select: none; pointer-events: none;
}
.footer__legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--silver-dim); }

/* ============================================================
   Reveal animation
   ============================================================ */
/* Progressive enhancement: only hide for reveal when JS is active */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .hero__title .line[data-reveal] { transform: none; opacity: 1; }
.js .hero__title .line > span { transform: translateY(110%); transition: transform 1s var(--ease); display: inline-block; }
.js .hero__title .line.in > span { transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  /* Mobile performance: fixed background attachment repaints on every scroll frame (iOS),
     the animated grain + heavy canvas blur cost GPU — all three get cheaper here. */
  body { background-attachment: scroll; }
  .grain { animation: none; }
  .beams { filter: blur(9px); }
  /* Portrait crop of the 16:9 hero video: pull the view toward the car (right of centre). */
  .hero__video { object-position: 68% center; }
  /* The heading wraps here, and the 0.98 leading let the underline fall into the next
     line's word ("Guter" hitting "Zufall"). More leading + a tighter underline fixes it. */
  .why__title { line-height: 1.34; }
  .why__title .uline::after { bottom: -0.07em; }
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .mobile-menu { display: flex; }
  .why__grid { grid-template-columns: 1fr; }
  .why__video { max-width: 26rem; }
  .contact__grid { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 3.5rem 1fr; }
  .svc__meta { display: none; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  /* Comfortable tap targets: these links are only ~17px tall inline. */
  .footer__col a,
  .cform__privacy a,
  .legal__back { display: inline-block; padding: 0.6rem 0; }
  .footer__col p { line-height: 1.4; }
}
@media (max-width: 560px) {
  .hero { padding-top: 6.5rem; }
  .hero__foot { flex-direction: column; align-items: flex-start; gap: 1.6rem; margin-top: 2rem; }
  .hero__actions { width: 100%; flex-direction: column; gap: 0.7rem; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__scroll { display: none; }
  .cform__row { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: 1fr; }
  .proj--portrait { grid-row: auto; display: block; }
  .proj--portrait .proj__thumb { flex: none; aspect-ratio: 3 / 4; }
  .footer__top { grid-template-columns: 1fr; }
  .vf-rec { display: none; }
}

/* ============================================================
   Legal pages (Impressum / Datenschutz)
   ============================================================ */
.legal-page { background: var(--void); }
.legal { max-width: 820px; margin: 0 auto; padding: 8.5rem var(--edge) 6rem; }
.legal__back { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--silver); transition: color .3s var(--ease); }
.legal__back:hover { color: var(--chalk); }
.legal h1 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1; margin: 0 0 2.4rem; letter-spacing: -0.01em;
}
.legal h2 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(1.35rem, 3.4vw, 1.9rem); line-height: 1.05; margin: 3rem 0 1rem; letter-spacing: -0.01em;
  padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.legal h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.12rem; margin: 2rem 0 0.5rem; color: var(--chalk); }
.legal h4 { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--silver); margin: 1.4rem 0 0.4rem; }
.legal p { color: var(--silver); margin: 0 0 1rem; line-height: 1.7; font-size: 0.97rem; }
.legal ul { color: var(--silver); margin: 0 0 1rem; padding-left: 1.2rem; line-height: 1.7; font-size: 0.97rem; }
.legal li { margin-bottom: 0.5rem; }
.legal a { color: var(--chalk); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.legal a:hover { color: var(--silver); }

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero__title .line > span { transform: none !important; }
}

/* Keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--chalk); outline-offset: 3px;
}
