/* Steady State: light theme from "Paper and Cobalt", dark theme in navy, glass surfaces over soft colour. */

/* ---------- Tokens ---------- */
:root {
  --page: #F6F7F9;                       /* solid page colour */
  --tint: rgba(246, 247, 249, 0.35);     /* inset panels on glass */
  --surface: rgba(255, 255, 255, 0.5);   /* frosted cards */
  --surface-alt: rgba(14, 27, 44, 0.035);
  --chip: #FFFFFF;                       /* opaque chips and diagram nodes */
  --line: rgba(14, 27, 44, 0.14);
  --line-strong: #7E8A9C;
  --stroke: #C9D1DC;
  --grid: #E6EAF0;
  --idle: #B9C2CF;
  --ink: #0E1B2C;
  --body: #3C4A5E;
  --muted: #5B687C;
  --accent: #2450E6;
  --accent-strong: #1B3DB0;
  --accent-soft: rgba(36, 80, 230, 0.12);
  --accent-text: #2450E6;
  --on-accent: #FFFFFF;
  --signal: #0E9F6E;
  --signal-text: #08734F;
  --danger-text: #B42318;
  --panel: rgba(14, 27, 44, 0.74);
  --panel-text: #E8EDF5;
  --panel-muted: #A9B6C8;
  --panel-accent: #8DB1FF;
  --panel-rule: #5B687C;
  --header-bg: color-mix(in srgb, var(--page) 86%, transparent);
  --glass-hi: rgba(255, 255, 255, 0.28);
  --elev1: 0 1px 2px rgba(14, 27, 44, 0.08), 0 1px 3px 1px rgba(14, 27, 44, 0.06);
  --elev2: 0 1px 2px rgba(14, 27, 44, 0.10), 0 2px 6px 2px rgba(14, 27, 44, 0.08);
  --elev3: 0 4px 8px 3px rgba(14, 27, 44, 0.08), 0 1px 3px rgba(14, 27, 44, 0.12);
  --blob-opacity: 0.15;

  --glow: color-mix(in srgb, var(--accent) 22%, transparent);
  --glow-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --signal-glow: color-mix(in srgb, var(--signal) 55%, transparent);
  --shine: rgba(255, 255, 255, 0.5);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --gutter: clamp(20px, 4vw, 48px);
  --maxw: 1200px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  --d: 0s; /* hero entrance delay; set to the intro length while it plays */
  color-scheme: light;
}

:root[data-theme="dark"] {
  --page: #0B1220;
  --tint: rgba(11, 18, 32, 0.3);
  --surface: rgba(30, 42, 68, 0.42);
  --surface-alt: rgba(255, 255, 255, 0.03);
  --chip: #16213A;
  --line: rgba(238, 242, 248, 0.14);
  --line-strong: #6C7A93;
  --stroke: #33415C;
  --grid: #18233A;
  --idle: #44536E;
  --ink: #EEF2F8;
  --body: #C3CCDA;
  --muted: #9AA7BA;
  --accent: #7C9AFF;
  --accent-strong: #8FA8FF;
  --accent-soft: rgba(124, 154, 255, 0.16);
  --accent-text: #7C9AFF;
  --on-accent: #0B1220;
  --signal: #2FCB94;
  --signal-text: #4FD9A6;
  --danger-text: #FF9D8A;
  --panel: rgba(6, 11, 20, 0.55);
  --panel-rule: #44536E;
  --glass-hi: rgba(255, 255, 255, 0.10);
  --elev1: 0 1px 2px rgba(0, 0, 0, 0.45), 0 1px 3px 1px rgba(0, 0, 0, 0.3);
  --elev2: 0 1px 2px rgba(0, 0, 0, 0.5), 0 2px 6px 2px rgba(0, 0, 0, 0.35);
  --elev3: 0 4px 8px 3px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.5);
  --blob-opacity: 0.2;
  --shine: rgba(255, 255, 255, 0.35);
  color-scheme: dark;
}

.intro { --d: 1.7s; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
svg { overflow: visible; }

a { color: var(--accent-text); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }

.skip-link {
  position: fixed; left: 16px; top: 12px; z-index: 200;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform 0.2s ease;
}
.skip-link:focus { transform: none; color: var(--on-accent); }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: 96px; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 28px); }
.band { background: var(--surface-alt); border-block: 1px solid var(--line); }

.h2 { font-size: clamp(28px, 3.2vw, 42px); line-height: 1.15; letter-spacing: -0.025em; }
.lede { color: var(--body); }
.muted { color: var(--muted); }

.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.section-head-text { display: flex; flex-direction: column; gap: 10px; max-width: 40em; flex: 1 1 420px; }
.stack > .section-head-text { flex: none; }
.section-art { flex: 0 1 300px; min-width: 220px; }
.section-art svg { display: block; width: 100%; height: auto; }
@media (max-width: 600px) { .section-art { flex-basis: 200px; min-width: 0; max-width: 220px; } }

/* ---------- Buttons, pills, chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 12px 20px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font: 600 16px/1.2 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }
.btn-lg { padding: 14px 22px; }
.btn-sm { padding: 10px 16px; font-size: 15px; }
.btn-primary { background: var(--accent) linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8B5CF6)); color: var(--on-accent); border-radius: var(--r-pill); box-shadow: var(--elev1); }
.btn-primary:hover { color: var(--on-accent); filter: brightness(0.92); box-shadow: var(--elev2); }
:root:not(.dev) .btn-primary::after, :root:not(.dev) .s-glint { display: none; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, var(--shine), transparent);
  animation: shine 4.5s ease-in-out infinite;
  pointer-events: none;
}
.icon-btn, .btn-ghost, .text-btn, .dev-toggle, .pill-choice span {
  background: color-mix(in srgb, var(--chip) 50%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.5); backdrop-filter: blur(12px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), var(--elev1);
}
:root[data-theme="dark"] :is(.icon-btn, .btn-ghost, .text-btn, .dev-toggle, .pill-choice span) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), var(--elev1); }
.btn-ghost { color: var(--ink); font-weight: 500; }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border-radius: 50%; color: var(--ink); cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle svg { animation: icoin 0.45s cubic-bezier(0.2, 0, 0, 1) both; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 3px 10px; font-size: 13px; line-height: 1.5; color: var(--muted);
  background: var(--surface); white-space: nowrap;
}

.pill-choice span {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 18px;
  border-width: 1.5px; border-radius: var(--r-pill); color: var(--ink);
  font: 500 15px/1.2 var(--font-sans); cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.pill-choice:hover span { transform: translateY(-1px); }
.pill-choice input:checked + span {
  border-color: transparent; color: var(--accent-strong); font-weight: 600;
  background: linear-gradient(var(--chip), var(--chip)) padding-box, linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8B5CF6)) border-box;
}
.pill-choice svg { display: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 16; }
.pill-choice input:checked + span svg { display: block; animation: tick 0.3s ease 0.1s both; }

/* Single-choice pills built on native radios */
.choice { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.choice legend { padding: 0; margin-bottom: 10px; font-weight: 600; }
.choice-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-choice { position: relative; display: inline-flex; }
.pill-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.pill-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.mono-tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 6%, transparent); font: 500 14px/1.2 var(--font-mono); color: var(--ink); }
.mono-tag::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev2);
}
.card-hover { transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }
.card-hover:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev3); }

.dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); animation: beat 2s ease-out infinite; }

.rule { display: block; height: 2px; background: var(--line); }
.rule > span { display: block; height: 100%; background: var(--accent); transform-origin: left; }

/* ---------- Intro loader ---------- */
.loader { display: none; }
.intro .loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--page); pointer-events: none;
  animation: loader-out 1.95s cubic-bezier(0.7, 0, 0.2, 1) both;
}
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; width: 300px; max-width: 80%; }
.loader-name { font: 600 22px var(--font-display); letter-spacing: -0.02em; color: var(--ink); }
.loader-track { display: block; align-self: stretch; height: 3px; background: var(--accent-soft); border-radius: 2px; overflow: hidden; }
.loader-fill { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: grow 1.4s cubic-bezier(0.3, 0.1, 0.2, 1) both; }
.loader-checks { display: flex; flex-direction: column; gap: 8px; align-self: stretch; font-size: 14px; color: var(--body); }
.loader-check { display: flex; align-items: center; gap: 10px; animation: rise 0.35s ease both; }
.check-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.loader-final { font: 600 16px var(--font-display); color: var(--ink); }

/* ---------- Scroll rail + progress ---------- */
.rail { position: fixed; left: 12px; top: 120px; bottom: 120px; width: 2px; background: var(--line); z-index: 30; pointer-events: none; }
.rail-dot { position: absolute; left: -5px; top: 0; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--glow-soft); }
@media (max-width: 760px) { .rail { display: none; } }

.progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.progress-bar { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--elev2);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-name { font: 600 18px var(--font-display); letter-spacing: -0.01em; }
.brand-sub { color: var(--muted); font-size: 15px; }

.nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; min-width: 0; gap: 4px 18px; font-size: 15px; }
@media (max-width: 1240px) { .brand-sub { display: none; } }
.nav-link { position: relative; padding: 10px 0; color: var(--body); text-decoration: none; transition: color 0.2s ease; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }


@media (max-width: 899px) {
  .header-inner { flex-wrap: wrap; padding-block: 8px 6px; gap: 6px 12px; }
  .nav { order: 3; width: 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; white-space: nowrap; gap: 4px 20px; scrollbar-width: none; }
  .header-cta { display: none; }
  .dev-toggle-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 56px; align-items: center; padding-top: 40px; padding-bottom: 104px;
}
.hero-copy { position: relative; display: flex; flex-direction: column; gap: 26px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 6px 14px; font-size: 14px; color: var(--body);
}
.hero-title { font-size: clamp(36px, 5vw, 66px); line-height: 1.06; letter-spacing: -0.03em; }
.hero-title .line { display: block; animation: clip-in 0.9s var(--ease-out) backwards; animation-delay: calc(var(--d) + var(--t, 0s)); }
.hero-title .accent { color: var(--accent-text); }
.hero-sub { max-width: 30em; font-size: 19px; color: var(--body); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.enter { animation: rise 0.5s ease backwards; animation-delay: calc(var(--d) + var(--t, 0s)); }


.hero-visual { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.orbit-map { display: block; width: 100%; height: auto; }
.map-hint { display: flex; align-items: center; gap: 8px; margin: -4px 4px 0; font-size: 13px; color: var(--muted); }
.map-hint svg { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Hero satellites are links to their sections */
.sat { cursor: pointer; }
.sat:focus-visible { outline: none; }
.sat .s-sat { transition: stroke 0.2s ease, fill 0.2s ease; }
.sat .s-sat-go { fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease, stroke 0.2s ease; }
.sat:hover .s-sat, .sat:focus-visible .s-sat { stroke: var(--accent); fill: var(--accent-soft); }
.sat:focus-visible .s-sat { stroke-width: 2.5; }
.sat:hover .s-sat-go, .sat:focus-visible .s-sat-go { stroke: var(--accent); transform: translateX(3px); }
.sat:hover .s-flow, .sat:focus-visible .s-flow { --dur: 0.5s; stroke-width: 2.4; }
.sat:hover .s-base, .sat:focus-visible .s-base { stroke: var(--accent); opacity: 0.4; }
.sat .s-base, .sat .s-flow, .sat .s-flow-in { pointer-events: none; }

/* Terminal readout */
.terminal {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--panel); color: var(--panel-text); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px;
  font: 14px/1.5 var(--font-mono);
}
.term-cmd { color: var(--signal); }
.type {
  display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom;
  width: 27ch; max-width: 100%; border-right: 2px solid var(--accent);
  animation: type-w 1.3s steps(27) calc(var(--d) + 0.7s) backwards, caret 0.8s step-end infinite;
}
.term-rows { display: flex; flex-direction: column; gap: 8px; }
.term-row { display: grid; grid-template-columns: auto minmax(16px, 1fr) auto; align-items: baseline; column-gap: 10px; }
.term-row dt { order: 1; color: var(--panel-muted); }
.term-row::after { content: ""; order: 2; border-bottom: 1px dotted var(--panel-rule); transform: translateY(-4px); }
.term-row dd { order: 3; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.term-row dd.hl { color: var(--panel-accent); }

/* ---------- Audience strip ---------- */
.audience { background: var(--surface); border-block: 1px solid var(--line); }
.audience-inner { display: flex; flex-direction: column; gap: 28px; padding-block: 56px; }
.audience-title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -0.02em; }
.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 32px; }
.audience-item { display: flex; flex-direction: column; gap: 8px; }
.audience-item h3 { margin-top: 6px; font-size: 20px; }
.audience-item p { color: var(--body); }

/* ---------- Section hand-offs ---------- */
.handoff { position: relative; z-index: 5; height: 0; display: flex; align-items: center; justify-content: center; }
.handoff-line { position: absolute; left: 50%; top: -44px; width: 2px; height: 88px; margin-left: -1px; background: var(--stroke); }
.handoff-dot { position: absolute; left: -4px; top: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: drop 1.6s ease-in infinite; }
.handoff-pill {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border: 1.5px solid var(--accent); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--elev2);
  font: 600 15px/1.2 var(--font-display); letter-spacing: -0.01em; white-space: nowrap;
}
.handoff-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* ---------- Work (industries) ---------- */
.tabbar { display: flex; flex-wrap: nowrap; gap: 0 26px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 50px; padding: 10px 6px 14px;
  border: 0; border-radius: 8px 8px 0 0; background: transparent; color: var(--muted);
  font: 500 16px/1.2 var(--font-sans); white-space: nowrap; cursor: pointer;
}
.tab:hover, .tab[aria-selected="true"] { color: var(--ink); }
.tab-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-selected="true"] .tab-icon { stroke: var(--accent); }
.tab-tag { font: 500 12px/1 var(--font-mono); color: var(--accent-text); border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8B5CF6)); animation: tabline 0.38s cubic-bezier(0.2, 0, 0, 1) both;
}
.domain-panel {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 30px;
  padding: clamp(22px, 3vw, 40px);
}
.domain-panel:focus-visible { outline-offset: 4px; border-radius: var(--r-lg); }
.domain-panel.enter-panel { animation: rise 0.5s var(--ease-out) both; }
.loadbar { position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: left; opacity: 0; animation: loadbar 0.8s ease both; }
.domain-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 36px; }
.domain-copy { display: flex; flex-direction: column; gap: 14px; }
.domain-title { font-size: clamp(21px, 2.2vw, 28px); line-height: 1.25; letter-spacing: -0.02em; }
.domain-stat { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.domain-stat .stat { position: relative; font: 700 44px/1 var(--font-display); letter-spacing: -0.03em; color: var(--accent-text); }
.domain-stat .stat-label { color: var(--body); font-size: 16px; }
.built { display: flex; flex-direction: column; gap: 12px; align-self: center; }
.built li { display: flex; gap: 12px; color: var(--ink); animation: rise 0.45s ease backwards; }
.built li:nth-child(2) { animation-delay: 0.08s; }
.built li:nth-child(3) { animation-delay: 0.16s; }
.built svg { flex: 0 0 14px; margin-top: 6px; }

.how { display: flex; flex-direction: column; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.how-title { font-weight: 600; }
.lane { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.lane-name { flex: 0 0 120px; color: var(--muted); font-size: 15px; }
.lane-scroll { flex: 1 1 520px; min-width: 0; overflow-x: auto; padding: 6px 2px; scrollbar-width: thin; }
@media (max-width: 700px) {
  .lane-scroll { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); padding-right: 32px; }
}
.flow { display: inline-flex; align-items: stretch; padding: 0 2px; }
.flow-step {
  position: relative; display: inline-flex; flex-direction: column; justify-content: center; gap: 1px;
  min-height: 52px; padding: 6px 28px 6px 32px; margin-left: -9px; white-space: nowrap;
  background: var(--accent-soft); color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
  animation: flowlit var(--cyc, 6s) ease-in-out infinite;
}
.flow-step:first-child { margin-left: 0; padding-left: 18px; border-radius: 10px 0 0 10px; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
.flow-name { font-size: 14.5px; font-weight: 600; }
.flow-tool { font: 11.5px/1.4 var(--font-mono); color: var(--muted); }
.pop { animation: pop 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }

/* ---------- Security ---------- */
.gates-wrap { position: relative; padding-top: 2px; }
.gates-line { position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--line); }
.token {
  position: absolute; top: 6px; left: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: travel 6s linear infinite;
}
.gates { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.gate { position: relative; display: flex; flex-direction: column; gap: 10px; }
.gate-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--accent); background: var(--chip);
  animation: gate 6s linear infinite;
}
.gate h3 { font-size: 17px; line-height: 1.3; }
.gate-num { color: var(--accent-text); }
.gate p { color: var(--body); font-size: 15.5px; line-height: 1.5; }
.gate .gate-tools { color: var(--muted); font: 12.5px/1.5 var(--font-mono); }

@media (max-width: 899px) {
  .gates { grid-template-columns: 1fr; gap: 26px; padding-left: 38px; }
  .gates-line { left: 9px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .token { left: 4px; top: 0; animation-name: travel-y; }
  .gate-dot { position: absolute; left: -38px; top: 2px; }
}

.edge-card { display: flex; flex-direction: column; gap: 20px; padding: clamp(22px, 3vw, 32px); }
.edge-card h3 { font-size: 20px; }
.edge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.edge-label { flex: 0 0 180px; color: var(--muted); font-size: 15px; }

/* ---------- Automation ---------- */
.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 24px; align-items: stretch; }
.auto-card { display: flex; flex-direction: column; gap: 14px; padding: clamp(18px, 2.4vw, 26px); }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 12px; }
.card-head h3 { font-size: 20px; }
.loop-svg { display: block; width: 100%; height: auto; }

.chat {
  flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 14px;
  min-height: 240px; padding: 16px;
  background: var(--tint); border: 1px solid var(--line); border-radius: var(--r-md);
}
.chat-channel { font: 13px var(--font-mono); color: var(--muted); }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.avatar { flex: 0 0 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.avatar-human { background: var(--panel); color: var(--panel-text); }
:root[data-theme="dark"] .avatar-human { background: var(--line-strong); }
.avatar-agent { background: var(--accent); }
.msg-body { position: relative; display: flex; flex-direction: column; gap: 2px; min-height: 62px; }
.msg-name { font-weight: 600; font-size: 14px; }
.bubble {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--chip); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px;
  padding: 8px 12px; font-size: 15px; line-height: 1.45;
}
.bubble .mention { color: var(--accent-text); font-weight: 600; }
.bubble-typing { position: absolute; left: 0; top: 24px; gap: 4px; padding: 12px 14px; }
.tdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); animation: tdot 1s ease-in-out infinite; }
.msg-1 { animation: msg1 8s ease infinite; }
.msg-typing { opacity: 0; animation: msgtype 8s ease infinite; }
.msg-2 { animation: msg2 8s ease infinite; }

.autos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; }
.auto-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); }
.auto-item svg { flex: 0 0 28px; }
.auto-item-text { display: flex; flex-direction: column; gap: 1px; }
.auto-item-title { font: 600 15.5px/1.25 var(--font-display); }
.auto-item-cap { font: 12px/1.4 var(--font-mono); color: var(--muted); }

/* ---------- Agents ---------- */
.agents-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.agent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.agent-head h3 { font-size: 20px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15.5px; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--ink); font-weight: 500; }

.viz {
  position: relative; overflow: hidden; height: 132px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 14px 16px; background: var(--tint); border: 1px solid var(--line); border-radius: var(--r-md);
}
.viz-row { display: flex; align-items: center; gap: 10px; }
.viz-label { flex: 0 0 82px; font-size: 12.5px; color: var(--muted); }
.viz-track { flex: 1 1 auto; height: 8px; background: var(--accent-soft); border-radius: 4px; overflow: hidden; }
.viz-bar { display: block; height: 100%; width: var(--w); background: var(--accent); border-radius: 4px; transform-origin: left; animation: bar 5s ease-in-out infinite; }
.blip { animation: blip 5s ease-in-out infinite; }
.mini-pill { font-size: 11.5px; font-weight: 600; border-radius: var(--r-pill); padding: 2px 8px; white-space: nowrap; line-height: 1.5; }
.mini-pill-accent { background: var(--accent); color: var(--on-accent); }
.mini-pill-plain { background: var(--chip); color: var(--ink); border: 1px solid var(--line); }
.mini-pill-good { background: var(--chip); color: var(--signal-text); border: 1px solid var(--line); }
.viz-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.endpoints { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px 0; justify-items: center; }
.ep { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--idle); animation: ep 6s ease-in-out infinite; }
.scan { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--accent); opacity: 0.5; animation: scan 6s linear infinite; }
.seq {
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 9px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5;
  background: var(--chip); color: var(--muted);
  animation: seq 6s ease-in-out infinite;
}

/* ---------- Lab ---------- */
.lang-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 24px; }
.agent, .lang { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.lang h3 { font-size: 22px; }
.lang p { color: var(--body); }
.code-line { background: var(--panel); color: var(--panel-text); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; font: 14px/1.5 var(--font-mono); }
.tv { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; width: calc(var(--n) * 1ch); max-width: 100%; }
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.project { display: flex; flex-direction: column; gap: 8px; }
.project-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.project-head h3 { font-size: 19px; line-height: 1.3; }
.project p { color: var(--body); }
.indet { position: relative; display: block; height: 4px; overflow: hidden; background: var(--accent-soft); border-radius: 2px; }
.indet::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: var(--accent); border-radius: 2px; animation: indet 1.6s ease-in-out infinite; }

.toolbelt { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.toolbelt-toggle {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 0; background: none; border: 0; cursor: pointer;
  color: var(--ink); font: 600 16px/1.2 var(--font-sans);
}
.toolbelt-toggle:hover { color: var(--accent-text); }
.toolbelt-toggle .caret { transition: transform 0.3s ease; }
.toolbelt-toggle[aria-expanded="true"] .caret { transform: rotate(90deg); }
.toolbelt-count { color: var(--muted); font-weight: 500; }
.drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s cubic-bezier(0.6, 0, 0.2, 1); }
.drawer.is-open { grid-template-rows: 1fr; }
.drawer-clip { overflow: hidden; min-height: 0; }
.tool-groups { display: flex; flex-direction: column; gap: 14px; padding: 12px 0 4px; }
.tool-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.tool-group-name { flex: 0 0 240px; color: var(--muted); font-size: 15px; }
.tool-list { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer:not(.is-open) .pop { animation: none; }

/* ---------- Savings ---------- */
.savings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 56px; align-items: center; }
.savings-copy { display: flex; flex-direction: column; gap: 16px; }
.estimator { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 36px); }
.est-field { display: flex; flex-direction: column; gap: 6px; }
.est-field label { font-weight: 600; }
.est-value { font: 600 36px/1.15 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.est-scale { display: flex; justify-content: space-between; margin-top: -6px; font: 12px var(--font-mono); color: var(--muted); }
.range { --fill: 11%; -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; }
.range:focus-visible { outline-offset: 2px; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--fill), var(--accent-soft) var(--fill)); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -9px;
  border-radius: 50%; background: var(--chip); border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--glow-soft); transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 9px var(--glow-soft); }
.range::-moz-range-track { height: 8px; border-radius: 4px; background: var(--accent-soft); }
.range::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--accent); }
.range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--chip); border: 2px solid var(--accent); box-shadow: 0 0 0 6px var(--glow-soft); }
.band-bar { position: relative; height: 18px; overflow: hidden; border-radius: 4px; background: var(--accent-soft); }
.band-fill { position: absolute; top: 0; bottom: 0; background: var(--accent); }
.band-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); }
.est-result { display: flex; flex-direction: column; gap: 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.est-result-value { font: 600 clamp(24px, 2.6vw, 32px)/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* ---------- Compliance ---------- */
.standards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.standard { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 2px solid var(--accent); }
.standard h3 { font-size: 19px; }
.standard p { color: var(--body); }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; align-items: start; }
.map-card { padding: 16px; }
.map-card svg { display: block; width: 100%; height: auto; }
.map-caption { margin: 8px 4px 2px; font-size: 14px; color: var(--muted); }
.map-node { cursor: pointer; }
.map-hit { fill: transparent; }
.map-dot { fill: var(--chip); stroke: var(--accent); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transition: transform 0.25s ease, fill 0.25s ease; }
.map-node.is-client .map-dot { stroke: var(--line-strong); }
.map-node:hover .map-dot { transform: scale(1.2); }
.map-node.is-on .map-dot { fill: var(--accent); stroke: var(--accent); transform: scale(1.4); }
.map-node .map-ring { display: none; }
.map-node.is-on .map-ring { display: inline; }
.map-node .s-lbl { transition: fill 0.2s ease; }
.map-node:hover .s-lbl, .map-node.is-on .s-lbl { fill: var(--ink); font-weight: 600; }

.region-side { display: flex; flex-direction: column; gap: 14px; }
.region-detail { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 22px; padding: clamp(22px, 3vw, 32px); }
.region-detail.enter-panel { animation: rise 0.45s var(--ease-out) both; }
.region-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.region-code { font: 14px var(--font-mono); color: var(--accent-text); }
.region-full { display: block; font: 600 clamp(19px, 2vw, 23px)/1.25 var(--font-display); }
.region-badge { border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 4px 12px; font-size: 14px; color: var(--body); }
.facets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 18px; }
.facet { display: flex; flex-direction: column; gap: 4px; padding-left: 14px; border-left: 2px solid var(--line-strong); }
.facet dt { color: var(--muted); font-size: 14px; }
.facet dd { color: var(--ink); font-size: 16px; }
.in-platform { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--tint); border: 1px solid var(--line); border-radius: var(--r-md); }
.in-platform svg { flex: 0 0 18px; }
.in-platform strong { font-weight: 600; }
.in-platform span { color: var(--body); }

/* ---------- Engage ---------- */
.models { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; }
.model { display: flex; flex-direction: column; gap: 6px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.model h3 { font-size: 20px; }
.model .model-term { color: var(--muted); font-size: 15px; }
.model p:last-child { color: var(--body); }
.scoper { display: flex; flex-direction: column; gap: 22px; padding: clamp(24px, 3vw, 36px); }
.scoper h3 { font-size: clamp(20px, 2vw, 24px); }
.scoper-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.scoper-summary { color: var(--body); font-size: 15px; }
.scoper-summary strong { color: var(--ink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 36px; font-size: 15px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.footer-links a { padding: 10px 0; }
.text-btn {
  min-height: 44px; padding: 8px 14px; border-radius: var(--r-sm);
  color: var(--ink); font: 500 15px/1.2 var(--font-sans); cursor: pointer;
  transition: border-color 0.2s ease;
}
.text-btn:hover { border-color: var(--accent); }

/* ---------- Contact form ---------- */
.contact-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 15px; }
.field .opt { color: var(--muted); font-weight: 400; }
.input {
  min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--chip); color: var(--ink); font: 400 16px/1.4 var(--font-sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
textarea.input { min-height: 110px; resize: vertical; }
.input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow-soft); }
.input[aria-invalid="true"] { border-color: var(--danger-text); }
.field-error { font-size: 13.5px; color: var(--danger-text); }
.context-chip {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  padding: 4px 4px 4px 12px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-text); font-size: 14px; font-weight: 600;
}
.context-chip button { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 18px; cursor: pointer; }
.form-status.is-error { color: var(--danger-text); }
.privacy-note { font-size: 13.5px; color: var(--muted); }
.sent { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.sent svg { width: 44px; height: 44px; fill: none; stroke: var(--signal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; animation: draw90 0.6s ease 0.1s backwards; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }

/* ---------- Ambient colour behind the glass ---------- */
.blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(80px); opacity: var(--blob-opacity); animation: drift 22s ease-in-out infinite alternate; }
.blob-1 { left: -12%; top: -14%; background: radial-gradient(circle, var(--accent), transparent 70%); }
.blob-2 { right: -14%; top: 22%; background: radial-gradient(circle, #8B5CF6, transparent 70%); animation-duration: 27s; animation-delay: -6s; }
.blob-3 { left: 18%; bottom: -22%; background: radial-gradient(circle, var(--signal), transparent 70%); animation-duration: 31s; animation-delay: -12s; }

/* ---------- Ripple on every button ---------- */
:where(button, .btn) { position: relative; overflow: hidden; }
:where(button, .btn)::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle, currentColor 10%, transparent 10.5%) center / 100% 100% no-repeat;
  transform: scale(12); opacity: 0; transition: transform 0.55s cubic-bezier(0.2, 0, 0, 1), opacity 0.9s;
}
:where(button, .btn):active::before { transform: scale(0); opacity: 0.24; transition: 0s; }

/* ---------- Floating "Book a call" on small screens ---------- */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 44; height: 56px; padding: 0 20px;
  border-radius: 16px; box-shadow: var(--elev3);
  transform: translateY(calc(100% + 80px)); transition: transform 0.35s var(--ease-out);
}
.fab.is-shown { transform: none; }
.fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
@media (min-width: 900px) { .fab { display: none; } }

/* ---------- Dev mode ---------- */
.dev-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px 8px 14px;
  border-radius: var(--r-pill); color: var(--ink); font: 500 14px/1.2 var(--font-mono); cursor: pointer;
}
.dev-toggle svg { width: 18px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.switch { position: relative; flex: none; width: 36px; height: 20px; border-radius: var(--r-pill); background: var(--line-strong); transition: background 0.3s ease; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(14, 27, 44, 0.4); transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1); }
.dev-toggle[aria-checked="true"] .switch { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #8B5CF6)); }
.dev-toggle[aria-checked="true"] .switch::after { transform: translateX(16px); }

.dev-only, .devblock, .term-section, .tmux { display: none; }
.dev .dev-only { display: inline; }
.dev .biz-only { display: none; }
.dev .devblock, .dev .term-section { display: block; }
.dev body { padding-bottom: 44px; }
.dev .fab { bottom: 60px; }
.dev .gate-tools { color: var(--ink); font-size: 13.5px; }
.dev .card { box-shadow: inset 0 1px 0 var(--glass-hi), 0 14px 36px -16px rgba(14, 27, 44, 0.45); }
.dev .btn-primary { box-shadow: 0 8px 26px -8px var(--accent), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
:root.dev { --blob-opacity: 0.22; }
:root.dev[data-theme="dark"] { --blob-opacity: 0.3; }

.devblock { font: 14px/1.5 var(--font-mono); color: var(--signal-text); }
.cursor { display: inline-block; width: 0.6em; height: 1.05em; margin-left: 5px; background: currentColor; vertical-align: text-bottom; animation: cursorblink 1.1s steps(1) infinite; }

/* Interactive terminal */
.term-section { padding-top: 8px; padding-bottom: 40px; }
.term-window { overflow: hidden; border-radius: 14px; background: var(--panel); color: var(--panel-text); font: 14.5px/1.6 var(--font-mono); }
.term-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(169, 182, 200, 0.25); color: var(--panel-muted); font-size: 13px; }
.term-bar > span { display: inline-flex; align-items: center; gap: 10px; }
.term-lights { display: inline-flex; gap: 6px; }
.term-lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--panel-muted); opacity: 0.5; }
.term-log { height: 380px; overflow-y: auto; padding: 14px 18px 6px; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; scrollbar-color: var(--panel-muted) transparent; }
.term-log > div { white-space: pre-wrap; overflow-wrap: anywhere; animation: appear 0.06s linear both; }
.term-log a { color: var(--panel-accent); }
.term-prompt, .t-ok { color: var(--signal); }
.t-err { color: #FF9D8A; }
.t-dim { color: var(--panel-muted); }
.term-line { display: flex; align-items: center; gap: 10px; padding: 8px 18px 12px; }
.term-line:focus-within { box-shadow: inset 3px 0 0 var(--panel-accent); }
.term-prompt { white-space: nowrap; }
.term-input { flex: 1 1 auto; min-width: 0; min-height: 28px; padding: 0; border: 0; background: transparent; color: var(--panel-text); font: inherit; caret-color: var(--panel-accent); }
.term-input:focus-visible { outline: 0; }
.term-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-top: 1px solid rgba(169, 182, 200, 0.25); }
.term-chip { min-height: 44px; padding: 8px 12px; border: 1px solid var(--panel-muted); border-radius: var(--r-sm); background: transparent; color: var(--panel-text); font: 500 13.5px/1.2 var(--font-mono); cursor: pointer; }
.term-chip:hover { border-color: var(--panel-accent); }
@media (max-width: 600px) { .term-log { height: 300px; } .term-hint { display: none !important; } }

/* tmux-style section bar */
.dev .tmux {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; height: 44px;
  display: flex; align-items: stretch; overflow-x: auto; white-space: nowrap;
  background: var(--panel); color: var(--panel-text); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  font: 500 13px/1 var(--font-mono); animation: tmuxin 0.35s ease both;
}
.tmux-session, .tmux-status { display: inline-flex; align-items: center; padding: 0 12px; }
.tmux-session { background: var(--signal); color: #0B1220; font-weight: 600; }
.tmux-status { color: var(--panel-muted); }
.tmux-spacer { flex: 1 1 auto; }
.tmux button { min-width: 44px; padding: 0 12px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tmux button[aria-current="true"] { background: var(--panel-accent); color: #0B1220; }
.tmux .tmux-help { color: var(--panel-accent); }

/* Boot screen and scan flash */
.boot { position: fixed; inset: 0; z-index: 68; display: none; align-items: center; justify-content: center; background: #0A1322; color: var(--panel-text); font: 16px/1.8 var(--font-mono); }
.boot.is-on { display: flex; animation: boot 1.9s cubic-bezier(0.7, 0, 0.2, 1) both; }
.boot-inner { width: 560px; max-width: 86%; }
.boot-line { display: block; white-space: pre-wrap; animation: appear 0.06s linear both; }
.boot-ok { color: var(--signal); }
.boot-bar { display: block; height: 10px; margin: 8px 0; border: 1px solid var(--panel-muted); }
.boot-fill { display: block; height: 100%; background: var(--panel-accent); transform-origin: left; animation: bootfill 0.9s steps(18) 0.45s both; }
.scan-flash { position: fixed; inset: 0; z-index: 65; display: none; overflow: hidden; pointer-events: none; }
.scan-flash.is-on { display: block; }
.scan-flash::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--accent); box-shadow: 0 0 24px 6px var(--accent); animation: scanline 0.65s cubic-bezier(0.6, 0, 0.3, 1) both; }
.scan-flash::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(14, 27, 44, 0.08) 0 2px, transparent 2px 4px); animation: scanfade 0.65s ease both; }

/* ---------- SVG illustration parts ---------- */
.s-grid { stroke: var(--grid); stroke-width: 1; }
.s-base { stroke: var(--stroke); stroke-width: 1.5; fill: none; transition: stroke 0.2s ease, opacity 0.2s ease; }
.s-dashed { stroke: var(--stroke); stroke-width: 1.5; stroke-dasharray: 4 6; fill: none; }
.s-flow { stroke: var(--accent); stroke-width: 1.6; fill: none; stroke-dasharray: 3 11; animation: dash var(--dur, 1.6s) linear infinite; transition: stroke-width 0.2s ease; }
.s-flow-in { stroke: var(--signal); stroke-width: 1.2; fill: none; stroke-dasharray: 2 16; opacity: 0.8; animation: dash 2.4s linear infinite reverse; }
.s-node { fill: var(--chip); stroke: var(--accent); stroke-width: 1.5; }
.s-node-c { fill: var(--chip); stroke: var(--signal); stroke-width: 1.5; }
.s-blink { transform-box: fill-box; transform-origin: center; animation: blink 4s ease-in-out infinite; }
.s-ring { fill: none; stroke: var(--accent); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: ring 2.6s ease-out infinite; }
.s-orbit { fill: none; stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 7; opacity: 0.6; transform-box: fill-box; transform-origin: center; animation: spin 18s linear infinite; }
.s-orbit-ring { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 4 8; transform-box: fill-box; transform-origin: center; animation: spin 40s linear infinite; }
.s-sweep { stroke: var(--accent); stroke-width: 1; opacity: 0.25; transform-box: view-box; animation: spin 7s linear infinite; }
.s-hub { fill: var(--chip); stroke: var(--accent); stroke-width: 2; }
.s-hub-fill { fill: var(--accent); }
.s-hub-t { font: 600 15px var(--font-display); fill: var(--on-accent); text-anchor: middle; }
.s-hubtxt { font: 600 11px var(--font-mono); fill: var(--ink); text-anchor: middle; }
.s-lbl { font: 500 11px var(--font-mono); fill: var(--muted); }
.t-mid { text-anchor: middle; }
.t-end { text-anchor: end; }
.s-sat { fill: var(--chip); stroke: var(--line); stroke-width: 1.5; }
.s-sat-t { font: 600 15px var(--font-display); fill: var(--ink); }
.s-sat-m { font: 400 12.5px var(--font-sans); fill: var(--muted); }
.s-glint { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: twinkle 2.8s ease-in-out infinite; }
.s-ico { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.s-shield { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 520; }
.s-check { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; }
.s-pathline { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; }
.s-step { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; transform-box: fill-box; transform-origin: bottom; }
.s-spark { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; animation: spark 5s ease-in-out infinite; }
.s-spark-base { fill: none; stroke: var(--line); stroke-width: 1; }

/* The production loop */
.s-loop { transform-box: view-box; transform-origin: 300px 205px; animation: loop 10s linear infinite; }
.s-st { fill: var(--chip); stroke: var(--accent); stroke-width: 2; animation: stpulse 10s linear infinite; }
.s-st-in { fill: var(--accent); }
.s-st-human { fill: var(--ink); stroke: var(--ink); stroke-width: 2; animation: sthuman 10s linear infinite; }
.s-st-ico { fill: none; stroke: var(--on-accent); stroke-width: 2; stroke-linecap: round; }
.s-lt { font: 600 14px var(--font-display); fill: var(--ink); }
.s-ls { font: 400 12px var(--font-sans); fill: var(--muted); }
.s-lc { font: 600 17px var(--font-display); fill: var(--ink); text-anchor: middle; }
.s-lc-a { font: 600 17px var(--font-display); fill: var(--accent-text); text-anchor: middle; }
.s-wait { font: 600 12px var(--font-sans); fill: var(--body); text-anchor: middle; opacity: 0; animation: wait 10s linear infinite; }
.s-ok { font: 600 12px var(--font-sans); fill: var(--signal-text); text-anchor: middle; animation: ok 10s linear infinite; }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal:not(.is-visible),
.js .stagger:not(.is-visible) > * { opacity: 0; }
.js .reveal.is-visible { animation: rise-lg 0.7s var(--ease-out) backwards; }
.js .stagger.is-visible > * { animation: rise-lg 0.65s var(--ease-out) backwards; }
.js .stagger.is-visible > :nth-child(2) { animation-delay: 0.08s; }
.js .stagger.is-visible > :nth-child(3) { animation-delay: 0.16s; }
.js .stagger.is-visible > :nth-child(4) { animation-delay: 0.24s; }
.js .stagger.is-visible > :nth-child(5) { animation-delay: 0.32s; }
.js .stagger.is-visible > :nth-child(n+6) { animation-delay: 0.4s; }

.js .rule > span { transform: scaleX(0); }
.js .is-visible .rule > span { transform: none; animation: grow 1s var(--ease-out) 0.3s backwards; }
.js .is-visible .tv { animation: type-w 1.1s steps(var(--n)) 0.45s backwards; }
.js .is-visible .s-shield { animation: draw520 1.6s ease backwards; }
.js .is-visible .s-check { animation: draw90 0.6s ease 0.9s backwards; }
.js .is-visible .s-pathline { animation: draw520 1.4s ease 0.5s backwards; }
.js .is-visible .s-step { animation: barup 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.js .is-visible .vendor { animation: rise 0.5s ease backwards; }

/* Pause looping animations while their section is off screen */
.js [data-anim-scope]:not(.in-view) *,
.js [data-anim-scope]:not(.in-view) *::before,
.js [data-anim-scope]:not(.in-view) *::after { animation-play-state: paused !important; }

/* Theme switch: circular reveal (View Transitions) */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise-lg { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes clip-in {
  from { opacity: 0; clip-path: inset(0 -5% 100% -5%); transform: translateY(40%); }
  to { opacity: 1; clip-path: inset(-20% -5% -20% -5%); transform: none; }
}
@keyframes type-w { from { width: 0; } }
@keyframes caret { 50% { border-color: transparent; } }
@keyframes dash { to { stroke-dashoffset: -28; } }
@keyframes ring { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes beat { 0% { box-shadow: 0 0 0 0 var(--signal-glow); } 100% { box-shadow: 0 0 0 10px transparent; } }
@keyframes travel { 0% { left: 0; opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { left: calc(100% - 12px); opacity: 0; } }
@keyframes travel-y { 0% { top: 0; opacity: 0; } 6% { opacity: 1; } 94% { opacity: 1; } 100% { top: calc(100% - 12px); opacity: 0; } }
@keyframes gate {
  0% { background: var(--accent); box-shadow: 0 0 0 7px var(--glow); }
  22% { background: var(--chip); box-shadow: 0 0 0 0 transparent; }
  100% { background: var(--chip); }
}
@keyframes loader-out { 0%, 80% { transform: none; } 100% { transform: translateY(-101%); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes loadbar { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes bar { 0% { transform: scaleX(0); } 25%, 85% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
@keyframes blip { 0%, 40% { opacity: 0; transform: translateY(4px); } 50%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes spark { 0% { stroke-dashoffset: 420; } 40%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 420; } }
@keyframes ep {
  0% { background: var(--idle); transform: scale(1); }
  6% { background: var(--signal); transform: scale(1.35); }
  12%, 82% { background: var(--signal); transform: scale(1); }
  92%, 100% { background: var(--idle); }
}
@keyframes scan { 0% { left: 0; opacity: 0; } 5% { opacity: 0.5; } 60% { left: 100%; opacity: 0.5; } 61%, 100% { left: 100%; opacity: 0; } }
@keyframes indet { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes twinkle { 0%, 100% { transform: scale(0) rotate(0deg); opacity: 0; } 50% { transform: scale(1) rotate(90deg); opacity: 1; } }
@keyframes draw520 { from { stroke-dashoffset: 520; } to { stroke-dashoffset: 0; } }
@keyframes draw90 { from { stroke-dashoffset: 90; } to { stroke-dashoffset: 0; } }
@keyframes barup { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes drop { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% - 10px); opacity: 0; } }
@keyframes seq {
  0%, 4% { background: var(--chip); color: var(--muted); border-color: var(--line); }
  10%, 58% { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
  68%, 100% { background: var(--chip); color: var(--muted); border-color: var(--line); }
}
@keyframes loop { 0% { transform: rotate(0deg); } 40% { transform: rotate(180deg); } 58% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
@keyframes stpulse { 0%, 7% { fill: var(--accent); } 13%, 100% { fill: var(--chip); } }
@keyframes sthuman { 0%, 39% { stroke: var(--ink); stroke-width: 2; } 41%, 57% { stroke: var(--signal); stroke-width: 6; } 60%, 100% { stroke: var(--ink); stroke-width: 2; } }
@keyframes wait { 0%, 39% { opacity: 0; } 41%, 49% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes ok { 0%, 50% { opacity: 0; } 52%, 64% { opacity: 1; } 68%, 100% { opacity: 0; } }
@keyframes msg1 { 0%, 3% { opacity: 0; transform: translateY(8px); } 8%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes msgtype { 0%, 16% { opacity: 0; } 19%, 36% { opacity: 1; } 39%, 100% { opacity: 0; } }
@keyframes msg2 { 0%, 38% { opacity: 0; transform: translateY(8px); } 43%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vmax, -4vmax) scale(1.15); } }
@keyframes cursorblink { 50% { opacity: 0; } }
@keyframes appear { from { opacity: 0; } }
@keyframes boot {
  0% { transform: none; clip-path: inset(49.6% 0 49.6% 0); }
  9%, 84% { transform: none; clip-path: inset(0); }
  100% { transform: translateY(-101%); clip-path: inset(0); }
}
@keyframes bootfill { from { transform: scaleX(0); } }
@keyframes scanline { from { top: 0; opacity: 1; } to { top: 100%; opacity: 0.2; } }
@keyframes scanfade { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tmuxin { from { transform: translateY(100%); } }
@keyframes flowlit { 0%, 100% { background: var(--accent-soft); } 5%, 14% { background: color-mix(in srgb, var(--accent) 38%, var(--chip)); } 24% { background: var(--accent-soft); } }
@keyframes tabline { from { transform: scaleX(0); opacity: 0.3; } }
@keyframes tick { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }
@keyframes icoin { from { transform: rotate(-90deg) scale(0.4); opacity: 0; } }
@keyframes tdot { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-3px); opacity: 1; } }

/* ---------- Reduced motion: everything still, everything visible ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .intro .loader { display: none; }
  .js .reveal:not(.is-visible), .js .stagger:not(.is-visible) > * { opacity: 1; }
  .js .rule > span { transform: none; }
}
