:root {
  --bg: #0a0a0b;
  --bg-elev: #111114;
  --bg-card: #131318;
  --fg: #f4f4f5;
  --fg-dim: #a1a1aa;
  --fg-mute: #52525b;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.16);
  --accent: #e4e4e7;
  --accent-glow: rgba(228,228,231,0.35);
  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 0 0 1px rgba(255,255,255,0.06);
  --max: 1280px;
  --pad-x: clamp(20px, 4vw, 64px);
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

[data-theme="light"] {
  --bg: #f5f5f4;
  --bg-elev: #ececea;
  --bg-card: #ffffff;
  --fg: #0a0a0b;
  --fg-dim: #52525b;
  --fg-mute: #a1a1aa;
  --line: rgba(0,0,0,0.08);
  --line-strong: rgba(0,0,0,0.16);
  --accent: #0a0a0b;
  --accent-glow: rgba(10,10,11,0.25);
}

[data-accent="cool"] { --accent: #93c5fd; --accent-glow: rgba(147,197,253,0.45); }
[data-accent="warm"] { --accent: #fbbf24; --accent-glow: rgba(251,191,36,0.45); }
[data-accent="lime"] { --accent: #d9f99d; --accent-glow: rgba(217,249,157,0.45); }

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

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(ellipse 800px 600px at 50% -10%, rgba(255,255,255,0.05), transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 30%, var(--accent-glow), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

[data-theme="light"] body {
  background-image:
    radial-gradient(ellipse 800px 600px at 50% -10%, rgba(0,0,0,0.04), transparent 60%),
    radial-gradient(ellipse 600px 400px at 100% 30%, var(--accent-glow), transparent 70%);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* TYPE */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.mono { font-family: var(--font-mono); }

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.02; }

.h-display {
  font-size: clamp(56px, 9vw, 144px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.92;
}
.h-display em {
  font-style: italic;
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-weight: 400;
  color: var(--fg-dim);
}

.h-section {
  font-size: clamp(40px, 5.5vw, 84px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--fg-dim);
  text-wrap: pretty;
  max-width: 60ch;
}

/* LAYOUT */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

section { position: relative; padding: clamp(80px, 12vh, 160px) 0; }
.section-head { display: flex; flex-direction: column; gap: 18px; margin-bottom: 64px; }

.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}

/* NAV */
.nav {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px;
  background: color-mix(in oklab, var(--bg-elev) 70%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), var(--shadow-1);
}
.nav .brand {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.nav .brand-mark {
  width: 18px; height: 18px;
  border-radius: 4px;
  background: var(--fg);
  position: relative;
  overflow: hidden;
}
.nav .brand-mark::after {
  content: ""; position: absolute; inset: 3px;
  border-radius: 2px;
  background: var(--bg);
  background-image: linear-gradient(135deg, transparent 45%, var(--fg) 45%, var(--fg) 55%, transparent 55%);
}
.nav a.nav-link {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--fg-dim);
  border-radius: 999px;
  transition: color .2s, background .2s;
}
.nav a.nav-link:hover { color: var(--fg); background: var(--line); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), background .25s, color .25s, border-color .25s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 6px 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--fg);
  background: color-mix(in oklab, var(--bg-elev) 50%, transparent);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--fg-mute); }
.btn-pill { padding: 14px 22px; font-size: 14px; }

.btn .arrow {
  display: inline-flex;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: currentColor;
  color: currentColor;
  position: relative;
  overflow: hidden;
  opacity: 0.15;
}
.btn .arrow::after {
  content: "→";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--bg);
  opacity: 1;
  font-size: 11px;
}
.btn-primary .arrow { opacity: 1; background: var(--bg); }
.btn-primary .arrow::after { color: var(--accent); }

/* HERO */
.hero {
  min-height: 100vh;
  padding-top: 120px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: end;
}
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

.hero-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-canvas {
  width: min(900px, 90vw);
  height: min(900px, 90vw);
  opacity: 0.9;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-dim);
  text-transform: uppercase;
}
.hero-meta .scroll-cue {
  display: inline-flex; align-items: center; gap: 8px;
}
.scroll-cue .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 12px var(--accent-glow); }
}

/* STATS MARQUEE */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 28px 0;
  position: relative;
  background: color-mix(in oklab, var(--bg-elev) 40%, transparent);
}
.marquee-track {
  display: flex;
  gap: 80px;
  animation: marquee 40s linear infinite;
  width: max-content;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee-item {
  display: inline-flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--fg-dim);
  text-transform: uppercase;
  white-space: nowrap;
}
.marquee-item strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--fg);
}
.marquee-item .sep {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 999px;
  transform: translateY(-3px);
}

/* PILLARS / WHY US */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  margin-top: 64px;
}
.pillar {
  background: var(--bg);
  padding: 40px;
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  transition: background .3s;
}
.pillar:hover { background: var(--bg-elev); }
.pillar .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}
.pillar h3 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}
.pillar p { color: var(--fg-dim); line-height: 1.45; font-size: 15px; max-width: 32ch; }
.pillar .glyph {
  position: absolute;
  top: 32px; right: 32px;
  width: 64px; height: 64px;
  opacity: 0.85;
}

/* SOLUTIONS / TWO-UP */
.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.card .img-placeholder {
  aspect-ratio: 16/10;
  border-radius: 16px;
  background:
    repeating-linear-gradient(135deg, color-mix(in oklab, var(--fg) 6%, transparent) 0 1px, transparent 1px 12px),
    var(--bg-elev);
  border: 1px solid var(--line);
  margin-bottom: 28px;
  position: relative;
  display: grid; place-items: center;
  color: var(--fg-mute);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Card vizualizations ─────────────────────────────────── */
.viz {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 16px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 50%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 70%),
    var(--bg-elev);
  border: 1px solid var(--line);
  margin-bottom: 28px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.viz svg { width: 100%; height: 100%; display: block; }
.viz-tag {
  position: absolute;
  bottom: 14px; left: 14px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--fg-mute);
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  backdrop-filter: blur(8px);
}

/* Lifecycle: 4 nodes orbit around center on tilted ellipse */
@keyframes lc-orbit {
  from { transform: rotate(0deg) translateX(110px) scaleY(0.3) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(110px) scaleY(0.3) rotate(-360deg); }
}
.lc-node {
  transform-origin: 0 0;
  animation: lc-orbit 18s linear infinite;
}
.lc-node-1 { animation-delay: -4.5s; }
.lc-node-2 { animation-delay: -9s; }
.lc-node-3 { animation-delay: -13.5s; }

/* Team: subtle pulse on the central node, scan line drift */
@keyframes tn-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.9; }
}
.tn-1 { animation: tn-pulse 3.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.tn-0 { animation: tn-pulse 3.5s ease-in-out infinite .4s; }
.tn-2 { animation: tn-pulse 3.5s ease-in-out infinite .8s; }
.tn-3 { animation: tn-pulse 3.5s ease-in-out infinite 1.2s; }
.tn-4 { animation: tn-pulse 3.5s ease-in-out infinite 1.6s; }
@keyframes scan-drift {
  0% { transform: translateY(-60px); opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(60px); opacity: 0; }
}
.scan { animation: scan-drift 5s ease-in-out infinite; }


/* WORK / CASE STUDY */
.case {
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--bg-elev);
  overflow: hidden;
}
.case-head {
  padding: 40px 40px 28px;
  border-bottom: 1px solid var(--line);
}
.case-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.case-tag { color: var(--fg); }
.case-status { color: var(--accent); }
.case-dot {
  width: 4px; height: 4px; border-radius: 999px;
  background: var(--fg-mute);
}
.case-title {
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.case-plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
.case-plates .plate {
  position: relative;
  background: var(--bg);
  padding: 24px;
  overflow: hidden;
}
.case-plates .plate img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0a0a0b;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 20px 60px rgba(0,0,0,0.4);
}
.case-plates .plate figcaption {
  margin-top: 16px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
}

.case-body {
  padding: 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.case-summary {
  color: var(--fg-dim);
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.6;
  text-wrap: pretty;
}
.case-summary strong { color: var(--fg); font-weight: 500; }

.case-specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 28px;
  row-gap: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.case-specs dt {
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 10px;
  padding-top: 2px;
  white-space: nowrap;
}
.case-specs dd {
  color: var(--fg);
  text-wrap: pretty;
}

/* WORKFLOW */
.workflow {
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-elev);
  overflow: hidden;
}
.workflow-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.wf-step {
  padding: 40px;
  border-right: 1px solid var(--line);
  position: relative;
  min-height: 340px;
  display: grid;
  /* glyph | num | title | description | (flex tail) */
  grid-template-rows: auto auto auto auto 1fr;
  gap: 18px;
  transition: background .3s;
  cursor: default;
}
.wf-step .wf-glyph { grid-row: 1; }
.wf-step .wf-num   { grid-row: 2; }
.wf-step .wf-title { grid-row: 3; margin: 0; }
.wf-step .wf-desc  { grid-row: 4; margin: 0; align-self: start; }
.wf-step:last-child { border-right: none; }
.wf-step:hover { background: var(--bg-card); }
.wf-step .wf-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
}
.wf-step h4 {
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.wf-step p { color: var(--fg-dim); font-size: 14px; line-height: 1.5; }
.wf-step .wf-glyph {
  width: 48px; height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg);
}

/* TECH STACK */
.tech-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.tech {
  background: var(--bg);
  aspect-ratio: 1.4;
  display: grid; place-items: center;
  gap: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  transition: background .25s, color .25s;
  padding: 16px;
}
.tech:hover { background: var(--bg-elev); color: var(--fg); }
.tech .tech-mark {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
  letter-spacing: -0.02em;
}

/* TEAM */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 64px;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform .3s, border-color .3s;
}
.team-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.team-photo {
  aspect-ratio: 4/5;
  border-radius: 16px;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in oklab, var(--fg) 10%, transparent), transparent 60%),
    repeating-linear-gradient(90deg, color-mix(in oklab, var(--fg) 4%, transparent) 0 1px, transparent 1px 8px),
    var(--bg-elev);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.team-photo .initials {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 400;
  color: var(--fg-mute);
  letter-spacing: -0.04em;
}
.team-info { padding: 4px 8px 8px; }
.team-info .role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 6px;
}
.team-info h4 {
  font-size: 20px;
  letter-spacing: -0.015em;
  font-weight: 500;
}

/* CLIENTS GLOBE */
.clients {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.clients-list { display: grid; gap: 1px; background: var(--line); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.client-row {
  background: var(--bg);
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.client-row .pct { color: var(--accent); letter-spacing: -0.01em; font-size: 16px; }
.client-row .region { color: var(--fg); }
.client-row .bar {
  height: 4px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  min-width: 100px;
}
.client-row .bar > span {
  position: absolute; inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--w, 0));
  transition: transform 1.5s cubic-bezier(.2,.7,.2,1);
}

.globe-wrap {
  aspect-ratio: 1;
  position: relative;
  display: grid; place-items: center;
}
.globe-canvas { width: 100%; height: 100%; }

/* CTA */
.cta-block {
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(ellipse 600px 300px at 50% 0%, var(--accent-glow), transparent 60%),
    var(--bg-elev);
  padding: clamp(60px, 8vw, 120px) clamp(40px, 6vw, 80px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 32px;
  background: linear-gradient(180deg, var(--accent-glow), transparent 40%);
  opacity: 0.4;
  pointer-events: none;
  mask: linear-gradient(black, transparent);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 32px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.footer-grid h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 16px;
  font-weight: 400;
}
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a {
  color: var(--fg-dim); font-size: 14px;
  transition: color .2s;
}
.footer-grid a:hover { color: var(--fg); }
.footer-brand h3 {
  font-size: 24px;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 13px; color: var(--fg-dim); max-width: 36ch; line-height: 1.5; }

.footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-mute);
  flex-wrap: wrap;
  gap: 16px;
}

/* HUGE TYPE — section divider with brand */
.bigword {
  font-size: clamp(120px, 22vw, 360px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.85;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  user-select: none;
  margin: 40px 0;
}
[data-theme="light"] .bigword { -webkit-text-stroke: 1px var(--line-strong); }

/* SCROLL REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* RESPONSIVE ───────────────────────────────────────────────── */

/* iPad / small laptop — ≤ 1024px */
@media (max-width: 1024px) {
  :root { --pad-x: clamp(20px, 4vw, 40px); }
  section { padding: clamp(72px, 10vh, 120px) 0; }
  .section-head { margin-bottom: 48px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(4, 1fr); }
  .pillar { padding: 32px; min-height: 240px; }
  .pillar .glyph { width: 52px; height: 52px; top: 24px; right: 24px; }
  .card { padding: 32px; }
  .case-head, .case-body { padding: 32px; }
  .case-body { gap: 32px; }
  .clients { gap: 40px; }
}

/* iPad portrait / large phone — ≤ 900px */
@media (max-width: 900px) {
  .pillars, .two-up, .clients { grid-template-columns: 1fr; }
  .case-plates { grid-template-columns: 1fr; }
  .case-body { grid-template-columns: 1fr; }
  .workflow-track { grid-template-columns: 1fr 1fr; }
  .wf-step:nth-child(2) { border-right: none; }
  .wf-step:nth-child(odd) { border-right: 1px solid var(--line); }
  .wf-step { border-bottom: 1px solid var(--line); min-height: 280px; }
  .wf-step:nth-last-child(-n+2) { border-bottom: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav a.nav-link { display: none; }
  .globe-wrap { max-width: 460px; margin: 0 auto; }
  .hero { min-height: 92vh; padding-top: 110px; }
  .hero-canvas { width: 110vw; height: 110vw; opacity: 0.55; }
}

/* iPhone — ≤ 640px */
@media (max-width: 640px) {
  :root {
    --pad-x: 20px;
    --max: 100%;
  }
  section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; gap: 14px; }

  /* Nav stays a single pill — shrink it */
  .nav {
    top: 12px;
    width: calc(100% - 24px);
    max-width: 420px;
    justify-content: space-between;
    padding: 6px;
  }
  .nav .brand { padding: 6px 10px; font-size: 11px; gap: 6px; }
  .nav .brand-mark { width: 16px; height: 16px; }
  .nav .btn-primary { padding: 8px 14px !important; font-size: 11px !important; }

  /* Hero */
  .hero { min-height: 88vh; padding-top: 96px; }
  .hero-canvas { width: 130vw; height: 130vw; opacity: 0.45; }
  .h-display { font-size: clamp(48px, 14vw, 80px); }
  .lead { font-size: 16px; }
  .hero-cta { gap: 10px; margin-top: 28px; }
  .hero-cta .btn-pill { padding: 12px 18px; font-size: 13px; flex: 1; min-width: 0; }
  .hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 40px;
    font-size: 10px;
  }
  .hero-meta > span:nth-child(3) { display: none; }

  /* Section type */
  .h-section { font-size: clamp(36px, 10vw, 56px); }

  /* Marquee — keep but reduce gap */
  .marquee { padding: 20px 0; }
  .marquee-track { gap: 56px; }
  .marquee-item { gap: 12px; font-size: 11px; }
  .marquee-item strong { font-size: 22px; }

  /* Pillars — single column */
  .pillars { grid-template-columns: 1fr; margin-top: 40px; }
  .pillar { padding: 28px; min-height: 220px; gap: 24px; }
  .pillar .glyph { width: 44px; height: 44px; top: 20px; right: 20px; }
  .pillar h3 { font-size: 26px; }
  .pillar p { font-size: 14px; }

  /* Cards */
  .card { padding: 24px; border-radius: 20px; }
  .card h3 { font-size: 24px !important; }
  .viz { margin-bottom: 20px; }
  .viz-tag { bottom: 10px; left: 10px; font-size: 9px; padding: 3px 7px; }

  /* Work / case */
  .case { margin-top: 40px; border-radius: 20px; }
  .case-head { padding: 24px 24px 20px; }
  .case-meta { margin-bottom: 16px; font-size: 10px; gap: 10px; }
  .case-title { font-size: clamp(26px, 8vw, 36px); }
  .case-plates .plate { padding: 16px; }
  .case-plates .plate figcaption { margin-top: 12px; font-size: 9px; }
  .case-body { padding: 24px; gap: 28px; }
  .case-specs { column-gap: 20px; row-gap: 12px; }

  /* Workflow — single column */
  .workflow { margin-top: 40px; border-radius: 20px; }
  .workflow-track { grid-template-columns: 1fr; }
  .wf-step {
    padding: 28px;
    min-height: auto;
    border-right: none !important;
    border-bottom: 1px solid var(--line);
    grid-template-rows: auto auto auto auto;
    gap: 14px;
  }
  .wf-step:last-child { border-bottom: none; }
  .wf-step .wf-title { font-size: 24px; }
  .wf-step .wf-desc { font-size: 14px; }

  /* Tech */
  .tech-grid { grid-template-columns: repeat(3, 1fr); margin-top: 32px; }
  .tech { aspect-ratio: 1.2; padding: 12px; }
  .tech .tech-mark { width: 30px; height: 30px; font-size: 16px; }
  .tech span { font-size: 10px; }

  /* Team — single column */
  .team-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 40px; }
  .team-card { flex-direction: row; align-items: center; padding: 16px; }
  .team-photo { width: 96px; flex: 0 0 96px; aspect-ratio: 1; border-radius: 12px; }
  .team-photo .initials { font-size: 32px; }
  .team-info { padding: 0; flex: 1; }
  .team-info h4 { font-size: 18px; }
  .team-info .role { font-size: 10px; }

  /* Clients */
  .clients { gap: 32px; }
  .client-row {
    grid-template-columns: 60px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 16px;
    padding: 16px 20px;
  }
  .client-row .pct { grid-row: 1 / span 2; font-size: 18px; align-self: center; }
  .client-row .region { grid-column: 2; font-size: 13px; }
  .client-row .bar { grid-column: 2; min-width: 0; width: 100%; }
  .globe-wrap { max-width: 340px; }

  /* Big word */
  .bigword { font-size: clamp(72px, 26vw, 160px); margin: 20px 0; }

  /* CTA block */
  .cta-block { padding: 56px 24px; border-radius: 24px; gap: 22px; }
  .cta-block .btn-pill { padding: 12px 18px; font-size: 13px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 10px;
  }

  /* Disable hover lifts that look weird on touch */
  .team-card:hover { transform: none; }
  .btn-primary:hover { transform: none; }
}

/* Very small phones — ≤ 380px */
@media (max-width: 380px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn-pill { width: 100%; }
  .nav .brand span:last-child { display: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scan, .lc-node, .tn-0, .tn-1, .tn-2, .tn-3, .tn-4 { animation: none; }
  .scroll-cue .dot { animation: none; }
}
