/* =========================================================
   ORBIT GROUP — Deep-space editorial-luxe theme
   ========================================================= */

:root {
  /* Palette */
  --bg:        #07080f;
  --bg-2:      #0a0c16;
  --surface:   rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.05);
  --line:      rgba(255, 255, 255, 0.09);
  --line-2:    rgba(255, 255, 255, 0.16);

  --text:      #E9ECF3;
  --muted:     #9094a6;
  --muted-2:   #6a6e80;

  /* Monochrome brand accent + subtle cool glow */
  --accent:    #ffffff;
  --accent-2:  #cdd6f5;
  --accent-3:  #aab6e6;
  --accent-soft: rgba(150, 170, 255, 0.14);
  --glow:      rgba(150, 170, 255, 0.55);

  /* Cool glow, used sparingly */
  --cool:      #9fb0ff;

  --maxw: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-2: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;
}

/* =========================================================
   Light theme — opt-in "daylight orbit"
   Dark stays the default brand identity; this redefines the
   same tokens for a warm, paper-light palette. Set via
   <html data-theme="light"> (boot script in index.html <head>).
   ========================================================= */
:root[data-theme="light"] {
  --bg:        #f4f1ea;
  --bg-2:      #ece7db;
  --surface:   rgba(18, 22, 40, 0.035);
  --surface-2: rgba(18, 22, 40, 0.07);
  --line:      rgba(18, 22, 40, 0.12);
  --line-2:    rgba(18, 22, 40, 0.20);

  --text:      #1b1d26;
  --muted:     #565a6b;
  --muted-2:   #82869a;

  /* "Max-contrast" accent flips to near-black; cool blue stays the through-line */
  --accent:    #1b1d26;
  --accent-2:  #2f3a82;
  --accent-3:  #4150a0;
  --accent-soft: rgba(80, 100, 200, 0.12);
  --glow:      rgba(90, 110, 210, 0.28);
  --cool:      #4c5fd6;
}

/* ---- Light-theme component corrections (where the dark theme hardcoded values) ---- */
:root[data-theme="light"] ::selection { background: var(--accent); color: var(--bg); }
:root[data-theme="light"] .btn-solid { color: var(--bg); }
:root[data-theme="light"] .btn-solid:hover { background: var(--accent-3); }
/* Light --glow is lower-alpha than dark, so give the hover halo a touch more
   spread/blur to stay clearly visible on the pale background. */
:root[data-theme="light"] .btn:hover { box-shadow: 0 0 26px 2px var(--glow), 0 0 12px var(--accent-soft); }
:root[data-theme="light"] .nav.scrolled { background: rgba(244, 241, 234, 0.82); }
:root[data-theme="light"] .nav.menu-open { background: rgba(244, 241, 234, 0.96); }
:root[data-theme="light"] .imsg.out .imsg-bubble { color: #fff; }

/* The terminal stays a dark "island" in both themes (terminals read as dark by
   convention). Re-pin the tokens it consumes so its text stays legible in light. */
:root[data-theme="light"] .terminal {
  --text: #E9ECF3;
  --muted: #9094a6;
  --muted-2: #6a6e80;
  --accent: #ffffff;
  --accent-2: #cdd6f5;
  --cool: #9fb0ff;
  --glow: rgba(150, 170, 255, 0.5);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --surface: rgba(255, 255, 255, 0.04);
}

/* ---- Atmosphere in light mode: a daytime sky ---- */
/* Stars belong to night; hide them. Agents (rockets) still fly by day — darken
   so they read against a pale background. */
/* Daytime sky: drop the twinkling background dots, but keep the occasional
   shooting-star streak (recolored below so it reads on the pale background). */
:root[data-theme="light"] .starfield .star { display: none; }
:root[data-theme="light"] .starfield .shooting-star {
  background: var(--accent-3);
  box-shadow: 0 0 6px 1px var(--glow);
  filter: drop-shadow(0 0 5px var(--glow));
}
:root[data-theme="light"] .starfield .shooting-star::before {
  background: linear-gradient(270deg, var(--accent-3), rgba(76, 95, 214, 0));
}
:root[data-theme="light"] .grain { opacity: 0.02; }
:root[data-theme="light"] .space-rockets .rocket {
  filter: brightness(0.4) saturate(1.5) drop-shadow(0 0 5px var(--glow));
}
:root[data-theme="light"] body::before {
  background:
    radial-gradient(900px 700px at 78% -5%, rgba(90, 110, 210, 0.10), transparent 60%),
    radial-gradient(800px 800px at 8% 8%, rgba(120, 140, 235, 0.07), transparent 55%),
    radial-gradient(1000px 900px at 50% 120%, rgba(150, 160, 200, 0.08), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
/* The faint CTA symbol watermark is a white PNG — flip it dark for light mode */
:root[data-theme="light"] .cta-watermark { filter: invert(1); }

/* ---- Orbital system in light mode ---- */
/* The hero orbit was tuned for deep space (white sun/dots, white rings).
   Re-tone it so the planets, rings, and sun read on a pale background. */
:root[data-theme="light"] .sun-core {
  background: radial-gradient(circle at 35% 30%, var(--cool), var(--accent-3));
}
:root[data-theme="light"] .orbit-4 { border-color: rgba(18, 22, 40, 0.10); }
:root[data-theme="light"] .planet-spin::before {
  box-shadow: 0 0 14px var(--accent-soft);
}
:root[data-theme="light"] .planet-1 .planet-spin::before {
  background: var(--accent-3);
  box-shadow: 0 0 16px var(--glow);
}
/* planet-2 (--cool) and planet-3 (--accent-2) already resolve to readable
   blues via the light tokens; planet-4 uses --text (dark). */
:root[data-theme="light"] .planet-tag {
  background: rgba(244, 241, 234, 0.75);
  color: var(--muted);
  border-color: var(--line);
}
/* Hover in light mode: the shared hover rule hardcodes a near-black tag
   background with var(--text) (dark) text — unreadable on a pale page.
   Re-pin it to a pale tag with accent text/border so the label stays legible,
   and drop the brightness() that washes out the dark-blue dots — let the
   box-shadow + scale do the "light up" instead. */
:root[data-theme="light"] .planet:hover .planet-tag,
:root[data-theme="light"] .planet:focus-visible .planet-tag {
  background: rgba(244, 241, 234, 0.92);
  color: var(--accent-2);
  border-color: var(--accent-2);
}
:root[data-theme="light"] .planet:hover .planet-spin::before,
:root[data-theme="light"] .planet:focus-visible .planet-spin::before {
  filter: none;
  box-shadow: 0 0 32px 4px var(--glow);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Background gradient atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(900px 700px at 78% -5%, rgba(150, 170, 255, 0.10), transparent 60%),
    radial-gradient(800px 800px at 8% 8%, rgba(124, 140, 255, 0.06), transparent 55%),
    radial-gradient(1000px 900px at 50% 120%, rgba(180, 190, 220, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em { font-style: italic; }

::selection { background: var(--accent); color: #07080f; }

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

.starfield { position: fixed; inset: 0; z-index: -2; pointer-events: none; }
.starfield .star {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: var(--o, 0.5);
  animation: twinkle var(--d, 4s) ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: 0.05; transform: scale(0.4); } }

/* Shooting stars — rare, fast streaks. Brighter than the twinkle stars, with a
   trailing tail. Created/removed in JS (js/main.js) and gated on reduced-motion.
   Travel vector (--dx/--dy) and trail angle (--angle) are set per-instance. */
.starfield .shooting-star {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: #fff;
  opacity: 0;
  will-change: transform, opacity;
  box-shadow: 0 0 6px 1px var(--glow), 0 0 2px 0 #fff;
  filter: drop-shadow(0 0 6px var(--glow));
  animation: shoot var(--d, 900ms) linear forwards;
}
.starfield .shooting-star::before {
  content: "";
  position: absolute;
  top: 50%; right: 0;
  width: 90px; height: 1.5px;
  transform-origin: right center;
  transform: translateY(-50%) rotate(var(--angle, 0deg));
  background: linear-gradient(270deg, var(--cool), rgba(159, 176, 255, 0));
  border-radius: 2px;
}
@keyframes shoot {
  0%   { transform: translate(0, 0); opacity: 0; }
  12%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate(var(--dx, 400px), var(--dy, 300px)); opacity: 0; }
}

/* Ambient rockets — drift faintly over content as "live agents"; catchable on hover.
   Layer sits above content (z 40) but below nav (1000)/grain/cursor; it's click-through
   except for each rocket's own .rocket-hit circle. */
.space-rockets { position: fixed; inset: 0; z-index: 40; pointer-events: none; overflow: hidden; }
.space-rockets .rocket {
  position: absolute;
  will-change: transform;
  opacity: var(--o, 0.5);
  filter: drop-shadow(0 0 6px var(--glow));
  transition: opacity .3s var(--ease), filter .3s var(--ease);
}
/* Inner wrapper owns the idle bob so it doesn't fight the JS scroll/rotate transform on .rocket */
.space-rockets .rocket-bob {
  position: relative;
  display: block;
  animation: rocketBob var(--bob, 5s) ease-in-out infinite alternate;
}
.space-rockets .rocket svg { display: block; transition: transform .3s var(--ease); }
.rocket-flame {
  position: absolute;
  bottom: -5px; left: 50%;
  width: 5px; height: 9px;
  transform: translateX(-50%);
  transform-origin: top center;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: linear-gradient(180deg, #ffffff, var(--cool), transparent);
  filter: drop-shadow(0 0 5px var(--glow));
  animation: rocketFlame .28s ease-in-out infinite alternate;
}
@keyframes rocketFlame { to { transform: translateX(-50%) scaleY(1.5); opacity: 0.6; } }
@keyframes rocketBob { to { transform: translateY(-4px); } }

/* Transparent circular catch-area centered on the sprite (rotation-invariant) */
.rocket-hit {
  position: absolute;
  top: 50%; left: 50%;
  width: 46px; height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: auto;
  cursor: none;
}
/* Caught: brighten + lock (freeze the bob/flame, enlarge the ship) */
.space-rockets .rocket.is-caught {
  opacity: 1;
  filter: drop-shadow(0 0 12px var(--glow)) brightness(1.25);
}
.space-rockets .rocket.is-caught .rocket-bob,
.space-rockets .rocket.is-caught .rocket-flame { animation-play-state: paused; }
.space-rockets .rocket.is-caught svg { transform: scale(1.3); }

/* Agent bubble — small popover anchored beside a caught rocket */
.agent-bubble {
  position: fixed;
  z-index: 1100;
  width: max-content;     /* shrink-wrap to the text… */
  max-width: 325px;       /* …but wrap once it gets this wide */
  padding: 0.9rem 2.1rem 0.95rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 18px 50px -12px rgba(0,0,0,0.6), 0 0 30px -10px var(--glow);
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.agent-bubble.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.agent-bubble-eyebrow {
  display: flex; align-items: center; gap: 0.4em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cool);
  margin-bottom: 0.45rem;
}
.agent-bubble-eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: agentLive 1.4s ease-in-out infinite;
}
@keyframes agentLive { 50% { opacity: 0.35; } }
.agent-bubble-line { margin: 0; color: var(--text); font-size: 1.05rem; line-height: 1.4; font-weight: 400; }
.agent-bubble-line strong { font-weight: 400; color: inherit; }
.agent-bubble-line span { color: inherit; }
.agent-bubble-close {
  position: absolute;
  top: 5px; right: 6px;
  background: none; border: 0;
  color: var(--muted-2);
  font-size: 0.85rem; line-height: 1;
  padding: 5px;
  cursor: none;
  transition: color .2s var(--ease);
}
.agent-bubble-close:hover { color: var(--accent); }
/* Arrow pointing back at the rocket — side (left/right) or vertical (up/down).
   JS sets --arrow-x / --arrow-y so it aims at the rocket even when the bubble
   is clamped to a screen edge. */
.agent-bubble::after { content: ""; position: absolute; width: 0; height: 0; }
.agent-bubble.arrow-left::after,
.agent-bubble.arrow-right::after {
  top: var(--arrow-y, 50%);
  transform: translateY(-50%);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}
.agent-bubble.arrow-left::after  { right: 100%; border-right: 8px solid var(--line-2); }
.agent-bubble.arrow-right::after { left: 100%;  border-left: 8px solid var(--line-2); }
.agent-bubble.arrow-up::after,
.agent-bubble.arrow-down::after {
  left: var(--arrow-x, 50%);
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}
.agent-bubble.arrow-up::after   { bottom: 100%; border-bottom: 8px solid var(--line-2); }
.agent-bubble.arrow-down::after { top: 100%;    border-top: 8px solid var(--line-2); }

/* Touch / coarse pointers: bigger tap target so a moving rocket is grabbable,
   and drop the per-element filters — drop-shadow on a moving foreground layer
   forces main-thread repaints on mobile (stutter). */
@media (pointer: coarse) {
  .rocket-hit { width: 66px; height: 66px; cursor: auto; }
  .space-rockets .rocket { filter: none; }
  .space-rockets .rocket.is-caught { filter: brightness(1.3); }
  .rocket-flame { filter: none; }
}

/* =========================================================
   Custom cursor
   ========================================================= */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor {
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  transition: width .3s var(--ease), height .3s var(--ease),
              background .3s var(--ease), border-color .3s var(--ease);
}
.cursor-dot {
  width: 5px; height: 5px;
  background: var(--accent);
}
.cursor.is-hover {
  width: 64px; height: 64px;
  background: var(--accent-soft);
  border-color: transparent;
}
/* While a modal is open the cursor is promoted into the top layer via the Popover
   API (js/main.js) so it can paint above a native <dialog>. A shown popover gets
   UA chrome (centered via inset/margin, padding, opaque background, dot border) —
   strip it back to a clean ring + dot. Only applies in the :popover-open state. */
.cursor:popover-open,
.cursor-dot:popover-open { inset: auto; top: 0; left: 0; margin: 0; padding: 0; overflow: visible; }
.cursor:popover-open     { background: transparent; }
.cursor-dot:popover-open { background: var(--accent); border: 0; }
@media (hover: none) { .cursor, .cursor-dot { display: none; } body { cursor: auto; } }

/* =========================================================
   Scroll progress
   ========================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--cool), #ffffff);
  z-index: 10000;
  box-shadow: 0 0 14px var(--glow);
}

/* =========================================================
   Reusable bits
   ========================================================= */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
}
.eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; transform: scale(0.7); } }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95em 1.6em;
  border-radius: 100px;
  border: 1px solid transparent;
  /* Reset native <button> chrome so btn-line/btn-ghost stay transparent
     (btn-solid sets its own background below). */
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  transition: transform .4s var(--ease), background .4s var(--ease),
              color .4s var(--ease), border-color .4s var(--ease),
              box-shadow .4s var(--ease);
  will-change: transform;
}
.btn-arrow { transition: transform .4s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* Hover glow — replaces the old magnetic cursor-follow. A soft, centered halo
   that gently breathes in and out, echoing the hero "sun" (see .sun-core /
   sunPulse). Token-based so it adapts to light + dark automatically; the
   keyframe only defines the 50% peak, so it pulses between the static :hover
   shadow and this brighter one. Under prefers-reduced-motion the pulse is
   frozen but the static :hover halo below still shows. */
@keyframes btnGlow {
  50% { box-shadow: 0 0 38px 4px var(--glow), 0 0 12px var(--accent-soft); }
}
.btn:hover {
  box-shadow: 0 0 22px 1px var(--glow), 0 0 6px var(--accent-soft);
  animation: btnGlow 2.4s ease-in-out infinite;
}

.btn-solid {
  background: var(--accent);
  color: #07080f;
  font-weight: 700;
}
.btn-solid:hover { background: var(--accent-2); }

.btn-line, .btn-ghost {
  border-color: var(--line-2);
  color: var(--text);
}
.btn-line:hover, .btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 1.15em 2em; font-size: 0.9rem; }

/* =========================================================
   Nav
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem);
  transition: padding .4s var(--ease), background .4s var(--ease),
              border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  background: rgba(7, 8, 15, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.brand { display: inline-flex; align-items: center; }
.brand-logo {
  height: 38px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 12px var(--accent-soft));
  transition: transform .5s var(--ease), filter .4s var(--ease), height .4s var(--ease);
}
.nav.scrolled .brand-logo { height: 33px; }
/* Theme-aware brand: white wordmark on dark, black on light */
.brand-logo-black { display: none; }
:root[data-theme="light"] .brand-logo-white { display: none; }
:root[data-theme="light"] .brand-logo-black { display: block; }
:root[data-theme="light"] .brand-logo { filter: none; }
.brand:hover .brand-logo {
  transform: scale(1.04);
  filter: drop-shadow(0 0 18px var(--glow));
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Absolutely centered in the bar so the 4 links sit dead-center,
   independent of the brand (left) and actions (right) widths. */
.nav-links {
  display: flex;
  gap: 2.2rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
/* Right cluster: "Start a project" sits left of the theme toggle (top-right corner) */
/* The controls keep their shape at any width: the CTA never wraps to two
   lines and the theme toggle never gets squashed. */
.nav-actions { display: flex; align-items: center; gap: 0.9rem; flex-shrink: 0; }
.nav-cta { white-space: nowrap; }
.theme-toggle { flex-shrink: 0; }
.brand { flex-shrink: 0; }

/* Nav CTA: match the theme toggle's calm hover — accent border + a 1px lift,
   no magnetic drift and no extra text recolor (overrides .btn-ghost:hover). */
.nav-cta { transition: transform .3s var(--ease), border-color .3s var(--ease); }
.nav-cta:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  position: relative;
  transition: color .3s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--accent);
  transition: width .35s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

/* Theme toggle (sun / moon) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  cursor: none;
  position: relative;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle .theme-icon {
  position: absolute;
  font-size: 1rem;
  line-height: 1;
  transition: opacity .3s var(--ease), transform .4s var(--ease);
}
/* Dark theme: show the moon (offer to go light). Light theme: show the sun. */
.theme-icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-icon-moon { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .theme-icon-sun { opacity: 1; transform: rotate(0) scale(1); }
:root[data-theme="light"] .theme-icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

.nav-toggle { display: none; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;        /* fallback */
  min-height: 100svh;       /* avoids iOS toolbar height jump */
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem clamp(1.25rem, 4vw, 3rem) 4rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero-glow {
  position: absolute;
  top: 30%; right: 5%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
  filter: blur(30px);
  z-index: -1;
  animation: float 12s ease-in-out infinite;
}
@keyframes float {
  50% { transform: translate(-30px, 30px) scale(1.1); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(3rem, 8.5vw, 7rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 1.6rem 0;
}
.hero-title .line { display: block; }
.hero-title em { color: var(--accent); font-weight: 400; text-shadow: 0 0 44px var(--glow); }

.hero-sub {
  max-width: 44ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 300;
}

.hero-actions { display: flex; gap: 1rem; margin-top: 2.4rem; flex-wrap: wrap; }

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-top: 3.5rem;
  flex-wrap: wrap;
}
.meta-item { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2em; }
.meta-num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1;
}
.meta-plus { font-family: var(--font-display); font-size: 1.4rem; color: var(--accent); }
.meta-label {
  display: block;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 0.3em;
}
.meta-divider { width: 1px; height: 40px; background: var(--line); }

/* ---- Live agent metric (replaces the old three-stat row) ----
   Sits between the hero subtitle and the CTA buttons. */
.hero-meta-live { flex-direction: column; align-items: flex-start; gap: 0.7rem; margin-top: 2.6rem; }
.live-metric { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2em; }
/* Label sits inline next to the number instead of dropping to its own line */
.live-metric .meta-label { display: inline; width: auto; margin-top: 0; margin-left: 0.7em; }
.live-dot {
  align-self: center;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 0.5em;
  background: #34d399;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.7);
  animation: livePulse 2.2s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 8px rgba(52, 211, 153, 0.7), 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70%  { box-shadow: 0 0 8px rgba(52, 211, 153, 0.7), 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 8px rgba(52, 211, 153, 0.7), 0 0 0 0 rgba(52, 211, 153, 0); }
}
.live-num { display: inline-block; min-width: 1.6ch; }
.live-num-val { display: inline-block; will-change: transform, opacity; }
/* Odometer roll: the old value drifts out one way, the new one rolls in
   from the other. Text is swapped by JS mid-animation, while invisible. */
.live-num-val.roll-up { animation: liveRollUp 0.55s cubic-bezier(0.22, 0.61, 0.36, 1); }
.live-num-val.roll-down { animation: liveRollDown 0.55s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes liveRollUp {
  0%   { transform: translateY(0); opacity: 1; }
  40%  { transform: translateY(-0.55em); opacity: 0; }
  50%  { transform: translateY(0.55em); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes liveRollDown {
  0%   { transform: translateY(0); opacity: 1; }
  40%  { transform: translateY(0.55em); opacity: 0; }
  50%  { transform: translateY(-0.55em); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.live-hint {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  /* Bloom: a band of light sweeps across the letters so the tiny line gets read.
     --text flips with the theme, so the glint works in light mode too. */
  background: linear-gradient(
    100deg,
    var(--muted-2) 42%,
    var(--text) 50%,
    var(--muted-2) 58%
  );
  background-size: 240% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: hintBloom 4.6s ease-in-out infinite;
}
@keyframes hintBloom {
  0%, 18%  { background-position: 100% 0; }
  62%, 100% { background-position: 0% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
  .live-num-val.roll-up, .live-num-val.roll-down { animation: none; }
  .live-hint {
    animation: none;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

/* ---- Orbital system ---- */
.hero-orbit {
  display: grid;
  place-items: center;
  /* tracks the orbit size — grows/shrinks with the screen */
  min-height: clamp(340px, min(58vmin, 92vw), 720px);
}
.orbit-system {
  position: relative;
  /* Scales with the viewport: bigger on large monitors, smaller on phones.
     min() keeps landscape phones from blowing out via the vw cap. */
  --orbit-size: clamp(300px, min(50vmin, 88vw), 620px);
  width: var(--orbit-size);
  height: var(--orbit-size);
  aspect-ratio: 1;
}
.sun {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 15%; height: 15%;       /* scales with the orbit system */
  display: grid; place-items: center;
}
.sun-core {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, var(--accent-3));
  box-shadow: 0 0 50px var(--glow), 0 0 100px var(--accent-soft);
  animation: sunPulse 4s ease-in-out infinite;
}
@keyframes sunPulse {
  50% { box-shadow: 0 0 70px var(--glow), 0 0 140px var(--accent-soft); }
}
.sun-flare {
  position: absolute;
  width: 180%; height: 180%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 60%);
  animation: sunPulse 4s ease-in-out infinite reverse;
}

.orbit {
  position: absolute;
  inset: 0;
  margin: auto;            /* centers the box without using transform */
  border: 1px solid var(--line);
  border-radius: 50%;
  will-change: transform;  /* stable GPU compositing on iOS */
  /* The rings are square boxes; the largest (orbit-4) is last in the DOM and
     would otherwise overlay + swallow clicks meant for the inner planets.
     Keep rings purely visual and let only the planets catch the pointer. */
  pointer-events: none;
}
.orbit-1 { width: 38%;  height: 38%;  animation: orbitSpin 14s linear infinite; }
.orbit-2 { width: 62%;  height: 62%;  animation: orbitSpin 22s linear infinite reverse; }
.orbit-3 { width: 86%;  height: 86%;  animation: orbitSpin 32s linear infinite; }
.orbit-4 { width: 110%; height: 110%; animation: orbitSpin 46s linear infinite reverse; border-style: dashed; border-color: rgba(255,255,255,0.05);}
/* Pure rotate() — interpolates identically on mobile + desktop (no mixed transforms) */
@keyframes orbitSpin { to { transform: rotate(360deg); } }

/* .planet is a point anchored on the top of its orbit ring */
.planet {
  position: absolute;
  top: 0; left: 50%;
  pointer-events: auto;    /* re-enable interaction (parent .orbit opts out) */
}
/* .planet-spin counter-rotates about that anchor so the dot + label stay upright.
   Anchored at the planet box CENTER, which is exactly the ring point — keeps the
   dot sitting on the orbit line regardless of the hit-area padding. */
.planet-spin {
  position: absolute;
  top: 50%; left: 50%;
  transform-origin: 0 0;
  will-change: transform;
}
.planet-spin::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 14px; height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 16px rgba(236,234,227,0.6);
  transition: box-shadow .3s var(--ease), filter .3s var(--ease), transform .3s var(--ease);
}
/* Invisible catch-area centered on the moving dot — easy to keep hovered, no visual shift */
.planet-spin::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 54px; height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}
.planet-1 .planet-spin::before { background: #ffffff; box-shadow: 0 0 18px var(--glow); width: 16px; height: 16px; }
.planet-2 .planet-spin::before { background: var(--cool); box-shadow: 0 0 16px var(--cool); }
.planet-3 .planet-spin::before { background: var(--accent-2); box-shadow: 0 0 16px var(--accent-soft); }
.planet-4 .planet-spin::before { width: 9px; height: 9px; }

.planet-tag {
  position: absolute;
  top: 0; left: 16px;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  background: rgba(7,8,15,0.6);
  padding: 2px 7px;
  border-radius: 100px;
  border: 1px solid var(--line);
  transition: color .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
/* Counter-rotate each planet opposite to its orbit so labels stay upright.
   Clean rotate-only keyframes — interpolates identically on mobile + desktop. */
.orbit-1 .planet-spin { animation: spinCCW 14s linear infinite; }
.orbit-2 .planet-spin { animation: spinCW  22s linear infinite; }
.orbit-3 .planet-spin { animation: spinCCW 32s linear infinite; }
.orbit-4 .planet-spin { animation: spinCW  46s linear infinite; }
@keyframes spinCW  { to { transform: rotate(360deg); } }
@keyframes spinCCW { to { transform: rotate(-360deg); } }

/* =========================================================
   Marquee
   ========================================================= */
.marquee-wrap {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.5rem 0;
  overflow: hidden;
  background: var(--surface);
}
.marquee { display: flex; }
.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 300;
}
.marquee-track .sep { color: var(--accent); font-size: 0.7em; }
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   Sections
   ========================================================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  /* Trimmed ~1in of dead air between sections (was 5rem/12vw/9rem) —
     tighter scroll rhythm without sections touching. */
  padding: clamp(4rem, 8.5vw, 6.5rem) clamp(1.25rem, 4vw, 3rem);
}
.section-head { max-width: 760px; margin-bottom: 4rem; }
.section-title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 1.2rem 0 1.4rem;
}
.section-title em { color: var(--accent); text-shadow: 0 0 40px var(--glow); }
.section-lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: 300;
  max-width: 56ch;
}

/* ---- Service cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.card {
  position: relative;
  padding: 2.2rem 2rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  overflow: hidden;
  transition: transform .5s var(--ease), border-color .5s var(--ease),
              background .5s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-100%);
  transition: transform .7s var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.card:hover::before { transform: translateX(100%); }
.card-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted-2);
  letter-spacing: 0.1em;
}
.card-icon {
  font-size: 2rem;
  color: var(--accent);
  margin: 1rem 0 1.2rem;
  line-height: 1;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
  letter-spacing: -0.01em;
}
.card p { color: var(--muted); font-size: 0.95rem; font-weight: 300; }
.card-tags {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 1.4rem;
}
.card-tags li {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35em 0.8em;
  border: 1px solid var(--line);
  border-radius: 100px;
}

/* ---- Orbit shelf (merged services × method) ----
   Five phases stacked as an auto-advancing accordion. One is open at a time;
   JS moves .is-open down the list on a timer (see main.js → orbitShelf). */
.anchor-mark { position: absolute; }        /* #process lands on the section top */
.shelf {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}
.shelf-item {
  border-top: 1px solid var(--line);
  transition: background 0.4s var(--ease);
}
.shelf-item:first-child { border-top: none; }
/* Collapsed cards are click targets edge to edge, so the whole card lights
   up on hover (the open one stays quiet: clicking it does nothing new). */
.shelf-item:not(.is-open):hover { background: var(--surface); }

.shelf-head {
  width: 100%;
  display: flex; align-items: center; gap: 1.1rem;
  padding: 1.2rem 1.6rem;
  background: none; border: none; color: inherit;
  font-family: inherit; text-align: left; cursor: pointer;
  position: relative;
  transition: background 0.4s var(--ease);
}
.shelf-num {
  font-family: var(--font-mono);
  font-size: 0.76rem; letter-spacing: 0.1em;
  color: var(--muted-2); min-width: 1.6em;
  transition: color 0.4s var(--ease);
}
.shelf-name {
  font-family: var(--font-display);
  font-weight: 400; font-size: 1.5rem; letter-spacing: -0.01em;
  transition: color 0.4s var(--ease), text-shadow 0.4s var(--ease);
}
.shelf-icon {
  margin-left: auto; color: var(--muted-2); font-size: 1.05rem;
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}
.shelf-item.is-open .shelf-num { color: var(--cool); }
.shelf-item.is-open .shelf-name { color: var(--cool); text-shadow: 0 0 26px var(--glow); }
.shelf-item.is-open .shelf-icon { color: var(--cool); transform: rotate(90deg); }

/* progress line that fills across the open head, then advances (animationend) */
.shelf-progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--cool), var(--accent));
  box-shadow: 0 0 12px var(--glow);
}
.shelf-item.is-open .shelf-progress { animation: shelf-fill var(--shelf-dwell, 6s) linear forwards; }
.shelf.is-paused .shelf-item.is-open .shelf-progress { animation-play-state: paused; }
@keyframes shelf-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* body opens with a smooth grid-rows height transition */
.shelf-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease);
}
.shelf-item.is-open .shelf-body { grid-template-rows: 1fr; }
.shelf-body-inner { overflow: hidden; }
.shelf-panel {
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem; align-items: center;
  padding: 0.4rem 1.6rem 2.1rem;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.5s var(--ease) 0.12s, transform 0.5s var(--ease) 0.12s;
}
.shelf-item.is-open .shelf-panel { opacity: 1; transform: none; }
.shelf-copy p { color: var(--muted); font-size: 0.96rem; font-weight: 300; margin: 0; max-width: 44ch; }

/* ---- Desktop: horizontal expanding-panel accordion ----
   The three buckets sit side by side as vertical spines; the active one grows
   and pushes the others aside, revealing its copy + visual. Below 1040px this
   whole block drops and the mobile-first vertical stack above takes over. */
@media (min-width: 1040px) {
  .shelf { display: flex; height: clamp(480px, 44vw, 544px); }
  .shelf-item {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column;
    border-top: none; border-left: 1px solid var(--line);
    transition: flex-grow 0.6s var(--ease);
  }
  .shelf-item:first-child { border-left: none; }
  .shelf-item.is-open { flex-grow: 2.2; }  /* active widens; collapsed stay roomy enough to read */

  /* header: number + straight name; arrow hint pinned top-right */
  .shelf-head {
    position: relative; flex: 0 0 auto; width: auto;
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    gap: 0.5rem; padding: 1.6rem 2.6rem 0.7rem 1.6rem;
  }
  .shelf-name { font-size: 1.24rem; line-height: 1.15; text-wrap: balance; }
  .shelf-icon { position: absolute; top: 1.7rem; right: 1.4rem; margin: 0; }
  .shelf-progress { top: 0; bottom: auto; }

  /* open header: inline row, larger name */
  .shelf-item.is-open .shelf-head { flex-direction: row; align-items: center; gap: 1rem; padding: 1.7rem 2.8rem 0.4rem 2rem; }
  .shelf-item.is-open .shelf-name { font-size: 1.7rem; line-height: 1; }
  .shelf-item.is-open .shelf-icon { top: 1.9rem; right: 2rem; }

  /* body shows description + tags in every card; the visual is revealed underneath on open */
  .shelf-body { display: block; flex: 1; min-height: 0; overflow: hidden; transition: none; }
  .shelf-body-inner { height: 100%; }
  .shelf-panel {
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 1rem; height: 100%; padding: 0.3rem 1.6rem 1.4rem;
    opacity: 1; transform: none;
  }
  .shelf-copy { width: 100%; }
  .shelf-copy p { font-size: 0.88rem; }
  .shelf-panel .viz { display: none; }

  /* open: description widens, animation stacks beneath it */
  .shelf-item.is-open .shelf-panel { padding: 0.3rem 2rem 1.7rem; gap: 1.3rem; }
  .shelf-item.is-open .shelf-copy p { font-size: 0.98rem; max-width: 66ch; }
  .shelf-item.is-open .shelf-panel .viz {
    display: grid; flex: 1 1 auto; min-height: 0;
    width: auto; height: auto; aspect-ratio: 4 / 3;
    align-self: center; max-width: 100%; margin-top: 0.2rem;
  }
}

/* per-phase generated visuals */
.viz {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line); border-radius: 14px;
  background:
    radial-gradient(120% 120% at 70% 10%, var(--accent-soft), transparent 55%),
    var(--bg-2);
  display: grid; place-items: center; overflow: hidden;
}
.viz svg { width: 78%; height: 78%; overflow: visible; }
.viz-defs { position: absolute; width: 0; height: 0; }
.viz-stroke { fill: none; stroke: var(--cool); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viz-faint  { fill: none; stroke: var(--line-2); stroke-width: 1.25; }
/* gradient stops driven through tokens so both themes adapt */
.g-sweep-0 { stop-color: var(--cool); stop-opacity: 0.55; }
.g-sweep-1 { stop-color: var(--cool); stop-opacity: 0; }
.g-planet-0 { stop-color: var(--accent); stop-opacity: 0.95; }
.g-planet-1 { stop-color: var(--cool); stop-opacity: 0.35; }
/* isometric slab faces — a chosen 3-tone shade, theme-aware via color-mix */
.slab-top   { fill: color-mix(in srgb, var(--cool) 22%, var(--bg-2)); stroke: var(--cool); stroke-width: 1; stroke-linejoin: round; }
.slab-left  { fill: color-mix(in srgb, var(--cool) 9%,  var(--bg-2)); stroke: var(--cool); stroke-width: 1; stroke-opacity: 0.55; stroke-linejoin: round; }
.slab-right { fill: color-mix(in srgb, var(--cool) 3%,  var(--bg));   stroke: var(--cool); stroke-width: 1; stroke-opacity: 0.55; stroke-linejoin: round; }

/* animations run only while a panel is open; hovering the shelf pauses the
   auto-advance tracker (.shelf-progress above), never the scene itself */
.viz [data-anim] { animation-play-state: paused; }
.shelf-item.is-open .viz [data-anim] { animation-play-state: running; }

/* every scene breathes with a slow float */
.viz-float { animation: viz-bob 7s ease-in-out infinite; }
@keyframes viz-bob { 0%, 100% { transform: translateY(3px); } 50% { transform: translateY(-3px); } }

/* -- Audit & Plan: radar sweep + pinging nodes -- */
.radar-sweep { transform-origin: 100px 90px; animation: viz-spin 3.6s linear infinite; }
.radar-dot   { fill: var(--muted-2); animation: viz-ping 3.6s ease-out infinite; }
@keyframes viz-spin { to { transform: rotate(360deg); } }
@keyframes viz-ping {
  0%, 66% { fill: var(--muted-2); r: 2.5; }
  76% { fill: var(--accent); r: 6; }
  100% { fill: var(--cool); r: 3; }
}
/* -- Build & Implement: isometric slabs assemble bottom-up, then float -- */
.slab { transform-box: view-box; opacity: 0; }
.slab.s1 { animation: viz-slabin 4.2s var(--ease) infinite; }
.slab.s2 { animation: viz-slabin 4.2s var(--ease) 0.45s infinite; }
.slab.s3 { animation: viz-slabin 4.2s var(--ease) 0.9s infinite; }
@keyframes viz-slabin {
  0% { opacity: 0; transform: translateY(-22px); }
  16%, 82% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.12; transform: translateY(0); }
}
/* -- Support & Train: satellite + fading trail sweep an ellipse; planet pulses -- */
.sat {
  offset-path: path("M174 90 A74 30 0 1 1 26 90 A74 30 0 1 1 174 90");
  offset-rotate: 0deg; animation: viz-orbit 4.4s linear infinite;
}
.sat.sat-trail { animation-duration: 4.4s; }
@keyframes viz-orbit { to { offset-distance: 100%; } }
.planet-atmo { fill: none; stroke: var(--cool); stroke-width: 2; animation: viz-atmo 3.4s ease-in-out infinite; }
@keyframes viz-atmo { 0%, 100% { opacity: 0.1; r: 23; } 50% { opacity: 0.32; r: 27; } }
.planet-core { animation: viz-glow 3.4s ease-in-out infinite; }
@keyframes viz-glow {
  0%, 100% { filter: drop-shadow(0 0 3px var(--glow)); }
  50% { filter: drop-shadow(0 0 14px var(--glow)); }
}

/* ---- Stats band ---- */
.stats-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
}
.stat {
  padding: 3rem clamp(1.25rem, 3vw, 2.5rem);
  border-right: 1px solid var(--line);
  text-align: center;
}
.stat:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Work list ---- */
.work-list { border-top: 1px solid var(--line); }
.work-item {
  display: grid;
  grid-template-columns: 1fr auto 40px;
  align-items: center;
  gap: 2rem;
  padding: 2.4rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: padding .5s var(--ease), background .5s var(--ease);
}
.work-item:hover {
  padding-left: 1.6rem; padding-right: 1.6rem;
  background: var(--surface);
}
.work-sector {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.work-main h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0.5rem 0 0.4rem;
  letter-spacing: -0.01em;
  transition: color .4s var(--ease);
}
.work-item:hover .work-main h3 { color: var(--accent); }
.work-main p { color: var(--muted); font-size: 0.92rem; font-weight: 300; max-width: 60ch; }
.work-result { text-align: right; }
.work-metric {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--text);
  line-height: 1;
}
.work-metric-label {
  /* block + top margin: the metric itself is inline-block (for the hover
     underline), so without this the label glues to the number's side */
  display: block;
  margin-top: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-arrow {
  font-size: 1.5rem;
  color: var(--muted-2);
  transition: transform .4s var(--ease), color .4s var(--ease);
}
.work-item:hover .work-arrow { color: var(--accent); transform: translate(4px, -4px); }

/* ---- Approach ---- */
.approach-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}
.approach-sticky { position: sticky; top: 120px; align-self: start; }
.approach-sticky .btn { margin-top: 2rem; }
.approach-points { display: flex; flex-direction: column; gap: 0; }
.point {
  padding: 2.2rem 0;
  border-top: 1px solid var(--line);
}
.point:last-child { border-bottom: 1px solid var(--line); }
.point h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
  display: flex; align-items: baseline; gap: 0.8rem;
  letter-spacing: -0.01em;
}
.point-mark {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}
.point p { color: var(--muted); font-weight: 300; }

/* ---- CTA ---- */
.cta {
  position: relative;
  /* Above the ambient rocket layer (z 40) AND opaque, so rockets are fully
     hidden behind the card here — no drift/shimmer over the form, clicks land. */
  z-index: 41;
  text-align: center;
  border-radius: 28px;
  /* Narrower than the 1240px section width so the bordered box is trimmed by
     ~1.5in on each side on a wide screen. The inner content (.cta-inner, 680px)
     stays centered and unchanged, so the form + text keep their size. */
  max-width: 960px;
  margin: 4rem auto;
  /* Trim the band below the form (top + the left/right spacing keep the section
     default). The centered rocket sits just above this padding. */
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--line);
  background:
    radial-gradient(700px 400px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface),
    var(--bg);
  overflow: hidden;
}
.cta-glow {
  position: absolute;
  bottom: -150px; left: 50%;
  transform: translateX(-50%);
  width: 500px; height: 300px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.cta-watermark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 90%);
  opacity: 0.05;
  pointer-events: none;
  filter: blur(0.3px);
}
.cta-inner { position: relative; max-width: 680px; margin: 0 auto; }
.cta-inner .eyebrow { margin-bottom: 1.4rem; }
.cta-title {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}
.cta-title em { color: var(--accent); text-shadow: 0 0 44px var(--glow); }
.cta-sub {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 50ch;
  margin: 0 auto 2.6rem;
}
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 4rem clamp(1.25rem, 4vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
}
/* Centered footer brand: the horizontal Orbit wordmark (same as the nav).
   The .brand-logo white/black theme-swap + drop-shadow rules from the nav apply
   here too; only the size and hover are footer-specific. */
.footer-top {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.brand-footer { display: inline-flex; }
.brand-footer .brand-logo { height: 44px; }
.brand-footer:hover .brand-logo {
  transform: scale(1.03);
  filter: drop-shadow(0 0 24px var(--glow));
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1.2rem;
  font-weight: 400;
}
.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.35rem 0;
  transition: color .3s var(--ease), transform .3s var(--ease);
}
.footer-col a:hover { color: var(--accent); transform: translateX(4px); }
.footer-bottom {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
  padding-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color .3s var(--ease);
}
.footer-links a:hover { color: var(--accent); }

/* =========================================================
   Reveal animations
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1240px) {
  /* Mid widths: the absolutely-centered links collide with the brand and
     the CTA. Put them back in flex flow so space-between keeps the three
     groups apart. */
  .nav-links { position: static; transform: none; gap: clamp(0.9rem, 2.5vw, 1.8rem); }
}

@media (max-width: 1140px) {
  /* Not enough room for links + full logo + CTA: middle links leave for
     the hamburger menu early, controls stay clean. */
  .nav-links { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: none; padding: 8px;
  }
  .nav-toggle span {
    width: 26px; height: 2px; background: var(--text);
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
}

@media (max-width: 980px) {
  /* Stack the hero and center the copy so it's balanced under the orbit
     (instead of clinging to the left as it does when side-by-side). */
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-orbit { order: -1; }
  .hero-copy { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-meta { justify-content: center; }
  .hero-meta-live { align-items: center; }
  .hero-meta-live .live-metric { justify-content: center; }
  .stats-band { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .approach-grid { grid-template-columns: 1fr; gap: 2rem; }
  .approach-sticky { position: static; }
}

@media (max-width: 680px) {
  .nav-links, .nav-cta { display: none; }
  /* Links drop back into normal flow for the dropdown (un-center them) */
  .nav-links { position: static; transform: none; }
  /* Brand | actions (theme toggle + hamburger) via the nav's space-between */
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: none; padding: 8px;
  }
  .nav-toggle span {
    width: 26px; height: 2px; background: var(--text);
    transition: transform .3s var(--ease), opacity .3s var(--ease);
  }
  .shelf-panel { grid-template-columns: 1fr; gap: 1.2rem; }
  .shelf-panel .viz { order: -1; max-width: 300px; }
  .footer-cols { grid-template-columns: 1fr; gap: 1.5rem; }
  .work-item { grid-template-columns: 1fr auto; }
  .work-arrow { display: none; }
  .hero-meta { gap: 1.2rem; }
  .meta-divider { display: none; }

  /* Orbital system: keep all four labels inside the viewport */
  .hero { padding-top: 6.5rem; }
  .orbit-system { --orbit-size: min(330px, 84vw); }
  .planet-tag { font-size: 0.55rem; left: 14px; padding: 2px 6px; }

  /* Performance: trim expensive blur/atmosphere on phones */
  .hero-glow { width: 340px; height: 340px; filter: blur(20px); }
  .grain { opacity: 0.03; animation: none; }

  /* Agent bubble: ~22% smaller so it doesn't dominate a phone screen */
  .agent-bubble { max-width: 250px; padding: 0.7rem 1.7rem 0.75rem 0.85rem; }
  .agent-bubble-eyebrow { font-size: 0.6rem; margin-bottom: 0.35rem; }
  .agent-bubble-line { font-size: 0.86rem; }
}

@media (max-width: 400px) {
  .orbit-system { --orbit-size: min(280px, 82vw); }
  .planet-tag { font-size: 0.5rem; letter-spacing: 0.1em; }
  .hero-glow, .cta-glow { display: none; }
}

/* Mobile nav open state */
.nav.menu-open {
  flex-wrap: wrap;
  background: rgba(7, 8, 15, 0.95);
  backdrop-filter: blur(16px);
}
.nav.menu-open .nav-links {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 1.2rem;
  padding-top: 1.5rem;
  position: static;
  transform: none;
  /* Links drop to their own full-width row BELOW brand + actions, so the
     theme toggle and hamburger stay pinned top-right instead of re-flowing
     under the menu (read as a duplicate control row). */
  order: 3;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   ENHANCEMENTS — accessibility, interaction & new sections
   ========================================================= */

/* ---- Skip link + global focus visibility ---- */
.skip-link {
  position: fixed;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 10001;
  background: var(--accent);
  color: #07080f;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.7em 1.2em;
  border-radius: 0 0 12px 12px;
  transition: transform .3s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); outline: none; }

:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 3px;
  border-radius: 4px;
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* =========================================================
   1A — Interactive orbit (planets as navigation)
   ========================================================= */
.planet {
  display: block;
  background: none;
  border: 0;
  cursor: none;
  /* keep the box tight so the dot stays anchored on its ring */
  padding: 14px;
  margin: -14px;
}
.planet:hover .planet-spin::before,
.planet:focus-visible .planet-spin::before {
  box-shadow: 0 0 38px 4px var(--glow);
  filter: brightness(1.5);
  transform: translate(-50%, -50%) scale(1.8);
}
.planet:hover .planet-tag,
.planet:focus-visible .planet-tag {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(7,8,15,0.85);
}
.planet:focus-visible { outline: none; }
.planet:focus-visible .planet-tag { outline: 2px solid var(--cool); outline-offset: 2px; }

@keyframes cardFlash {
  0%   { border-color: var(--line); box-shadow: 0 0 0 0 transparent inset; }
  25%  { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 0 40px -6px var(--glow) inset; }
  100% { border-color: var(--line); box-shadow: 0 0 0 0 transparent inset; }
}
.card.is-flashed { animation: cardFlash 1.4s var(--ease); }

/* =========================================================
   1C — Micro-interactions
   ========================================================= */
/* keep card text above the spotlight overlay */
.card > * { position: relative; z-index: 1; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  .card:hover::after { opacity: 1; }
}

.btn:active { filter: brightness(0.93); }

.work-metric { position: relative; display: inline-block; }
.work-metric::after {
  content: "";
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .45s var(--ease);
}
.work-item:hover .work-metric::after { width: 100%; }

/* =========================================================
   2A — Client logo wall
   ========================================================= */
.logos { padding-top: clamp(3rem, 7vw, 5rem); padding-bottom: clamp(3rem, 7vw, 5rem); text-align: center; }
.logos-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.4rem;
}
.logo-wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: center;
  gap: 1.5rem 2rem;
}
.logo-mark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  letter-spacing: 0.02em;
  color: var(--text);
  opacity: 0.55;
  transition: opacity .4s var(--ease), color .4s var(--ease), transform .4s var(--ease);
}
@media (hover: hover) {
  .logo-mark:hover { opacity: 1; color: var(--accent); transform: translateY(-2px); }
}

/* =========================================================
   4 — Live agent demo terminal
   ========================================================= */
.demo-illustrative { color: var(--muted-2); }
.terminal {
  max-width: 760px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(8, 10, 20, 0.7);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px var(--glow);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.tdot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--line-2); }
.tdot:nth-child(2) { background: var(--surface-2); }
.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.terminal-tab {
  padding: 0.25em 0.7em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}
.terminal-body {
  padding: 1.4rem 1.5rem;
  min-height: 280px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.7;
}
.t-line { margin-bottom: 0.5rem; white-space: pre-wrap; word-break: break-word; }
.t-user { color: var(--text); }
.t-user::before { content: "› "; color: var(--cool); }
.t-tool { color: var(--muted); }
.t-tool.done { color: var(--accent-2); animation: tickPulse 0.7s var(--ease); border-radius: 4px; }
@keyframes tickPulse {
  0%   { color: var(--accent); background: var(--accent-soft); }
  100% { background: transparent; }
}
.t-assistant { color: var(--text); border-left: 2px solid var(--glow); padding-left: 0.9rem; margin-top: 0.8rem; }
.t-assistant-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.3rem;
}
.t-caret {
  display: inline-block;
  width: 8px; height: 1.05em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }
.t-thinking span {
  display: inline-block;
  width: 6px; height: 6px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--muted);
  animation: thinkDot 1.2s ease-in-out infinite;
}
.t-thinking span:nth-child(2) { animation-delay: .18s; }
.t-thinking span:nth-child(3) { animation-delay: .36s; }
@keyframes thinkDot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.terminal-foot {
  padding: 0 1.5rem 1.4rem;
}
.terminal-replay { padding: 0.7em 1.3em; font-size: 0.74rem; }

/* ---- Multi-surface demo: tabs + stage ---- */
/* Center the demo column (tabs + visual + replay) within the section; the
   section heading/lead stay left-aligned by design. */
.demo { max-width: 960px; margin-inline: auto; }
.demo-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  /* 8 pills: cap the row width so they break into two balanced rows */
  max-width: 680px;
  margin-inline: auto;
}
.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6em 1.05em;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: none;
  transition: color .3s var(--ease), border-color .3s var(--ease),
              background .3s var(--ease), transform .3s var(--ease);
}
.demo-tab:hover { color: var(--text); border-color: var(--line-2); transform: translateY(-1px); }
.demo-tab .demo-tab-icon { color: var(--cool); font-size: 0.85rem; }
.demo-tab[aria-selected="true"] {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.demo-tab[aria-selected="true"] .demo-tab-icon { color: var(--bg); }

.demo-stage { min-height: 400px; position: relative; z-index: 0; }
/* Soft spotlight behind whichever surface is playing */
.demo-stage::before {
  content: "";
  position: absolute;
  inset: -12% -10%;
  background: radial-gradient(ellipse 60% 55% at 50% 42%, var(--accent-soft), transparent 70%);
  filter: blur(6px);
  z-index: -1;
  pointer-events: none;
}
.demo-foot { margin-top: 1.2rem; text-align: center; }
.demo-replay { padding: 0.7em 1.3em; font-size: 0.74rem; }

/* The terminal surface keeps its own .terminal styles above; just let it fill. */
.demo-stage .terminal { max-width: 100%; }

/* ---- Phone / iMessage surface ---- */
.phone { display: flex; justify-content: center; }
.phone-frame {
  width: min(330px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 30px;
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px var(--glow);
}
/* iOS-style status bar (pure CSS glyphs, theme-aware) */
.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.1rem 0.35rem;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text);
}
.ps-right { display: inline-flex; align-items: center; gap: 0.4rem; }
.ps-net { font-size: 0.56rem; letter-spacing: 0.06em; color: var(--muted); }
.ps-signal { display: inline-flex; align-items: flex-end; gap: 2px; }
.ps-signal i { width: 3px; background: var(--text); border-radius: 1px; }
.ps-signal i:nth-child(1) { height: 4px; }
.ps-signal i:nth-child(2) { height: 6px; }
.ps-signal i:nth-child(3) { height: 8px; }
.ps-signal i:nth-child(4) { height: 10px; background: var(--muted-2); }
.ps-battery {
  position: relative;
  width: 20px; height: 10px;
  border: 1px solid var(--muted);
  border-radius: 3px;
  padding: 1px;
}
.ps-battery::after {
  content: "";
  position: absolute;
  right: -3px; top: 3px;
  width: 2px; height: 4px;
  background: var(--muted);
  border-radius: 0 1px 1px 0;
}
.ps-battery i { display: block; width: 72%; height: 100%; background: var(--text); border-radius: 1px; }
.phone-home { display: flex; justify-content: center; padding: 0.45rem 0 0.55rem; }
.phone-home::before { content: ""; width: 110px; height: 4px; border-radius: 999px; background: var(--line-2); }

.phone-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.phone-back { color: var(--cool); font-size: 1.1rem; line-height: 1; }
.phone-contact { display: flex; align-items: center; gap: 0.5rem; }
.phone-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.6rem;
}
.phone-name { font-size: 0.82rem; color: var(--text); font-weight: 600; }
.phone-time { margin-left: auto; font-family: var(--font-mono); font-size: 0.62rem; color: var(--muted-2); }
.imsg-thread {
  padding: 1rem;
  min-height: 300px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.imsg { display: flex; position: relative; animation: imsgPop 0.38s var(--ease-2) backwards; }
.imsg.in { justify-content: flex-start; }
.imsg.out { justify-content: flex-end; }
.imsg.in .imsg-bubble { transform-origin: bottom left; }
.imsg.out .imsg-bubble { transform-origin: bottom right; }
@keyframes imsgPop {
  0%   { opacity: 0; transform: translateY(10px) scale(0.86); }
  70%  { opacity: 1; transform: translateY(-2px) scale(1.02); }
  100% { opacity: 1; transform: none; }
}
/* Tapback reaction: overlaps the bubble's top corner, like iMessage */
.imsg-react {
  position: absolute;
  top: -0.75rem;
  font-size: 0.72rem;
  padding: 0.18em 0.45em;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  animation: reactPop 0.35s var(--ease-2) backwards;
}
.imsg.out .imsg-react { right: 6px; }
.imsg.in .imsg-react { left: 6px; }
.imsg-status {
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  margin: -0.15rem 0.3rem 0;
  animation: fadeUp 0.5s var(--ease) backwards;
}
@keyframes reactPop {
  0%   { opacity: 0; transform: scale(0.4); }
  70%  { transform: scale(1.15); }
  100% { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}
.imsg-bubble {
  max-width: 78%;
  padding: 0.6em 0.85em;
  border-radius: 18px;
  font-size: 0.85rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.imsg.in .imsg-bubble {
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 5px;
}
.imsg.out .imsg-bubble {
  background: var(--cool);
  color: #0a0c16;
  border-bottom-right-radius: 5px;
}
.imsg.typing .imsg-bubble { padding: 0.7em 0.85em; }

/* ---- Slack surface ---- */
.slack {
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px var(--glow);
}
.slack-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}
.slack-hash { color: var(--muted-2); margin-right: 0.15rem; }
.slack-members { font-family: var(--font-mono); font-size: 0.62rem; font-weight: 400; color: var(--muted-2); }
.slack-head-icons { margin-left: auto; display: inline-flex; gap: 0.7rem; color: var(--muted-2); font-size: 0.8rem; font-weight: 400; }
.slack-msgs {
  padding: 1rem 1.2rem;
  min-height: 300px;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.slack-msg { display: flex; gap: 0.7rem; animation: fadeUp 0.4s var(--ease) backwards; }
.slack-msg.thread { margin-top: -0.5rem; padding-left: 2.4rem; }
.slack-react {
  display: inline-flex;
  margin-top: 0.35rem;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--accent-soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--accent-2);
  animation: reactPop 0.35s var(--ease-2) backwards;
}
.slack-msg.thread .slack-avatar { display: none; }
.slack-avatar {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}
.slack-avatar.agent { background: var(--accent-soft); color: var(--accent-2); }
.slack-meta { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.15rem; }
.slack-author { font-weight: 600; font-size: 0.8rem; color: var(--text); }
.slack-badge {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-2);
}
.slack-ts { font-family: var(--font-mono); font-size: 0.6rem; color: var(--muted-2); }
.slack-text { font-size: 0.86rem; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }

/* ---- Email surface ---- */
.email {
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 30px 80px -40px var(--glow);
}
.email-head { padding: 1rem 1.3rem; border-bottom: 1px solid var(--line); background: var(--surface); }
.email-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
}
.email-client {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.email-send {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  padding: 0.35em 0.9em;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--muted);
}
.email-send.sent { color: var(--accent-2); border-color: var(--accent-2); animation: reactPop 0.35s var(--ease-2); }
.email-from { color: var(--muted); }
.email-field { display: flex; gap: 0.75rem; padding: 0.25rem 0; font-size: 0.85rem; }
.email-label {
  flex: 0 0 64px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding-top: 0.1rem;
}
.email-val { color: var(--text); }
.email-notes { padding: 0.9rem 1.3rem 0; font-family: var(--font-mono); font-size: 0.78rem; }
.email-note { color: var(--muted); margin-bottom: 0.35rem; }
.email-note.done { color: var(--accent-2); }
.email-notes:empty { padding: 0; }
.email-body {
  padding: 1.1rem 1.3rem 1.3rem;
  min-height: 180px;
  max-height: 280px;
  overflow-y: auto;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}
.email-line { white-space: pre-wrap; word-break: break-word; }

@media (max-width: 680px) {
  .demo-stage { min-height: 420px; }
  .demo-tab { font-size: 0.68rem; padding: 0.55em 0.85em; }
  .imsg-thread, .slack-msgs { max-height: 320px; }
  .slack-msg.thread { padding-left: 1.2rem; }
}

/* =========================================================
   2D — Case study modal
   ========================================================= */
.work-modal {
  /* Center the modal: the global `* { margin: 0 }` reset cancels the UA
     dialog centering, so position it explicitly. */
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(640px, 92vw);
  max-height: min(85vh, 85dvh);
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: var(--bg-2);
  color: var(--text);
  overflow: auto;
  overscroll-behavior: contain;
}
.work-modal::backdrop {
  background: rgba(7, 8, 15, 0.72);
  backdrop-filter: blur(6px);
}
/* The custom cursor (z-9999) can't paint over a native <dialog>, which renders
   in the browser top layer above everything else — so the cursor looks like it
   disappears. Fallback: show the OS cursor inside the modal + over its backdrop. */
.work-modal,
.work-modal *,
.work-modal::backdrop { cursor: auto; }
.work-modal a,
.work-modal button,
.work-modal summary { cursor: pointer; }
/* Popover-capable browsers promote the custom cursor into the top layer while the
   modal is open (see caseStudies() in js/main.js), so hide the OS cursor here to
   avoid showing both. Older browsers keep the OS fallback above. */
@supports selector(:popover-open) {
  .work-modal,
  .work-modal *,
  .work-modal::backdrop { cursor: none; }
}
.work-modal-close {
  position: sticky;
  top: 0;
  width: fit-content;
  margin-left: auto;
  display: block;
  background: none; border: 0;
  color: var(--muted);
  font-size: 1.1rem;
  padding: 1rem 1.3rem;
  cursor: none;
  transition: color .3s var(--ease);
}
.work-modal-close:hover { color: var(--accent); }
.work-modal-body { padding: 0 2rem 0.5rem; }
.cs-sector {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.cs-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.01em;
  margin: 0.5rem 0 1.4rem;
}
.cs-section { margin-bottom: 1.3rem; }
.cs-section h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 0.4rem;
}
.cs-section p { color: var(--muted); font-weight: 300; }
.cs-stack { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0; }
.cs-stack li {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.35em 0.8em;
  border: 1px solid var(--line);
  border-radius: 100px;
}
/* Tech logo glyph — inline SVG sprite symbol, filled with the chip's text
   color so it adapts to light/dark automatically. See #tech-sprite in index.html. */
.cs-logo {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
  fill: currentColor;
}
.cs-results {
  display: flex; gap: 2.5rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}
.cs-metric {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--accent);
  line-height: 1;
}
.cs-metric-label {
  display: block;
  margin-top: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-modal-foot { padding: 0.5rem 2rem 2rem; }
@media (min-width: 681px) {
  .work-modal { animation: modalIn .4s var(--ease); }
  @keyframes modalIn { from { opacity: 0; transform: translateY(16px); } }
}
@media (max-width: 680px) {
  .work-modal { width: min(540px, 94vw); max-height: min(90vh, 90dvh); border-radius: 16px; }
  .work-modal-close { padding: 0.85rem 1rem; }
  .work-modal-body { padding: 0 1.25rem 0.5rem; }
  .work-modal-foot { padding: 0.5rem 1.25rem 1.5rem; }
  .cs-results { flex-wrap: wrap; gap: 1.25rem 2rem; }
}

/* =========================================================
   2A2 — Workshop (Coldture) — founder intro, two-act media
   grid, video testimonials. All footage is 9:16 vertical.
   ========================================================= */
.ws-founder {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 4rem;
  align-items: center;
}
/* Phone-style frame — echoes the agent-demo phone */
.ws-phone {
  border: 1px solid var(--line-2);
  border-radius: 30px;
  padding: 0.6rem;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  max-width: 410px;
  margin: 0 auto;
}
.ws-phone .ws-panel { border-radius: 22px; border: 0; }
.ws-panel {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 16;
}
.ws-panel video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-quotes .ws-panel { aspect-ratio: 9 / 14; }

/* Fullscreen fallback: if a video does end up in native fullscreen, the
   in-layout crop (cover) must not follow it — show the whole frame. */
.ws-panel video:fullscreen,
.ws-tile video:fullscreen { object-fit: contain; background: #000; }
.ws-panel video:-webkit-full-screen,
.ws-tile video:-webkit-full-screen { object-fit: contain; background: #000; }

/* Hide the native fullscreen control everywhere (controlsList covers
   Chromium; this pseudo-element covers WebKit/Safari) — the lightbox
   trigger below is its stand-in. */
.ws-panel video::-webkit-media-controls-fullscreen-button { display: none !important; }

/* Lightbox trigger, seated IN the control bar at the fullscreen spot:
   bare white glyph, no chrome — reads as part of the native controls.
   JS fades it in/out in step with the control bar. */
.ws-expand {
  position: absolute; bottom: 33px; right: 34px; z-index: 4;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), background .25s var(--ease);
}
.ws-expand.is-visible { opacity: 0.95; pointer-events: auto; }
.ws-expand:hover { opacity: 1; background: rgba(255, 255, 255, 0.14); }

/* Video lightbox: centered over a dimmed page, sized to the clip */
.video-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 20px;
  background: #000;
  overflow: hidden;
}
.video-modal::backdrop {
  background: rgba(7, 8, 15, 0.78);
  backdrop-filter: blur(6px);
}
.video-modal video {
  display: block;
  max-height: min(86vh, 86dvh);
  max-width: 92vw;
}
.video-modal-close {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 2;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(7, 8, 15, 0.6);
  color: #E9ECF3;
  font-size: 0.9rem;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.video-modal-close:hover { border-color: var(--accent); background: rgba(7, 8, 15, 0.85); }
/* Native dialogs sit above the custom cursor layer — use the OS cursor there
   (same fallback as .work-modal). */
.video-modal, .video-modal *, .video-modal::backdrop { cursor: auto; }
.video-modal button { cursor: pointer; }

/* Play overlay — the site's mono/ghost button language */
.ws-play {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  background: rgba(7, 8, 15, 0.25);
  border: 0; padding: 0;
  cursor: none;
  transition: background .4s var(--ease);
}
.ws-play:hover { background: rgba(7, 8, 15, 0.05); }
.ws-play-pill {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #E9ECF3;
  padding: 0.9em 1.5em;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  background: rgba(7, 8, 15, 0.6);
  backdrop-filter: blur(8px);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.ws-play:hover .ws-play-pill { border-color: var(--accent); box-shadow: 0 0 22px 1px var(--glow); }
.ws-play-tri {
  width: 0; height: 0;
  border-left: 9px solid #E9ECF3;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.ws-play.hidden { display: none; }

/* CTA row under the founder description */
.ws-actions { display: flex; gap: 1rem; margin-top: 2.2rem; flex-wrap: wrap; }

/* Per-section CTA row: centered, one visual notch below the content */
.section-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 3.5rem;
}

/* Ambient rockets (fixed layer, z-index 40) must pass BEHIND the workshop
   media — lift photos/videos above the rocket layer. */
.ws-phone { position: relative; }
.ws-phone, .ws-tile, .ws-panel { z-index: 41; }

/* Acts */
.ws-act { margin-top: 4rem; }
/* The gallery's section-head already carries 4rem bottom margin; don't stack
   another 4rem onto the first grid that follows it. */
.section-head + .ws-act { margin-top: 0; }
.ws-act-head {
  display: flex; align-items: baseline; gap: 1.2rem;
  border-top: 1px solid var(--line-2);
  padding-top: 1.2rem;
}
.ws-act-num {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.ws-act-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }

/* Gap-free editorial grid: fixed row height, tiles fill their cells */
.ws-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: clamp(220px, 26vw, 380px);
  gap: 1rem;
  margin-top: 1.6rem;
}
.ws-tile {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  margin: 0;
}
.ws-tile img, .ws-tile video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ws-tile img { filter: saturate(0.95); }
.ws-tile::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(180deg, transparent, rgba(7, 8, 15, 0.5));
  pointer-events: none;
}
.ws-cap {
  position: absolute; left: 0.9rem; bottom: 0.75rem; z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E9ECF3;
  text-shadow: 0 1px 8px rgba(7, 8, 15, 0.7);
  display: inline-flex; align-items: center; gap: 0.6em;
}
.ws-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cool);
  box-shadow: 0 0 10px var(--glow);
  animation: pulse 2.4s ease-in-out infinite;
}
.ws-s5 { grid-column: span 5; }
.ws-s4 { grid-column: span 4; }
.ws-s3 { grid-column: span 3; }

/* Testimonial row */
.ws-quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.6rem;
}
.ws-quote { margin: 0; }
.ws-who { display: flex; flex-direction: column; gap: 0.15em; margin-top: 0.9rem; }
.ws-name { font-weight: 600; font-size: 0.95rem; }
.ws-link {
  color: var(--accent-2);
  border-bottom: 1px solid var(--line-2);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.ws-link:hover { color: var(--accent); border-bottom-color: var(--cool); }
.ws-company {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: transparent;
  width: fit-content;
}

/* Show-more testimonials: centered round pill under the first row;
   the second row unfolds with a max-height + fade flow. */
.ws-more-wrap { display: flex; justify-content: center; margin-top: 2rem; }
.ws-more {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 1em 1.7em;
  border: 1px solid var(--line-2);
  border-radius: 100px;
  background: var(--surface);
  cursor: none;
  transition: color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.ws-more:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 18px 0 var(--glow);
}
.ws-more-arrow { transition: transform .4s var(--ease); }
.ws-more[aria-expanded="true"] .ws-more-arrow { transform: rotate(180deg); }
.ws-quotes-more {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height .8s var(--ease), opacity .6s var(--ease), margin-top .8s var(--ease);
}
.ws-quotes-more.open {
  max-height: 1400px;
  opacity: 1;
  margin-top: 2.5rem;
}
@media (prefers-reduced-motion: reduce) {
  .ws-quotes-more { transition: none; }
}

/* Method stat chips (absorbed from the old stats band) */
.method-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 18px; /* matches .shelf above it */
  overflow: hidden;
  background: var(--surface);
  margin-top: 3rem;
}
.method-stats .stat { padding: 2.2rem clamp(1.25rem, 3vw, 2.5rem); }

/* Light theme re-pins: video posters/scrims are inherently dark, so the
   caption/pill colors stay light-on-dark and read fine in both themes.
   Only the containers need adjusting. */
:root[data-theme="light"] .ws-phone { box-shadow: 0 20px 60px rgba(27, 29, 38, 0.18); }
:root[data-theme="light"] .ws-tile { border-color: var(--line-2); }
:root[data-theme="light"] .ws-play { background: rgba(27, 29, 38, 0.15); }

/* Responsive */
@media (max-width: 860px) {
  .ws-founder { grid-template-columns: 1fr; gap: 2.5rem; }
  .ws-grid { grid-auto-rows: clamp(180px, 44vw, 260px); }
  .ws-tile { grid-column: span 6 !important; }
  .ws-quotes { grid-template-columns: 1fr; }
  /* Stacked cards need far more room than the desktop 3-across row —
     without this the third card clips at the 1400px animation cap. */
  .ws-quotes-more.open { max-height: 2600px; }
  .method-stats { grid-template-columns: 1fr; }
  .method-stats .stat { padding: 1.6rem clamp(1.25rem, 3vw, 2.5rem); }
}

/* =========================================================
   2B — Testimonials
   ========================================================= */
.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.quote {
  position: relative;
  padding: 2.4rem 1.8rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: transform .5s var(--ease), border-color .5s var(--ease), background .5s var(--ease);
}
.quote::before {
  content: "\201C";
  position: absolute;
  top: 0.4rem; left: 1.2rem;
  font-family: var(--font-display);
  font-size: 3.4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.5;
}
.quote:hover { transform: translateY(-5px); border-color: var(--line-2); background: var(--surface-2); }
.quote blockquote {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.12rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin-bottom: 1.6rem;
}
.quote figcaption { display: flex; align-items: center; gap: 0.9rem; }
.avatar {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, var(--accent-3));
  color: #07080f;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: 0 0 0 1px var(--line-2), 0 0 18px -4px var(--glow);
}
.quote-who { display: flex; flex-direction: column; }
.quote-name { font-weight: 600; font-size: 0.95rem; }
.quote-role {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* =========================================================
   2C — FAQ
   ========================================================= */
.faq-list { max-width: 820px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0.2rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 2.3vw, 1.4rem);
  letter-spacing: -0.01em;
  transition: color .3s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-mark {
  position: relative;
  flex: none;
  width: 16px; height: 16px;
}
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.faq-mark::before { width: 16px; height: 2px; }
.faq-mark::after  { width: 2px; height: 16px; }
.faq-item[open] .faq-mark::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s var(--ease);
}
.faq-answer > p { overflow: hidden; color: var(--muted); font-weight: 300; padding-bottom: 0; max-width: 64ch; }
.faq-item[open] .faq-answer { grid-template-rows: 1fr; }
.faq-item[open] .faq-answer > p { padding-bottom: 1.5rem; }

/* =========================================================
   2E — Contact form
   ========================================================= */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
/* :not([type="checkbox"]) — the Service Interest checkboxes live inside a
   .field fieldset; padded/bordered text-input styling on a native checkbox
   makes Chrome flip between native and styled rendering mid-click, ballooning
   the checkbox for a frame and jittering the whole chip. */
.field input:not([type="checkbox"]), .field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.85em 1em;
  width: 100%;
  resize: vertical;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:not([type="checkbox"]):focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #e2b04a; }
.field-error {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: #f0c069;
  min-height: 0.9em;
}
.field-hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.field-optional { color: var(--muted-2); text-transform: none; letter-spacing: 0; }
.field-choices { border: 0; padding: 0; margin: 0; }
.field-choices legend {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0;
  margin-bottom: 0.55rem;
}
.choice-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.6em 0.9em;
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.choice:hover { border-color: var(--accent); }
.choice input { width: auto; accent-color: var(--accent); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice:has(input:focus-visible) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.contact-submit {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
#contactSubmit[aria-busy="true"] { opacity: 0.7; pointer-events: none; }
.form-status {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  min-height: 1.2em;
  margin: 0;
  text-align: center;
}
.form-status.is-error { color: #f0c069; }
.form-status.is-success { color: var(--cool); }

/* =========================================================
   5 — CTA rocket (ignite on hover)
   ========================================================= */
.cta-rocket {
  /* In normal flow below the form, centered with the rest of the content.
     position:relative keeps it the anchor for its flame + lets hover translate. */
  position: relative;
  display: block;
  width: 40px;
  margin: 2rem auto 0;
  line-height: 0;
  z-index: 1;
  pointer-events: none;
  transition: transform .5s var(--ease);
}
.cta-rocket svg { display: block; }
.cta-rocket-flame {
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top center;
  width: 14px; height: 26px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: linear-gradient(180deg, #ffffff, var(--cool), transparent);
  filter: drop-shadow(0 0 8px var(--glow));
  transition: transform .35s var(--ease);
}
.cta:hover .cta-rocket { transform: translateY(-10px); }
.cta:hover .cta-rocket-flame { transform: translateX(-50%) scaleY(1); animation: ctaFlicker .2s ease-in-out infinite alternate; }
@keyframes ctaFlicker { to { transform: translateX(-50%) scaleY(1.25); opacity: 0.75; } }

/* Launch on successful submit: crouch, ignite, then blast off and vanish. */
.cta-rocket.is-launching { animation: ctaLaunch 1.5s cubic-bezier(.45, 0, .7, .2) forwards; }
.cta-rocket.is-launching .cta-rocket-flame {
  transform: translateX(-50%) scaleY(1);
  animation: ctaFlicker .12s ease-in-out infinite alternate;
}
@keyframes ctaLaunch {
  0%   { transform: translateY(0); }
  12%  { transform: translateY(8px); }
  100% { transform: translateY(-130vh); opacity: 0; }
}

/* Segmented toggle — switch between the contact form and the booking calendar.
   A sliding accent "thumb" sits behind the active tab (mirrors .btn-solid). */
.cta-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;   /* two equal columns → thumb tracks at 50% */
  width: max-content;
  margin: 2.4rem auto 0;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-2);
}
.cta-switch-btn {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.62rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  color: var(--muted-2);
  border-radius: 999px;
  transition: color .35s var(--ease);
}
.cta-switch-btn:hover { color: var(--text); }
.cta-switch-btn.is-active { color: var(--bg); }        /* reads on the accent thumb */
/* Thumb spans one column exactly; 4px inset matches the container padding. */
.cta-switch-thumb {
  position: absolute;
  top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 4px);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.5);
  transition: transform .4s var(--ease);
}
.cta-switch[data-active="booking"] .cta-switch-thumb { transform: translateX(100%); }

/* Panels — one visible at a time; the hidden one is removed from flow. */
.cta-panels { position: relative; }
.cta-panel { margin-top: 2.6rem; }
.cta-panel[hidden] { display: none; }
.cta-panel.is-active { animation: panelFade .4s var(--ease) both; }
@keyframes panelFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cta-switch-thumb { transition: none; }
  .cta-panel.is-active { animation: none; }
}

/* Direct booking — inline Google appointment schedule, shown in its panel.
   Wider than the 680px form column so the calendar reads big and prominent. */
.booking { max-width: 860px; margin: 0 auto; text-align: center; }
.booking-sub {
  color: var(--muted-2);
  font-size: 0.98rem;
  margin: 0 auto 1.8rem;
  max-width: 30rem;
}
/* Google's appointment iframe is cross-origin: it can't be themed and always
   renders LIGHT content (dark text) on a TRANSPARENT body. So we anchor it on a
   solid white surface in BOTH site themes — otherwise the dark text vanishes on
   our dark bg. In dark mode this reads as an intentional white "booking card". */
.booking-embed {
  background: #fff;
  color-scheme: light;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 6px;
  overflow: hidden;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.55);
}
.booking-embed iframe {
  width: 100%;
  height: 720px;
  border: 0;
  border-radius: 12px;
  display: block;
  color-scheme: light;
  background: #fff;
}

/* =========================================================
   Responsive — new sections
   ========================================================= */
@media (max-width: 980px) {
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .quotes { grid-template-columns: 1fr; }
  .terminal-body { min-height: 320px; }
}
@media (max-width: 680px) {
  .logo-wall { grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
  .contact-form { grid-template-columns: 1fr; }
  .cs-results { gap: 1.6rem; }
  /* Google's booking layout is taller on narrow screens — give it room so the
     iframe doesn't spawn its own inner scrollbar. */
  .booking-embed iframe { height: 720px; }
  /* Toggle: fluid (fills available width) so it can't overflow narrow phones;
     tighter padding/tracking keeps both labels on one line down to ~300px. */
  .cta-switch { width: 100%; max-width: 340px; }
  .cta-switch-btn { padding: 0.62rem 0.4rem; font-size: 0.62rem; letter-spacing: 0.08em; }
}

/* Reduced motion — new elements: kill the showy bits, keep usability */
@media (prefers-reduced-motion: reduce) {
  .rocket-flame, .cta-rocket-flame { display: none; }
  .space-rockets .rocket-bob { animation: none; }
  .cta:hover .cta-rocket { transform: none; }
  .faq-answer { transition: none; }
}
