/* ================================================================
   DIGIT GLOBAL — Visual System
   Cinematic, mysterious, high-end. Light cream base, deep navy
   plates, oversized Poppins, heavy motion choreography.
   ================================================================ */

:root {
  /* — Brand */
  --dg-blue: #1E90FF;
  --dg-deep: #005BFF;
  --dg-cyan: #4FC3FF;
  --dg-navy: #071A3D;

  /* — Surfaces */
  --cream: #F2EEE6;          /* page bg */
  --cream-2: #ECE7DC;         /* alt section */
  --paper: #FBF9F4;
  --plate: #050912;           /* near-black plate */
  --plate-2: #071A3D;         /* navy plate */
  --plate-3: #0A2456;

  /* — Ink */
  --ink-0: #050912;
  --ink-1: #0D1729;
  --ink-2: #2A3447;
  --ink-3: #5B6577;
  --ink-4: #8A92A1;
  --ink-on-dark-0: #FBF9F4;
  --ink-on-dark-2: #B6C2DA;
  --ink-on-dark-3: #6E7C97;

  /* — Lines */
  --line-1: rgba(5, 9, 18, 0.10);
  --line-2: rgba(5, 9, 18, 0.18);
  --line-on-dark-1: rgba(255, 255, 255, 0.10);
  --line-on-dark-2: rgba(255, 255, 255, 0.18);

  /* — Accent (mutated by tweaks) */
  --accent: var(--dg-deep);
  --accent-2: var(--dg-blue);
  --accent-3: var(--dg-cyan);
  --accent-glow: rgba(0, 91, 255, 0.35);
  --accent-soft: rgba(0, 91, 255, 0.10);

  /* — Type */
  --font: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* — Layout */
  --max: 1320px;
  --pad: clamp(20px, 4.6vw, 64px);

  /* — Motion */
  --motion: 1;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
}

/* — Reset */
* { box-sizing: border-box; }
*::selection { background: var(--ink-0); color: var(--cream); }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--ink-1);
  font-family: var(--font);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ── TYPE SCALE ─────────────────────────────────────────────── */

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.eyebrow--center {
  justify-content: center;
}
.eyebrow--on-dark {
  color: var(--ink-on-dark-2);
}

/* Display — gargantuan, the cinema */
.h-cinema {
  font-family: var(--font);
  font-size: clamp(64px, 12vw, 220px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-weight: 500;
  color: var(--ink-0);
  text-wrap: balance;
  margin: 0;
}
.h-cinema em {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.h-display {
  font-size: clamp(48px, 8.4vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 500;
  color: var(--ink-0);
  text-wrap: balance;
  margin: 0;
}
.h-display em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

.h-1 {
  font-size: clamp(38px, 5.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.032em;
  font-weight: 500;
  color: var(--ink-0);
  text-wrap: balance;
  margin: 0;
}
.h-1 em { font-style: italic; font-weight: 300; color: var(--accent); }

.h-2 {
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1.02;
  letter-spacing: -0.024em;
  font-weight: 500;
  color: var(--ink-0);
  text-wrap: balance;
  margin: 0;
}
.h-2 em { font-style: italic; font-weight: 300; color: var(--accent); }

.h-3 {
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 500;
  margin: 0;
}

.lede {
  font-size: clamp(18px, 1.45vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
  font-weight: 400;
  max-width: 58ch;
  margin: 0;
  text-wrap: pretty;
}

.body { color: var(--ink-2); line-height: 1.55; font-size: 16px; }
.caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  text-transform: uppercase;
}

/* Inverted (on dark plate) */
.on-dark { color: var(--ink-on-dark-0); }
.on-dark .h-cinema, .on-dark .h-display, .on-dark .h-1, .on-dark .h-2, .on-dark .h-3 { color: var(--ink-on-dark-0); }
.on-dark .lede { color: var(--ink-on-dark-2); }
.on-dark .body { color: var(--ink-on-dark-2); }
.on-dark .caption { color: var(--ink-on-dark-3); }
.on-dark .eyebrow { color: var(--ink-on-dark-2); }

/* ── LAYOUT ─────────────────────────────────────────────────── */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.wrap--narrow { max-width: 1100px; }
.wrap--wide   { max-width: 1480px; }
.section { position: relative; padding: clamp(80px, 11vw, 180px) 0; }
.section--snug { padding: clamp(60px, 7vw, 110px) 0; }
.plate {
  background: var(--plate);
  color: var(--ink-on-dark-0);
}
.plate-navy {
  background: linear-gradient(180deg, var(--plate-2) 0%, var(--plate) 100%);
  color: var(--ink-on-dark-0);
}

/* ── BUTTONS ────────────────────────────────────────────────── */

.btn {
  --bh: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: var(--bh);
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-1);
  position: relative;
  overflow: hidden;
  transition: color .35s var(--ease), border-color .35s var(--ease);
  white-space: nowrap;
  isolation: isolate;
}
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Primary — deep blue fill with cinematic shimmer */
.btn--primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 14px 40px -12px var(--accent-glow);
}
.btn--primary::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.20) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .9s var(--ease);
  z-index: -1;
}
.btn--primary:hover::before { transform: translateX(100%); }

/* Outline — for light bg */
.btn--outline {
  border-color: var(--line-2);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--ink-0);
  background: var(--ink-0);
  color: var(--cream);
}

/* Ghost — minimal text */
.btn--ghost {
  border-color: transparent;
  padding: 0 8px;
  height: 36px;
}
.btn--ghost:hover { color: var(--accent); }

/* On dark */
.on-dark .btn--outline {
  border-color: var(--line-on-dark-2);
  color: var(--ink-on-dark-0);
}
.on-dark .btn--outline:hover {
  background: var(--cream);
  color: var(--ink-0);
  border-color: var(--cream);
}

/* Sizes */
.btn--lg { --bh: 64px; padding: 0 32px; font-size: 15px; }
.btn--sm { --bh: 40px; padding: 0 18px; font-size: 13px; }

/* Magnetic CTA — used on hero. Sized large with rotating glow */
.cta-orb {
  --s: 168px;
  position: relative;
  width: var(--s); height: var(--s);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .25s var(--ease);
  box-shadow: 0 20px 60px -18px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.22);
  cursor: pointer;
  border: 0;
}
.cta-orb::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px dashed currentColor;
  opacity: 0.35;
  animation: cta-rotate calc(28s / var(--motion)) linear infinite;
  pointer-events: none;
}
.cta-orb::after {
  content: "";
  position: absolute;
  inset: -32px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}
.cta-orb .label { display: flex; align-items: center; gap: 8px; }
@keyframes cta-rotate { to { transform: rotate(360deg); } }

/* ── CARDS / TILES ──────────────────────────────────────────── */

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line-1);
  border-radius: 24px;
  padding: 32px;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.plate .card, .plate-navy .card {
  background: rgba(255,255,255,0.025);
  border-color: var(--line-on-dark-1);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 240px at var(--mx,50%) var(--my,0%), var(--accent-soft), transparent 65%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: var(--line-2); }
.plate .card:hover, .plate-navy .card:hover { border-color: var(--line-on-dark-2); }

/* ── CHIP / TAG ─────────────────────────────────────────────── */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: rgba(5,9,18,0.04);
  border: 1px solid var(--line-1);
  color: var(--ink-1);
}
.on-dark .chip {
  background: rgba(255,255,255,0.06);
  border-color: var(--line-on-dark-1);
  color: var(--ink-on-dark-0);
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.chip--live .dot { background: #00C972; box-shadow: 0 0 8px #00C972; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ── REVEAL ─────────────────────────────────────────────────── */

/* Default: content is VISIBLE. The hidden-then-reveal state is opted-in
   by a body class set in JS, so a JS failure keeps content visible. */
.reveal { opacity: 1; transform: none; }

body.has-reveal-js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
body.has-reveal-js .reveal.in {
  opacity: 1;
  transform: none;
}

/* Char-by-char reveal */
.reveal-chars .ch { display: inline-block; }
body.has-reveal-js .reveal-chars .ch {
  transform: translateY(110%);
  opacity: 0;
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
}
body.has-reveal-js .reveal-chars.in .ch {
  transform: none;
  opacity: 1;
}

/* ── MARQUEE ────────────────────────────────────────────────── */

.marquee {
  display: flex; gap: 80px; width: max-content;
  animation: mq calc(45s / var(--motion)) linear infinite;
}
.marquee--slow { animation-duration: calc(80s / var(--motion)); }
@keyframes mq {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── DIVIDER WITH LABEL ────────────────────────────────────── */

.rule {
  display: flex; align-items: center; gap: 16px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-family: var(--mono);
}
.rule::before, .rule::after {
  content: ""; flex: 1; height: 1px; background: var(--line-1);
}
.on-dark .rule { color: var(--ink-on-dark-3); }
.on-dark .rule::before, .on-dark .rule::after { background: var(--line-on-dark-1); }

/* ── GRID LINES ─────────────────────────────────────────────── */

.bg-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-1) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-1) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 85%);
}
.on-dark .bg-grid {
  background-image:
    linear-gradient(to right, var(--line-on-dark-1) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-on-dark-1) 1px, transparent 1px);
}
.bg-noise {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.on-dark .bg-noise { mix-blend-mode: overlay; opacity: 0.07; }

/* ── HORIZONTAL TICKER ────────────────────────────────────── */

.ticker {
  display: flex; align-items: center; gap: 32px;
  padding: 14px var(--pad);
  border-top: 1px solid var(--line-1);
  border-bottom: 1px solid var(--line-1);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
}
.ticker .blip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

/* ── FOCUS ──────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 3px;
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: rgba(5,9,18,0.15);
  border-radius: 8px;
  border: 2px solid var(--cream);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(5,9,18,0.30); background-clip: padding-box; }

/* ── TABULAR NUMERICS ──────────────────────────────────────── */
.tnum { font-variant-numeric: tabular-nums; }

/* ── ASPECT HELPERS ────────────────────────────────────────── */
.aspect-21x9 { aspect-ratio: 21/9; }
.aspect-16x9 { aspect-ratio: 16/9; }
.aspect-4x5  { aspect-ratio: 4/5; }
.aspect-1x1  { aspect-ratio: 1/1; }

/* ── UTILS ──────────────────────────────────────────────────── */
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.no-wrap { white-space: nowrap; }
.text-center { text-align: center; }
.relative { position: relative; }

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

/* Tablet (≤ 1024px): tighten container padding */
@media (max-width: 1024px) {
  :root { --pad: 28px; }
}

/* Tablet → phone (≤ 820px): hide desktop nav, mobile menu kicks in via JS class */
@media (max-width: 820px) {
  :root { --pad: 22px; }
  nav.primary-links { display: none !important; }
  .nav-desk-cta { display: none !important; }
  .nav-mobile-toggle { display: inline-flex !important; }

  /* Tighter section padding */
  .section { padding: clamp(56px, 9vw, 110px) 0; }
  .section--snug { padding: clamp(48px, 7vw, 80px) 0; }

  /* Tighter button height for touch */
  .btn { --bh: 52px; padding: 0 22px; font-size: 14px; }
  .btn--lg { --bh: 58px; padding: 0 26px; font-size: 14.5px; }

  /* Pull oversized CTA orb down */
  .cta-orb { --s: 140px; font-size: 13px; }

  /* Cards: lighter padding */
  .card { padding: 24px; border-radius: 20px; }

  /* Decorative bg layers are expensive on phones — hide them */
  .bg-grid { display: none; }
  .bg-noise { display: none; }
}

/* Phone (≤ 720px): the big sweep — collapse multi-col grids,
   scale typography down for narrow screens, fix touch targets,
   safe-area insets for iOS notch/home-bar. */
@media (max-width: 720px) {
  :root {
    --pad: 18px;
    --max: 100%;
  }

  html, body { -webkit-text-size-adjust: 100%; }

  /* Safe-area insets for iOS notch and home indicator */
  body {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }

  /* — Typography rescale for narrow screens — */
  .h-cinema  { font-size: clamp(38px, 11vw, 72px); line-height: 0.96; letter-spacing: -0.035em; }
  .h-display { font-size: clamp(34px, 9.5vw, 60px); line-height: 1.0;  letter-spacing: -0.032em; }
  .h-1       { font-size: clamp(28px, 8vw, 48px);   line-height: 1.04; letter-spacing: -0.028em; }
  .h-2       { font-size: clamp(22px, 6vw, 34px);   line-height: 1.1;  letter-spacing: -0.02em; }
  .h-3       { font-size: clamp(18px, 4.6vw, 22px); line-height: 1.2; }
  .lede      { font-size: clamp(15.5px, 4.2vw, 18px); line-height: 1.5; }
  .body      { font-size: 15px; line-height: 1.55; }

  /* — Force any inline 2/3/4-column grids in main to single column — */
  /* JSX renders style values without quotes, so attribute selectors match
     the raw substring (no surrounding quote chars). */
  /* Two-column inline grids */
  main [style*="1.2fr 1fr"],
  main [style*="1.1fr 1fr"],
  main [style*="1.3fr 1fr"],
  main [style*="1.4fr 1fr"],
  main [style*="1.5fr 1fr"],
  main [style*="1.6fr 1fr"],
  main [style*="1fr 1.1fr"],
  main [style*="1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  /* Note: bare '1fr 1fr' layouts (e.g. two side-by-side buttons inside a card)
     are intentionally left as 2-col on mobile — half-width buttons read well. */

  /* Three-column inline grids */
  main [style*="repeat(3, 1fr)"],
  main [style*="1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  /* Four-column → 2 cols on phone */
  main [style*="repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }

  /* Tri-column with fixed left rail (timeline / process patterns) — stack */
  main [style*="120px 1fr 1.4fr"],
  main [style*="180px 1fr 1.6fr"],
  main [style*="1fr 80px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Card grids using auto-fill minmax — allow smaller cards */
  main [style*="minmax(340px"],
  main [style*="minmax(360px"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Five-column dense table → 2-up card stack */
  main [style*="1.4fr 1.4fr 1fr 1fr 0.5fr"] {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px 12px !important;
    font-size: 12.5px !important;
  }
  main [style*="1.4fr 1.4fr 1fr 1fr 0.5fr"] > *:nth-child(5) {
    grid-column: span 2;
    text-align: left !important;
  }

  /* Hero metric strip — keep 3 across but small */
  main .home-metrics {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }
  /* Shrink the count-up numbers inside the home metrics block */
  main .home-metrics > div > span:first-child {
    font-size: clamp(20px, 6.2vw, 32px) !important;
  }

  /* — Inputs / buttons touch sizing — */
  input, textarea, select, button {
    font-size: 16px;             /* iOS won't zoom if ≥ 16px */
  }

  /* Tighter chip wrap */
  .chip { padding: 6px 12px; font-size: 12px; }

  /* Marquee: slower + bigger gap to feel calmer on phone */
  .marquee { gap: 48px; }

  /* Ticker: smaller padding */
  .ticker { padding: 12px var(--pad); font-size: 10.5px; gap: 20px; }

  /* Disable magnetic hover transform (pointer:fine only) */
  /* Browsers without pointer:fine treat it as none, so no-op needed. */
}

/* Hover-only effects: only apply on devices with a fine pointer */
@media (hover: none) {
  .card:hover { border-color: var(--line-1); transform: none; }
  .card:hover::before { opacity: 0; }
  .btn--outline:hover { background: transparent; color: var(--ink-1); border-color: var(--line-2); }
  .btn--primary:hover::before { transform: translateX(-100%); }
}

/* Very small phones (≤ 380px — iPhone SE / Mini) */
@media (max-width: 380px) {
  :root { --pad: 14px; }
  .h-cinema  { font-size: 34px; }
  .h-display { font-size: 30px; }
  .h-1       { font-size: 26px; }
  .h-2       { font-size: 20px; }
  .cta-orb { --s: 124px; font-size: 12px; }
  .btn { padding: 0 16px; font-size: 13px; }
}

/* Touch target floor for all interactive elements on mobile */
@media (max-width: 820px) {
  a, button, [role="button"] { min-height: 44px; }
  a.btn--ghost, a[class*="caption"], header a { min-height: 0; }
}

/* iOS quirk: hide outlines on touch-driven focus only */
@media (hover: none) and (pointer: coarse) {
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
}

/* Product capability rows — keep text first on mobile regardless of flip */
@media (max-width: 720px) {
  .cap-row { gap: 32px !important; padding: 48px 0 !important; }
  .cap-row .cap-row-text { order: 1 !important; }
  .cap-row .cap-row-media { order: 2 !important; }
  .cap-row .cap-row-media [style*="min-height: 380px"],
  .cap-row .cap-row-media [style*="minHeight: 380px"] { min-height: 280px !important; }
}

/* Pricing tiers — stack to single column on phone, kill the lift */
@media (max-width: 980px) {
  .pricing-tiers { grid-template-columns: 1fr 1fr !important; gap: 18px !important; }
  .tier-card--featured { transform: none !important; }
}
@media (max-width: 720px) {
  .pricing-tiers { grid-template-columns: 1fr !important; gap: 16px !important; }
  .tier-card { padding: 24px !important; }
  .tier-card .tier-name { font-size: 30px !important; }
  .tier-card .tier-price { font-size: 34px !important; }
  .tier-card--featured { transform: none !important; }
}

/* Process timeline — desktop keeps mirrored cards, mobile stacks */
.process-card--shown { visibility: visible; }
.process-card--hidden { visibility: hidden; }
@media (max-width: 720px) {
  .process-wrap .process-line { display: none; }
  .process-row {
    grid-template-columns: 1fr !important;
    padding: 28px 0 !important;
    gap: 14px !important;
  }
  .process-row .process-card--hidden { display: none !important; }
  .process-row .process-dot { display: none !important; }
  .process-row .process-card--shown {
    border-left: 2px solid var(--accent);
    padding-left: 18px;
  }
}

/* Footer mobile grid — overrides the inline 4-col template */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 36px !important; }
  .footer-grid > :first-child { grid-column: span 2; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; margin-bottom: 56px !important; }
  .footer-grid > :first-child { grid-column: auto; }
}

/* ═══════════════════════════════════════════════════════════════
   Mobile Nav Panel — full-screen overlay, self-contained header
   + scrollable link list. Sits ABOVE the chatbot launcher.
   ═══════════════════════════════════════════════════════════════ */
.nav-mobile-toggle { display: none; }

.nav-mobile-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  height: 100dvh; /* iOS dynamic viewport, falls back to 100% */
  background: var(--cream);
  z-index: 200;   /* above chatbot launcher (90) and everything else */
  display: flex;
  flex-direction: column;
  /* Use opacity + visibility instead of transform so background is reliably opaque */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity .25s var(--ease-out), transform .35s var(--ease-out), visibility 0s linear .35s;
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}
.nav-mobile-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
  transition: opacity .25s var(--ease-out), transform .35s var(--ease-out), visibility 0s linear 0s;
}

/* Panel header — brand + close */
.nav-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line-1);
  flex-shrink: 0;
  background: var(--cream);
}
.nav-mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.nav-mobile-close {
  width: 40px; height: 40px;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-0);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-mobile-close:active { background: var(--cream-2); }

/* "Menu" eyebrow */
.nav-mobile-label {
  padding: 18px var(--pad) 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex-shrink: 0;
}

/* Links list — scrolls if needed but normally fits */
.nav-mobile-links {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.nav-mobile-link {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  color: var(--ink-0);
  border-bottom: 1px solid var(--line-1);
  min-height: 60px;
  text-decoration: none;
}
.nav-mobile-link:last-of-type { border-bottom: none; }
.nav-mobile-link__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.nav-mobile-link__label {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink-0);
  line-height: 1.15;
}
.nav-mobile-link__desc {
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.005em;
  line-height: 1.3;
}
.nav-mobile-link.active .nav-mobile-link__label { color: var(--accent); }
.nav-mobile-link.active .nav-mobile-link__arrow { color: var(--accent); }
.nav-mobile-link__arrow {
  color: var(--ink-3);
  flex-shrink: 0;
}

/* Bottom: CTA + footer copy */
.nav-mobile-bottom {
  padding: 16px var(--pad) calc(20px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--line-1);
  background: var(--cream);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-mobile-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  box-shadow: 0 12px 30px -10px var(--accent-glow);
  border: none;
  text-decoration: none;
}
.nav-mobile-cta:active { transform: scale(0.98); }
.nav-mobile-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Tighter spacing for very small phones so all 6 links + CTA fit */
@media (max-width: 380px) {
  .nav-mobile-link { min-height: 52px; padding: 11px 0; }
  .nav-mobile-link__label { font-size: 18px; }
  .nav-mobile-link__desc { font-size: 11.5px; }
  .nav-mobile-label { padding: 12px var(--pad) 6px; }
  .nav-mobile-bottom { padding: 12px var(--pad) calc(16px + env(safe-area-inset-bottom, 0)); }
  .nav-mobile-cta { height: 48px; font-size: 14px; }
}

/* Lock background scroll while the menu is open */
body.nav-locked { overflow: hidden; position: relative; }

/* ═══════════════════════════════════════════════════════════════
   Hero — keep the robot visible on phones but get it out of the
   way of the lede paragraph so copy stays readable.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 720px) {
  /* Shrink the orb and tuck it into the bottom-right corner so it
     becomes ambient decoration instead of a centered overlay. */
  .hero-orb {
    right: -60px !important;
    top: auto !important;
    bottom: -40px !important;
    transform: none !important;
    width: 260px !important;
    height: 260px !important;
    opacity: 0.55;
  }
  /* Quiet down the floating colour blobs so they don't wash out text. */
  .hero-blob { opacity: 0.45; }
  /* Coordinate tag chips are decorative; hide on phones. */
  .hero-coord { display: none !important; }
}
@media (max-width: 480px) {
  .hero-orb {
    width: 200px !important;
    height: 200px !important;
    right: -50px !important;
    bottom: -30px !important;
    opacity: 0.5;
  }
}
