/* ==========================================================================
   Alionix — design system
   Signal teal accent · dark theme · Inter (UI) + JetBrains Mono (labels)
   ========================================================================== */

/* ── Fonts ─────────────────────────────────────────────────────────────
   Self-hosted variable fonts (latin subset). Replaces the render-blocking
   fonts.googleapis.com stylesheet; paths resolve against this file. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  /* Neutrals */
  --bg:            #0f0f10;
  --bg-2:          #131316;
  --bg-card:       #17171b;
  --bg-card-hover: #1e1e23;
  --bg-elev:       #1b1b20;
  --sidebar:       #161619;
  --border:        #28282e;
  --border-2:      #34343c;
  --border-3:      #45454f;

  /* Text — all AA-verified on --bg, --bg-card and --sidebar */
  --text:       #f2f1f5;
  --text-muted: #c0bfca;
  --text-dim:   #8f8e9b;

  /* Signal teal — owned by the Alionix umbrella brand */
  --accent:      #3ec9d6;
  --accent-hi:   #8fe8f2;
  --accent-lo:   #2b93a3;
  --accent-dim:  rgba(62, 201, 214, 0.10);
  --accent-dim2: rgba(62, 201, 214, 0.26);
  --accent-glow: rgba(62, 201, 214, 0.30);
  --accent-on:   #04252a;

  /* Product identities — borrowed from each product's own site */
  --hive:      #f59e0b;
  --hive-hi:   #fcc248;
  --hive-dim:  rgba(245, 158, 11, 0.10);
  --hive-dim2: rgba(245, 158, 11, 0.26);
  --brain:     #948ebd;
  --brain-hi:  #c9c5f0;
  --brain-dim: rgba(148, 142, 189, 0.10);
  --brain-dim2:rgba(148, 142, 189, 0.28);

  --hub: #4a5064;

  /* Spacing scale — 4px base */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Type scale */
  --fs-xs:   0.72rem;
  --fs-sm:   0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md:   1.0625rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.5rem;
  --fs-2xl:  2rem;
  --fs-3xl:  2.5rem;
  --fs-4xl:  3.25rem;

  /* Radii */
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   18px;
  --r-pill: 100px;

  /* Shadows */
  --sh-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --sh-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --sh-lg: 0 28px 70px rgba(0, 0, 0, 0.55);
  --sh-focus: 0 0 0 3px rgba(62, 201, 214, 0.45);

  /* Motion — one shared system for the whole page */
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.42, 0.5, 1);

  --dur-1: 120ms;  /* micro  */
  --dur-2: 240ms;  /* quick  */
  --dur-3: 420ms;  /* base   */
  --dur-4: 700ms;  /* reveal */
  --dur-5: 1100ms; /* slow   */

  --stagger: 80ms;            /* master entrance cadence */
  --handoff: 960ms;           /* console internals start after the frame lands */

  --t-fast:   0.16s;
  --t:        0.24s;
  --t-slow:   0.55s;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --container: 1140px;
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--sp-4));
  -webkit-text-size-adjust: 100%;
}

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

/* Subtle film-grain layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.018'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

a { color: inherit; }

/* Accessible focus — a reserved transparent ring that becomes visible on
   :focus-visible. Keeps a consistent, high-contrast keyboard ring everywhere. */
a, button {
  outline: 2px solid transparent;
  outline-offset: 3px;
}
:focus-visible {
  outline-color: var(--accent);
  border-radius: var(--r-sm);
}

/* Skip link */
.skip-link {
  position: fixed;
  top: var(--sp-3);
  left: 50%;
  transform: translate(-50%, -200%);
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 700;
  font-size: var(--fs-sm);
  border-radius: var(--r-md);
  text-decoration: none;
  box-shadow: var(--sh-md);
  transition: transform var(--t) var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ── Layout primitives ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--sp-6);
}

main { position: relative; z-index: 1; }

.section { position: relative; padding-block: var(--sp-24); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-hi);
  background: var(--accent-dim);
  border: 1px solid var(--accent-dim2);
  padding: 0.3rem 0.8rem;
  border-radius: var(--r-pill);
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.section-head { max-width: 660px; }
.section-head h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.75rem);
  margin-top: var(--sp-5);
}
.section-head p {
  margin-top: var(--sp-4);
  color: var(--text-muted);
  font-size: var(--fs-md);
  line-height: 1.7;
}

.grad {
  background: linear-gradient(120deg, var(--accent-hi) 0%, #caa5f2 115%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
              color var(--t) var(--ease), box-shadow var(--t) var(--ease),
              transform var(--t) var(--ease);
}
.btn .ext { transition: transform var(--t) var(--ease-out); }
.btn:hover .ext { transform: translate(2px, -2px); }

.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 700;
  box-shadow: 0 0 18px var(--accent-glow);
}
/* a single restrained sheen sweep on hover */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -55%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg) translateX(0);
  transition: transform var(--dur-4) var(--ease-out);
  pointer-events: none;
}
.btn-primary:hover::after { transform: skewX(-18deg) translateX(360%); }
/* keep the arrow legible on the teal button surface */
.btn-primary .ext { color: currentColor; }
.btn-primary:hover {
  background: var(--accent-hi);
  transform: translateY(-1px);
  box-shadow: 0 0 26px rgba(62, 201, 214, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-3);
  background: rgba(255, 255, 255, 0.04);
}

.btn-lg { min-height: 50px; padding: 0.85rem 1.6rem; font-size: var(--fs-md); border-radius: var(--r-md); }

.ext {
  font-size: 0.82em;
  color: var(--text-dim);
  line-height: 1;
}

/* ── Header / nav ──────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(15, 15, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
              box-shadow var(--t) var(--ease);
}
.site-header.scrolled {
  background: rgba(15, 15, 16, 0.92);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--text);
  padding-block: var(--sp-2);
}
/* mark sits on the text baseline (approved wordmark treatment) */
.brand img { height: 0.9em; width: auto; }
.brand .wg {
  background: linear-gradient(90deg, #81f4f5 0%, #caa5f2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: auto;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-link::after {
  content: '';
  position: absolute;
  left: var(--sp-3);
  right: var(--sp-3);
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t) var(--ease-out);
}
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-2); }
.nav-actions .btn { min-height: 40px; padding: 0.5rem 0.95rem; font-size: var(--fs-sm); }

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  color: var(--text);
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.burger:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--border-3); }
.burger .bars { position: relative; width: 18px; height: 12px; }
.burger .bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t) var(--ease), opacity var(--t-fast) var(--ease), top var(--t) var(--ease);
}
.burger .bars span:nth-child(1) { top: 0; }
.burger .bars span:nth-child(2) { top: 5px; }
.burger .bars span:nth-child(3) { top: 10px; }
.burger[aria-expanded='true'] .bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.burger[aria-expanded='true'] .bars span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] .bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* ── Mobile menu ───────────────────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  padding-top: var(--nav-h);
  background: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility var(--t) var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.open { opacity: 1; visibility: visible; }

.mobile-panel {
  width: min(360px, 88vw);
  height: 100%;
  overflow-y: auto;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: var(--sp-6);
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease-out);
}
.mobile-menu.open .mobile-panel { transform: none; }

.mobile-panel nav { display: flex; flex-direction: column; gap: var(--sp-1); }
.mobile-panel .menu-label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--sp-2);
}
.mobile-panel nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 var(--sp-3);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--r-md);
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.mobile-panel nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.mobile-panel .menu-cta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--border);
}
.mobile-panel .menu-cta .btn { width: 100%; min-height: 48px; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-h) + var(--sp-16));
  padding-bottom: var(--sp-16);
}
.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.35rem, 5.6vw, 4.15rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.06;
  max-width: 920px;
  margin-top: var(--sp-6);
}
.hero-lede {
  margin-top: var(--sp-6);
  max-width: 660px;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  line-height: 1.7;
  color: var(--text-muted);
}
.hero-actions {
  margin-top: var(--sp-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.orb-1 { width: 680px; height: 680px; top: -240px; left: 50%; transform: translateX(-50%); background: rgba(62, 201, 214, 0.10); }
.orb-2 { width: 340px; height: 340px; bottom: 2%; left: -10%; background: rgba(143, 232, 242, 0.06); }
.orb-3 { width: 340px; height: 340px; bottom: 2%; right: -10%; background: rgba(202, 165, 242, 0.05); }

/* ── Hero console — one cinematic mission-control frame ────────────────── */
.hero-console {
  width: 100%;
  max-width: 1120px;
  margin-top: var(--sp-16);
  text-align: left;
  perspective: 1600px;
}
/* canvas must never inherit the entrance blur — keep it crisp */
.hero-console.reveal { filter: none; }
.console-tilt {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--sh-lg), 0 0 60px rgba(62, 201, 214, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow var(--t) var(--ease);
}
.console-tilt::after {
  /* faint top light-line, echoes enterprise hardware */
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143, 232, 242, 0.4), transparent);
  pointer-events: none;
}

/* Unified chrome bar */
.console-chrome {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  height: 42px;
  padding-inline: var(--sp-4);
  background: linear-gradient(180deg, #191920, #141418);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  overflow: hidden;
}
.console-led {
  flex: 0 0 auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow), 0 0 0 3px rgba(62, 201, 214, 0.10);
}
.console-id { flex: 0 0 auto; letter-spacing: 0.06em; color: var(--text-muted); white-space: nowrap; }
.console-sep { color: var(--accent-lo); }
.console-tabs {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-left: auto;
  min-width: 0;
}
.console-tab {
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  color: var(--text-dim);
  white-space: nowrap;
}
.console-tab.is-on {
  color: var(--accent-hi);
  background: var(--accent-dim);
  border-color: var(--accent-dim2);
}
.console-tab-spacer { width: var(--sp-3); }
.console-meta { color: var(--text-dim); white-space: nowrap; }

/* Panes */
.console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--border);
}
.pane {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}
.pane-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 34px;
  padding-inline: var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: #121216;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  overflow: hidden;
}
.pane-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto; }
.pane-dot--acc { background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.pane-dot--net { background: var(--brain-hi); box-shadow: 0 0 6px rgba(201, 197, 240, 0.45); }
.pane-title { color: var(--text-muted); font-weight: 600; letter-spacing: 0.04em; }
.pane-sub { color: var(--text-dim); }
.pane-sub::before { content: '— '; }

/* ── Terminal theater ──────────────────────────────────────────────────── */
.terminal-body {
  position: relative;
  flex: 1;
  min-height: 372px;
  padding: var(--sp-5) var(--sp-4);
  background: var(--bg);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1.9;
  overflow: hidden;
  transition: opacity var(--dur-3) var(--ease-in-out);
}
/* very subtle scanline + vignette texture */
.terminal-body::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.terminal-body::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 90% at 30% 0%, transparent 55%, rgba(0, 0, 0, 0.35));
}
.terminal-body.is-cycling { opacity: 0; }

.t-line {
  position: relative;
  z-index: 1;
  display: flex;
  gap: var(--sp-3);
  min-height: 1.9em;
}
.js .terminal-body .t-line { opacity: 0; transform: translateY(5px); }
.t-line.vis { animation: lineIn var(--dur-3) var(--ease-out) forwards; }
@keyframes lineIn { to { opacity: 1; transform: none; } }
/* newest line: phosphor glow that settles */
.t-line.t-fresh .t-msg { animation: phosphor 2.4s var(--ease-out) forwards; }
@keyframes phosphor {
  0%   { text-shadow: 0 0 10px currentColor, 0 0 2px currentColor; opacity: 0.55; }
  22%  { text-shadow: 0 0 8px currentColor; opacity: 1; }
  100% { text-shadow: 0 0 0 transparent; }
}

.t-prompt { flex: 0 0 auto; display: inline-flex; align-items: baseline; font-size: var(--fs-xs); font-weight: 600; }
.t-user { color: var(--accent-hi); }
.t-punc { color: var(--text-dim); }
.t-dir  { color: var(--hive-hi); }
.t-caret { margin-left: 0.42em; color: var(--accent); }
.t-name { flex: 0 0 auto; min-width: 84px; font-weight: 600; font-size: var(--fs-xs); }
.t-msg  { color: var(--text-muted); white-space: pre-wrap; }
.t-mid  { color: var(--text-dim); }
.t-acc   { color: var(--accent-hi); }
.t-hive  { color: var(--hive-hi); }
.t-brain { color: var(--brain-hi); }

.t-cursor {
  display: inline-block;
  width: 7px; height: 1.02em;
  margin-left: 2px;
  vertical-align: -0.16em;
  border-radius: 1px;
  background: var(--accent-hi);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 0%, 52% { opacity: 1; } 53%, 100% { opacity: 0; } }

/* running-command status (braille spinner) — not a transcript line */
.t-status {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 1.9em;
  color: var(--text-dim);
  font-size: var(--fs-xs);
}
.t-status[hidden] { display: none; }
.t-spin { color: var(--accent); font-size: 1.05em; }

/* ── System-map pane ───────────────────────────────────────────────────── */
.map-stage {
  position: relative;
  flex: 1;
  min-height: 372px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 50% 42%, rgba(62, 201, 214, 0.05), transparent 70%),
    var(--bg);
}
.map-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.map-cap {
  flex: 0 0 auto;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border);
  background: #121216;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
  text-align: center;
  padding-inline: var(--sp-3);
}

/* Freeze every CSS animation inside the console when the master loop stops */
.hero-console.is-paused *,
.hero-console.is-paused *::before,
.hero-console.is-paused *::after { animation-play-state: paused !important; }

/* ── Product cards ─────────────────────────────────────────────────────── */
#products {
  background: linear-gradient(180deg, transparent, rgba(62, 201, 214, 0.022), transparent);
}
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-12);
}
.card {
  position: relative;
  padding: var(--sp-8);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform var(--t) var(--ease-out), border-color var(--t) var(--ease),
              background var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--p), transparent);
}
/* pointer-tracked sheen */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), var(--p-dim2), transparent 62%);
  transition: opacity var(--t) var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--p-dim2); background: var(--bg-card-hover); box-shadow: var(--sh-lg), 0 0 46px var(--p-dim); }
.card:hover::after { opacity: 0.55; }

.card--hive  { --p: var(--hive);  --p-hi: var(--hive-hi);  --p-dim: var(--hive-dim);  --p-dim2: var(--hive-dim2); }
.card--brain { --p: var(--brain); --p-hi: var(--brain-hi); --p-dim: var(--brain-dim); --p-dim2: var(--brain-dim2); }

.card-head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.card-icon {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-lg);
  color: var(--p-hi);
  background: var(--p-dim);
  border: 1px solid var(--p-dim2);
}
.card-icon svg { width: 23px; height: 23px; }
.card-name { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; }
.card-name .p { color: var(--p-hi); }
.card-kind {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.card-tag { margin: var(--sp-2) 0 var(--sp-6); font-size: var(--fs-md); line-height: 1.6; color: var(--text); }
.card-list { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-8); }
.card-list li { display: flex; gap: var(--sp-3); font-size: var(--fs-base); line-height: 1.6; color: var(--text-muted); }
.card-list svg { flex-shrink: 0; margin-top: 4px; color: var(--p); }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--p-hi);
  text-decoration: none;
}
.card-link .ext { color: var(--p-hi); transition: transform var(--t) var(--ease-out); }
.card-link:hover .ext { transform: translate(2px, -2px); }

.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-5); }
.card-foot .card-link { min-height: 40px; }
.card-foot .card-link--ext { color: var(--text-muted); }
.card-foot .card-link--ext:hover { color: var(--text); }
.card-foot .card-link--ext .ext { color: var(--text-dim); }

.small-print {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.small-print .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

/* ── Principles ────────────────────────────────────────────────────────── */
#principles {
  padding-top: 0;
}
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-12);
}
.principle {
  padding: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease-out);
}
.principle:hover { border-color: var(--border-3); background: var(--bg-card-hover); transform: translateY(-2px); }
.principle .num {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--accent);
  letter-spacing: 0.1em;
}
.principle h3 { margin-top: var(--sp-3); font-size: var(--fs-lg); font-weight: 700; }
.principle p { margin-top: var(--sp-2); font-size: var(--fs-base); color: var(--text-muted); line-height: 1.65; }

/* ── CTA ───────────────────────────────────────────────────────────────── */
#family {
  text-align: center;
  background: radial-gradient(ellipse 70% 45% at 50% 50%, rgba(62, 201, 214, 0.06), transparent 70%);
}
#family .section-head { margin-inline: auto; }
#family h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.cta-links {
  margin-top: var(--sp-8);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  justify-content: center;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-8);
  font-size: var(--fs-sm);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-8);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid var(--border);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--sp-4); align-items: flex-start; }
.site-footer .brand { font-size: 1.25rem; padding-block: 0; }
.footer-tag { max-width: 34ch; color: var(--text-muted); line-height: 1.65; }
.footer-col h3 {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--sp-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-1); }
.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
.footer-col a:hover { color: var(--accent-hi); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  color: var(--text-dim);
}

/* ── Reveal animation — one master entrance system ─────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-4) var(--ease-out),
              transform var(--dur-4) var(--ease-out);
  transition-delay: var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* Hero entrance: rise + slight blur-to-sharp, staggered by --d.
   Retained for reference, but the above-the-fold hero is un-gated below so
   LCP is never gated behind this animation. Blur lived only on the hero's own
   elements and only for the entrance — a persistent page-wide blur filter is
   far too expensive to rasterize. */
.js .hero-inner .reveal.in {
  animation: heroIn var(--dur-4) var(--ease-out) var(--d, 0ms) both;
}
/* Above-the-fold hero must not gate LCP behind the reveal animation. */
.js .hero-inner .reveal { opacity: 1; transform: none; }
.js .hero-inner .reveal.in { animation: none; }
@keyframes heroIn {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to   { opacity: 1; transform: none;             filter: blur(0); }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .console-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .nav-menu, .nav-actions .btn { display: none; }
  .burger { display: inline-flex; }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .container { padding-inline: var(--sp-5); }
  .section { padding-block: var(--sp-16); }
  .hero { padding-top: calc(var(--nav-h) + var(--sp-12)); }
  .hero-console { margin-top: var(--sp-12); }
  .console-tabs .console-tab:not(.is-on), .console-tabs .console-tab-spacer, .console-meta { display: none; }
  .terminal-body, .map-stage { min-height: 320px; }
  .map-stage { min-height: 280px; }
  .footer-top { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Reduced motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .js .hero-inner .reveal { animation: none; opacity: 1; }
  .js .terminal-body .t-line { opacity: 1; transform: none; }
  .card:hover, .principle:hover, .btn-primary:hover { transform: none; }
  .console-tilt { transform: none !important; }
  .btn-primary::after { display: none; }
  .terminal-body::before, .terminal-body::after { display: none; }
}

/* ==========================================================================
   Content pages — inner URLs (/neohive/, /neobrain/, /local-first/)
   Same tokens, quieter composition than the cinematic home hero.
   ========================================================================== */

.page-main { position: relative; z-index: 1; }

/* Compact page hero */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + var(--sp-20));
  padding-bottom: var(--sp-10);
}
.page-hero .orb-1 { width: 560px; height: 560px; top: -300px; }
.page-hero-inner { position: relative; z-index: 1; max-width: 820px; }
.page-hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  margin-top: var(--sp-5);
}
.page-hero .lede {
  margin-top: var(--sp-5);
  max-width: 700px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.7;
  color: var(--text-muted);
}
.page-hero .hero-actions { margin-top: var(--sp-8); justify-content: flex-start; }

/* Breadcrumb */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--text-dim);
}
.crumbs a { color: var(--text-dim); text-decoration: none; transition: color var(--t) var(--ease); }
.crumbs a:hover { color: var(--accent-hi); }
.crumbs .sep { color: var(--border-3); }

/* Prose / article body */
.prose { max-width: 760px; margin-top: var(--sp-12); }
.prose > * + * { margin-top: var(--sp-5); }
.prose h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-top: var(--sp-16);
  scroll-margin-top: calc(var(--nav-h) + var(--sp-4));
}
.prose h3 { font-size: var(--fs-lg); font-weight: 700; margin-top: var(--sp-8); }
.prose p, .prose li { color: var(--text-muted); line-height: 1.78; font-size: var(--fs-md); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--accent-hi); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--text); }
.prose ul, .prose ol { display: flex; flex-direction: column; gap: var(--sp-3); padding-left: var(--sp-5); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--accent); }
.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--accent-hi);
  background: var(--accent-dim);
  border: 1px solid var(--accent-dim2);
  padding: 0.1em 0.4em;
  border-radius: var(--r-sm);
}

/* Install snippet */
.snippet {
  margin-top: var(--sp-6);
  background: #101013;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.snippet-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 34px;
  padding-inline: var(--sp-4);
  border-bottom: 1px solid var(--border);
  background: #121216;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
.snippet-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.snippet pre {
  padding: var(--sp-4) var(--sp-5);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1.9;
  color: var(--text-muted);
  white-space: pre;
}
.snippet pre .cm { color: var(--text-dim); }
.snippet pre .ac { color: var(--accent-hi); }

/* Keyboard focus for horizontally scrollable regions (WCAG 2.1.1) */
.table-wrap:focus-visible, .snippet pre:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

/* Feature / point grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); margin-top: var(--sp-8); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); margin-top: var(--sp-8); }
.mini {
  padding: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease-out);
}
.mini:hover { border-color: var(--border-3); background: var(--bg-card-hover); transform: translateY(-2px); }
.mini h3 { font-size: var(--fs-md); font-weight: 700; }
.mini p { margin-top: var(--sp-2); font-size: var(--fs-base); line-height: 1.68; color: var(--text-muted); }
.mini .tag { font-family: var(--mono); font-size: var(--fs-xs); color: var(--accent); letter-spacing: 0.08em; }

/* Steps */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: var(--sp-5); margin-top: var(--sp-8); }
.step { display: flex; gap: var(--sp-4); }
.step-n {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  background: var(--accent-dim);
  border: 1px solid var(--accent-dim2);
  color: var(--accent-hi);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 600;
}
.step-body { min-width: 0; }
.step h3 { font-size: var(--fs-md); font-weight: 700; margin-top: 3px; }
.step p { margin-top: var(--sp-2); font-size: var(--fs-base); line-height: 1.7; color: var(--text-muted); }

/* Doc table */
.table-wrap { margin-top: var(--sp-6); border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto; }
table.doc { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
table.doc th, table.doc td { text-align: left; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); vertical-align: top; }
table.doc tr:last-child td { border-bottom: 0; }
table.doc th {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: #121216;
}
table.doc td { color: var(--text-muted); }
table.doc code { font-family: var(--mono); font-size: 0.9em; color: var(--accent-hi); }

/* Callout */
.callout {
  display: flex;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border: 1px solid var(--accent-dim2);
  background: var(--accent-dim);
  border-radius: var(--r-lg);
}
.callout .mark { flex: 0 0 auto; color: var(--accent-hi); font-family: var(--mono); font-weight: 700; }
.callout p { color: var(--text); font-size: var(--fs-base); line-height: 1.7; }

/* Related links */
.related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); margin-top: var(--sp-8); }
.related a {
  display: block;
  padding: var(--sp-6);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  text-decoration: none;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease-out);
}
.related a:hover { border-color: var(--accent-dim2); background: var(--bg-card-hover); transform: translateY(-2px); }
.related .k { font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-hi); }
.related .t { margin-top: var(--sp-2); font-size: var(--fs-md); font-weight: 700; color: var(--text); }
.related .d { margin-top: var(--sp-2); font-size: var(--fs-base); line-height: 1.65; color: var(--text-muted); }

/* Section wrapper for content pages */
.cpage { padding-block: var(--sp-10) var(--sp-4); }
.cpage--last { padding-bottom: var(--sp-24); }

@media (max-width: 820px) {
  .grid-2, .grid-3, .related { grid-template-columns: 1fr; }
  .page-hero { padding-top: calc(var(--nav-h) + var(--sp-12)); }
}
