/* Self-hosted variable fonts (latin) — replaces Google Fonts CDN (CSP) */
@font-face { font-family:'Inter'; font-style:normal; font-weight:100 900; font-display:swap; src:url('../fonts/inter-var.woff2') format('woff2'); }
@font-face { font-family:'Fraunces'; font-style:normal; font-weight:100 900; font-display:swap; src:url('../fonts/fraunces-var.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:100 800; font-display:swap; src:url('../fonts/jetbrains-mono-var.woff2') format('woff2'); }

/* ============================================================
   AI-CRAFTERS · ATELIER MIX (photo hero) + THEME SWITCHER
   Navy base · themed accent via CSS custom properties
   Theme "blue"  = Crystal Blue (cyan/blue primary)
   Theme "gold"  = Atelier Gold (gold primary, gold glows)
   Gold stays a rare fixed accent inside the blue theme.
   Self-contained: inline CSS + JS, no external deps.
   ============================================================ */

:root {
  /* Background — navy (same in both themes) */
  --bg-deep:    #000411;
  --bg-navy:    #030a1c;
  --bg-card:    rgba(255,255,255,0.035);
  --bg-card-hi: rgba(255,255,255,0.06);
  --bg-modal:   rgba(0,4,17,0.92);

  /* Foreground */
  --fg:         #ffffff;
  --fg-soft:    rgba(255,255,255,0.85);
  --fg-mute:    rgba(255,255,255,0.55);
  --fg-faint:   rgba(255,255,255,0.40);
  --fg-ghost:   rgba(255,255,255,0.10);

  /* Fixed gold (rare accent in blue theme) */
  --gold:      #d4a73c;
  --gold-2:    #b8860b;
  --gold-rgb:  212,167,60;
  --gold-glow: rgba(212,167,60,0.30);
  --gold-line: rgba(212,167,60,0.45);

  /* Emerald (status green — fixed) */
  --emerald:   #10b981;

  /* ===== THEMED ACCENT — Crystal Blue (default) ===== */
  --accent:      #00E0FF;   --accent-rgb:  0,224,255;
  --accent-2:    #2563eb;   --accent2-rgb: 37,99,235;
  --accent-3:    #3b82f6;   --accent3-rgb: 59,130,246;
  --accent-ink:  #001018;   /* text on accent buttons */

  /* Derived accent shades — auto-follow --accent-rgb */
  --accent-glow: rgba(var(--accent-rgb), 0.30);
  --accent-line: rgba(var(--accent-rgb), 0.42);

  /* Typography */
  --font-sans:  'Inter', system-ui, sans-serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;

  /* Radii + easing */
  --r-card: 16px;
  --r-pill: 9999px;
  --ease:      cubic-bezier(.2,.8,.2,1);
  --ease-mask: cubic-bezier(.65,0,.35,1);
}

/* ===== THEMED ACCENT — Atelier Gold ===== */
[data-theme="gold"] {
  --accent:     #d4a73c;   --accent-rgb:  212,167,60;
  --accent-2:   #b8860b;   --accent2-rgb: 184,134,11;
  --accent-3:   #e6bd55;   --accent3-rgb: 230,189,85;
  --accent-ink: #1a1206;
}

/* Smooth theme transition — only while switching (avoids clobbering hover/scroll anims) */
html.theming, html.theming *, html.theming *::before, html.theming *::after {
  transition: background-color .55s var(--ease), color .55s var(--ease),
              border-color .55s var(--ease), box-shadow .55s var(--ease),
              fill .55s var(--ease), stroke .55s var(--ease), stop-color .55s var(--ease) !important;
}

/* ---------- Reset / base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-deep);
  color: var(--fg);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.5;
  font-feature-settings: 'ss01','cv11';
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* subtle CRT scanline overlay */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0, rgba(255,255,255,.012) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
}

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--font-serif); }
.mono  { font-family: var(--font-mono); }
.gold  { color: var(--gold); }
.accent{ color: var(--accent); }

/* ---------- Eyebrow (accent text + gold hairline) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.34em; text-transform: uppercase;
  font-family: var(--font-mono);
}
.eyebrow::before { content: ''; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }

/* ---------- Shimmer text: white → accent → white ---------- */
.text-shimmer {
  background: linear-gradient(90deg, #fff 0%, var(--accent) 45%, var(--accent-3) 55%, #fff 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
}
/* Hero shimmer — fixed GOLD (Atelier look) regardless of theme */
.shimmer-gold {
  background: linear-gradient(90deg, #fff 0%, var(--gold) 50%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { 0% { background-position: 0% center; } 100% { background-position: 220% center; } }

/* ---------- Link underline wipe ---------- */
.link-line { position: relative; transition: color .3s var(--ease); }
.link-line::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0); transform-origin: right;
  transition: transform .55s var(--ease-mask);
}
.link-line:hover { color: var(--accent); }
.link-line:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Shine divider ---------- */
.div-shine { height: 1px; background: linear-gradient(90deg, transparent, var(--accent-line), transparent); }

/* ---------- LED status dots ---------- */
.led { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; animation: ledPulse 2.4s ease-in-out infinite; }
.led-green { background: var(--emerald);  box-shadow: 0 0 10px rgba(16,185,129,.7), 0 0 22px rgba(16,185,129,.35); }
.led-cyan  { background: var(--accent);   box-shadow: 0 0 10px rgba(var(--accent-rgb),.7),  0 0 22px rgba(var(--accent-rgb),.35); }
.led-blue  { background: var(--accent-3); box-shadow: 0 0 10px rgba(var(--accent3-rgb),.7), 0 0 22px rgba(var(--accent3-rgb),.35); }
.led-gold  { background: var(--gold);     box-shadow: 0 0 10px rgba(var(--gold-rgb),.7),  0 0 22px rgba(var(--gold-rgb),.35); }
@keyframes ledPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.82); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(48px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-mask { clip-path: inset(0 100% 0 0); transition: clip-path 1.15s var(--ease-mask); }
.reveal-mask.in { clip-path: inset(0 0 0 0); }

/* ---------- Scroll progress ---------- */
.scroll-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 100;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 18px var(--accent-glow);
  transition: width .1s ease-out;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(0,4,17,.4);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
/* original AI-Crafters symbol — cropped (symbol only, no wordmark), whitened + themed glow */
.logo-mark { position: relative; height: 36px; width: 47.3px; overflow: hidden; flex-shrink: 0; }
.logo-mark img {
  position: absolute; max-width: none;
  width: 84.2px; height: 84.2px; left: -19.1px; top: -15.3px;      /* crop to symbol bbox (232,186,808,624) of 1024² */
  filter: brightness(0) invert(1) drop-shadow(0 0 6px var(--accent-glow)); /* dark-blue → white + themed glow */
}
/* professional inline line-icons (Lucide / Feather style) — monochrome, theme-following */
.ico { display: inline-block; color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); vertical-align: middle; }
.btn-ico { width: 16px; height: 16px; stroke: currentColor; flex-shrink: 0; }
.node .bg .ico { width: 32px; height: 32px; }
.voice-core .ico { color: var(--accent-ink); filter: none; }
.modal-ico .ico { width: 40px; height: 40px; }
.brand .name { font-weight: 900; font-size: 18px; line-height: 1; letter-spacing: -.01em; }
.brand .name sup { color: var(--gold); font-size: 9px; margin-left: 2px; }
.brand .sub { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-faint); letter-spacing: .28em; text-transform: uppercase; margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 38px; font-size: 14px; font-weight: 500; color: var(--fg-soft); }
.header-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 24px; border-radius: var(--r-pill);
  background: #fff; color: #000411; font-weight: 700; font-size: 13px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.header-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(var(--accent-rgb),.5); }
@media (max-width: 900px) { .nav { display: none; } .brand .sub { display: none; } }

/* ============================================================
   HERO — Atelier photo + Ken-Burns + vignette
   ============================================================ */
.hero { position: relative; min-height: 100vh; min-height: 780px; display: flex; align-items: center; overflow: hidden; }
.hero-photo {
  /* anchored right, full face visible (portrait shown at natural ratio, soft left fade) */
  position: absolute; top: 0; bottom: 0; right: 0; left: auto;
  width: auto; height: 100%; object-fit: cover; object-position: top; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%);
}
@media (max-width: 900px) { .hero-photo { opacity: .5; } }
.ken-burns { animation: kenBurns 22s ease-in-out infinite alternate; }
@keyframes kenBurns {
  0%   { transform: scale(1.0)  translate(0,0);     filter: brightness(.72) contrast(1.08); }
  100% { transform: scale(1.05) translate(-1%,-1%); filter: brightness(.82) contrast(1.14); }
}
.hero-grad-v { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(0,4,17,.55) 0%, rgba(0,4,17,.34) 40%, rgba(0,4,17,.92) 100%); }
.hero-grad-h { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(0,4,17,.75) 0%, transparent 48%, transparent 62%, rgba(0,4,17,.5) 100%); }
.hero-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 30%, rgba(0,4,17,.6) 75%, var(--bg-deep) 100%); }
.hero-beam { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .35; overflow: hidden; }
.light-beam {
  position: absolute; width: 200%; height: 200%; top: -50%; left: -50%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0deg 320deg, rgba(var(--accent-rgb),.14) 340deg, rgba(var(--accent-rgb),.3) 360deg, rgba(var(--accent-rgb),.14) 20deg, transparent 40deg);
  animation: beamSpin 30s linear infinite;
}
@keyframes beamSpin { to { transform: rotate(360deg); } }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 2; }
.hero-blob.a { width: 440px; height: 440px; top: 18%; left: -8%; opacity: .4; background: radial-gradient(circle, rgba(var(--accent2-rgb),.45), transparent 65%); }
.hero-blob.b { width: 520px; height: 520px; bottom: -12%; right: -6%; opacity: .3; background: radial-gradient(circle, rgba(var(--accent-rgb),.32), transparent 65%); }

.hero-content { position: relative; z-index: 5; width: 100%; }
.gold-line-row { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.gold-line-row::before, .gold-line-row::after { content: ''; width: 42px; height: 1px; }
.gold-line-row::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.gold-line-row::after  { background: linear-gradient(90deg, var(--gold), transparent); }
.hero-eyebrow { font-family: var(--font-mono); color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .42em; text-transform: uppercase; }
.hero h1 { font-family: var(--font-serif); font-weight: 300; font-size: clamp(52px, 9.5vw, 124px); line-height: .95; letter-spacing: -.02em; margin-bottom: 30px; }
.hero h1 .l1 { display: block; color: #fff; }
.hero h1 .l2 { display: block; font-style: italic; font-weight: 500; }
.hero h1 .l3 { display: block; color: var(--fg-soft); }
.hero .lead { font-size: clamp(18px, 2.2vw, 24px); font-weight: 300; color: var(--fg-soft); max-width: 640px; line-height: 1.55; margin-bottom: 40px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 30px; border-radius: var(--r-pill);
  background: #fff; color: #000411; font-weight: 700; font-size: 14px;
  box-shadow: 0 16px 40px -12px rgba(var(--accent-rgb),.5);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 22px 50px -12px rgba(var(--accent-rgb),.7); }
.btn-accent {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--accent-ink); font-weight: 700; font-size: 14px;
  box-shadow: 0 16px 40px -12px rgba(var(--accent-rgb),.55);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), filter .3s var(--ease);
}
.btn-accent:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 22px 50px -12px rgba(var(--accent-rgb),.7); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,.22); color: var(--fg-soft);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: .03em;
  background: rgba(255,255,255,.03); backdrop-filter: blur(6px);
  transition: border-color .3s var(--ease), color .3s var(--ease), background .3s var(--ease);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); background: rgba(var(--gold-rgb),.06); }  /* gold hover accent */

/* Hero bottom signature */
.hero-signature { position: absolute; left: 0; right: 0; bottom: 34px; z-index: 5; }
.sig-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.sig-id { display: flex; align-items: center; gap: 14px; }
.sig-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); box-shadow: 0 0 20px var(--gold-glow); }
.sig-name { font-family: var(--font-serif); font-style: italic; font-size: 18px; color: #fff; }
.sig-role { font-family: var(--font-mono); font-size: 10px; color: var(--fg-mute); letter-spacing: .28em; text-transform: uppercase; margin-top: 5px; }
.scroll-cue { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.scroll-cue span { font-family: var(--font-mono); font-size: 10px; color: var(--fg-faint); letter-spacing: .3em; text-transform: uppercase; }
.scroll-ind { width: 1px; height: 52px; background: linear-gradient(to bottom, transparent, var(--accent), transparent); animation: pulseDown 2.4s ease-in-out infinite; }
@keyframes pulseDown { 0%,100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(8px); } }
@media (max-width: 720px) { .scroll-cue { display: none; } }

/* ============================================================
   STATUS BAR
   ============================================================ */
.statusbar { border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(3,10,28,.55); }
.statusbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 52px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.status-items { display: flex; align-items: center; gap: 22px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.status-items::-webkit-scrollbar { display: none; }
.status-item { display: flex; align-items: center; gap: 8px; }
.status-item .k { color: var(--fg-soft); } .status-item .m { color: var(--fg-faint); }
.status-clocks { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.status-clocks .lbl { color: var(--fg-faint); }
.status-clocks .t { color: var(--fg); font-variant-numeric: tabular-nums; }
.status-op { color: var(--emerald); font-weight: 700; }
@media (max-width: 720px) { .status-clocks { display: none; } }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section { position: relative; padding: 90px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.sec-head h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(30px, 4.5vw, 52px); line-height: 1.05; letter-spacing: -.02em; margin-top: 14px; }
.sec-head .meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-faint); display: flex; align-items: center; gap: 8px; }

/* ============================================================
   BENTO PANELS
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; grid-auto-rows: min-content; }
.panel {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.015) 100%);
  border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-card);
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease);
}
.panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb),.06), transparent 55%);
}
.panel:hover {
  border-color: var(--accent-line);
  box-shadow: 0 18px 60px -25px rgba(var(--accent-rgb),.5), inset 0 0 0 1px rgba(var(--accent-rgb),.1);
  transform: translateY(-3px);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.06);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-mute);
}
.panel-head .id { color: var(--accent); font-weight: 700; }
.panel-body { padding: 18px; position: relative; z-index: 1; }
.panel-foot { padding: 10px 16px; border-top: 1px solid rgba(255,255,255,.05); display: flex; flex-wrap: wrap; gap: 8px; }
.stack-tag { font-family: var(--font-mono); font-size: 10px; padding: 2px 9px; border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-pill); color: var(--fg-mute); }
.live-num { font-family: var(--font-serif); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.live-num.c { color: var(--accent); } .live-num.e { color: var(--emerald); } .live-num.w { color: #fff; }
.live-num.key { color: var(--gold); }   /* single gold key number */
.micro-lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-faint); }
.up { font-family: var(--font-mono); font-size: 10.5px; color: var(--emerald); }

/* Bento spans (desktop) */
.c-voice { grid-column: span 4; grid-row: span 2; }
.c-lead  { grid-column: span 4; }
.c-bau   { grid-column: span 4; }
.c-solar { grid-column: span 3; }
.c-pump  { grid-column: span 3; }
.c-wa    { grid-column: span 3; }
.c-mem   { grid-column: span 3; }
.c-feed  { grid-column: span 6; }
.c-chart { grid-column: span 6; }
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .c-voice { grid-column: span 6; grid-row: span 1; }
  .c-lead, .c-bau, .c-feed, .c-chart { grid-column: span 6; }
  .c-solar, .c-pump, .c-wa, .c-mem { grid-column: span 3; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .panel { grid-column: 1 / -1 !important; }
}

/* --- Micro-viz: voice wave bars --- */
.wave { display: flex; align-items: flex-end; gap: 3px; height: 40px; }
.wave span { flex: 1; border-radius: 2px; background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb),.2)); animation: waveBar 1.4s ease-in-out infinite; }
@keyframes waveBar { 0%,100% { height: 18%; opacity: .55; } 50% { height: 100%; opacity: 1; } }

/* --- Micro-viz: voice rings (bespoke) --- */
.voice-rings { position: relative; width: 62px; height: 62px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.voice-rings::before, .voice-rings::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent-line); animation: voiceRing 2.4s var(--ease) infinite; }
.voice-rings::after { animation-delay: 1.2s; }
@keyframes voiceRing { 0% { transform: scale(.45); opacity: 1; border-color: var(--accent); } 100% { transform: scale(1.4); opacity: 0; } }
.voice-core { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); display: flex; align-items: center; justify-content: center; font-size: 16px; z-index: 2; box-shadow: 0 0 22px var(--accent-glow); }

/* --- Micro-viz: sparkline --- */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 52px; }
.spark span { flex: 1; border-radius: 1px; background: linear-gradient(180deg, var(--accent-3), rgba(var(--accent3-rgb),.18)); }

/* --- Micro-viz: solar 24h bars --- */
.solar { display: flex; align-items: flex-end; gap: 2px; height: 84px; }
.solar span { flex: 1; border-radius: 1px; background: linear-gradient(180deg, var(--accent), rgba(var(--accent-rgb),.15)); transition: height .8s var(--ease); }

/* --- Micro-viz: chat bubbles (bespoke) --- */
.wa-stream { display: flex; flex-direction: column; gap: 8px; }
.wa-bubble { max-width: 82%; padding: 8px 12px; border-radius: 14px; font-size: 12px; line-height: 1.4; animation: bubbleIn 6s ease-in-out infinite; opacity: 0; }
.wa-bubble.in  { background: rgba(255,255,255,.06); color: var(--fg-soft); border-bottom-left-radius: 4px; align-self: flex-start; }
.wa-bubble.out { background: linear-gradient(135deg, rgba(var(--accent2-rgb),.28), rgba(var(--accent-rgb),.2)); color: #eef8ff; border-bottom-right-radius: 4px; align-self: flex-end; }
.wa-bubble.appr { background: rgba(var(--gold-rgb),.1); border: 1px dashed var(--gold-line); color: var(--gold); align-self: center; font-size: 10px; font-style: italic; }
.wa-stream > *:nth-child(1){ animation-delay: 0s } .wa-stream > *:nth-child(2){ animation-delay: 1.1s }
.wa-stream > *:nth-child(3){ animation-delay: 2.2s } .wa-stream > *:nth-child(4){ animation-delay: 3.3s }
@keyframes bubbleIn { 0%,92%,100% { opacity: 0; transform: translateY(8px); } 12%,80% { opacity: 1; transform: translateY(0); } }

/* --- Micro-viz: knowledge graph --- */
.kg-lines { stroke: rgba(var(--accent3-rgb),.5); }
.kg-line { stroke-dasharray: 200; stroke-dashoffset: 200; animation: kgFlow 4s linear infinite; }
@keyframes kgFlow { to { stroke-dashoffset: 0; } }
.kg-node { animation: kgPulse 3s ease-in-out infinite; transform-origin: center; }
.kg-hub { fill: var(--accent); } .kg-sat { fill: var(--accent-3); } .kg-em { fill: var(--emerald); }
@keyframes kgPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* --- Micro-viz: telemetry chart draw (bespoke) --- */
#kgGrad stop:first-child { stop-color: rgba(var(--accent-rgb),.3); }
#funGrad stop:first-child { stop-color: var(--accent-2); }
#funGrad stop:last-child  { stop-color: var(--accent); }
#chartFill stop { stop-color: var(--accent); }
.fun-ink { fill: var(--accent-ink); }
.chart-line { stroke: var(--accent); stroke-dasharray: 620; stroke-dashoffset: 620; animation: chartDraw 5s ease-in-out infinite; }
.chart-pt { fill: var(--accent); }
@keyframes chartDraw { 0% { stroke-dashoffset: 620; } 50% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -620; } }
.alarm-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: var(--r-pill); background: rgba(201,48,26,.12); border: 1px solid rgba(201,48,26,.5); font-family: var(--font-mono); font-size: 11px; color: #ff8a7a; animation: alarmBlink 1.6s ease-in-out infinite; }
@keyframes alarmBlink { 0%,100% { box-shadow: 0 0 0 0 rgba(201,48,26,0); } 50% { box-shadow: 0 0 20px rgba(201,48,26,.4); } }
.dot-red { width: 8px; height: 8px; border-radius: 50%; background: #ff6b6b; animation: ledPulse 1s ease-in-out infinite; }

/* --- Activity feed --- */
.feed { height: 300px; overflow-y: auto; padding-right: 4px; font-family: var(--font-mono); scrollbar-width: thin; scrollbar-color: var(--accent-line) transparent; }
.feed::-webkit-scrollbar { width: 6px; } .feed::-webkit-scrollbar-thumb { background: var(--accent-line); border-radius: 999px; }
.feed-item { display: grid; grid-template-columns: 82px 1fr; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed rgba(255,255,255,.05); font-size: 11.5px; animation: feedIn .5s var(--ease); }
.feed-item .ts { color: var(--accent); font-weight: 700; }
.feed-item .msg { color: var(--fg-soft); line-height: 1.45; }
.feed-item .msg .src { color: var(--accent-3); font-weight: 600; margin-right: 4px; }
.feed-item.success .msg .src { color: var(--emerald); }
.feed-item.alert .msg .src { color: #ff6b6b; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   CONSTELLATION (Atlas connector-draw + modal)
   ============================================================ */
.constellation { position: relative; overflow: hidden; }
.const-blob { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.const-blob.a { width: 480px; height: 480px; top: 4%; left: 6%; background: radial-gradient(circle, rgba(var(--accent2-rgb),.35), transparent 70%); }
.const-blob.b { width: 460px; height: 460px; bottom: 0; right: 4%; background: radial-gradient(circle, rgba(var(--accent-rgb),.28), transparent 70%); }

/* story progress bars (V5 reel) */
.story-prog { display: flex; gap: 6px; max-width: 460px; margin: 18px 0 0; }
.story-prog span { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.14); overflow: hidden; position: relative; transition: background .3s var(--ease), box-shadow .3s var(--ease); }
.story-prog span.active { background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }

.arena { position: relative; width: 100%; max-width: 720px; aspect-ratio: 1/1; margin: 40px auto 0; }
.arena-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.conn { fill: none; stroke: var(--accent-line); stroke-width: 1; stroke-dasharray: 600; stroke-dashoffset: 600; filter: drop-shadow(0 0 4px rgba(var(--accent-rgb),.6)); }
.arena-svg.in .conn { animation: connDraw 1.5s var(--ease) forwards, connPulse 4s ease-in-out infinite 1.6s; }
@keyframes connDraw { to { stroke-dashoffset: 0; } }
@keyframes connPulse { 0%,100% { stroke: rgba(var(--accent-rgb),.28); } 50% { stroke: rgba(var(--accent-rgb),.6); } }

.core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 3;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, rgba(var(--accent-rgb),.4), transparent 62%), linear-gradient(135deg, rgba(var(--accent2-rgb),.22), rgba(var(--accent-rgb),.1));
  border: 1px solid var(--accent-line);
  box-shadow: 0 0 70px rgba(var(--accent-rgb),.4), inset 0 0 40px rgba(var(--accent-rgb),.18);
  display: flex; align-items: center; justify-content: center; text-align: center;
  backdrop-filter: blur(6px); animation: corePulse 4s ease-in-out infinite; pointer-events: none;
}
@keyframes corePulse { 0%,100% { box-shadow: 0 0 70px rgba(var(--accent-rgb),.4), inset 0 0 40px rgba(var(--accent-rgb),.18); } 50% { box-shadow: 0 0 110px rgba(var(--accent-rgb),.55), inset 0 0 56px rgba(var(--accent-rgb),.28); } }
.core .cw { font-family: var(--font-serif); font-weight: 600; font-size: 19px; line-height: 1.05; color: var(--fg); }
.core .cw small { display: block; font-family: var(--font-mono); font-size: 8px; letter-spacing: .3em; color: var(--fg-mute); margin-top: 6px; font-weight: 700; }

.node { position: absolute; width: 128px; transform: translate(-50%,-50%); z-index: 2; background: transparent; border: 0; text-align: center; transition: transform .4s var(--ease), opacity .4s var(--ease), filter .4s var(--ease); }
.node .bg {
  width: 84px; height: 84px; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 34px;
  border: 1px solid var(--accent-line);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.16), transparent 60%), linear-gradient(135deg, rgba(var(--accent2-rgb),.28), rgba(var(--accent-rgb),.16));
  border-radius: 62% 38% 42% 58% / 55% 45% 55% 45%;
  box-shadow: 0 8px 30px rgba(0,4,17,.6), inset 0 0 20px rgba(var(--accent-rgb),.14);
  backdrop-filter: blur(4px); transition: all .4s var(--ease); animation: nodeFloat 8s ease-in-out infinite;
}
.node:nth-child(2) .bg { animation-delay: -1s } .node:nth-child(3) .bg { animation-delay: -2s }
.node:nth-child(4) .bg { animation-delay: -3s } .node:nth-child(5) .bg { animation-delay: -4s }
.node:nth-child(6) .bg { animation-delay: -5s } .node:nth-child(7) .bg { animation-delay: -6s }
.node:nth-child(8) .bg { animation-delay: -7s } .node:nth-child(9) .bg { animation-delay: -8s }
@keyframes nodeFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.node .lbl { margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--fg-soft); line-height: 1.2; }
.node .lbl .n { display: block; font-family: var(--font-mono); font-size: 9px; color: var(--accent); letter-spacing: .3em; font-weight: 700; margin-bottom: 3px; }
.node:hover { transform: translate(-50%,-50%) scale(1.1); z-index: 4; }
.node:hover .bg { border-color: var(--accent); box-shadow: 0 0 55px rgba(var(--accent-rgb),.5), inset 0 0 28px rgba(var(--accent-rgb),.24); }
.node:hover .lbl { color: var(--accent); }
.arena:hover .node:not(:hover) { opacity: .38; filter: saturate(.4); }
.arena-hint { text-align: center; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg-faint); margin-top: 26px; }
@media (max-width: 640px) {
  .arena { max-width: 360px; } .node { width: 96px; }
  .node .bg { width: 62px; height: 62px; font-size: 26px; } .node .lbl { font-size: 10.5px; }
  .core { width: 110px; height: 110px; } .core .cw { font-size: 15px; }
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; background: var(--bg-modal); backdrop-filter: blur(20px); opacity: 0; transition: opacity .4s var(--ease); }
.modal.open { display: flex; opacity: 1; }
.modal-card {
  width: 100%; max-width: 720px; max-height: 88vh; overflow-y: auto; position: relative; padding: 44px;
  background: radial-gradient(circle at 0% 0%, rgba(var(--accent-rgb),.1), transparent 50%), radial-gradient(circle at 100% 100%, rgba(var(--accent2-rgb),.1), transparent 50%), rgba(6,12,28,.96);
  border: 1px solid var(--accent-line); border-radius: var(--r-card);
  box-shadow: 0 60px 120px -20px rgba(0,0,0,.8), 0 0 80px rgba(var(--accent-rgb),.18);
  transform: translateY(20px) scale(.96); transition: transform .5s var(--ease);
}
.modal.open .modal-card { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--fg-ghost); background: rgba(0,0,0,.4); color: var(--fg-soft); display: flex; align-items: center; justify-content: center; font-size: 16px; transition: all .25s var(--ease); }
.modal-close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }
.modal-stat { margin: 22px 0; padding: 20px 24px; border-radius: 14px; background: linear-gradient(135deg, rgba(var(--accent-rgb),.12), rgba(var(--accent2-rgb),.08)); border: 1px solid var(--accent-line); font-family: var(--font-serif); font-size: 20px; font-weight: 600; color: var(--accent); }
.pill { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid rgba(var(--accent-rgb),.28); border-radius: var(--r-pill); background: rgba(var(--accent-rgb),.06); color: var(--fg-soft); font-family: var(--font-mono); font-size: 11px; font-weight: 500; }
.pill::before { content: '◆'; color: var(--accent); margin-right: 6px; font-size: 8px; }

/* ============================================================
   CASES
   ============================================================ */
.case-list { display: flex; flex-direction: column; gap: 22px; }
.case {
  display: grid; grid-template-columns: .95fr 1.05fr; gap: 40px; align-items: center;
  padding: 40px; border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-card);
  background: linear-gradient(160deg, rgba(255,255,255,.04), rgba(255,255,255,.012));
  transition: border-color .4s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
}
.case:hover { border-color: var(--accent-line); transform: translateY(-4px); box-shadow: 0 20px 60px -25px rgba(var(--accent-rgb),.45); }
.case:nth-child(even) .case-quote { order: 2; }
.case-quote { position: relative; }
.case-quote .q { font-family: var(--font-serif); font-style: italic; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.35; color: var(--fg-soft); margin-bottom: 26px; }
.case-quote .q::before { content: '\201C'; font-family: var(--font-serif); position: absolute; top: -46px; left: -8px; font-size: 120px; color: rgba(var(--accent-rgb),.16); }
.case-person { display: flex; align-items: center; gap: 14px; }
.case-initials { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); font-weight: 700; font-size: 17px; box-shadow: 0 0 26px var(--accent-glow); }
.case-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .3em; color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.case h3 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; margin-bottom: 22px; letter-spacing: -.01em; }
.case-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.1); }
.case-metric .v { font-family: var(--font-serif); font-weight: 600; font-size: clamp(28px, 3.6vw, 44px); color: var(--accent); line-height: 1; }
.case-metric .l { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-faint); margin-top: 8px; }
.case-body { font-size: 15px; color: var(--fg-mute); line-height: 1.6; }
@media (max-width: 820px) {
  .case { grid-template-columns: 1fr; padding: 28px; gap: 26px; }
  .case:nth-child(even) .case-quote { order: 0; }
}

/* ============================================================
   FOUNDER CTA (corner-bracket card + glass nameplate)
   ============================================================ */
.founder { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.founder-card { position: relative; border-radius: var(--r-card); overflow: hidden; aspect-ratio: 4/5; box-shadow: 0 50px 100px -30px rgba(var(--accent-rgb),.35); }
.founder-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.founder-card:hover img { transform: scale(1.05); }
/* animated corner brackets — gold accent */
.founder-card .corner { position: absolute; width: 40px; height: 40px; border-color: var(--gold); border-style: solid; opacity: 0; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.founder-card .corner.tl { top: 14px; left: 14px; border-width: 1px 0 0 1px; transform: translate(6px,6px); }
.founder-card .corner.tr { top: 14px; right: 14px; border-width: 1px 1px 0 0; transform: translate(-6px,6px); }
.founder-card .corner.bl { bottom: 14px; left: 14px; border-width: 0 0 1px 1px; transform: translate(6px,-6px); }
.founder-card .corner.br { bottom: 14px; right: 14px; border-width: 0 1px 1px 0; transform: translate(-6px,-6px); }
.founder-card.in .corner, .founder-card:hover .corner { opacity: 1; transform: translate(0,0); }
.founder-card .nameplate { position: absolute; left: 20px; right: 20px; bottom: 20px; padding: 14px 18px; border-radius: 12px; background: rgba(0,4,17,.7); backdrop-filter: blur(12px); border: 1px solid var(--accent-line); }
.founder-card .nameplate .nm { font-family: var(--font-serif); font-style: italic; font-size: 16px; }
.founder-card .nameplate .rl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .25em; text-transform: uppercase; color: var(--fg-mute); margin-top: 4px; }
.founder h2 { font-family: var(--font-serif); font-weight: 500; font-size: clamp(36px, 6vw, 72px); line-height: 1; letter-spacing: -.02em; margin: 22px 0 22px; }
.founder h2 .hl { display: block; font-weight: 600; color: var(--accent); }
.founder p.lead { font-size: 17px; color: var(--fg-mute); line-height: 1.6; max-width: 520px; margin-bottom: 26px; }
.sig-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.founder-eta { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg-mute); margin-top: 22px; }
@media (max-width: 820px) { .founder { grid-template-columns: 1fr; } .founder-card { max-width: 340px; } }

/* ============================================================
   THEME SWITCHER (floating)
   ============================================================ */
.theme-switch {
  position: fixed; right: 20px; bottom: 20px; z-index: 120;
  display: flex; gap: 4px; padding: 5px; border-radius: 999px;
  background: rgba(3,10,28,.82); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 12px 40px -12px rgba(0,0,0,.6);
}
.theme-switch button {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--fg-mute);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em;
  transition: color .3s var(--ease), background .3s var(--ease);
}
.theme-switch button.active { background: rgba(255,255,255,.08); color: var(--fg); }
.theme-switch .sw { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.sw-blue { background: #00E0FF; box-shadow: 0 0 10px rgba(0,224,255,.6); }
.sw-gold { background: #d4a73c; box-shadow: 0 0 10px rgba(212,167,60,.6); }
@media (max-width: 520px) { .theme-switch .tlabel { display: none; } .theme-switch button { padding: 8px 10px; } }

/* ============================================================
   FOOTER
   ============================================================ */
footer { padding: 64px 0 40px; border-top: 1px solid rgba(255,255,255,.06); position: relative; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 40px; margin-bottom: 44px; }
.footer-tag { font-family: var(--font-serif); font-style: italic; font-size: 14px; color: var(--fg-mute); max-width: 260px; margin-top: 18px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.footer-col li { list-style: none; margin-bottom: 10px; font-size: 14px; color: var(--fg-soft); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 12px; color: var(--fg-faint); padding-top: 22px; }
.footer-bottom .legal { font-family: var(--font-serif); font-style: italic; }
.footer-bottom .links { display: flex; gap: 22px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .reveal-mask { clip-path: none !important; }
  .conn { stroke-dashoffset: 0 !important; }
}

/* ============================================================
   Live-site integration overrides (Phase 1)
   ============================================================ */
#site-header { background: rgba(0,4,17,.55); border-bottom: 1px solid rgba(255,255,255,.06); }
#site-header nav { max-width: 1280px; }
main { background: var(--bg-deep); }
