/* =========================================================
   NorthAlgo — Nordic Brutalist × Code-Native × Algorithmic
   ========================================================= */

:root {
  /* Palette — Obsidian + Bone + Aurora Lime */
  --bg: #0A0B0D;
  --bg-2: #111215;
  --bg-3: #17191D;
  --line: #24272D;
  --line-2: #2F333B;
  --fg: #F2F0EB;
  --fg-dim: #A9ADB4;
  --fg-muted: #6B6F77;
  --accent: oklch(90% 0.18 130);     /* aurora lime */
  --accent-2: oklch(82% 0.14 200);   /* aurora teal */
  --accent-ink: #0A0B0D;
  --danger: oklch(70% 0.19 25);

  /* Type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Instrument Serif", ui-serif, Georgia, serif;

  /* Rhythm */
  --gutter: clamp(20px, 3vw, 40px);
  --maxw: 1440px;
  --radius: 4px;
  --radius-lg: 10px;

  /* Motion scale (0..1) controlled by JS */
  --motion: 1;
}

[data-theme="light"] {
  --bg: #F2F0EB;
  --bg-2: #E9E7E1;
  --bg-3: #DEDCD5;
  --line: #C9C6BE;
  --line-2: #B3B0A6;
  --fg: #0A0B0D;
  --fg-dim: #3B3F46;
  --fg-muted: #6B6F77;
  --accent-ink: #F2F0EB;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "ss01", "ss02", "cv11";
}

/* Type pairings (swappable via tweaks) */
[data-type="neogrotesk"] {
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}
[data-type="editorial"] {
  --font-display: "Instrument Serif", ui-serif, Georgia, serif;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}
[data-type="monoall"] {
  --font-display: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "JetBrains Mono", ui-monospace, monospace;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* -------- Selection -------- */
::selection { background: var(--accent); color: var(--accent-ink); }

/* -------- Containers -------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

/* -------- Grid overlay (tweakable) -------- */
.grid-overlay {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 50%, transparent) 1px, transparent 1px);
  background-size: calc((100vw - 2*var(--gutter)) / 12) 100%;
  background-position: var(--gutter) 0;
  max-width: calc(100vw);
  opacity: 0;
  transition: opacity .3s;
}
[data-grid="on"] .grid-overlay { opacity: 1; }

/* -------- Nav -------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px; letter-spacing: .04em;
}
.logo-mark {
  width: 22px; height: 22px; display: block;
}
.logo b { font-weight: 600; letter-spacing: -0.01em; }
.logo .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; display: inline-block; animation: pulse 2s infinite; }

.nav-links {
  display: flex; gap: 28px; justify-content: center;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-dim);
}
.nav-links a {
  position: relative; padding: 4px 0;
  transition: color .2s;
}
.nav-links a .idx { color: var(--fg-muted); margin-right: 6px; }
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover .idx { color: var(--accent); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--fg);
  background: var(--fg); color: var(--bg);
  transition: background .2s, color .2s;
}
.nav-cta:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.nav-cta::after { content: "→"; }

/* -------- Status bar (under nav) -------- */
.statusbar {
  position: fixed; top: var(--nav-h, 60px); left: 0; right: 0; z-index: 49;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
  height: 32px;
  display: flex; align-items: center;
}
.statusbar-inner {
  display: flex; align-items: center; gap: 32px;
  padding: 6px var(--gutter);
  white-space: nowrap;
  animation: ticker 60s linear infinite;
  animation-duration: calc(60s / var(--motion, 1));
}
[data-motion="off"] .statusbar-inner { animation: none; }
.statusbar-item { display: inline-flex; align-items: center; gap: 8px; }
.statusbar-item .key { color: var(--fg-muted); }
.statusbar-item .val { color: var(--fg); }
.statusbar-item .up { color: var(--accent); }
.statusbar-item .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: pulse 1.5s infinite; }

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

/* -------- Common section chrome -------- */
section { position: relative; }
.section {
  padding-block: clamp(80px, 10vw, 160px);
  border-top: 1px solid var(--line);
  position: relative;
}
.section-header {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  margin-bottom: 64px;
  align-items: start;
}
.section-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  border-top: 1px solid var(--fg);
  padding-top: 12px;
}
.section-meta .num {
  display: block;
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 8px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.section-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

/* Tag chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .04em;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-dim);
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.chip.solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px;
  padding: 14px 20px;
  border: 1px solid var(--fg);
  transition: all .2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn.ghost { background: transparent; color: var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); }
.btn::after { content: "→"; transition: transform .2s; }
.btn:hover::after { transform: translateX(4px); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  padding-top: 160px;
  padding-bottom: 80px;
  min-height: 100vh;
  display: grid;
  align-content: center;
  overflow: hidden;
}
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
  opacity: .9;
}
.hero-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, transparent 0%, var(--bg) 85%),
    linear-gradient(to bottom, transparent 60%, var(--bg) 100%);
  pointer-events: none; z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
.hero-labels {
  display: flex; gap: 16px; align-items: center;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-muted);
}
.hero-labels .sep { color: var(--line-2); }
.hero-labels .loc { color: var(--accent); }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 10vw, 180px);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 0;
  text-wrap: balance;
}
.hero-title .line { display: block; }
.hero-title .line.shift { padding-left: 8vw; }
.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.hero-title .caret {
  display: inline-block;
  width: 0.6ch; height: 0.9em;
  background: var(--accent);
  vertical-align: -0.08em;
  animation: blink 1s step-end infinite;
  animation-duration: calc(1s / var(--motion, 1));
}
@keyframes blink { 50% { opacity: 0; } }

.hero-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  margin-top: 48px;
  align-items: end;
}
.hero-lede {
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--fg-dim);
  max-width: 52ch;
  line-height: 1.45;
}
.hero-lede b { color: var(--fg); font-weight: 500; }
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 24px;
}

/* Terminal */
.terminal {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--fg-dim);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.6), 0 0 0 1px color-mix(in srgb, var(--accent) 10%, transparent);
}
.terminal-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-3);
}
.terminal-bar .dots { display: flex; gap: 6px; }
.terminal-bar .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.terminal-bar .dots span:first-child { background: oklch(70% 0.18 25); }
.terminal-bar .dots span:nth-child(2) { background: oklch(85% 0.14 85); }
.terminal-bar .dots span:nth-child(3) { background: oklch(80% 0.16 140); }
.terminal-bar .title { font-size: 11px; color: var(--fg-muted); }
.terminal-body { padding: 16px 18px; min-height: 230px; }
.terminal-body .prompt { color: var(--accent); }
.terminal-body .cmd { color: var(--fg); }
.terminal-body .ok { color: var(--accent); }
.terminal-body .warn { color: oklch(85% 0.14 85); }
.terminal-body .dim { color: var(--fg-muted); }
.terminal-body .caret {
  display: inline-block;
  width: 0.6ch; height: 1em;
  background: var(--accent);
  vertical-align: -0.15em;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

/* =========================================================
   LOGO WALL
   ========================================================= */
.logos {
  padding-block: 60px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.logos-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: center;
}
.logos-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase;
}
.logos-list {
  display: flex; flex-wrap: wrap; gap: 48px 80px;
  align-items: center;
}
.logo-item {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fg-dim);
  transition: color .2s;
  display: inline-flex; align-items: center; gap: 10px;
  opacity: .75;
}
.logo-item::before {
  content: ""; display: inline-block;
  width: 8px; height: 8px; background: currentColor;
  transform: rotate(45deg);
}
.logo-item:hover { color: var(--fg); opacity: 1; }
.logo-item.voodoo::before { border-radius: 50%; transform: none; }
.logo-item.vireum::before { border-radius: 0; transform: rotate(0); }
.logo-item.vtt::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.logo-item.vividize::before { clip-path: polygon(0 50%, 50% 0, 100% 50%, 50% 100%); }

/* =========================================================
   SERVICES
   ========================================================= */
.services-list {
  border-top: 1px solid var(--line);
}
.service {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 200px;
  gap: 48px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  position: relative;
  transition: background .3s;
}
.service:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.service .idx {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg-muted);
  padding-top: 12px;
}
.service h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}
.service p {
  font-size: 15px; color: var(--fg-dim); margin: 0;
  max-width: 46ch;
}
.service .stack {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-family: var(--font-mono); font-size: 11px;
  justify-content: flex-end;
}
.service .stack span {
  padding: 3px 8px; border: 1px solid var(--line-2);
  color: var(--fg-dim);
}
.service .sch {
  position: absolute; right: 220px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-muted);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.service:hover .sch { opacity: .6; }

/* =========================================================
   HOW WE WORK
   ========================================================= */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.step {
  padding: 40px 32px;
  border-right: 1px solid var(--line);
  position: relative;
  min-height: 320px;
  display: flex; flex-direction: column;
}
.step:last-child { border-right: 0; }
.step-num {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent);
  margin-bottom: 80px;
  display: flex; justify-content: space-between;
}
.step-num .arrow { color: var(--fg-muted); }
.step h4 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 500;
  letter-spacing: -0.02em; margin: 0 0 16px 0;
  line-height: 1.1;
}
.step p { font-size: 13.5px; color: var(--fg-dim); margin: 0; line-height: 1.55; }
.step-dur {
  margin-top: auto; padding-top: 24px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted);
  border-top: 1px dashed var(--line-2);
}

/* =========================================================
   CASE STUDIES
   ========================================================= */
.cases {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.case {
  position: relative;
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  min-height: 440px;
  display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.case:hover { border-color: var(--accent); }
.case.a { grid-column: span 7; }
.case.b { grid-column: span 5; }
.case.c { grid-column: span 5; }
.case.d { grid-column: span 7; }

.case-visual {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: var(--bg-3);
}
.case-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.case-meta {
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 24px;
  align-items: end;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.case-client {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 6px;
}
.case-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em; margin: 0;
}
.case-metrics {
  display: flex; gap: 20px;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim);
}
.case-metrics b { color: var(--accent); font-weight: 400; display: block; font-size: 20px; font-family: var(--font-display); letter-spacing: -0.01em; margin-bottom: 2px; }
.case-tags {
  grid-column: span 2;
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}

/* Hover reveal — schematic dot */
.case .hover-glow {
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
  transform: translate(-50%, -50%);
  z-index: 1;
}
.case:hover .hover-glow { opacity: 1; }

/* =========================================================
   NUMBERS (investor)
   ========================================================= */
.numbers {
  background: var(--bg-2);
}
.numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.num {
  padding: 48px 32px;
  border-right: 1px solid var(--line);
  position: relative;
}
.num:last-child { border-right: 0; }
.num-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 24px;
}
.num-value {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 500; letter-spacing: -0.04em; line-height: 0.95;
  color: var(--fg);
}
.num-value .unit { color: var(--accent); font-size: 0.6em; }
.num-delta {
  margin-top: 16px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent);
  display: flex; align-items: center; gap: 8px;
}
.num-delta .arrow { font-size: 10px; }
.num-spark {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 60px; pointer-events: none;
  opacity: .5;
}

/* =========================================================
   POD CONFIGURATOR
   ========================================================= */
.pod {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: stretch;
}
.pod-builder {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 32px;
}
.pod-section { margin-bottom: 28px; }
.pod-section-label {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
  display: flex; justify-content: space-between;
}
.pod-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pod-opt {
  font-family: var(--font-mono); font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  color: var(--fg-dim);
  cursor: pointer;
  transition: all .15s;
  background: transparent;
}
.pod-opt:hover { border-color: var(--fg); color: var(--fg); }
.pod-opt.active {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent);
}
.pod-slider-wrap {
  display: flex; align-items: center; gap: 16px;
}
.pod-slider {
  -webkit-appearance: none; appearance: none;
  flex: 1;
  height: 2px;
  background: var(--line-2);
  outline: none;
}
.pod-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--accent);
  cursor: pointer;
  border-radius: 50%;
}
.pod-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--accent);
  cursor: pointer;
  border-radius: 50%;
  border: 0;
}
.pod-slider-val {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--accent); min-width: 48px; text-align: right;
}

.pod-summary {
  border: 1px solid var(--line);
  background: var(--bg-3);
  padding: 32px;
  display: flex; flex-direction: column;
  position: relative;
}
.pod-summary-head {
  display: flex; justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase;
}
.pod-summary-head .live { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.pod-summary-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.5s infinite; }
.pod-roster {
  display: flex; flex-direction: column; gap: 12px;
  flex: 1; margin-bottom: 20px;
}
.pod-role {
  display: grid; grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-mono); font-size: 12px;
  align-items: center;
}
.pod-role-name { color: var(--fg); }
.pod-role-qty { color: var(--accent); }
.pod-role-dim { color: var(--fg-muted); font-size: 11px; display: block; margin-top: 2px; }

.pod-total {
  display: grid; grid-template-columns: 1fr auto; gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pod-total-label { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase; }
.pod-total-value {
  font-family: var(--font-display); font-size: 36px;
  font-weight: 500; letter-spacing: -0.02em;
}
.pod-total-value .unit { color: var(--accent); font-size: 0.6em; }
.pod-total-sub { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); margin-top: 4px; }
.pod-custom-pricing {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-2) 86%, var(--accent) 14%);
}
.pod-custom-pricing-label {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--fg);
}
.pod-custom-pricing-copy {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
}
.pod-custom-pricing-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pod-custom-pricing-link:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

/* =========================================================
   TEAM
   ========================================================= */
.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.person {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  min-height: 300px;
}
.person-avatar {
  width: 100%; aspect-ratio: 1;
  background: var(--bg-3);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.person-avatar img,
.person-avatar svg { width: 100%; height: 100%; }
.person-avatar img {
  display: block;
  object-fit: cover;
}
.person-name {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 500;
  letter-spacing: -0.01em; margin: 0;
}
.person-role {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: .04em;
}
.person-flag {
  position: absolute; top: 24px; right: 24px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent);
}

/* =========================================================
   CAREERS
   ========================================================= */
.careers-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--line);
}
.job {
  display: grid; grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  align-items: center;
  cursor: pointer;
  transition: background .2s;
}
.job:nth-child(2n) { border-right: 0; }
.job:hover { background: var(--bg-2); }
.job:hover .job-apply { color: var(--accent); }
.job-title { font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.job-meta { font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted); margin-top: 6px; }
.job-apply { font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); transition: color .2s; display: inline-flex; align-items: center; gap: 6px; }
.job-apply::after { content: "→"; }

/* =========================================================
   BLOG / INSIGHTS
   ========================================================= */
.posts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.post {
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 280px;
  transition: border-color .2s, transform .2s;
}
.post:hover { border-color: var(--accent); }
.post-meta {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted);
}
.post-meta .cat { color: var(--accent); }
.post-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.01em;
  line-height: 1.15; margin: 0;
  text-wrap: balance;
}
.post-excerpt {
  font-size: 13.5px; color: var(--fg-dim); margin: 0; line-height: 1.55;
  flex: 1;
}
.post-cta {
  font-family: var(--font-mono); font-size: 12px; color: var(--fg);
  display: inline-flex; align-items: center; gap: 6px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.post-cta::after { content: "→"; transition: transform .2s; }
.post:hover .post-cta::after { transform: translateX(4px); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: start;
}
.contact-big {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 76px);
  font-weight: 500; line-height: 0.95; letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}
.contact-big em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent);
}
.contact-info {
  display: flex; flex-direction: column; gap: 32px;
}
.contact-block h5 {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 10px 0;
}
.contact-block p, .contact-block a {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 500; letter-spacing: -0.01em;
  margin: 0;
  color: var(--fg);
}
.contact-block a:hover { color: var(--accent); }
.contact-form {
  display: flex; gap: 12px; margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.contact-form input {
  flex: 1;
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--fg);
  font-family: var(--font-mono); font-size: 13px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .2s;
}
.contact-form input::placeholder { color: var(--fg-muted); }
.contact-form input:focus { border-color: var(--accent); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding-block: 80px 32px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer h6 {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted); letter-spacing: .08em; text-transform: uppercase;
  margin: 0 0 14px 0;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer ul a { font-size: 14px; color: var(--fg-dim); }
.footer ul a:hover { color: var(--accent); }
.footer-big {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 64px);
  font-weight: 500; letter-spacing: -0.03em; line-height: 0.95;
  margin: 0 0 24px 0;
}
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-muted);
}
.footer-bottom .links { display: flex; gap: 24px; }

/* =========================================================
   TWEAKS PANEL
   ========================================================= */
.tweaks {
  position: fixed; z-index: 100;
  right: 20px; bottom: 20px;
  width: 300px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  color: var(--fg);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.7);
  display: none;
}
.tweaks.open { display: block; }
.tweaks-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-muted);
}
.tweaks-head .live { color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.tweaks-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.tweaks-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 16px; max-height: 70vh; overflow-y: auto; }
.tweak-row { display: flex; flex-direction: column; gap: 8px; }
.tweak-row label { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .06em; }
.tweak-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.tweak-opt {
  font-family: var(--font-mono); font-size: 11px;
  padding: 6px 10px; border: 1px solid var(--line-2);
  color: var(--fg-dim); background: transparent; cursor: pointer;
  transition: all .15s;
}
.tweak-opt:hover { color: var(--fg); border-color: var(--fg); }
.tweak-opt.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tweak-swatches { display: flex; gap: 8px; }
.tweak-swatch {
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
  transition: border-color .15s;
}
.tweak-swatch.active { border-color: var(--fg); }
.tweak-input {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--bg-3); border: 1px solid var(--line-2);
  color: var(--fg); padding: 8px 10px;
  outline: none;
}
.tweak-input:focus { border-color: var(--accent); }

/* =========================================================
   Reveal-on-scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }
[data-motion="off"] .reveal { opacity: 1; transform: none; transition: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .hero-bottom { grid-template-columns: 1fr; }
  .section-header { grid-template-columns: 1fr; gap: 20px; }
  .service { grid-template-columns: 40px 1fr; gap: 16px; }
  .service .stack { justify-content: flex-start; grid-column: 2; }
  .service p { grid-column: 2; }
  .service .sch { display: none; }
  .process { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2) { border-right: 0; }
  .cases { grid-template-columns: 1fr; }
  .case.a, .case.b, .case.c, .case.d { grid-column: span 1; }
  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .num:nth-child(2) { border-right: 0; }
  .pod { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr 1fr; }
  .careers-grid { grid-template-columns: 1fr; }
  .job { border-right: 0 !important; }
  .posts { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .logos-inner { grid-template-columns: 1fr; }
}

/* =========================================================
   MOBILE ENHANCEMENTS — hamburger, sticky CTA, tap states,
   ripples, swipeable cases, gyro glow, haptic tap targets
   ========================================================= */

/* ----- Hamburger nav button ----- */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg) 50%, transparent);
  position: relative;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.nav-burger:active { background: var(--accent); border-color: var(--accent); }
.nav-burger span {
  position: absolute; left: 10px; right: 10px; height: 1.5px;
  background: var(--fg);
  transition: transform .3s, opacity .2s, top .3s;
}
.nav-burger span:nth-child(1) { top: 14px; }
.nav-burger span:nth-child(2) { top: 21px; }
.nav-burger span:nth-child(3) { top: 28px; }
.nav-burger.open { background: var(--accent); border-color: var(--accent); }
.nav-burger.open span { background: var(--accent-ink); }
.nav-burger.open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ----- Mobile nav overlay ----- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--bg);
  padding: calc(var(--nav-h, 60px) + 40px) var(--gutter) 40px;
  transform: translateY(-100%);
  transition: transform .45s cubic-bezier(.2,.9,.25,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu-list {
  display: flex; flex-direction: column; gap: 0;
  border-top: 1px solid var(--line);
}
.mobile-menu-link {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
  transition: color .2s, padding-left .3s;
  position: relative;
  overflow: hidden;
}
.mobile-menu-link .idx {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-muted);
  letter-spacing: .08em;
}
.mobile-menu-link:active {
  color: var(--accent);
  padding-left: 12px;
}
.mobile-menu-meta {
  margin-top: auto;
  padding-top: 40px;
  display: flex; flex-direction: column; gap: 16px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted);
}
.mobile-menu-meta .cta {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: 13px;
  margin-top: 8px;
}
.mobile-menu-meta .cta::after { content: "→"; }
.mobile-menu-meta .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block; margin-right: 8px;
  animation: pulse 1.5s infinite;
}

body.menu-open { overflow: hidden; }

/* ----- Sticky mobile bottom CTA ----- */
.mobile-cta {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 40;
  display: none;
  padding: 14px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-mono); font-size: 13px;
  align-items: center; justify-content: space-between;
  box-shadow: 0 18px 40px -12px color-mix(in srgb, var(--accent) 40%, transparent),
              0 0 0 1px color-mix(in srgb, var(--accent-ink) 10%, transparent);
  transform: translateY(140%);
  transition: transform .4s cubic-bezier(.2,.9,.25,1);
  border-radius: 2px;
  -webkit-tap-highlight-color: transparent;
}
.mobile-cta.in { transform: translateY(0); }
.mobile-cta::after { content: "→"; transition: transform .2s; }
.mobile-cta:active { transform: translateY(0) scale(0.97); }
.mobile-cta:active::after { transform: translateX(4px); }
.mobile-cta .live {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
}
.mobile-cta .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-ink); animation: pulse 1.5s infinite;
}

/* ----- Ripple (tap feedback) ----- */
.ripple {
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.ripple .ripple-dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: color-mix(in srgb, var(--accent) 50%, transparent);
  pointer-events: none;
  animation: rippleOut 650ms ease-out forwards;
  mix-blend-mode: screen;
}
@keyframes rippleOut {
  0%   { transform: translate(-50%, -50%) scale(0);   opacity: 0.7; }
  80%  { opacity: 0.2; }
  100% { transform: translate(-50%, -50%) scale(30);  opacity: 0; }
}

/* ----- Tap-reveal for cases and services ----- */
.case.tapped { border-color: var(--accent); }
.case.tapped .hover-glow { opacity: 1; }
.case.tapped .case-visual::after {
  content: "● SCH VISIBLE";
  position: absolute;
  top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent);
  letter-spacing: .08em;
  z-index: 2;
}
.service.tapped { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.service.tapped .sch { opacity: .8; }

/* ----- Swipe-hint under cases (mobile only, shown inline) ----- */
.cases-hint {
  display: none;
  align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-muted);
  margin-top: 16px; padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.cases-hint .arrow { color: var(--accent); animation: swipe-hint 2.2s infinite; }
@keyframes swipe-hint {
  0%, 100% { transform: translateX(0); opacity: .5; }
  50% { transform: translateX(12px); opacity: 1; }
}

/* =========================================================
   REFINED MOBILE (<=1000px)
   ========================================================= */
@media (max-width: 1000px) {
  /* Nav: show burger, hide CTA and links (menu overlay replaces them) */
  .nav-inner { grid-template-columns: auto 1fr auto; gap: 12px; padding: 10px var(--gutter); }
  .nav-burger { display: inline-flex; }
  .nav-cta { display: none; }

  /* Hero */
  .hero {
    padding-top: calc(var(--nav-h, 60px) + 80px);
    padding-bottom: 40px;
    min-height: auto;
  }
  .hero-title { font-size: clamp(44px, 13vw, 88px); line-height: 0.92; }
  .hero-title .line.shift { padding-left: 0; }
  .hero-labels { flex-wrap: wrap; gap: 8px; font-size: 10px; }
  .hero-labels .sep { display: none; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { flex: 1; justify-content: center; min-width: 140px; }
  .hero-bottom { gap: 32px; margin-top: 32px; }
  .terminal { font-size: 11px; }
  .terminal-body { padding: 12px 14px; min-height: 190px; }

  /* Statusbar tighter */
  .statusbar { height: 28px; font-size: 10px; }
  .statusbar-inner { gap: 20px; padding: 6px var(--gutter); }

  /* Services: tap targets */
  .service { padding: 24px 0; }
  .service h3 { font-size: clamp(26px, 7vw, 40px); }

  /* Cases: horizontal snap-swipe carousel */
  .cases {
    display: flex;
    grid-template-columns: none;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cases::-webkit-scrollbar { display: none; }
  .case {
    flex: 0 0 85%;
    min-width: 85%;
    scroll-snap-align: center;
    min-height: 380px;
  }
  .case.a, .case.b, .case.c, .case.d { grid-column: auto; }
  .case-meta { grid-template-columns: 1fr; gap: 8px 0; padding: 16px 18px; }
  .case-tags { grid-column: 1; margin-top: 8px; padding-top: 10px; }
  .case-title { font-size: 18px; }
  .cases-hint { display: flex; }

  /* Numbers */
  .num { padding: 32px 20px; }
  .num-value { font-size: clamp(44px, 12vw, 72px); }

  /* Pod config: restructure for mobile touch */
  .pod-builder, .pod-summary { padding: 20px; }
  .pod-options { gap: 6px; }
  .pod-opt { padding: 10px 14px; }
  .pod-role { grid-template-columns: 1fr auto; gap: 8px; padding: 14px; }
  .pod-builder .pod-section:last-child > div > div {
    grid-template-columns: 1fr auto auto auto !important;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .pod-total { grid-template-columns: 1fr; gap: 10px; }
  .pod-total > div:nth-child(2) { text-align: left !important; }

  /* Contact */
  .contact-form { flex-direction: column; gap: 10px; }
  .contact-form input { padding: 14px 14px; font-size: 14px; }
  .contact-form .btn { justify-content: center; width: 100%; }

  /* Footer */
  .footer-top { gap: 32px; padding-bottom: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
  .footer-bottom .links { flex-wrap: wrap; }

  /* Sticky CTA visible on mobile; add body padding */
  body.has-sticky-cta { padding-bottom: 80px; }
  .mobile-cta { display: flex; }

  /* Rhythm */
  .section { padding-block: clamp(60px, 14vw, 120px); }

  /* Logos */
  .logos-list { gap: 28px 40px; }
  .logo-item { font-size: 20px; }

  /* Titles */
  .section-title { font-size: clamp(32px, 8vw, 60px); }
  .contact-big { font-size: clamp(32px, 8vw, 56px); }
  .footer-big { font-size: clamp(28px, 8vw, 48px); }

  /* Larger touch targets */
  .btn, .chip, .pod-opt, .tweak-opt { min-height: 40px; }
  .job { padding: 20px; min-height: 72px; }
  .job-title { font-size: 18px; }
}

/* Very small phones */
@media (max-width: 480px) {
  .numbers-grid { grid-template-columns: 1fr; }
  .num { border-right: 0; border-bottom: 1px solid var(--line); }
  .num:last-child { border-bottom: 0; }
  .process { grid-template-columns: 1fr; }
  .step { border-right: 0 !important; border-bottom: 1px solid var(--line); min-height: auto; }
  .step:last-child { border-bottom: 0; }
  .step-num { margin-bottom: 48px; }
  .team { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero-title { font-size: clamp(40px, 14vw, 72px); }

  .tweaks {
    right: 8px; left: 8px; bottom: 8px;
    width: auto;
    max-height: 60vh;
  }
  .tweaks-body { max-height: 50vh; }
}

/* Accessibility: respect OS-level reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .statusbar-inner { animation: none; }
  .hero-title .caret, .terminal-body .caret { animation: none; }
  .mobile-cta, .mobile-menu { transition: none; }
}

/* iOS: safe-area insets */
@supports(padding: max(0px)) {
  .mobile-cta { bottom: max(12px, env(safe-area-inset-bottom)); }
  .nav-inner { padding-top: max(10px, env(safe-area-inset-top)); }
}
