/* ============================================================
  Mythlogic Studios — Global Stylesheet
  Font: Syne + IBM Plex Sans + IBM Plex Mono
  Palette: Portal template dark + neon green primary
  ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Source+Sans+3:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Poller+One&display=swap');

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:     #00ff88;
  --primary-dark:#00cc6a;
  --secondary:   #00ff88;

  --bg:          #0a0e14;
  --bg2:         #111827;
  --bg3:         #1a2332;
  --border:      #1e293b;
  --border2:     #2b3a54;

  --accent:      var(--primary);
  --accent2:     var(--primary-dark);
  --purple:      var(--secondary);
  --green:       #34a853;
  --orange:      #fbbc05;
  --yellow:      #fbbc05;
  --pink:        #ea4335;

  --text:        #f0f4f8;
  --text2:       #d7dee7;
  --muted:       #94a3b8;

  --radius:      12px;
  --radius-lg:   20px;
  --nav-height:  64px;
  --shadow:      0 10px 32px rgba(0,0,0,0.42);
  --glow-blue:   0 0 40px rgba(0,255,136,0.14);
  --glow-purple: 0 0 36px rgba(0,255,136,0.12);
}

html { scroll-behavior: smooth; }

main > section:not(:first-of-type) {
  contain: layout style paint;
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}

@supports not (content-visibility: auto) {
  main > section {
    display: block;
  }
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text2);
  line-height: 1.6;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10050;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 800;
  border-radius: 0 0 10px 0;
}

.skip-link:focus {
  left: 0;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
  font-family: 'Playfair Display', 'Source Sans 3', sans-serif;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
p  { color: var(--text2); font-size: 1rem; }
a  { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
code, .mono { font-family: 'IBM Plex Mono', monospace; font-size: 0.85em; }

/* ── Layout Utilities ─────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 100px 0; }
.section-sm { padding: 60px 0; }
.text-center { text-align: center; }
.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}
.text-gradient-green {
  background: linear-gradient(135deg, var(--green) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-orange {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ── Navigation ───────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(10,14,20,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
}

main {
  padding-top: calc(var(--nav-height) + env(safe-area-inset-top));
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.24rem; font-weight: 800; color: var(--text);
  letter-spacing: -0.3px;
  transform-style: preserve-3d;
  perspective: 840px;
  transition: transform 0.22s ease, text-shadow 0.22s ease;
}
.nav-logo span { color: var(--accent); }
.nav-logo > span:first-child {
  display: inline-block;
  font-size: 1.32rem;
  transform-origin: center;
  transition: transform 0.24s ease;
}
.nav-logo:hover {
  transform: translateY(-2px) scale(1.05) rotateX(12deg) rotateY(-8deg);
  text-shadow: 0 8px 20px rgba(0,0,0,0.34), 0 0 14px rgba(0,255,136,0.28);
}
.nav-logo:hover > span:first-child {
  animation: logo-hex-flip 0.66s ease, logo-rumble 0.42s linear 1;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.system-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(63,185,80,0.25);
  background: rgba(63,185,80,0.08);
  color: var(--text2);
  font-size: 0.76rem;
  font-weight: 600;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 10px rgba(63,185,80,0.6);
}
.status-text { white-space: nowrap; }
.system-status.thinking .status-text {
  color: var(--yellow);
}
.system-status.thinking .status-dot.online {
  background: var(--yellow);
  box-shadow: 0 0 0 0 rgba(251,188,5,0.45);
  animation: status-thinking 1s linear infinite;
}
.status-thought-bubble {
  position: absolute;
  top: calc(100% + 12px);
  right: -6px;
  max-width: 270px;
  min-width: 170px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,255,136,0.34);
  background: rgba(11,17,25,0.98);
  color: var(--text);
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 12px 26px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(8px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1200;
  border-style: solid;
  border-width: 2px;
  animation: bubble-border-wobble 1.25s ease-in-out infinite;
}
.status-thought-bubble::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 24px;
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  border-left: 1px solid rgba(0,255,136,0.34);
  border-top: 1px solid rgba(0,255,136,0.34);
  background: rgba(11,17,25,0.98);
  animation: bubble-tail-bounce 0.85s ease-in-out infinite;
}
.status-thought-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: bubble-border-wobble 1.25s ease-in-out infinite, bubble-text-jitter 2.2s steps(2) infinite;
}
.nav-links a {
  color: var(--muted); font-size: 0.9rem; font-weight: 500;
  padding: 6px 14px; border-radius: 8px;
  transition: all .2s;
}
.nav-links a:hover { color: var(--text); background: var(--bg3); }
.nav-links a.active { color: var(--accent); }
.nav-cta {
  background: var(--accent2); color: #fff !important;
  border-radius: 8px; padding: 7px 16px !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent) !important; color: var(--bg) !important; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-hamburger span { width: 24px; height: 2px; background: var(--text2); border-radius: 2px; transition: .3s; }

#interactive-showcase {
  padding-top: 96px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: max(64px, env(safe-area-inset-top));
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%),
    radial-gradient(560px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(0,255,136,0.08), transparent 42%);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0,255,136,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0,255,136,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 60%, rgba(0,255,136,0.05) 0%, transparent 50%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,255,136,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,136,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem; font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
.hero h1 { margin-bottom: 24px; }
.hero h1 .dud { color: rgba(0,255,136,0.55); }
.hero p.lead {
  font-size: 1.2rem; color: var(--muted); max-width: 600px;
  margin-bottom: 40px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
#neural-renderer-toggle {
  border-color: rgba(0,255,136,0.45);
  color: var(--accent);
}
#neural-quality-toggle {
  border-color: rgba(255,166,77,0.45);
  color: var(--purple);
}
#neural-renderer-toggle:hover {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(0,255,136,0.22);
}
#neural-quality-toggle:hover {
  border-color: var(--purple);
  box-shadow: 0 0 16px rgba(255,166,77,0.22);
}
.hero-stats {
  display: flex; gap: 40px; margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.hero-stat-num { font-size: 2rem; font-weight: 800; color: var(--text); }
.hero-stat-label { font-size: 0.85rem; color: var(--muted); margin-top: 2px; }

.ai-power-band {
  background: radial-gradient(ellipse at 20% 10%, rgba(0,255,136,0.12), transparent 58%),
              radial-gradient(ellipse at 88% 90%, rgba(255,166,77,0.12), transparent 52%);
}

.ai-power-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

@keyframes flipInX {
  0%   { transform: perspective(600px) rotateX(-90deg); opacity: 0; }
  40%  { transform: perspective(600px) rotateX(12deg); }
  70%  { transform: perspective(600px) rotateX(-6deg); }
  100% { transform: perspective(600px) rotateX(0deg);  opacity: 1; }
}

.ai-power-card {
  background: rgba(13,17,23,0.75);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  backdrop-filter: blur(14px);
  contain: layout style paint;
  opacity: 0;
  animation: flipInX 0.55s ease both;
  animation-play-state: paused;
}
.ai-power-card.flip-play { animation-play-state: running; }
.ai-power-grid .ai-power-card:nth-child(1)  { animation-delay: 0.00s; }
.ai-power-grid .ai-power-card:nth-child(2)  { animation-delay: 0.08s; }
.ai-power-grid .ai-power-card:nth-child(3)  { animation-delay: 0.16s; }
.ai-power-grid .ai-power-card:nth-child(4)  { animation-delay: 0.24s; }
.ai-power-grid .ai-power-card:nth-child(5)  { animation-delay: 0.32s; }
.ai-power-grid .ai-power-card:nth-child(6)  { animation-delay: 0.40s; }
.ai-power-grid .ai-power-card:nth-child(7)  { animation-delay: 0.48s; }
.ai-power-grid .ai-power-card:nth-child(8)  { animation-delay: 0.56s; }
.ai-power-grid .ai-power-card:nth-child(9)  { animation-delay: 0.64s; }
.ai-power-grid .ai-power-card:nth-child(10) { animation-delay: 0.72s; }
@media (prefers-reduced-motion: reduce) {
  .ai-power-card { animation: none !important; opacity: 1 !important; }
}

.ai-power-card .num {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--accent);
}

.ai-power-card .label {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.local-first-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  align-items: stretch;
}

.local-first-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-height: 100%;
  padding: 28px 24px;
  border-radius: 18px;
  border: 1px solid rgba(0,255,136,0.18);
  background:
    linear-gradient(145deg, rgba(17,24,39,0.96) 0%, rgba(10,14,20,0.98) 100%),
    radial-gradient(circle at top, rgba(0,255,136,0.10), transparent 55%);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.local-first-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,255,136,0.12), transparent 35%, rgba(0,255,136,0.08));
  opacity: 0.75;
  pointer-events: none;
}

.local-first-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,255,136,0.38);
  box-shadow: 0 24px 48px rgba(0,0,0,0.34), 0 0 22px rgba(0,255,136,0.08);
}

.local-first-card > * {
  position: relative;
  z-index: 1;
}

.local-first-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,255,136,0.18), rgba(0,255,136,0.18));
  border: 1px solid rgba(0,255,136,0.24);
  color: var(--text);
  font-size: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.24);
}

.local-first-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.local-first-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,136,0.26);
  background: rgba(0,255,136,0.08);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.local-first-meta {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.local-first-card p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 30ch;
}

.local-first-cta {
  margin-top: 18px;
}

.live-ide-shell {
  margin-top: 26px;
  background: rgba(11,17,25,0.85);
  border: 1px solid rgba(0,255,136,0.24);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}

.live-ide-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(0,255,136,0.35);
  background: rgba(0,255,136,0.1);
}

.live-status {
  font-size: 0.76rem;
  color: var(--muted);
}
.live-status.ready { color: var(--green); }
.live-status.error { color: var(--pink); }
.live-status.running { color: var(--yellow); }

.live-ide-presets {
  margin-bottom: 14px;
}

.live-ide-label-inline {
  margin-bottom: 8px;
}

.live-ide-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-ide-preset {
  border: 1px solid rgba(120, 168, 207, 0.2);
  background: rgba(17, 24, 33, 0.9);
  color: var(--text2);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.live-ide-preset:hover,
.live-ide-preset:focus-visible {
  border-color: rgba(0,255,136,0.45);
  color: var(--accent);
  transform: translateY(-1px);
}

.live-ide-preset.is-active {
  border-color: rgba(0,255,136,0.38);
  background: rgba(0,255,136,0.1);
  color: var(--accent);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.copy-btn {
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text2);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

.live-ide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.live-ide-label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.live-ide-editor,
.live-ide-output {
  width: 100%;
  min-height: 220px;
  background: #0a0f17;
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 12px;
  color: #d3e2ef;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
}

.live-ide-editor {
  resize: vertical;
  outline: none;
}

.live-ide-output {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
}

.live-ide-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.live-ide-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.live-ide-metric-card {
  background: rgba(10, 15, 23, 0.82);
  border: 1px solid rgba(120, 168, 207, 0.18);
  border-radius: 12px;
  padding: 12px;
}

.live-ide-metric-label {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.live-ide-metric-value {
  display: block;
  color: #eef7ff;
  font-size: 0.95rem;
  line-height: 1.35;
}

.live-ide-insights {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(120, 168, 207, 0.18);
  border-radius: 12px;
  background: rgba(10, 15, 23, 0.76);
}

.live-ide-insight-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text2);
}

.live-ide-insight-list li + li {
  margin-top: 6px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: all .2s; text-decoration: none;
  white-space: nowrap;
}
.btn-loader { opacity: 0.88; }
.btn.is-loading { pointer-events: none; opacity: 0.9; }
.btn-primary {
  background: var(--primary);
  color: var(--bg);
  box-shadow: 0 4px 20px rgba(0,255,136,0.26);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,255,136,0.36); color: var(--bg); background: var(--primary-dark); }
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: var(--bg); border-color: var(--primary); }
.btn-outline {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: rgba(0,255,136,0.1); color: var(--accent); }
.btn-disabled {
  background: var(--bg3) !important; color: var(--muted) !important;
  border: 1px solid var(--border) !important;
  cursor: not-allowed !important; opacity: 0.6;
  box-shadow: none !important; transform: none !important;
  pointer-events: none;
}
.btn-coming-soon {
  position: relative;
  background: var(--bg3); color: var(--muted);
  border: 1px solid var(--border);
  cursor: not-allowed; opacity: 0.7;
}
.coming-soon-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: var(--bg); font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 100px;
  letter-spacing: 0.5px; text-transform: uppercase;
  margin-left: 4px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all .3s;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.card-glow-blue:hover  { box-shadow: var(--shadow), var(--glow-blue); border-color: rgba(0,255,136,0.3); }
.card-glow-purple:hover { box-shadow: var(--shadow), var(--glow-purple); border-color: rgba(255,166,77,0.3); }

/* ── Feature Grid ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 60px;
}
.feature-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px;
}
.feature-icon.blue   { background: rgba(0,255,136,0.15); }
.feature-icon.purple { background: rgba(255,166,77,0.15); }
.feature-icon.green  { background: rgba(63,185,80,0.15); }
.feature-icon.orange { background: rgba(247,129,102,0.15); }
.feature-icon.yellow { background: rgba(227,179,65,0.15); }
.feature-icon.cyan   { background: rgba(0,255,136,0.15); }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.feature-card p  { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* ── Products Section ─────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-top: 60px;
}
.product-card {
  position: relative;
  background: linear-gradient(145deg, rgba(22,27,34,0.9) 0%, rgba(13,17,23,0.95) 100%);
  border: 1px solid rgba(0,255,136,0.1);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .3s;
  display: flex; flex-direction: column;
  contain: layout style paint;
}
.product-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: conic-gradient(from 0deg, transparent, rgba(0,255,136,0.4), transparent 30%);
  animation: rotate 8s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}
.product-card:hover::before { opacity: 1; }
.product-card > * {
  position: relative;
  z-index: 1;
  background: inherit;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
@keyframes rotate { 100% { transform: rotate(360deg); } }
.product-card-header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--border2);
}
.product-tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  padding: 4px 12px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 16px;
}
.tag-ide     { background: rgba(0,255,136,0.15); color: var(--accent2); border: 1px solid rgba(0,255,136,0.3); }
.tag-ai      { background: rgba(255,166,77,0.15); color: var(--purple); border: 1px solid rgba(255,166,77,0.3); }
.tag-game    { background: rgba(63,185,80,0.15); color: var(--green); border: 1px solid rgba(63,185,80,0.3); }
.product-card-body { padding: 24px 32px 32px; flex: 1; display: flex; flex-direction: column; }
.product-card-body p { font-size: 0.9rem; color: var(--muted); margin-bottom: 20px; flex: 1; }
.product-card-footer { padding: 0 32px 32px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Section Headers ──────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 16px; }
.section-header .eyebrow {
  display: inline-block;
  font-size: 0.75rem; font-weight: 700;
  color: var(--accent); letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 16px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--muted); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
  margin: 0;
}

/* ── About Section ────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.about-orb {
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(0,255,136,0.3) 0%,
    rgba(0,255,136,0.2) 30%,
    rgba(255,166,77,0.1) 60%,
    transparent 80%);
  border: 1px solid rgba(0,255,136,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
  box-shadow: 0 0 80px rgba(0,255,136,0.1), inset 0 0 80px rgba(0,255,136,0.05);
  animation: float 6s ease-in-out infinite;
}
.about-text .eyebrow {
  font-size: 0.75rem; font-weight: 700;
  color: var(--accent); letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 16px;
  display: block;
}
.about-text h2 { margin-bottom: 20px; }
.about-text p  { color: var(--muted); margin-bottom: 16px; line-height: 1.8; }
.about-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 100px; padding: 6px 16px;
  font-size: 0.8rem; font-weight: 500; color: var(--text2);
}

/* ── Contact Section ──────────────────────────────────────── */
.contact-card {
  max-width: 640px; margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  box-shadow: var(--shadow), var(--glow-blue);
  contain: layout style paint;
}
.contact-card h2 { margin-bottom: 16px; }
.contact-card p  { color: var(--muted); margin-bottom: 32px; }
.contact-email {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 14px 28px;
  font-size: 1rem; font-weight: 600; color: var(--accent);
  transition: all .2s;
}
.contact-email:hover { background: rgba(0,255,136,0.1); border-color: var(--accent); color: var(--accent); }

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  z-index: 1400;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}

.scroll-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--orange), var(--green));
  box-shadow: 0 0 18px rgba(0,255,136,0.55);
}

.platform-grid,
.marketplace-grid,
.vitals-grid,
.referral-grid,
.constellation-grid {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.platform-grid,
.marketplace-grid,
.vitals-grid,
.referral-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.constellation-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.extension-card,
.vital,
.certification-card,
.sandbox-panel,
.referral-card,
.comparison-shell,
.research-post,
.interactive-demo {
  background: rgba(13,17,23,0.78);
  border: 1px solid rgba(0,255,136,0.16);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  contain: layout style paint;
}

.extension-card.official { border-color: rgba(63,185,80,0.26); }
.extension-card.community { border-color: rgba(255,166,77,0.24); }

.extension-meta,
.author,
.installs {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 6px;
}

.comparison-matrix {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}

.comparison-matrix th,
.comparison-matrix td {
  border-bottom: 1px solid var(--border);
  padding: 14px 12px;
  text-align: left;
}

.comparison-matrix th { color: var(--text); }
.comparison-matrix td strong { color: var(--accent); }

.constellation-node {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(0,255,136,0.18);
  background: radial-gradient(circle at top, rgba(0,255,136,0.1), rgba(13,17,23,0.86));
}

.author-solo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(0,255,136,0.25);
}

.author-solo .meta {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.viz-bars {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.viz-bar {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 18px;
  min-height: 90px;
}

.viz-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--bar-size, 50%);
  opacity: 0.18;
}

.viz-bar.transformer::before { background: linear-gradient(90deg, var(--orange), transparent); }
.viz-bar.mingru::before { background: linear-gradient(90deg, var(--accent), transparent); }

.viz-bar strong,
.viz-bar span {
  position: relative;
  z-index: 1;
  display: block;
}

.solo-quote {
  margin-top: 20px;
  padding: 22px 26px;
  border-left: 4px solid var(--accent);
  background: rgba(0,255,136,0.08);
  border-radius: 0 16px 16px 0;
  font-size: 1.25rem;
  color: var(--text);
}

.comparison-negative { border-color: rgba(248,81,73,0.22); }
.comparison-positive { border-color: rgba(63,185,80,0.22); }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(63,185,80,0.1);
  border: 1px solid rgba(63,185,80,0.26);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.vital { text-align: center; }
.vital .number {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  color: var(--text);
}
.vital .label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.studio-dashboard {
  position: relative;
  overflow: hidden;
}

.studio-meter {
  margin-top: 14px;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(0,255,136,0.14);
}

.studio-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--orange));
}

.studio-feed-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.studio-feed-list div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(0,255,136,0.08);
}

.studio-feed-list span {
  color: var(--muted);
  font-size: 0.86rem;
}

.badge-preview {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(0,255,136,0.32);
  background: rgba(0,255,136,0.06);
  text-align: center;
}

.badge-preview strong { display: block; color: var(--text); }

.certification-card .btn {
  width: 100%;
  max-width: 100%;
  justify-content: center;
  white-space: normal;
  text-align: center;
  padding-left: 16px;
  padding-right: 16px;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: rgba(0,255,136,0.08);
  color: var(--accent);
  cursor: pointer;
}

.sandbox-terminal {
  margin-top: 18px;
  display: none;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.8;
  border: 1px solid rgba(0,255,136,0.18);
  border-radius: 14px;
  padding: 16px;
  background: #0b1118;
  color: #c7d5e0;
  position: relative;
  overflow: hidden;
}

.sandbox-terminal.active { display: block; }

.referral-code {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,166,77,0.24);
  background: rgba(255,166,77,0.08);
  color: var(--text);
}

.hero-variant-B .hero-eyebrow {
  border-color: rgba(255,166,77,0.25);
  color: var(--purple);
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 12px; max-width: 280px; line-height: 1.7; }
.footer-col h4 { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-bottom: 16px; letter-spacing: 0.5px; text-transform: uppercase; }
.footer-col a  { display: block; color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { color: var(--muted); font-size: 0.85rem; }

.roadmap-ladder {
  list-style: none;
  counter-reset: roadmap;
  display: grid;
  gap: 14px;
  margin-top: 36px;
  padding: 0;
}

.roadmap-ladder li {
  counter-increment: roadmap;
  display: grid;
  gap: 6px;
  padding: 18px 20px 18px 72px;
  border-radius: 16px;
  border: 1px solid rgba(0,255,136,0.14);
  background: rgba(255,255,255,0.03);
  position: relative;
}

.roadmap-ladder li::before {
  content: counter(roadmap);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,255,136,0.22), rgba(255,166,77,0.18));
  color: var(--text);
  font-weight: 800;
}

.roadmap-ladder span {
  color: var(--muted);
  font-size: 0.94rem;
}

.roadmap-spotlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.roadmap-card {
  position: relative;
  text-align: center;
  padding: 22px 18px;
  border-radius: 18px;
  border: 1px solid rgba(0,255,136,0.28);
  background:
    radial-gradient(circle at 16% 14%, rgba(0,255,136,0.18), transparent 56%),
    radial-gradient(circle at 84% 88%, rgba(63,185,80,0.14), transparent 54%),
    linear-gradient(165deg, rgba(255,255,255,0.05), rgba(0,0,0,0.08));
  box-shadow: 0 14px 34px rgba(0,0,0,0.25);
  overflow: hidden;
  isolation: isolate;
  transform: translateZ(0);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.roadmap-card::after {
  content: "";
  position: absolute;
  top: -120%;
  left: -40%;
  width: 36%;
  height: 340%;
  transform: rotate(26deg);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.24), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.roadmap-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(63,185,80,0.10), transparent 48%, rgba(0,255,136,0.12));
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.roadmap-card:hover::before {
  opacity: 1;
}

.roadmap-card:hover::after {
  opacity: 1;
  animation: roadmap-sweep 0.85s ease 1;
}

.roadmap-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(63,185,80,0.42);
  box-shadow: 0 18px 42px rgba(0,0,0,0.34), 0 0 18px rgba(0,255,136,0.16);
}

.roadmap-card:nth-child(1) {
  border-color: rgba(63,185,80,0.36);
}

.roadmap-card:nth-child(2) {
  border-color: rgba(0,255,136,0.38);
}

.roadmap-card:nth-child(3) {
  border-color: rgba(251,188,5,0.34);
}

.roadmap-card-top {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.roadmap-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(63,185,80,0.35);
  background: rgba(63,185,80,0.14);
  color: var(--green);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
}

.roadmap-card:nth-child(2) .roadmap-pill {
  border-color: rgba(0,255,136,0.4);
  background: rgba(0,255,136,0.14);
  color: var(--accent);
}

.roadmap-card:nth-child(3) .roadmap-pill {
  border-color: rgba(251,188,5,0.45);
  background: rgba(251,188,5,0.15);
  color: var(--yellow);
}

.roadmap-card h3 {
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.32;
}

.roadmap-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.62;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}
@keyframes status-thinking {
  0% { box-shadow: 0 0 0 0 rgba(251,188,5,0.45); }
  60% { box-shadow: 0 0 0 10px rgba(251,188,5,0); }
  100% { box-shadow: 0 0 0 0 rgba(251,188,5,0); }
}
@keyframes bubble-border-wobble {
  0%, 100% { border-radius: 12px 16px 14px 15px; }
  50% { border-radius: 16px 12px 15px 13px; }
}
@keyframes bubble-tail-bounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(-2px); }
}
@keyframes bubble-text-jitter {
  0%, 100% { letter-spacing: 0; }
  30% { letter-spacing: 0.01em; }
  60% { letter-spacing: -0.005em; }
}
@keyframes logo-rumble {
  0% { transform: translateX(0); }
  20% { transform: translateX(-1.4px) rotate(-2deg); }
  40% { transform: translateX(1.6px) rotate(2deg); }
  60% { transform: translateX(-1.2px) rotate(-1deg); }
  80% { transform: translateX(1px) rotate(1deg); }
  100% { transform: translateX(0); }
}
@keyframes logo-hex-flip {
  0% { transform: rotateY(0deg) rotateX(0deg) scale(1); }
  48% { transform: rotateY(180deg) rotateX(14deg) scale(1.28); }
  100% { transform: rotateY(360deg) rotateX(0deg) scale(1); }
}
@keyframes roadmap-sweep {
  from { transform: translateX(-220%) rotate(26deg); }
  to { transform: translateX(430%) rotate(26deg); }
}
@keyframes roadmap-glow {
  0%, 100% { box-shadow: 0 14px 34px rgba(0,0,0,0.25); }
  50% { box-shadow: 0 16px 40px rgba(0,0,0,0.28), 0 0 24px rgba(0,255,136,0.2); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-16px); }
}
@keyframes mesh-drift {
  0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  33% { transform: translate(-46%, -54%) scale(1.08) rotate(8deg); }
  66% { transform: translate(-54%, -46%) scale(0.94) rotate(-7deg); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp 0.6s ease forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.roadmap-card.animate-in {
  animation: fadeInUp 0.56s ease forwards, roadmap-glow 2.8s ease-in-out 0.7s infinite;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .live-ide-grid { grid-template-columns: 1fr; }
  .live-ide-metrics { grid-template-columns: 1fr 1fr; }
  .system-status { display: none; }
  .ai-power-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--bg2); border-bottom: 1px solid var(--border);
    padding: 16px 24px; gap: 4px;
  }
  #interactive-showcase { padding-top: 84px; }
  .ai-power-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-card { padding: 32px 24px; }
  .hero-actions { flex-direction: column; }
  .section { padding: 60px 0; }
}

/* Force animation/effects path for diagnostics (`?fx=1`) */
.force-motion .reveal-on-scroll,
.force-motion .reveal-left,
.force-motion .reveal-right,
.force-motion .stagger-children > * {
  opacity: initial !important;
  transform: initial !important;
  transition: initial !important;
}

.force-motion .animate-in {
  animation-play-state: running !important;
}

/* ── Page-specific: Product Pages ────────────────────────── */
.product-hero {
  padding: 140px 0 80px;
  position: relative; overflow: hidden;
}
.product-hero-bg-blue {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(0,255,136,0.15) 0%, transparent 70%);
}
.product-hero-bg-purple {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255,166,77,0.15) 0%, transparent 70%);
}
.product-hero-bg-green {
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(63,185,80,0.12) 0%, transparent 70%);
}
.product-hero h1 { margin-bottom: 20px; }
.product-hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 700px; margin: 0 auto 40px; }
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px; margin-top: 60px;
}
.spec-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  text-align: center;
}
.spec-card .num { font-size: 2rem; font-weight: 800; color: var(--text); }
.spec-card .label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.feature-list { list-style: none; margin-top: 20px; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 0.95rem; color: var(--text2);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list .check { color: var(--green); font-size: 1rem; flex-shrink: 0; margin-top: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }

/* ── Live Stats Bar ───────────────────────────────────────── */
.live-stats-bar {
  background: linear-gradient(90deg, var(--bg2), var(--bg3), var(--bg2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

/* ── Architecture Diagram ─────────────────────────────────── */
.arch-diagram {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.arch-center {
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
  padding: 24px 48px;
  border-radius: 50px;
  text-align: center;
  box-shadow: 0 0 50px rgba(0,255,136,0.4);
  position: relative;
  z-index: 2;
}
.arch-nodes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 800px;
}
.arch-node {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: default;
  transition: all .3s;
}
.arch-node:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,255,136,0.15);
}
.arch-node-title { color: var(--text); font-weight: 600; font-size: 0.9rem; margin-top: 8px; }
.arch-node-sub   { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }
@media (max-width: 600px) {
  .arch-nodes { grid-template-columns: repeat(2, 1fr); }
}

/* ── Code Quest Demo ──────────────────────────────────────── */
.cq-wrapper {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #010409;
  margin-top: 40px;
}
.cq-game {
  position: relative;
  height: 280px;
  background: linear-gradient(180deg, #040810 0%, #0d1c2c 100%);
}
.cq-panel {
  background: rgba(13,17,23,0.98);
  border-top: 2px solid var(--accent);
  padding: 20px 24px;
}
.cq-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.cq-template {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
}
.cq-input {
  flex: 1;
  min-width: 160px;
  background: var(--bg2);
  border: 2px solid var(--border);
  color: var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  outline: none;
  transition: border-color .2s;
}
.cq-input:focus { border-color: var(--accent); }

/* ── Monster Maneuvers scan line ──────────────────────────── */
.mm-scan-line {
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, #3fb950, transparent);
  animation: mm-scan 4s linear infinite;
}
@keyframes mm-scan {
  0%   { left: -100%; }
  100% { left:  100%; }
}
.mm-tab-btn:hover { color: var(--text2) !important; }

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #hero-canvas { display: none; }
  .mm-scan-line { display: none; }
}

/* ── CSS containment ──────────────────────────────────────── */
.cq-wrapper { contain: layout style paint; }
.arch-diagram { content-visibility: auto; contain-intrinsic-size: 0 500px; }
.arch-node, .product-card { will-change: transform; }

/* ── Stat bar numbers ─────────────────────────────────────── */
.stat-num   { font-size: 1.6rem; font-weight: 800; }
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* ── Ability pills ────────────────────────────────────────── */
.ability-pill {
  background: var(--bg3);
  padding: 12px;
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.ability-sub { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* ── MM tab active state ──────────────────────────────────── */
.mm-tab-btn {
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted); padding: 10px 14px;
  cursor: pointer; font-size: 0.85rem; font-weight: 600;
  transition: color .2s;
  min-height: 44px;
}
.mm-tab-btn:hover { color: var(--text2); }
.mm-tab-btn.active-tab { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Touch-friendly tap targets ───────────────────────────── */
.btn, .mm-tab-btn, .pill, .nav-links a {
  min-height: 44px;
}

/* ── Mobile optimizations ─────────────────────────────────── */
@media (max-width: 768px) {
  #hero-canvas { display: none; }
  .arch-node:hover { transform: none; }
  .product-card:hover { transform: none; }
}

@media (hover: none) {
  .btn:active {
    transform: scale(0.96);
    transition: transform 0.1s;
  }

  .product-card::before {
    display: none;
  }
}

/* ── Accordion ────────────────────────────────────────────── */
.arch-accordion { margin-top: 48px; display: flex; flex-direction: column; gap: 12px; }

.accordion-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s;
}
.accordion-item[open] { border-color: var(--border2); }
.accordion-item[open] .accordion-summary { color: var(--accent); }

.accordion-summary {
  padding: 20px 24px;
  cursor: pointer;
  color: var(--text2);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  list-style: none;
  transition: color .2s;
  user-select: none;
}
.accordion-summary::-webkit-details-marker { display: none; }
.accordion-summary::after {
  content: '+';
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform .2s;
}
.accordion-item[open] .accordion-summary::after { transform: rotate(45deg); }
.accordion-summary:hover { color: var(--text); }

.accordion-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(0,255,136,0.1);
  border: 1px solid rgba(0,255,136,0.2);
  border-radius: 100px;
  padding: 3px 12px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.accordion-body {
  padding: 0 24px 24px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 0.95rem;
}
.accordion-body p { margin-bottom: 12px; }
.accordion-body ul, .accordion-body ol {
  padding-left: 20px;
  margin: 12px 0;
}
.accordion-body li { margin-bottom: 6px; }

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-top: 16px;
  white-space: pre;
}

.pipeline-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.pipeline-step {
  background: rgba(0,255,136,0.12);
  color: var(--accent);
  border: 1px solid rgba(0,255,136,0.25);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 600;
}
.pipeline-arrow { color: var(--muted); font-size: 0.9rem; }

/* ── Testimonials ─────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.testimonial {
  background: var(--bg2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 28px;
  margin: 0;
  transition: transform .3s, box-shadow .3s;
}
.testimonial:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.testimonial:nth-child(2) { border-left-color: var(--purple); }
.testimonial:nth-child(3) { border-left-color: var(--green); }
.testimonial p {
  color: var(--text2);
  font-style: italic;
  line-height: 1.8;
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.testimonial footer {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
}
.testimonial footer span { color: var(--muted); }

/* ── Build Pipeline ───────────────────────────────────────── */
.pipeline-card {
  background: #161b22;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 48px;
}
.pipeline-steps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.pipe-step-node {
  flex: 1;
  min-width: 90px;
  text-align: center;
}
.pipe-icon {
  width: 52px; height: 52px;
  background: var(--bg2);
  border: 2px solid var(--border);
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  transition: box-shadow .3s;
}
.pipe-step-node:hover .pipe-icon {
  box-shadow: 0 0 20px currentColor;
}
.pipe-label { color: var(--text2); font-size: 0.9rem; font-weight: 600; }
.pipe-sub   { color: var(--muted); font-size: 0.75rem; margin-top: 3px; }
.pipe-connector {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  position: relative;
  min-width: 24px;
}
.pipe-connector::after {
  content: '';
  position: absolute;
  right: -1px; top: -4px;
  border-left: 8px solid var(--c2);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.build-log {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  height: 130px;
  overflow-y: auto;
  line-height: 1.7;
  scrollbar-width: thin;
}
.build-log div { margin-bottom: 2px; }
@media (max-width: 600px) {
  .pipeline-steps-row { flex-direction: column; align-items: flex-start; }
  .pipe-connector { width: 2px; height: 24px; background: linear-gradient(180deg, var(--c1), var(--c2)); }
  .pipe-connector::after {
    right: -4px; top: auto; bottom: -1px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 8px solid var(--c2);
    border-bottom: none;
  }
}

/* ── Mermaid Architecture Diagram ─────────────────────────── */
.mermaid-card {
  background: #161b22;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 48px;
  overflow-x: auto;
}
.mermaid-card .mermaid {
  min-height: 300px;
  display: flex;
  justify-content: center;
}
.mermaid-card svg {
  max-width: 100%;
  height: auto;
}
.arch-info-box {
  margin-top: 20px;
  padding: 16px 20px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--border2);
  min-height: 64px;
  transition: border-left-color .2s;
}
.arch-info-box p {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

/* ── Scroll-triggered reveal animations ──────────────────── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}
.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Stagger children — up to 6 items */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }

/* Slide in from left/right variants */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll,
  .reveal-left,
  .reveal-right,
  .stagger-children > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   Advanced Interaction Layer (v2)
   ============================================================ */

/* Theme system with system-sync support */
:root[data-theme="light"] {
  --bg:        #f4f8fd;
  --bg2:       #ffffff;
  --bg3:       #eef3f9;
  --border:    #d6e1ee;
  --border2:   #7fb3da;
  --accent:    #ffa64d;
  --accent2:   #0b5bd3;
  --purple:    #ffa64d;
  --green:     #2f9d59;
  --orange:    #da6d43;
  --yellow:    #c7962f;
  --pink:      #d74848;
  --text:      #0b1f36;
  --text2:     #1c3550;
  --muted:     #536d87;
  --shadow:    0 8px 24px rgba(15,40,70,0.12);
  --glow-blue: 0 0 34px rgba(0,255,136,0.15);
  --glow-purple: 0 0 34px rgba(255,166,77,0.13);
}

:root[data-theme="steam"] {
  --bg:        #0a141f;
  --bg2:       #102030;
  --bg3:       #1b2f45;
  --border:    #28435d;
  --border2:   #00ff88;
  --accent:    #00ff88;
  --accent2:   #1b7cc5;
  --purple:    #00ff88;
  --green:     #7cc36d;
  --orange:    #f59b68;
  --yellow:    #f0c55d;
  --pink:      #ef7f7a;
  --text:      #f2f8ff;
  --text2:     #d5e6f7;
  --muted:     #9ab6d3;
}

:root[data-theme="high-contrast"] {
  --bg:        #000000;
  --bg2:       #090909;
  --bg3:       #151515;
  --border:    #ffffff;
  --border2:   #00ff88;
  --accent:    #00ff88;
  --accent2:   #ffa64d;
  --purple:    #ffa64d;
  --green:     #7fff00;
  --orange:    #ff9900;
  --yellow:    #ffff00;
  --pink:      #ff4477;
  --text:      #ffffff;
  --text2:     #f2f2f2;
  --muted:     #d4d4d4;
  --shadow:    0 0 0 rgba(0,0,0,0);
  --glow-blue: 0 0 0 rgba(0,0,0,0);
  --glow-purple: 0 0 0 rgba(0,0,0,0);
}

body.theme-transitioning {
  transition: background-color 0.5s ease, color 0.5s ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 0.86rem;
  min-width: 40px;
  min-height: 36px;
  line-height: 1;
  cursor: pointer;
  transition: all .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.theme-toggle-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.theme-toggle-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.mesh-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  filter: blur(4px);
}

.mesh-field span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: calc(var(--size) * 0.72);
  border-radius: 38% 62% 51% 49% / 41% 37% 63% 59%;
  background:
    radial-gradient(circle at 30% 30%, rgba(0,255,136,0.28), transparent 58%),
    radial-gradient(circle at 70% 60%, rgba(255,166,77,0.22), transparent 62%),
    radial-gradient(circle at 50% 50%, rgba(255,166,77,0.12), transparent 70%);
  opacity: 0.55;
  transform: translate(-50%, -50%);
  animation: mesh-drift var(--duration, 18s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.data-saver {
  font-family: system-ui, sans-serif;
}

.data-saver canvas,
.data-saver #neural-bg,
.data-saver .mesh-field,
.data-saver .cursor-dot,
.data-saver .cursor-outline,
.data-saver .parallax-layer {
  display: none !important;
}

.data-saver .hero,
.data-saver .product-hero,
.data-saver .contact-hero {
  background: var(--bg) !important;
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: none;
  background: rgba(4, 8, 14, 0.56);
}

.help-modal.open { display: block; }

.help-modal-shell {
  position: fixed;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, 92vw);
  background: rgba(13, 17, 23, 0.96);
  border: 1px solid rgba(0, 255, 136, 0.28);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  padding: 22px;
}

.help-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.help-modal-head h3 { margin: 0; }

.help-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.shortcut-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.shortcut-card kbd {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--accent);
  font: 700 0.8rem 'JetBrains Mono', monospace;
}

.shortcut-card p {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Reveal API compatibility: "revealed" alias */
.reveal-on-scroll.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.stagger-children.revealed > * {
  opacity: 1;
  transform: translate(0,0) scale(1);
}

/* Animated gradient text */
.gradient-text {
  background: linear-gradient(135deg, #00ff88 0%, #ffa64d 50%, #00ff88 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shine 3s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

/* Glassmorphism + tilt card enhancement */
.feature-card {
  background: rgba(13, 17, 23, 0.70);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 136, 0.12);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
  transition: left 0.5s;
  pointer-events: none;
}
.feature-card:hover::before { left: 100%; }
.feature-card:hover {
  border-color: rgba(0, 255, 136, 0.3);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,255,136,0.1);
}

/* Desktop cursor system */
.cursor-dot,
.cursor-outline {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
}
.cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00ff88;
  mix-blend-mode: difference;
  z-index: 9999;
}
.cursor-outline {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(0,255,136,0.45);
  border-radius: 50%;
  transition: transform 0.12s ease;
}
body.custom-cursor-enabled .cursor-dot,
body.custom-cursor-enabled .cursor-outline {
  opacity: 1;
}

/* Interactive terminal showcase */
.demo-terminal {
  margin-top: 16px;
  border: 1px solid var(--border2);
  border-radius: 12px;
  overflow: hidden;
  background: #0b1118;
}
.terminal-header {
  background: #131a22;
  border-bottom: 1px solid #1f2a38;
  padding: 10px 14px;
  display: flex;
  gap: 8px;
}
.terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.terminal-header .dot.red { background: #f85149; }
.terminal-header .dot.yellow { background: #e3b341; }
.terminal-header .dot.green { background: #3fb950; }
.terminal-body {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #c7d5e0;
  padding: 14px;
  min-height: 140px;
  line-height: 1.8;
}
.terminal-body .line { white-space: pre-wrap; }
.terminal-body .prompt { color: #00ff88; font-weight: 700; }
.terminal-body .success { color: #3fb950; }
.terminal-body .comment { color: #8b949e; }
.terminal-body .cursor { color: #00ff88; animation: blink 1s steps(1) infinite; }
.demo-terminal::after,
.sandbox-terminal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0, 255, 136, 0.3);
  animation: scanline 4s linear infinite;
  pointer-events: none;
}
@keyframes blink { 50% { opacity: 0; } }

@view-transition {
  navigation: auto;
}

/* Skeleton shimmer */
.skeleton-card {
  background: linear-gradient(90deg, rgba(22, 27, 34, 0.8) 25%, rgba(48, 55, 66, 0.8) 50%, rgba(22, 27, 34, 0.8) 75%);
  background-size: 200% 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  margin-top: 16px;
  animation: shimmer 1.5s infinite;
}
.skeleton-header,
.skeleton-line {
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
.skeleton-header {
  height: 1.4rem;
  width: 62%;
  margin-bottom: 1rem;
}
.skeleton-line {
  height: 0.86rem;
  margin-bottom: 0.5rem;
}
.skeleton-line.short { width: 60%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-line.short { width: 42%; }
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Page transition */
body.page-transitioning {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Mobile-first micro interactions */
@media (hover: none) {
  .btn:active {
    transform: scale(0.95);
    transition: transform 0.1s;
  }
}

/* Scroll snap optional containers */
.features-container {
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  height: 100vh;
}
.feature-section {
  scroll-snap-align: start;
  min-height: 100vh;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gradient-text,
  .skeleton-header,
  .skeleton-line,
  .terminal-body .cursor {
    animation: none !important;
  }
  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }
  .animate-in,
  .parallax-layer {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================================
   Phase 3 Enhancements
   ============================================================ */

:root {
  --accent-hue: 200;
  --dynamic-accent: hsl(var(--accent-hue) 86% 60%);
}

.predictive-hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 1px rgba(0,255,136,0.35), 0 10px 22px rgba(6,10,16,0.35);
  transition: transform .26s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .26s ease;
}

body.focus-mode .feature-card:not(:hover):not(:focus-within),
body.focus-mode .product-card:not(:hover):not(:focus-within) {
  filter: grayscale(0.8) opacity(0.6);
  transform: scale(0.98);
  transition: all 0.5s ease;
}

body.performance-mode *,
body.performance-mode *::before,
body.performance-mode *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

.achievement-stack {
  position: fixed;
  top: 82px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10020;
  pointer-events: none;
}

.achievement-toast {
  min-width: 260px;
  max-width: 320px;
  background: rgba(13,17,23,0.92);
  border: 1px solid rgba(0,255,136,0.3);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  padding: 12px 14px;
  backdrop-filter: blur(14px) saturate(140%);
}

.achievement-toast.tier-bronze { border-left-color: #c5965d; }
.achievement-toast.tier-silver { border-left-color: #aab9c5; }
.achievement-toast.tier-gold { border-left-color: #e3b341; }
.achievement-toast.tier-mythic { border-left-color: #ffa64d; }
.achievement-toast.leaving { opacity: 0; transform: translateX(40px); transition: all .3s ease; }

.achievement-kicker {
  font-size: 0.7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.achievement-title {
  margin-top: 2px;
  color: var(--text);
  font-weight: 700;
}
.achievement-detail {
  margin-top: 2px;
  color: var(--text2);
  font-size: 0.84rem;
}
.achievement-tier {
  margin-top: 8px;
  color: var(--dynamic-accent);
  font-size: 0.74rem;
  font-weight: 700;
}

.command-palette {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: none;
  background: rgba(4,8,14,0.42);
}
.command-palette.open { display: block; }

.command-palette-shell {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  width: min(620px, 92vw);
  background: rgba(13, 17, 23, 0.95);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 16px;
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  padding: 14px;
  animation: cmd-pop .2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cmd-pop {
  from { transform: translateX(-50%) scale(0.95); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}

.command-input {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
}
.command-input:focus { border-color: var(--dynamic-accent); }

.command-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 52vh;
  overflow: auto;
}

.command-item {
  text-align: left;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.command-item small {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.command-item.active,
.command-item:hover {
  border-color: rgba(0,255,136,0.4);
  background: rgba(0,255,136,0.12);
  color: var(--text);
}
.command-hint {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

body.command-palette-open > *:not(.command-palette):not(.achievement-stack) {
  filter: blur(4px) brightness(0.72);
  pointer-events: none;
  transition: filter .3s;
}

.remote-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 10005;
  color: var(--dynamic-accent);
  transform: translate(-2px, -2px);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
  transition: transform .1s linear;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remote-cursor .cursor-label {
  background: var(--dynamic-accent);
  color: #0d1117;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.9;
}

.live-metrics {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 10000;
  background: rgba(11, 17, 25, 0.92);
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}

.install-promo {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 10000;
  backdrop-filter: blur(16px) saturate(140%);
  border-color: rgba(0,255,136,0.4);
}

.ai-powered-chip {
  margin: 14px auto 0;
  width: fit-content;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,255,136,0.35);
  background: rgba(0,255,136,0.1);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.adaptive-priority {
  border-color: rgba(0,255,136,0.42) !important;
  box-shadow: 0 0 0 1px rgba(0,255,136,0.2), 0 14px 24px rgba(0,0,0,0.35);
}

.collab-presence-banner {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10012;
  background: rgba(13,17,23,0.92);
  color: var(--text2);
  border: 1px solid rgba(0,255,136,0.32);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.74rem;
}
.metrics-head {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.metrics-foot {
  margin-top: 4px;
  display: flex;
  gap: 10px;
  color: var(--text2);
  font-size: 0.75rem;
}

:root[data-theme="retro-amber"] {
  --bg: #130f06;
  --bg2: #1c1508;
  --bg3: #2a1f0b;
  --border: #4a3412;
  --border2: #d4942f;
  --accent: #f7b955;
  --accent2: #e69d2b;
  --purple: #e39b39;
  --green: #d8b562;
  --orange: #f7a946;
  --yellow: #ffd479;
  --pink: #f0a058;
  --text: #ffe6b9;
  --text2: #f0d6a4;
  --muted: #c79e5e;
}

.crt-mode::before {
  content: ' ';
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(18,16,16,0) 50%, rgba(0,0,0,0.24) 50%);
  background-size: 100% 4px;
  z-index: 10030;
  pointer-events: none;
  animation: scanline 10s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(10px); }
}

/* ============================================================
   Final Website Lock (Single Source of Truth)
   ============================================================ */

:root,
:root[data-theme="light"],
:root[data-theme="steam"],
:root[data-theme="high-contrast"],
:root[data-theme="retro-amber"],
:root[data-theme="mythic-matrix"] {
  --primary: #00ff88;
  --primary-dark: #00cc6a;
  --secondary: #ffa64d;
  --accent: #00ff88;
  --accent2: #ffa64d;
  --purple: #ffa64d;
}

@font-face {
  font-family: 'Star Jedi';
  src:
    local('Star Jedi'),
    local('StarJedi');
  font-display: swap;
}

.theme-toggle,
.theme-toggle-label,
.theme-toggle-icon,
.mesh-field,
.mesh-field span,
.about-orb,
.about-visual,
#hero-canvas,
#neural-bg,
body::before,
.hero::after,
.product-hero::after,
.contact-hero::after,
section::before {
  display: none !important;
  content: none !important;
  animation: none !important;
}

body,
button,
input,
textarea,
select,
.nav-links a,
.footer-col a {
  font-family: 'Space Grotesk', 'Source Sans 3', 'Segoe UI', system-ui, sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero-eyebrow,
.product-tag,
.section-header .eyebrow,
.section-header h2,
.hero h1,
.product-hero h1,
.contact-hero h1,
.nav-logo,
.footer-col h4 {
  font-family: 'Poller One', 'Star Jedi', 'Michroma', 'Audiowide', sans-serif !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

main > section,
.section,
.section-sm {
  min-height: 0 !important;
}

main > section:not(:first-of-type) {
  content-visibility: visible !important;
  contain-intrinsic-size: auto !important;
}

.section {
  padding-top: 34px !important;
  padding-bottom: 34px !important;
}

.section-sm {
  padding-top: 24px !important;
  padding-bottom: 24px !important;
}

.hero,
.product-hero,
.contact-hero {
  min-height: 0 !important;
  padding-top: 78px !important;
  padding-bottom: 26px !important;
}

.reveal-on-scroll,
.reveal-left,
.reveal-right,
.stagger-children > *,
.animate-in,
.animate-in.delay-1,
.animate-in.delay-2,
.animate-in.delay-3,
.animate-in.delay-4 {
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 768px) {
  .section {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  .section-sm {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

  .hero,
  .product-hero,
  .contact-hero {
    padding-top: 70px !important;
    padding-bottom: 20px !important;
  }
}



