/* migo.dev — production styles
   A3 Horizon palette: amber #FF8C42 + indigo #7C6CFF.
   Type: Inter (sans) + JetBrains Mono (mono). */

:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --border: #2e2a3a;
  --text: #f4f4f6;
  --text-dim: #9a9aa4;
  --heading: #e6dfd4;
  --accent: #ff8c42;
  --accent-soft: #ffb07a;
  --accent-2: #7c6cff;
  --accent-2-soft: #a89eff;
  --success: #78d79e;

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, ui-monospace, monospace;

  /* Type scale 1.25x (major third) */
  --display: clamp(2.75rem, 5.5vw + 0.5rem, 5rem);
  --display-xl: clamp(3.5rem, 8vw + 0.5rem, 7.5rem);
  --h1: clamp(2rem, 3.5vw + 1rem, 2.75rem);
  --h2: clamp(1.5rem, 2vw + 0.75rem, 2rem);
  --h3: clamp(1.125rem, 1vw + 0.75rem, 1.375rem);
  --body: 1rem;
  --body-sm: 0.875rem;
  --mono-sm: 0.8125rem;

  /* Spacing 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;

  --content: 64rem;
  --wide: 80rem;

  /* Shared section padding — single source for proof / scope / pov / contact.
     Hero uses --section-padding-x but custom y-axis (smaller bottom). */
  --section-padding-y: clamp(var(--space-8), 8vw, var(--space-10));
  --section-padding-x: clamp(var(--space-4), 4vw, var(--space-7));

  --motion-standard: cubic-bezier(0.2, 0, 0.38, 0.9);
  --motion-emphasis: cubic-bezier(0.4, 0.14, 0.3, 1);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f2f2ee;
  --border: #dfdcea;
  --text: #17171a;
  --text-dim: #6a6a70;
  --heading: #1a1716;
  --accent: #b84a0f;
  --accent-soft: #963607;
  --accent-2: #5140d1;
  --accent-2-soft: #4736bf;
  --success: #147a3d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: color-mix(in srgb, var(--accent) 32%, transparent);
}

/* migo.dev:~$_ logo signature */
.brand-mark {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--heading);
  display: inline-flex;
  align-items: baseline;
  gap: 0;
}
.brand-mark .dollar { color: var(--accent); padding: 0 0.05em; }
.brand-mark .cursor {
  color: var(--accent-2);
  animation: blink 1.1s steps(2) infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .brand-mark .cursor {
    animation: none;
    opacity: 1;
  }
}
body {
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  font-feature-settings: "ss01", "tnum";
}

/* Lenis safety — disable native scroll-behavior when Lenis is active.
   Lenis 1.3 docs: https://github.com/darkroomengineering/lenis */
html.lenis,
html.lenis body {
  height: auto;
}
html.lenis {
  scroll-behavior: auto !important;
}
html.lenis-stopped {
  overflow: hidden;
}

.amber { color: var(--accent); }
.indigo { color: var(--accent-2); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -10000px;
  top: 4px;
  padding: 8px 14px;
  background: var(--accent);
  color: #1a1010;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { left: 12px; }

/* =========================================================================
   Atmospheric auras
   ========================================================================= */
.aura {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
}
.aura-amber {
  width: 70vw;
  height: 70vw;
  top: -25vw;
  left: -20vw;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.10;
  mix-blend-mode: screen;
}
.aura-indigo {
  width: 80vw;
  height: 80vw;
  bottom: -30vw;
  right: -25vw;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 60%);
  opacity: 0.12;
  mix-blend-mode: screen;
}
[data-theme="light"] .aura-amber { mix-blend-mode: multiply; }
[data-theme="light"] .aura-indigo { opacity: 0.08; mix-blend-mode: multiply; }

/* Subtle grid pattern behind content — also takes the parallax via JS.
   Lines are 1px @ 80×80 grid. Color is text-dim at 10% (was 5%) so they
   are perceptible without dominating; mask-image fades toward edges so
   no hard rectangle is visible. Element is `position: fixed` and gets
   `transform: translateY(-50%)` over the full scroll range. */
.grid {
  position: fixed;
  inset: -10vh -5vw;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--text-dim) 12%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--text-dim) 12%, transparent) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 85%);
  opacity: 0.85;
  will-change: transform;
}

/* =========================================================================
   Scroll-reveal initial states
   GSAP adds .has-motion to <html> when motion is enabled. Without it, content
   is visible immediately (no FOUC, accessible by default).
   Only opacity is set here — GSAP fully owns transform so the from-vars on
   the tween don't fight a competing CSS translateY in the first frame.
   ========================================================================= */
.has-motion [data-scroll-fade],
.has-motion [data-scroll-stagger] > * {
  opacity: 0;
  will-change: opacity, transform;
}

/* Global amber pointer glow — fixed/global, follows cursor everywhere.
   Stays at full opacity always (ambient mood under boxes).
   Indigo is added per-box via ::after pseudo (see below) — appears only
   inside the box on hover, so the cursor "tints" the box indigo without
   any global animation or layer swap. */
.pointer-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 350ms var(--motion-standard);
}
.glow-amber {
  background: radial-gradient(
    480px circle at var(--gx, 50%) var(--gy, 30%),
    color-mix(in srgb, var(--accent) 9%, transparent) 0%,
    color-mix(in srgb, var(--accent) 2%, transparent) 30%,
    transparent 65%
  );
}
.has-motion .glow-amber { opacity: 1; }

[data-theme="light"] .glow-amber {
  background: radial-gradient(
    480px circle at var(--gx, 50%) var(--gy, 30%),
    color-mix(in srgb, var(--accent) 6%, transparent) 0%,
    color-mix(in srgb, var(--accent) 2%, transparent) 35%,
    transparent 65%
  );
}

/* Per-box indigo tint overlay — fades in on hover, follows pointer
   inside the box via --cx/--cy. No shape change, no scale, no movement —
   pure color tint of the box surface. */
.wall-card,
.pov-list > li,
.stat,
.scope-row {
  position: relative;
}
.wall-card::after,
.pov-list > li::after,
.stat::after,
.scope-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    320px circle at var(--cx, 50%) var(--cy, 50%),
    color-mix(in srgb, var(--accent-2) 30%, transparent) 0%,
    color-mix(in srgb, var(--accent-2) 8%, transparent) 35%,
    transparent 65%
  );
  opacity: 0;
  transition: opacity 450ms ease-out;
  pointer-events: none;
  border-radius: inherit;
  /* screen-blend lets the indigo tint the surface without covering text */
  mix-blend-mode: screen;
}
[data-theme="light"] .wall-card::after,
[data-theme="light"] .pov-list > li::after,
[data-theme="light"] .stat::after,
[data-theme="light"] .scope-row::after {
  mix-blend-mode: multiply;
  background: radial-gradient(
    320px circle at var(--cx, 50%) var(--cy, 50%),
    color-mix(in srgb, var(--accent-2) 14%, transparent) 0%,
    color-mix(in srgb, var(--accent-2) 4%, transparent) 35%,
    transparent 65%
  );
}
.wall-card:hover::after,
.wall-card.is-pointed::after,
.pov-list > li:hover::after,
.pov-list > li.is-pointed::after,
.stat:hover::after,
.stat.is-pointed::after,
.scope-row:hover::after,
.scope-row.is-pointed::after {
  opacity: 1;
}

/* =========================================================================
   Scroll progress bar (kept from current site, more visible)
   ========================================================================= */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 50;
  background: color-mix(in srgb, var(--border) 60%, transparent);
  pointer-events: none;
}
.scroll-progress > span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: width 80ms linear;
}

/* =========================================================================
   Header
   ========================================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-4) clamp(var(--space-4), 4vw, var(--space-7));
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.brand { font-size: 1.0625rem; }

.nav {
  justify-self: center;
  display: flex;
  gap: clamp(var(--space-3), 2vw, var(--space-6));
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.nav a {
  color: var(--text-dim);
  position: relative;
  padding: 6px 4px;
  transition: color 200ms;
}
.nav a:hover,
.nav a.is-active {
  color: var(--text);
}
.nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}

.actions {
  display: flex;
  gap: var(--space-2);
}
.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 200ms, color 200ms;
}
.icon-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  color: var(--accent);
}
.icon-btn.lang { font-weight: 600; min-width: 42px; }

/* =========================================================================
   Generic section helpers
   ========================================================================= */
main { position: relative; z-index: 1; }

.section-head {
  max-width: var(--wide);
  margin: 0 auto var(--space-7);
  padding: 0 clamp(var(--space-4), 4vw, var(--space-7));
}
.section-head-tight {
  margin-bottom: var(--space-7);
}

/* Terminal-style eyebrow — matches the pattern in current /migo.dev:
   - amber static border-left bar (running command indicator)
   - gray text (not the whole line in amber)
   - amber $ inside (consistent with logo `migo.dev:~$_`)
   - indigo blinking _ cursor at the end (via ::after) */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-4);
  min-height: 1.5em;
  border-left: 2px solid var(--accent);
  padding: 0 0 0 10px;
  width: fit-content;
  max-width: 100%;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.eyebrow::after {
  content: "_";
  margin-left: 1px;
  color: var(--accent-2);
  animation: cursor-blink 1.05s steps(2, end) infinite;
}
.cmd-dollar {
  color: var(--accent);
  font-weight: 600;
}
/* Command text after `$ ` — slightly brighter than the prompt prefix
   so the terminal line reads with prefix < command < amber sigils. */
.cmd-text {
  color: color-mix(in srgb, var(--text-dim) 35%, var(--text));
}
@keyframes cursor-blink {
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .eyebrow::after { animation: none; }
}

.h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--heading);
  margin: 0 0 var(--space-4);
}

.section-lede {
  margin: 0;
  font-size: 1.125rem;
  color: var(--text-dim);
  max-width: 38rem;
  line-height: 1.55;
}

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  padding: clamp(var(--space-7), 8vw, var(--space-9)) var(--section-padding-x) clamp(var(--space-7), 6vw, var(--space-9));
  max-width: var(--wide);
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(var(--space-5), 4vw, var(--space-8));
  align-items: center;
}

.hero-copy { position: relative; z-index: 2; }

.display {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.75rem, 6.5vw, 5.75rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--heading);
  margin: 0 0 var(--space-5);
  text-wrap: balance;
}

.lede {
  font-size: 1.1875rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 var(--space-6);
  max-width: 32rem;
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-7);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: transform 200ms var(--motion-standard), border-color 200ms, background 200ms, box-shadow 200ms;
  background: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #1a1010;
  border-color: var(--accent);
  box-shadow: 0 14px 40px color-mix(in srgb, var(--accent) 35%, transparent);
}
[data-theme="light"] .btn-primary { color: #fff; box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 92%, white);
  box-shadow: 0 18px 50px color-mix(in srgb, var(--accent) 45%, transparent);
}
.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
  color: var(--accent);
}
.btn-arrow {
  transition: transform 220ms;
}
.btn:hover .btn-arrow { transform: translateX(3px); }

/* Hero meta */
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: clamp(var(--space-4), 3vw, var(--space-7));
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  margin: 0;
}
.hero-meta div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hero-meta dt {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero-meta dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--heading);
  line-height: 1;
}

/* Active outcome strip — feedback for hero glyph clicks.
   Stable layout: min-height prevents page-shift when text changes. */
.active-strip {
  margin: var(--space-5) 0 0;
  padding: var(--space-4) var(--space-5);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 50%),
    color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  line-height: 1.5;
  min-height: 5em; /* reserves space for the longest outcome description */
  transition: border-left-color 240ms, background 240ms;
}
.active-strip.strip-flash {
  animation: strip-pulse 480ms var(--motion-emphasis) 1;
}
@keyframes strip-pulse {
  0%   { transform: translateX(0); border-left-width: 3px; }
  35%  { transform: translateX(2px); border-left-width: 5px; background:
            linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
            color-mix(in srgb, var(--surface) 80%, transparent); }
  100% { transform: translateX(0); border-left-width: 3px; }
}
.active-tag {
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-size: 0.9375rem;
}
.active-text {
  color: var(--text);
  flex: 1 1 220px;
  min-width: 0;
  /* Reserve 2.5 lines so the strip never grows when text length varies
     across languages (PL is longer than EN for several outcomes). */
  min-height: 3.6em;
  line-height: 1.45;
  display: flex;
  align-items: center;
}
.active-link {
  color: var(--accent-2);
  border-bottom: 1px dotted color-mix(in srgb, var(--accent-2) 50%, transparent);
  white-space: nowrap;
  transition: color 200ms, border-bottom-color 200ms;
}
.active-link:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
@media (max-width: 480px) {
  .active-strip {
    padding: var(--space-3) var(--space-4);
    font-size: 0.8125rem;
    min-height: 6em;
  }
}

/* =========================================================================
   Hero glyph SVG
   ========================================================================= */
/* Animated angles for the protractor backdrop:
   --protractor-rot   : continuous slow spin (driven by GSAP in main.js)
   --protractor-kick  : transient counter-spin played on satellite click */
@property --protractor-rot {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}
@property --protractor-kick {
  syntax: '<angle>';
  inherits: true;
  initial-value: 0deg;
}
.hero-glyph {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  isolation: isolate;
}
/* Bottom layer: Polar Protractor — concentric rings + degree ticks.
   Wider mask so outer ticks survive. Two stacked rotates compose:
   continuous slow spin + transient kick on satellite click. */
.hero-glyph::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(135%, 680px);
  aspect-ratio: 1;
  transform:
    translate(-50%, -50%)
    rotate(var(--protractor-rot, 0deg))
    rotate(var(--protractor-kick, 0deg));
  transform-origin: center;
  background: url('/assets/backdrop-protractor.png') center / contain no-repeat;
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
  -webkit-mask-image: radial-gradient(circle at center, transparent 22%, #000 38%, #000 88%, transparent 100%);
          mask-image: radial-gradient(circle at center, transparent 22%, #000 38%, #000 88%, transparent 100%);
}
@media (prefers-reduced-motion: reduce) {
  .hero-glyph::before { will-change: auto; }
}
/* Top layer: Hex Mesh — denser pattern in mid annulus. */
.hero-glyph::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(120%, 600px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url('/assets/backdrop.png') center / contain no-repeat;
  opacity: 0.15;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: radial-gradient(circle at center, transparent 30%, #000 55%, #000 78%, transparent 100%);
          mask-image: radial-gradient(circle at center, transparent 30%, #000 55%, #000 78%, transparent 100%);
}
[data-theme="light"] .hero-glyph::before {
  mix-blend-mode: multiply;
  opacity: 0.30;
}
[data-theme="light"] .hero-glyph::after {
  mix-blend-mode: multiply;
  opacity: 0.25;
}
.hero-glyph > * {
  position: relative;
  z-index: 2;
}
.glyph-svg {
  width: 100%;
  max-width: 480px;
  height: auto;
  filter: drop-shadow(0 30px 80px color-mix(in srgb, var(--accent) 25%, transparent));
}
/* Tooltip on satellite hover */
.tooltip {
  position: absolute;
  pointer-events: none;
  max-width: 240px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  opacity: 0;
  transform: translate(-50%, calc(-100% - 12px)) scale(0.95);
  transition: opacity 180ms var(--motion-standard), transform 180ms var(--motion-standard);
  z-index: 5;
  white-space: normal;
}
.tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 12px)) scale(1);
}
.tooltip strong {
  display: block;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}

/* SVG node styles */
.orbits circle { stroke: color-mix(in srgb, var(--accent-2) 50%, transparent); }

.sat {
  cursor: pointer;
  transition: transform 280ms var(--motion-standard);
  transform-origin: center;
  transform-box: fill-box;
}
.sat circle {
  fill: color-mix(in srgb, var(--surface) 92%, transparent);
  stroke: var(--border);
  stroke-width: 1.4;
  transition: fill 240ms, stroke 240ms, stroke-width 240ms, filter 240ms;
}
.sat-title {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  fill: var(--text);
  letter-spacing: 0.05em;
  pointer-events: none;
}
.sat-sub {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  fill: var(--text-dim);
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* Hover state — clearer affordance */
.sat:hover { transform: scale(1.06); }
.sat:hover circle,
.sat:focus-visible circle {
  stroke: var(--accent-2);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent-2) 60%, transparent));
}
.sat:focus-visible { outline: none; }
.sat:focus-visible circle {
  stroke: var(--accent);
  stroke-width: 2.4;
}

/* Active (selected) state */
.sat.is-active { transform: scale(1.10); }
.sat.is-active circle {
  stroke: var(--accent);
  stroke-width: 2.6;
  fill: color-mix(in srgb, var(--accent) 14%, var(--surface));
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 50%, transparent));
}
.sat.is-active .sat-title { fill: var(--accent); }

/* Initial guided pulse — fires once at page load to communicate
   "these are clickable". Animates ONLY the drop-shadow glow on the circle
   so it never collides with the satellite's own transform (.sat.is-active
   sets scale(1.10), .sat:hover sets scale(1.06)) or stroke colour. */
.sat.sat-pulse circle {
  animation: sat-pulse-glow 700ms ease-out 1;
}
@keyframes sat-pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 0 transparent);
  }
  50% {
    filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 70%, transparent));
  }
}

.core-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
  opacity: 0.55;
  animation: core-spin 28s linear infinite;
  transform-origin: 240px 240px;
}
@keyframes core-spin {
  to { transform: rotate(360deg); }
}
.core-fill {
  fill: color-mix(in srgb, var(--accent) 14%, var(--surface));
  stroke: var(--accent);
  stroke-width: 1.5;
}
.core-line {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  fill: var(--heading);
  letter-spacing: 0.02em;
}
.core-pulse {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  font-weight: 600;
  fill: var(--accent);
}
.core-cursor {
  fill: var(--accent-2);
  animation: blink 1.1s steps(2) infinite;
}

.flow-dot {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 70%, transparent));
}

/* =========================================================================
   Flagship cinematic — subtle watermark behind the POV section. Body class
   `is-flagship-watermark` is set by main.js (default on; ?flagship=off
   disables for debug).
   ========================================================================= */
.has-flagship.is-flagship-watermark .pov {
  position: relative;
  isolation: isolate;
}
.has-flagship.is-flagship-watermark .pov::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Stack: cinematic image on top, solid bg fill below. The base fill
     occludes the global .grid pattern so it doesn't bleed through the
     transparent areas of the alpha-keyed cinematic. */
  background:
    url('/assets/brand/flagship-cinematic.png') center 50% / cover no-repeat,
    linear-gradient(var(--bg), var(--bg));
  opacity: 0.32;
  mix-blend-mode: screen;
  /* Two composited masks: radial softens left/right, linear adds long
     fade-in at top + fade-out at bottom so the image blends gracefully
     into the page on both ends. Bottom fade starts at 75% so desk + chair
     stay visible. */
  -webkit-mask-image:
    radial-gradient(ellipse 85% 100% at 50% 50%, #000 35%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 75%, transparent 100%);
          mask-image:
    radial-gradient(ellipse 85% 100% at 50% 50%, #000 35%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 75%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  pointer-events: none;
}
[data-theme="light"] .has-flagship.is-flagship-watermark .pov::before {
  mix-blend-mode: multiply;
  opacity: 0.14;
}

/* =========================================================================
   Proof
   ========================================================================= */
.proof {
  padding: var(--section-padding-y) var(--section-padding-x);
  max-width: var(--wide);
  margin: 0 auto;
}

.stats {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}
.stat {
  position: relative;
  padding: var(--space-7);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 100% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%);
  pointer-events: none;
}
.stat-big {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface) 80%);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(3.5rem, 7vw, 5.75rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: var(--heading);
  position: relative;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}
.stat-value.indigo { color: var(--accent-2); font-size: clamp(2.5rem, 5vw, 3.75rem); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  z-index: 1;
}
.stat p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

/* Production wall */
.wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}
.wall-card {
  position: relative;
  padding: var(--space-5);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
  transition: border-color 220ms, transform 220ms;
}
.wall-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
  transform: translateY(-2px);
}
.wall-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 0%, transparent), color-mix(in srgb, var(--accent-2) 0%, transparent));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
  transition: background 220ms;
}
.wall-card:hover::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 50%, transparent), color-mix(in srgb, var(--accent-2) 60%, transparent));
}
.wall-icon {
  display: block;
  width: 72px;
  height: 72px;
  opacity: 1;
  margin-bottom: var(--space-1);
}
.wall-domain {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.wall-claim {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
}
.wall-attribution {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  flex-wrap: nowrap;
  padding-top: var(--space-3);
  margin-top: auto;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.wall-name {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: -0.01em;
  white-space: nowrap;
  min-width: 0;
}
.wall-period {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
  opacity: 0.85;
}
.wall-claim strong { color: var(--heading); font-weight: 600; }

.proof-note {
  margin: var(--space-7) 0 0;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--text-dim);
  text-align: center;
}
.proof-note a {
  color: var(--accent);
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 40%, transparent);
}

/* =========================================================================
   Scope table
   ========================================================================= */
.scope {
  padding: var(--section-padding-y) var(--section-padding-x);
  max-width: var(--wide);
  margin: 0 auto;
}

.scope-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.scope-note {
  width: 100%;
  margin: var(--space-5) 0 0;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  line-height: 1.65;
  color: var(--text-dim);
  text-align: left;
}
.scope-note strong {
  color: var(--heading);
  font-weight: 600;
}
.scope-headrow,
.scope-row {
  display: grid;
  grid-template-columns: 200px 1.2fr 1.4fr 1.4fr;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.scope-row:last-child { border-bottom: none; }
.scope-headrow {
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.scope-row {
  cursor: pointer;
  transition: background 220ms;
}
.scope-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.scope-row.is-active {
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  box-shadow: inset 4px 0 0 var(--accent);
}
.scope-row > span:not(.scope-pill) {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text);
}
.scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--heading);
}
.scope-pill em {
  font-style: normal;
  font-size: 0.6875rem;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
}

/* =========================================================================
   Point of View
   ========================================================================= */
.pov {
  padding: var(--section-padding-y) var(--section-padding-x);
  max-width: var(--wide);
  margin: 0 auto;
}
.pov-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
.pov-list li {
  position: relative;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
  transition: border-color 220ms, transform 220ms;
}
.pov-list li::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 0%, transparent),
    color-mix(in srgb, var(--accent-2) 0%, transparent));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
  transition: background 240ms;
}
.pov-list li:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.pov-list li:hover::before {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 45%, transparent),
    color-mix(in srgb, var(--accent-2) 55%, transparent));
}
.pov-num {
  position: absolute;
  top: var(--space-4);
  right: var(--space-5);
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--accent) 15%, transparent);
  line-height: 1;
  pointer-events: none;
}
.pov-list h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  color: var(--heading);
  margin: 0;
  max-width: 18rem;
}
.pov-list p {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.55;
  max-width: 30rem;
}

/* =========================================================================
   Contact
   ========================================================================= */
.contact {
  padding: var(--section-padding-y) var(--section-padding-x);
  max-width: var(--wide);
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(var(--space-6), 4vw, var(--space-9));
  align-items: start;
}
.contact-copy { position: sticky; top: 100px; }
.contact-lede {
  font-size: 1.0625rem;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0 0 var(--space-5);
  max-width: 28rem;
}
.email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  margin-bottom: var(--space-4);
}
.email:hover { color: var(--heading); border-bottom-color: var(--heading); }
.contact-meta {
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--text-dim);
  margin: 0;
}

/* Form */
.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-5), 3vw, var(--space-7));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.form-fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.form-legend {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0;
  margin-bottom: 8px;
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.chip input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.chip span {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 200ms, background 200ms, color 200ms;
}
.chip input:checked + span {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: var(--accent);
  color: var(--accent);
}
.chip input:focus-visible + span {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.chip span:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.field input,
.field textarea {
  font: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 200ms, background 200ms;
}
.field textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-sans);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
}

.honey {
  position: absolute;
  left: -10000px;
  top: -10000px;
}

.privacy-disclosure {
  border-top: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  padding-top: var(--space-4);
  color: var(--text-dim);
  font-size: 0.8125rem;
  line-height: 1.65;
}
.privacy-disclosure summary {
  cursor: pointer;
  width: max-content;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.privacy-disclosure summary:hover,
.privacy-disclosure summary:focus-visible {
  color: var(--accent);
}
.privacy-disclosure summary:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
.privacy-disclosure div {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.privacy-disclosure p {
  margin: 0;
}
.privacy-disclosure strong {
  color: var(--heading);
  font-weight: 600;
}

.btn-submit {
  align-self: flex-start;
  margin-top: var(--space-2);
}

.form-status {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--text-dim);
  min-height: 1.5em;
}
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--accent); }

/* Animated success: terminal-output style — preserves typed-line breaks
   that JS writes into status.textContent. */
.form.is-sent .form-status { white-space: pre-line; }
.form.is-sent .form-status::before {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 10px color-mix(in srgb, var(--success) 60%, transparent);
}

/* =========================================================================
   Footer + Back to top
   ========================================================================= */
.footer {
  padding: var(--space-7) clamp(var(--space-4), 4vw, var(--space-7));
  border-top: 1px solid var(--border);
  margin-top: var(--space-8);
  position: relative;
  z-index: 1;
}
.foot-grid {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--mono-sm);
  color: var(--text-dim);
}
.foot-meta { letter-spacing: 0.04em; }

.footer-note {
  max-width: 64ch;
  margin: var(--space-4) auto 0;
  padding: 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.125rem;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 220ms, transform 220ms, border-color 220ms;
  cursor: pointer;
}
.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-7); }
  .hero-glyph { order: -1; max-width: 420px; margin: 0 auto; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-big { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-7); }
  .contact-copy { position: static; }
  .scope-headrow,
  .scope-row { grid-template-columns: 160px 1fr 1fr; }
  .scope-headrow span:nth-child(4),
  .scope-row span:nth-child(4) { grid-column: 2 / -1; }
}

@media (max-width: 720px) {
  .nav { gap: var(--space-3); font-size: 0.8125rem; }
  .actions { gap: 6px; }
  .icon-btn { width: 32px; height: 32px; }
  .hero-meta { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .hero-meta dd { font-size: 1.125rem; }
  .stats { grid-template-columns: 1fr; }
  .stat-big { grid-column: auto; }
  .pov-list { grid-template-columns: 1fr; }

  /* Scope on mobile: card stack — pill, "when", "what you get",
     and a smaller technical footer below a hairline. No side-by-side
     label/value columns. */
  .scope-headrow,
  .scope-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-5);
  }
  /* Cancel the desktop "4th col spans cols 2-3" rule from 1100px so the
     mobile single column actually flows top-to-bottom. */
  .scope-headrow span:nth-child(4),
  .scope-row span:nth-child(4) {
    grid-column: auto;
  }
  .scope-headrow { display: none; }
  .scope-row > span:not(.scope-pill) {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--text);
  }
  .scope-row > span:not(.scope-pill)::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 4px;
  }
  .scope-row > span:nth-child(4) {
    font-size: 0.8125rem;
    color: var(--text-dim);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border);
    margin-top: var(--space-2);
  }
  .scope-row > span:nth-child(4)::before {
    color: color-mix(in srgb, var(--text-dim) 70%, transparent);
  }
  .scope-row.is-active {
    background: color-mix(in srgb, var(--accent) 5%, var(--surface));
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .foot-grid { flex-direction: column; }
}

/* Below 540px: drop section anchors from the header to keep brand + theme
   + lang on one line. Footer keeps the full nav for skip-to-section.  */
@media (max-width: 540px) {
  .nav { display: none; }
  .header { gap: var(--space-3); }
}

@media (max-width: 460px) {
  .display { letter-spacing: -0.025em; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .back-top { bottom: 16px; right: 16px; }
}

/* Print: keep every section visible. Without this rule, .has-motion would
   leave reveals at opacity:0 in print/PDF/headless capture pipelines. */
@media print {
  .has-motion [data-scroll-fade],
  .has-motion [data-scroll-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
  .aura,
  .pointer-glow,
  .scroll-progress,
  .back-top { display: none !important; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .core-ring { animation: none; }
  .flow-dot { display: none; }
  .back-top,
  .btn { transition: none; }
}
