/* Theme tokens — data-theme on body */
:root,
[data-theme="personal"] {
  --bg: #030712;
  --ink: #e2e8f0;
  --mute: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #c084fc;
  --accent-3: #f0abfc;
  --hot: #67e8f9;
  --btn-ink: #041016;
  --glow: 34, 211, 238;
  --glow-2: 192, 132, 252;
  --stage-a: rgba(192, 132, 252, 0.12);
  --stage-b: rgba(34, 211, 238, 0.10);
}

[data-theme="family"] {
  --bg: #1a0f0a;
  --ink: #fde8d8;
  --mute: #d4a594;
  --accent: #f59e0b;
  --accent-2: #fb7185;
  --accent-3: #fdba74;
  --hot: #fbbf24;
  --btn-ink: #1c1008;
  --glow: 245, 158, 11;
  --glow-2: 251, 113, 133;
  --stage-a: rgba(251, 113, 133, 0.14);
  --stage-b: rgba(245, 158, 11, 0.10);
}

[data-theme="avanti"] {
  --bg: #0c0b09;
  --ink: #e8e4d9;
  --mute: #9a9588;
  --accent: #d4af37;
  --accent-2: #8b8680;
  --accent-3: #f3e6b8;
  --hot: #f5d76e;
  --btn-ink: #1a160c;
  --glow: 212, 175, 55;
  --glow-2: 139, 134, 128;
  --stage-a: rgba(212, 175, 55, 0.12);
  --stage-b: rgba(107, 114, 128, 0.10);
}

[data-theme="synthesis"] {
  --bg: #0b1118;
  --ink: #d5dde6;
  --mute: #8b9aab;
  --accent: #7dd3fc;
  --accent-2: #94a3b8;
  --accent-3: #cbd5e1;
  --hot: #bae6fd;
  --btn-ink: #0b1220;
  --glow: 125, 211, 252;
  --glow-2: 148, 163, 184;
  --stage-a: rgba(125, 211, 252, 0.10);
  --stage-b: rgba(148, 163, 184, 0.10);
}

[data-theme="llhcg"] {
  --bg: #070b14;
  --ink: #e6eaf0;
  --mute: #9aa3b2;
  --accent: #93c5fd;
  --accent-2: #c0c7d1;
  --accent-3: #64748b;
  --hot: #e2e8f0;
  --btn-ink: #071018;
  --glow: 147, 197, 253;
  --glow-2: 192, 199, 209;
  --stage-a: rgba(30, 58, 95, 0.28);
  --stage-b: rgba(192, 199, 209, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100%;
}

#field {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: 0.55; pointer-events: none;
}

.noise, .scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 5;
}
.noise {
  opacity: 0.07;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,0.18) 3px,
    transparent 4px
  );
  opacity: 0.35;
}

.stage {
  position: relative; z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse 80% 50% at 70% 40%, var(--stage-a), transparent 55%),
    radial-gradient(ellipse 60% 40% at 20% 80%, var(--stage-b), transparent 50%);
}

.top, .foot {
  display: flex; justify-content: space-between; align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem; letter-spacing: 0.08em; color: var(--mute);
}
.brand {
  font-family: Orbitron, sans-serif;
  font-weight: 700; font-size: 0.95rem; color: #fff;
  text-transform: uppercase; letter-spacing: 0.12em;
}
.brand .tld { color: var(--accent); }
.status { display: flex; gap: 0.55rem; align-items: center; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: blink 1.6s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1rem, 4vh, 3rem) 0;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .viz { order: -1; min-height: 280px; }
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent-2);
  font-size: 0.78rem; letter-spacing: 0.18em;
  margin-bottom: 1rem; text-transform: uppercase;
}
h1 {
  font-family: Orbitron, sans-serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 5.5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.1rem;
}
h1 em {
  font-style: normal;
  background: linear-gradient(110deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(var(--glow), 0.25));
}
.sub {
  max-width: 36rem;
  color: var(--mute);
  font-size: 1.05rem; line-height: 1.55;
  margin-bottom: 1.75rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600; font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s, border-color 0.15s;
}
.btn.primary {
  color: var(--btn-ink);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 28px rgba(var(--glow), 0.35);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(var(--glow-2), 0.45); }
.btn.ghost {
  color: var(--ink);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}
.btn.ghost:hover { border-color: var(--accent); color: var(--hot); }
.btn.soft {
  color: var(--mute);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, rgba(15, 23, 42, 0.4));
  cursor: default;
  pointer-events: none;
  letter-spacing: 0.02em;
}
.meta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem; color: #64748b; letter-spacing: 0.06em;
}

.viz {
  position: relative;
  display: grid; place-items: center;
  min-height: 420px;
}
.hero-art {
  position: absolute; inset: 8% 0 0;
  width: 100%; height: 85%;
  object-fit: cover; object-position: center;
  border-radius: 24px;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  filter: saturate(1.2) contrast(1.05);
}
.glyph-wrap {
  position: relative; z-index: 2;
  width: min(280px, 55vw); height: min(280px, 55vw);
  display: grid; place-items: center;
}
.glyph {
  width: 72%; height: 72%; object-fit: contain;
  animation: float 5.5s ease-in-out infinite;
  filter: drop-shadow(0 0 24px rgba(var(--glow), 0.45));
}
@keyframes float {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(2deg); }
}
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  inset: 0;
  animation: spin 18s linear infinite;
}
.r2 {
  inset: 8%;
  border-color: color-mix(in srgb, var(--accent-2) 30%, transparent);
  animation-duration: 12s; animation-direction: reverse;
}
.r3 {
  inset: 18%;
  border-color: color-mix(in srgb, var(--accent-3) 20%, transparent);
  animation-duration: 9s; border-style: dashed;
}
@keyframes spin { to { transform: rotate(360deg); } }

.coords { color: var(--accent); opacity: 0.8; }

@media (prefers-reduced-motion: reduce) {
  .glyph, .ring, .pulse, #field { animation: none !important; }
}
