/* ============================================================
   TEKNO LABS — INDEX V2 "MISSION CONTROL"
   Same brand. Way more motion.
   ============================================================ */

/* ============== TOKENS ============== */
:root, [data-theme="dark"] {
  --bg:        #0A0A0A;
  --bg-2:      #111111;
  --surface:   #161616;
  --surface-2: #1C1C1C;
  --line:      #242424;
  --line-2:    #2E2E2E;
  --text:      #F5F5F5;
  --text-dim:  #B5B5B5;
  --muted:     #7C7C7C;
  --muted-2:   #5A5A5A;
  --accent:    #FF4D2E;
  --ok:        #6BE090;

  --accent-2:     color-mix(in oklab, var(--accent) 78%, white);
  --accent-glow:  color-mix(in srgb, var(--accent) 18%, transparent);
  --accent-soft:  color-mix(in srgb, var(--accent) 7%, transparent);
  --accent-focus: color-mix(in srgb, var(--accent) 12%, transparent);

  --on-accent:     #0A0A0A;
  --nav-bg:        rgba(10,10,10,0.7);
  --nav-bg-strong: rgba(10,10,10,0.92);
  --grid-dot:      rgba(255,255,255,0.05);
  --foot-bg:       #050505;
  --foot-text:     #F5F5F5;
  --foot-text-dim: #B5B5B5;
  --foot-line:     #242424;
  --ok-glow:       rgba(107,224,144,0.18);
  --stroke-text:   rgba(255,255,255,0.16);
  color-scheme: dark;

  --sans: 'Space Grotesk', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1400px;
  --gutter: clamp(20px, 4vw, 56px);
  --r-sm: 4px;
  --r-md: 10px;

  /* motion intensity: 1 = full, set lower via [data-motion] */
  --mi: 1;
}

[data-theme="light"] {
  --bg:        #F7F6F2;
  --bg-2:      #EFEDE6;
  --surface:   #FFFFFF;
  --surface-2: #FAF8F3;
  --line:      #E4E1D8;
  --line-2:    #CFCBC0;
  --text:      #111111;
  --text-dim:  #44423E;
  --muted:     #6E6B65;
  --muted-2:   #A29F97;
  --ok:        #1E8A4A;

  --on-accent:     #FFFFFF;
  --nav-bg:        rgba(247,246,242,0.78);
  --nav-bg-strong: rgba(247,246,242,0.94);
  --grid-dot:      rgba(0,0,0,0.08);
  --foot-bg:       #0A0A0A;
  --foot-text:     #F5F5F5;
  --foot-text-dim: #B5B5B5;
  --foot-line:     #242424;
  --ok-glow:       rgba(30,138,74,0.18);
  --stroke-text:   rgba(0,0,0,0.18);
  color-scheme: light;
}

[data-motion="subtle"] { --mi: 0.45; }
[data-motion="off"]    { --mi: 0; }

/* ============== RESET ============== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 240ms ease, color 240ms ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1,h2,h3,h4,h5 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { list-style: none; margin: 0; padding: 0; }
.mono { font-family: var(--mono); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ============== TYPE ============== */
.h2 {
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.035em;
}
.h2 em { font-style: normal; color: var(--accent); }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.section-sub { color: var(--text-dim); max-width: 52ch; font-size: 17px; }
.section-head--row {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end;
  margin-bottom: 64px;
}
@media (max-width: 820px) { .section-head--row { grid-template-columns: 1fr; gap: 20px; } }

/* ============== BUTTONS ============== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  background: transparent; color: var(--text);
  white-space: nowrap;
  transition: 180ms ease;
  position: relative;
}
.btn--sm { padding: 9px 16px; font-size: 13px; }
.btn--xl { padding: 22px 36px; font-size: 17px; }
.btn--primary {
  background: var(--accent); border-color: var(--accent);
  color: var(--on-accent); font-weight: 600;
}
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn:hover { border-color: var(--text); }
.btn--primary:hover { border-color: var(--accent-2); }
.magnet { will-change: transform; }

/* ============== BOOT OVERLAY ============== */
.boot {
  position: fixed; inset: 0; z-index: 200;
  background: #050505;
  display: flex; align-items: center; justify-content: center;
  transition: transform 640ms cubic-bezier(.76,0,.24,1), visibility 0s linear 640ms;
  cursor: pointer;
}
.boot__inner { width: min(460px, 84vw); font-family: var(--mono); font-size: 13px; color: #B5B5B5; }
.boot__line {
  display: flex; justify-content: space-between; gap: 16px;
  opacity: 0; transform: translateY(6px);
  animation: bootline 300ms ease forwards;
  padding: 3px 0;
}
.boot__line .ok { color: #6BE090; }
.boot__line:nth-child(1) { animation-delay: 80ms; }
.boot__line:nth-child(2) { animation-delay: 280ms; }
.boot__line:nth-child(3) { animation-delay: 470ms; }
.boot__line:nth-child(4) { animation-delay: 650ms; }
.boot__line:nth-child(5) { animation-delay: 820ms; }
@keyframes bootline { to { opacity: 1; transform: none; } }
.boot__bar {
  margin-top: 18px; height: 3px; background: #1C1C1C; border-radius: 999px; overflow: hidden;
}
.boot__bar > span {
  display: block; height: 100%; width: 0; background: var(--accent);
  animation: bootbar 1050ms cubic-bezier(.3,.6,.2,1) 120ms forwards;
}
@keyframes bootbar { to { width: 100%; } }
.boot__hint { margin-top: 14px; font-size: 11px; color: #5A5A5A; text-transform: uppercase; letter-spacing: .1em; }
html.is-booted .boot { transform: translateY(-100%); visibility: hidden; }
html.no-boot .boot { display: none; }

/* ============== NAV + PROGRESS ============== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 200ms, border-color 200ms;
}
.nav.is-scrolled { background: var(--nav-bg-strong); border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.nav__links { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.nav__links a { color: var(--text-dim); position: relative; padding: 6px 0; }
.nav__links a:hover { color: var(--text); }
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--accent); transition: 160ms;
}
.nav__links a:hover::after { width: 100%; }
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 51;
}
.logo { display: inline-flex; align-items: center; color: var(--text); }
.logo-svg { display: block; width: auto; height: 36px; color: var(--text); transition: opacity 160ms; }
.logo:hover .logo-svg { opacity: .78; }
.foot .logo-svg { color: var(--foot-text); }
@media (max-width: 1024px) { .nav__links { display: none; } }

/* theme toggle (same as v1) */
.theme-toggle {
  border: 1px solid var(--line-2); background: transparent; padding: 0;
  border-radius: 999px; transition: 160ms; color: var(--muted); flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--text); color: var(--text); }
.theme-toggle__track {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  width: 56px; height: 28px; padding: 0 7px; border-radius: 999px;
}
.theme-toggle__icon { display: block; z-index: 1; position: relative; color: var(--muted-2); transition: 160ms; }
[data-theme="dark"] .theme-toggle__icon--moon { color: var(--accent); }
[data-theme="light"] .theme-toggle__icon--sun { color: var(--accent); }
.theme-toggle__thumb {
  position: absolute; top: 50%; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-2);
  transform: translateY(-50%);
  transition: transform 220ms cubic-bezier(.4,.2,.2,1), background 200ms;
  pointer-events: none;
}
[data-theme="light"] .theme-toggle__thumb { transform: translateY(-50%) translateX(28px); }

/* ============== HERO BENTO ============== */
.hero {
  position: relative;
  padding: 110px 0 56px;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 75%, transparent);
}
.hero::after {
  content: '';
  position: absolute; inset: -20%;
  background: radial-gradient(700px 460px at 72% 30%, var(--accent-glow), transparent 70%);
  pointer-events: none;
  opacity: calc(0.7 * var(--mi) + 0.3);
}

.bento {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(96px, auto);
  gap: 14px;
}
.tile {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(6px);
  border-radius: var(--r-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
  will-change: transform;
}
.tile:hover {
  border-color: var(--line-2);
  transform: translateY(calc(-3px * var(--mi)));
  box-shadow: 0 12px 40px -18px rgba(0,0,0,.6);
}
.tile__label {
  font-family: var(--mono);
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}
.tile__label .idx { color: var(--accent); }

/* tile entrance choreography */
.tile { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(6px); }
html.is-booted .tile {
  opacity: 1; transform: none; filter: blur(0);
  transition:
    opacity 700ms cubic-bezier(.2,.7,.2,1) var(--d, 0ms),
    transform 700ms cubic-bezier(.2,.7,.2,1) var(--d, 0ms),
    filter 700ms cubic-bezier(.2,.7,.2,1) var(--d, 0ms),
    border-color 240ms ease, box-shadow 240ms ease;
}
[data-motion="off"] .tile { opacity: 1; transform: none; filter: none; transition: none; }

/* headline tile */
.tile--head {
  grid-column: 1 / 9; grid-row: 1 / 3;
  justify-content: space-between;
  background:
    linear-gradient(135deg, var(--accent-soft), transparent 55%),
    color-mix(in srgb, var(--surface) 82%, transparent);
  min-height: 420px;
}
.tile--head .eyebrow {
  font-family: var(--mono);
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
}
.tile--head .eyebrow b { color: var(--accent); font-weight: 400; }
.display2 {
  font-size: clamp(44px, 6.4vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  font-weight: 600;
  margin: 24px 0;
}
.display2 em { font-style: normal; color: var(--accent); }
.display2 .mask { display: block; overflow: hidden; }
.display2 .line { display: block; transform: translateY(110%); }
html.is-booted .display2 .line {
  transform: none;
  transition: transform 900ms cubic-bezier(.16,1,.3,1) var(--d, 0ms);
}
[data-motion="off"] .display2 .line { transform: none; transition: none; }
.tile--head .lede {
  font-size: clamp(16px, 1.3vw, 19px);
  color: var(--text-dim); max-width: 52ch; line-height: 1.5;
}
.tile--head .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* status tile */
.tile--status { grid-column: 9 / 13; grid-row: 1 / 2; font-family: var(--mono); font-size: 12.5px; }
.tile--status .rows { display: grid; gap: 8px; }
.tile--status .row { display: flex; justify-content: space-between; gap: 12px; color: var(--text-dim); }
.tile--status .row .k { color: var(--muted); }
.tile--status .row .v { color: var(--text); }
.tile--status .row .ok { color: var(--ok); }
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-glow);
  display: inline-block;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* uptime tile */
.tile--uptime { grid-column: 9 / 13; grid-row: 2 / 3; justify-content: flex-end; }
.tile--uptime .big {
  font-size: clamp(44px, 4.6vw, 76px);
  line-height: .95; letter-spacing: -0.04em; font-weight: 600;
}
.tile--uptime .big .unit { font-size: .42em; color: var(--muted); font-weight: 500; }
.tile--uptime .note { font-size: 13px; color: var(--text-dim); margin-top: 10px; }
.tile--uptime .spark { position: absolute; right: 0; left: 0; top: 0; height: 56px; opacity: .9; }
.tile--uptime .spark path.fill { fill: url(#sparkgrad); }
.tile--uptime .spark path.stroke {
  fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-dasharray: 600; stroke-dashoffset: 600;
}
html.is-booted .tile--uptime .spark path.stroke {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1600ms cubic-bezier(.3,.6,.2,1) 800ms;
}
[data-motion="off"] .tile--uptime .spark path.stroke { stroke-dashoffset: 0; transition: none; }

/* small bento tiles */
.tile--count { grid-column: 1 / 4; }
.tile--count .big, .tile--pods .big {
  font-size: clamp(40px, 4vw, 64px);
  line-height: .95; letter-spacing: -0.04em; font-weight: 600;
  margin-top: auto;
}
.tile--count .big .plus { color: var(--accent); font-size: .6em; }
.tile--count .note, .tile--pods .note { font-size: 13px; color: var(--text-dim); margin-top: 8px; }

.tile--term { grid-column: 4 / 9; font-family: var(--mono); font-size: 12.5px; }
.tile--term pre { margin: 0; white-space: pre-wrap; color: var(--text-dim); line-height: 1.7; min-height: 66px; }
.tile--term .prompt { color: var(--accent); }
.tile--term .caret {
  width: 8px; height: 14px; background: var(--accent);
  display: inline-block; vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.tile--loc { grid-column: 9 / 13; font-family: var(--mono); font-size: 12.5px; justify-content: space-between; }
.tile--loc .clock { font-size: clamp(26px, 2.2vw, 38px); font-weight: 500; letter-spacing: -0.02em; color: var(--text); font-family: var(--mono); }
.tile--loc .place { color: var(--text-dim); margin-top: 6px; }
.tile--loc .place b { color: var(--accent); font-weight: 400; }

@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .tile--head { grid-column: 1 / 7; grid-row: auto; min-height: 380px; }
  .tile--status { grid-column: 1 / 4; grid-row: auto; }
  .tile--uptime { grid-column: 4 / 7; grid-row: auto; }
  .tile--count { grid-column: 1 / 3; }
  .tile--term { grid-column: 3 / 7; }
  .tile--loc { grid-column: 1 / 7; flex-direction: row; align-items: center; }
}
@media (max-width: 680px) {
  .hero { padding-top: 96px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile--head, .tile--status, .tile--uptime, .tile--count, .tile--term, .tile--loc { grid-column: 1 / -1; min-height: 0; }
  .tile--loc { flex-direction: column; align-items: flex-start; }
}

/* ============== GIANT VELOCITY MARQUEE ============== */
.shout {
  border-bottom: 1px solid var(--line);
  padding: 44px 0;
  overflow: hidden;
  background: var(--bg-2);
}
.shout__track { display: flex; width: max-content; will-change: transform; }
.shout__group {
  display: flex; align-items: baseline; gap: 48px; padding-right: 48px;
  font-size: clamp(56px, 9vw, 150px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
}
.shout__group .solid { color: var(--text); }
.shout__group .ghost {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--stroke-text);
}
.shout__group .hot { color: var(--accent); }
.shout__group .dot { color: var(--accent); font-size: .5em; }

/* ============== CLIENT STRIP ============== */
.logos { padding: 48px 0; border-bottom: 1px solid var(--line); }
.logos__head {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--muted); margin-bottom: 26px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.marquee { overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: scroll 36s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee__group { display: flex; align-items: center; gap: 64px; padding-right: 64px; }
.logo-mark {
  font-weight: 700; font-size: 26px; letter-spacing: -0.01em;
  color: var(--text-dim); white-space: nowrap; opacity: .75; transition: 200ms;
}
.logo-mark--alt { font-family: var(--mono); font-weight: 500; font-size: 22px; }
.logo-mark:hover { opacity: 1; color: var(--accent); }
[data-motion="off"] .marquee__track, [data-motion="off"] .shout__track { animation: none; transform: none !important; }

/* ============== SERVICES ============== */
.services { padding: 130px 0; border-bottom: 1px solid var(--line); }
.svc2-list { border-top: 1px solid var(--line); }
.svc2 {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 28px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  cursor: default;
}
.svc2::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to right, transparent, var(--accent-soft) 85%);
  opacity: 0; transition: opacity 240ms ease;
  pointer-events: none;
}
.svc2:hover::before { opacity: 1; }
.svc2__num { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .08em; transition: color 200ms; }
.svc2:hover .svc2__num { color: var(--accent); }
.svc2__main { overflow: hidden; padding: 22px 0; }
.svc2__title {
  font-size: clamp(32px, 4.6vw, 64px);
  letter-spacing: -0.035em; line-height: 1.02;
  font-weight: 600;
  display: block;
  transform: translateY(110%);
  transition: transform 200ms;
}
.svc2.is-in .svc2__title {
  transform: none;
  transition: transform 850ms cubic-bezier(.16,1,.3,1) var(--d, 0ms);
}
[data-motion="off"] .svc2__title { transform: none; transition: none; }
/* Expands via grid-template-rows (0fr → 1fr) rather than max-height/margin so the
   reveal avoids per-frame layout thrash. No margin animates. */
.svc2__desc {
  color: var(--text-dim); font-size: 16px; max-width: 58ch;
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows 360ms cubic-bezier(.2,.7,.2,1), opacity 300ms ease;
}
.svc2__desc > span { display: block; overflow: hidden; min-height: 0; }
/* Spacers live inside the clipped span — padding on the span itself would floor
   the collapsed track at its own height and leave a permanent gap. */
.svc2__desc > span::before { content: ''; display: block; height: 6px; }
.svc2__desc > span::after  { content: ''; display: block; height: 14px; }
.svc2:hover .svc2__desc, .svc2:focus-within .svc2__desc { grid-template-rows: 1fr; opacity: 1; }
.svc2__tags { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.svc2__tags li::before { content: '+ '; color: var(--accent); }
.svc2__arrow {
  font-size: clamp(24px, 2.6vw, 40px);
  color: var(--muted-2);
  transition: transform 280ms cubic-bezier(.2,.7,.2,1), color 200ms;
  padding-right: 8px;
}
.svc2:hover .svc2__arrow { transform: translate(calc(8px * var(--mi)), calc(-8px * var(--mi))); color: var(--accent); }
@media (max-width: 720px) {
  .svc2 { grid-template-columns: 48px 1fr; }
  .svc2__arrow { display: none; }
  .svc2__desc { grid-template-rows: 1fr; opacity: 1; }
  .svc2__desc > span::before { height: 8px; }
  .svc2__desc > span::after  { height: 12px; }
}

/* ============== STATS BAND (scrub) ============== */
.stats2 {
  padding: 130px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  position: relative; overflow: hidden;
}
.stats2__row { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat {
  padding: 36px 28px 32px 0;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
}
.stat:last-child { border-right: none; }
.stat + .stat { padding-left: 28px; }
.stat__num {
  font-size: clamp(48px, 6vw, 92px);
  line-height: .95; letter-spacing: -0.04em; font-weight: 600;
  display: inline-flex; align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.stat__plus { color: var(--accent); font-size: .6em; margin-left: 4px; }
.stat__unit { font-size: .4em; color: var(--muted); margin-left: 8px; font-weight: 500; }
.stat__label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat__note { font-size: 14px; color: var(--text-dim); max-width: 26ch; }
@media (max-width: 960px) {
  .stats2__row { grid-template-columns: 1fr 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--line); padding: 28px 0; }
  .stat:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 24px; }
  .stat:nth-child(even) { padding-left: 24px; }
  .stat + .stat { padding-left: 0; }
  .stat:nth-child(even) { padding-left: 24px; }
}
@media (max-width: 560px) {
  .stats2__row { grid-template-columns: 1fr; }
  .stat, .stat:nth-child(odd), .stat:nth-child(even) { border-right: none; padding: 24px 0; }
}

/* ============== WORK / CASES (parallax) ============== */
.work { padding: 130px 0; border-bottom: 1px solid var(--line); }
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 240ms, transform 240ms;
}
.case:hover { border-color: var(--line-2); transform: translateY(calc(-4px * var(--mi))); }
.case__media {
  aspect-ratio: 16 / 10;
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.case__media > .px {
  position: absolute; inset: -14% 0;
  transform: translateY(calc(var(--py, 0) * 1px));
  will-change: transform;
}
.case__chart { position: absolute; inset: 0; padding: 28px; }
.case__chart svg { width: 100%; height: 100%; }
.case__gridviz {
  position: absolute; inset: 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: 6px;
}
.case__gridviz > div { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.case__gridviz > div:nth-child(3n) { background: var(--accent); }
.case__gridviz > div:nth-child(5) { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.case__ascii pre { margin: 0; padding: 24px; color: var(--accent); font-size: 12px; line-height: 1.5; font-family: var(--mono); }
.case__meta {
  position: absolute; top: 16px; right: 16px;
  display: flex; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(4px);
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  z-index: 2;
}
.case__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.case__title { font-size: 22px; letter-spacing: -0.02em; line-height: 1.2; }
.case__desc { color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.case__metrics {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.case__metrics b { color: var(--text); font-family: var(--sans); font-weight: 600; font-size: 14px; margin-right: 4px; }
@media (max-width: 960px) { .cases { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cases { grid-template-columns: 1fr; } }

/* ============== PROCESS (line draw on scrub) ============== */
.process { padding: 130px 0; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.process__steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  position: relative;
}
.process__steps::before {
  content: '';
  position: absolute; top: -2px; left: 0; height: 3px; width: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  z-index: 2;
}
[data-motion="off"] .process__steps::before { transform: scaleX(1); }
.step {
  padding: 32px 24px 32px 0;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
  opacity: clamp(0.25, calc(var(--p, 0) * 4 - var(--i, 0) + 1), 1);
  transition: opacity 200ms linear;
}
[data-motion="off"] .step { opacity: 1; }
.step + .step { padding-left: 24px; }
.step:last-child { border-right: none; }
.step__num { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .06em; }
.step__week { font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.step__title { font-size: 22px; letter-spacing: -0.02em; margin-bottom: 8px; }
.step__desc { color: var(--text-dim); font-size: 15px; }
@media (max-width: 960px) {
  .process__steps { grid-template-columns: 1fr 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--line); padding: 24px 0; }
  .step:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 24px; }
  .step:nth-child(even) { padding-left: 24px; }
  .step + .step { padding-left: 0; }
  .step:nth-child(even) { padding-left: 24px; }
}
@media (max-width: 560px) {
  .process__steps { grid-template-columns: 1fr; }
  .step, .step:nth-child(odd), .step:nth-child(even) { border-right: none; padding: 24px 0; }
}

/* ============== BIG QUOTE (word scrub) ============== */
.bigquote { padding: 150px 0; border-bottom: 1px solid var(--line); }
.bigquote blockquote {
  margin: 0;
  font-size: clamp(28px, 4.2vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 22ch;
}
.bigquote .w { opacity: .14; transition: opacity 240ms linear; }
.bigquote .w.on { opacity: 1; }
[data-motion="off"] .bigquote .w { opacity: 1; }
.bigquote figcaption {
  margin-top: 36px;
  font-family: var(--mono); font-size: 13px; color: var(--muted);
  display: flex; flex-direction: column; gap: 4px;
}
.bigquote figcaption .name { color: var(--text); }

/* ============== CONTACT CTA ============== */
.cta {
  padding: 170px 0;
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
  text-align: center;
}
.cta::before {
  content: '';
  position: absolute; inset: -10%;
  background: radial-gradient(640px 420px at 50% 110%, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.cta .kicker { justify-content: center; display: flex; }
.cta__title {
  font-size: clamp(48px, 8vw, 132px);
  line-height: .96; letter-spacing: -0.045em; font-weight: 600;
  margin: 0 auto 40px;
  max-width: 14ch;
}
.cta__title em { font-style: normal; color: var(--accent); }
.cta__row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.cta__meta {
  margin-top: 56px;
  display: flex; gap: 32px; justify-content: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
}
.cta__meta a { color: var(--text); border-bottom: 1px solid var(--line-2); padding-bottom: 2px; }
.cta__meta a:hover { color: var(--accent); border-color: var(--accent); }

/* ============== FOOTER ============== */
.foot { background: var(--foot-bg); color: var(--foot-text); padding: 72px 0 24px; }
.foot a { color: var(--foot-text); }
.foot__top {
  display: grid; grid-template-columns: 1fr auto; gap: 48px;
  padding-bottom: 48px; border-bottom: 1px solid var(--foot-line);
  align-items: end;
}
.foot__tag {
  margin-top: 20px;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.05; letter-spacing: -0.02em;
}
.foot__tag::after { content: ''; display: block; width: 32px; height: 3px; background: var(--accent); margin-top: 20px; }
.foot__links { display: flex; gap: 24px; font-size: 14px; flex-wrap: wrap; }
.foot__links a { color: var(--foot-text-dim); }
.foot__links a:hover { color: var(--accent); }
.foot__bar {
  margin-top: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: 12px; color: #777; flex-wrap: wrap;
}
.foot__bar .hot { color: var(--accent); }
@media (max-width: 720px) { .foot__top { grid-template-columns: 1fr; align-items: start; } }

/* ============== GENERIC REVEAL ============== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms cubic-bezier(.2,.7,.2,1) var(--d, 0ms), transform 800ms cubic-bezier(.2,.7,.2,1) var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: translateY(0); }
[data-motion="off"] [data-reveal] { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal], .tile, .display2 .line, .svc2__title { opacity: 1 !important; transform: none !important; filter: none !important; }
  .boot { display: none; }
  .bigquote .w { opacity: 1; }
  .process__steps::before { transform: scaleX(1); }
  .step { opacity: 1; }
}
