/* ───────── Tokens ───────── */
:root {
  --bg: #050505;
  --surface: #0c0c0e;
  --surface-2: #121215;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f4f4f2;
  --muted: #8b8b90;
  --dim: #707076;
  --rec: #ff3b30;
  --display: "Michroma", "Manrope", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, 0, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--text); color: var(--bg); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 4px; }

/* ───────── Shared ───────── */
.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.h2, .h3, .hero-title, .cta-title, .svc h3, .step h3 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.15;
  text-transform: uppercase;
}
.h2 { font-size: clamp(26px, 4vw, 54px); overflow-wrap: break-word; }
.h3 { font-size: clamp(20px, 2.4vw, 30px); }
.dim { color: var(--dim); }
.rec {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 12px var(--rec);
  display: inline-block;
  animation: blink 1.4s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--line-strong);
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s;
  white-space: nowrap;
}
.pill-light { background: var(--text); color: var(--bg); border-color: var(--text); }
.pill-light:hover { background: transparent; color: var(--text); }
.pill-xl { padding: 22px 40px; font-size: clamp(16px, 2vw, 22px); }

.line { display: block; overflow: hidden; padding-bottom: .08em; }
.line > span { display: inline-block; }

/* Film grain */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); } 40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 5%); } 80% { transform: translate(6%, 2%); } 100% { transform: translate(0, 0); }
}

.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 101;
  background: var(--text); transform-origin: 0 50%; transform: scaleX(0);
}

/* ───────── Loader ───────── */
.loader { display: none; }
.anim .loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.loader-mark { width: min(440px, 70vw); color: var(--text); }
.loader-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.loader-count { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .2em; }

/* ───────── Nav ───────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
  transition: transform .5s var(--ease), background .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(5, 5, 5, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--line); }
.nav.hidden { transform: translateY(-100%); }
.nav:focus-within { transform: none; }
.nav-logo svg { width: 128px; height: 22px; display: block; color: var(--text); }
.nav-links { display: flex; gap: 36px; font-size: 14px; color: var(--muted); }
.nav-links a { position: relative; transition: color .3s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--text); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-logo svg { width: 104px; }
  .nav .pill { padding: 10px 16px; font-size: 13px; }
}

/* ───────── Hero ───────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 120px var(--gutter) 48px;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 75%);
}
.hero-beam {
  position: absolute; left: 50%; top: -30%; width: 900px; height: 900px; translate: -50% 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .09), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; width: 100%; }
.hero-label { margin-bottom: 28px; }
.hero-title { font-size: clamp(34px, 7.4vw, 112px); line-height: 1.04; }
.hero-wordmark {
  display: block; width: 100%; aspect-ratio: 602 / 92; height: auto;
  margin: clamp(40px, 7vw, 90px) 0 clamp(28px, 4vw, 48px);
  color: var(--text);
}
.hero-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; border-top: 1px solid var(--line); padding-top: 28px; }
.hero-copy { max-width: 520px; color: var(--muted); font-size: clamp(15px, 1.5vw, 18px); }
.scroll-cue { width: 26px; height: 42px; border: 1px solid var(--line-strong); border-radius: 20px; position: relative; flex-shrink: 0; }
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 2px; height: 8px; border-radius: 2px;
  background: var(--text); translate: -50% 0; animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }

/* ───────── Marquee ───────── */
.marquee {
  border-block: 1px solid var(--line);
  padding: 26px 0; overflow: hidden; white-space: nowrap;
}
.marquee-track { display: inline-flex; align-items: center; will-change: transform; }
.marquee-track > * { margin-right: 48px; }
.marquee span { font-family: var(--display); font-size: clamp(22px, 3.4vw, 44px); text-transform: uppercase; }
.marquee span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px var(--muted); }
.marquee i { font-style: normal; color: var(--dim); font-size: 18px; }

/* ───────── Manifesto ───────── */
.manifesto {
  min-height: 100svh;
  padding: 100px var(--gutter);
  display: flex; flex-direction: column; justify-content: center; gap: 40px;
}
.manifesto-text {
  font-family: var(--display);
  font-size: clamp(22px, 3.6vw, 52px);
  line-height: 1.3;
  text-transform: uppercase;
  max-width: 1300px;
}
.manifesto-text .w { display: inline-block; }

/* ───────── Services ───────── */
.services { padding: 120px 0; }
.services-head { padding: 0 var(--gutter); display: flex; flex-direction: column; gap: 24px; margin-bottom: 64px; }
/* Default (no JS, reduced motion, short screens): a wrapping grid. JS adds .is-horizontal on desktop. */
.services-track {
  display: grid; gap: 20px; padding: 0 var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.svc {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  display: flex; flex-direction: column;
  transition: border-color .4s, background .4s;
}
.svc:hover { border-color: var(--line-strong); background: var(--surface-2); }
.svc-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.svc h3 { font-size: clamp(18px, 1.7vw, 22px); margin: auto 0 14px; }
.svc p { color: var(--muted); font-size: 15px; }

/* Service mini-visuals */
.svc-visual { height: 170px; margin: 28px 0 40px; display: flex; gap: 6px; align-items: center; }
.svc-visual i { display: block; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); }
.v-long i { height: 44px; flex: 1; }
.v-long i:nth-child(2) { flex: 2.4; background: var(--text); }
.v-long i:nth-child(4) { flex: 1.6; }
.v-short { justify-content: center; gap: 12px; }
.v-short i { width: 64px; height: 120px; border-radius: 12px; }
.v-short i:nth-child(2) { height: 160px; background: var(--text); }
.v-motion { position: relative; }
.v-motion i { position: absolute; border-radius: 50%; }
.v-motion i:nth-child(1) { width: 120px; height: 120px; left: 10%; }
.v-motion i:nth-child(2) { width: 80px; height: 80px; left: 40%; background: var(--text); animation: orbit 6s linear infinite; }
.v-motion i:nth-child(3) { width: 40px; height: 40px; left: 70%; }
@keyframes orbit { 50% { transform: translateX(60px) scale(.7); } }
.v-ads { align-items: flex-end; }
.v-ads i { flex: 1; }
.v-ads i:nth-child(1) { height: 30%; } .v-ads i:nth-child(2) { height: 45%; } .v-ads i:nth-child(3) { height: 38%; }
.v-ads i:nth-child(4) { height: 60%; } .v-ads i:nth-child(5) { height: 72%; } .v-ads i:nth-child(6) { height: 66%; }
.v-ads i:nth-child(7) { height: 95%; background: var(--text); }
.v-social { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); gap: 8px; align-items: stretch; }
.v-social i { border-radius: 8px; }
.v-social i:nth-child(5) { background: var(--text); }
.v-growth svg { width: 100%; height: 100%; overflow: visible; }
.v-growth path { fill: none; stroke: var(--text); stroke-width: 2; vector-effect: non-scaling-stroke; }

.services.is-horizontal { overflow: hidden; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 96px 0 48px; }
.services.is-horizontal .services-head { margin-bottom: 48px; }
.services.is-horizontal .services-track { display: flex; }
.services.is-horizontal .svc { flex: 0 0 clamp(300px, 34vw, 460px); min-height: clamp(360px, 54svh, 520px); }
.services.is-horizontal .svc-visual { height: clamp(90px, 16svh, 170px); }
.services.is-horizontal .services-track::after { content: ""; flex: 0 0 calc(var(--gutter) - 20px); }

/* ───────── Frame ───────── */
.frame-section { height: 100svh; display: grid; place-items: center; padding: 0 var(--gutter); }
.frame {
  position: relative; width: 100%; height: 86svh;
  border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
}
.frame-footage {
  position: absolute; inset: -10%;
  background:
    radial-gradient(ellipse 40% 50% at 30% 40%, rgba(255, 255, 255, .14), transparent 70%),
    radial-gradient(ellipse 50% 40% at 70% 70%, rgba(255, 255, 255, .08), transparent 70%),
    linear-gradient(160deg, #1b1b1f, #050505 60%);
  animation: drift 14s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(4%, -3%) scale(1.08); } }
.vf { position: absolute; inset: clamp(16px, 3vw, 36px); font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.vf-c { position: absolute; width: 28px; height: 28px; border-color: var(--text); border-style: solid; border-width: 0; }
.vf-c.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.vf-c.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.vf-c.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.vf-c.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.vf-top, .vf-bot { position: absolute; left: 44px; right: 44px; display: flex; justify-content: space-between; }
.vf-top { top: 6px; } .vf-bot { bottom: 6px; }
.vf-top > span:first-child { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.frame-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center; padding: 24px; }
@media (max-width: 600px) { .vf-bot span:last-child { display: none; } }

/* ───────── Process ───────── */
.process { padding: 160px var(--gutter) 120px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 64px; }
.process-head { display: flex; flex-direction: column; gap: 24px; align-self: start; position: sticky; top: 140px; }
.steps { position: relative; padding-left: 40px; }
.steps-line { position: absolute; left: 0; top: 0; bottom: 0; width: 1px; background: var(--line); }
.steps-line span { position: absolute; inset: 0; background: var(--text); transform-origin: top; transform: scaleY(0); }
.anim .steps-line span { transform: scaleY(0); }
html:not(.anim) .steps-line span { transform: scaleY(1); }
.step { display: flex; gap: 28px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.step:first-child { padding-top: 0; }
.step-num { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 6px; }
.step h3 { font-size: clamp(20px, 2vw, 28px); margin-bottom: 10px; }
.step p { color: var(--muted); max-width: 460px; }
@media (max-width: 860px) {
  .process { grid-template-columns: 1fr; gap: 48px; padding-top: 120px; }
  .process-head { position: static; }
  .steps { padding-left: 24px; }
}

/* ───────── Toolkit ───────── */
.toolkit { padding: 100px var(--gutter); display: flex; flex-direction: column; gap: 36px; }
.tools { display: flex; flex-wrap: wrap; gap: 12px; }
.tools li {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 12px 22px; font-size: 15px; color: #cfcfd4;
  transition: background .3s, color .3s;
}
.tools li:hover { background: var(--text); color: var(--bg); }

/* ───────── CTA ───────── */
.cta {
  min-height: 90svh; padding: 140px var(--gutter);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 32px;
  background: radial-gradient(ellipse 50% 40% at 50% 60%, rgba(255, 255, 255, .06), transparent 70%);
}
.cta-title { font-size: clamp(32px, 7vw, 104px); line-height: 1.05; }
.cta-copy { color: var(--muted); max-width: 480px; }
.magnet { will-change: transform; }
@media (max-width: 480px) { .pill-xl { padding: 18px 26px; font-size: 15px; } }

/* ───────── Footer ───────── */
.footer { padding: 80px var(--gutter) 40px; border-top: 1px solid var(--line); }
.footer-mark { width: 100%; aspect-ratio: 602 / 92; height: auto; color: var(--surface-2); display: block; margin-bottom: 48px; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }
.legal { font-size: 13px; line-height: 1.7; }

/* ───────── Pre-animation states (only when JS animations are active) ───────── */
.anim .hero-title .line > span,
.anim .cta-title .line > span { transform: translateY(110%); }
.anim .hero-label, .anim .hero-foot { opacity: 0; }
.anim .hero-wordmark { clip-path: inset(0 100% 0 0); }
.anim [data-reveal] { opacity: 0; transform: translateY(40px); }
.anim .v-growth path { stroke-dasharray: 1; stroke-dashoffset: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  .grain { display: none; }
}
