@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --navy: #0b1120;
  --navy-800: #111827;
  --navy-700: #1a2540;
  --navy-600: #1f2e50;
  --teal: #0eeacc;
  --cyan: #14bdcc;
  --gen-2g: #4b8bf4;
  --gen-3g: #a855f7;
  --gen-4g: #f59e0b;
  --gen-5g: #10b981;
  --gen-6g: #ec4899;
  --muted: #7d8caa;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

*, *:before, *:after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--navy);
  color: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; color: inherit; }

::selection { color: #fff; background: #0eeacc40; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--navy-800); }
::-webkit-scrollbar-thumb { background: var(--navy-600); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -3rem; left: 0.5rem; z-index: 100;
  padding: 0.5rem 1rem; border-radius: 0.5rem;
  background: var(--teal); color: var(--navy); font-weight: 700; font-size: 0.875rem;
  transition: top 0.15s;
}
.skip-link:focus { top: 0.5rem; }

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 56rem; margin: 0 auto; padding: 0 1.5rem; }
.container-prose { max-width: 42rem; margin: 0 auto; padding: 0 1.5rem; }

.text-gradient-teal {
  background-image: linear-gradient(135deg, var(--teal) 0%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block;
}
.text-gradient-gen-2g { color: var(--gen-2g); }
.text-gradient-gen-3g { color: var(--gen-3g); }
.text-gradient-gen-4g { color: var(--gen-4g); }
.text-gradient-gen-5g { color: var(--gen-5g); }
.text-gradient-gen-6g { color: var(--gen-6g); }

.card-glass {
  background: #ffffff08;
  border: 1px solid #ffffff14;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  border: 1px solid;
}
.badge-legacy { color: var(--muted); border-color: #64748b4d; background: #64748b0d; }
.badge-deployed { color: #34d399; border-color: #10b9814d; background: #10b9810d; }
.badge-research { color: #f472b6; border-color: #ec48994d; background: #ec48990d; }
.badge-supported { color: #34d399; border-color: #10b9814d; background: #10b9811a; }
.badge-limited { color: #fbbf24; border-color: #f59e0b4d; background: #f59e0b1a; }
.badge-not_supported { color: #f87171; border-color: #ef44444d; background: #ef44441a; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.875rem;
  transition: all 0.2s;
}
.btn-primary { background: var(--teal); color: var(--navy); box-shadow: 0 0 20px #0eeacc4d, 0 0 60px #0eeacc1a; }
.btn-primary:hover { background: #0eeacce6; }
.btn-secondary { border: 1px solid #ffffff1a; color: #cbd5e1; font-weight: 500; }
.btn-secondary:hover { background: #ffffff0d; border-color: #ffffff33; color: #fff; }

/* Header / nav */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 4rem;
  border-bottom: 1px solid #ffffff0d;
  background: #0b1120cc;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.site-header-inner {
  max-width: 72rem; margin: 0 auto; height: 100%; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; }
.main-nav { display: none; align-items: center; gap: 0.25rem; }
.main-nav a {
  padding: 0.375rem 0.75rem; border-radius: 0.375rem;
  font-size: 0.875rem; font-weight: 500; color: #94a3b8; transition: all 0.2s;
}
.main-nav a:hover { color: #fff; background: #ffffff0d; }
.main-nav a.active { background: #0eeacc1a; color: var(--teal); border: 1px solid #0eeacc4d; }
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: 2.25rem; height: 2.25rem; gap: 0.375rem; border-radius: 0.375rem;
}
.nav-toggle:hover { background: #ffffff0d; }
.nav-toggle span { display: block; width: 1.25rem; height: 2px; background: #cbd5e1; transition: transform 0.2s, opacity 0.2s; }
.mobile-nav {
  position: absolute; top: 4rem; left: 0; right: 0;
  background: #0b1120f2; backdrop-filter: blur(24px);
  border-bottom: 1px solid #ffffff0d;
  max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
  transition: all 0.2s;
}
.mobile-nav.open { max-height: 24rem; opacity: 1; pointer-events: auto; }
.mobile-nav ul { display: flex; flex-direction: column; padding: 1rem 1.5rem; gap: 0.25rem; }
.mobile-nav a { display: block; padding: 0.75rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; color: #94a3b8; }
.mobile-nav a.active { background: #0eeacc1a; color: var(--teal); }

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* Footer */
.site-footer { border-top: 1px solid #ffffff0d; margin-top: 8rem; padding: 3rem 1.5rem; }
.site-footer-inner {
  max-width: 72rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem;
  align-items: center; justify-content: space-between; color: var(--muted); font-size: 0.875rem;
}
.site-footer-inner a { color: #0eeaccb3; }
.site-footer-inner a:hover { color: var(--teal); }
@media (min-width: 768px) { .site-footer-inner { flex-direction: row; } }

/* Hero / sections */
.bg-grid {
  background-image:
    linear-gradient(#0eeacc0a 1px, transparent 1px),
    linear-gradient(90deg, #0eeacc0a 1px, transparent 1px);
  background-size: 64px 64px;
}

@keyframes wave-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes float-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: 0.5; } }
.animate-pulse { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
.stagger-children > * { opacity: 0; animation: float-up 0.4s ease-out forwards; }
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }

/* Grids */
.grid-gens { display: grid; grid-template-columns: repeat(1, 1fr); gap: 0.75rem; }
@media (min-width: 640px) { .grid-gens { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-gens { grid-template-columns: repeat(5, 1fr); } }

.gen-card {
  display: block; border-radius: 0.75rem; padding: 1.25rem;
  transition: all 0.3s;
}
.gen-card:hover { border-color: #ffffff26; transform: translateY(-4px); }

.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
.grid-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 768px) { .grid-metrics { grid-template-columns: repeat(4, 1fr); } }

.rounded-xl { border-radius: 0.75rem; }
.rounded-lg { border-radius: 0.5rem; }

/* Simulator slider */
.simulator-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 8px; border-radius: 4px; cursor: pointer;
  background: linear-gradient(to right, var(--slider-color) 0%, var(--slider-color) var(--fill-percent), #ffffff14 var(--fill-percent), #ffffff14 100%);
}
.simulator-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--slider-color); border: 2px solid var(--navy);
  cursor: pointer; transition: box-shadow 0.2s, transform 0.15s;
}
.simulator-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--slider-color); border: 2px solid var(--navy); cursor: pointer;
}
.simulator-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* Progress bars used in metrics / performance */
.meter { height: 6px; border-radius: 3px; background: #ffffff0d; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 3px; transition: width 0.6s ease-out; }

/* Architecture diagram (static, CSS-positioned instead of react-flow) */
.arch-diagram { position: relative; padding: 1rem 0; overflow-x: auto; }
.arch-canvas { position: relative; width: 800px; height: 320px; }
.arch-node {
  position: absolute; transform: translate(-50%, -50%);
  width: 130px; border-radius: 0.5rem; padding: 0.5rem 0.75rem;
  background: #ffffff0d; border: 1px solid #ffffff14; text-align: center;
}
.arch-node .code { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; }
.arch-node .full { font-size: 0.65rem; color: var(--muted); margin-top: 2px; }
.arch-edge-label {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 9px; color: var(--muted);
  background: var(--navy); padding: 0 4px;
}
.arch-svg { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.arch-svg path { fill: none; stroke: #0eeacc66; stroke-width: 1.5; }

/* Timeline page */
.timeline-track { position: relative; padding: 2rem 0; }
.timeline-track-line { position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: #ffffff1a; transform: translateY(-50%); }
.timeline-track-fill { position: absolute; top: 50%; left: 0; height: 2px; border-radius: 9999px; transform: translateY(-50%); background: var(--teal); transition: width 0.3s; }
.timeline-track-points { position: relative; display: flex; align-items: center; justify-content: space-between; }
.timeline-point { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.timeline-year { font-family: var(--font-mono); font-size: 11px; color: var(--muted); transition: color 0.2s; }
.timeline-point.is-active .timeline-year { color: #fff; }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; background: #ffffff26; transition: all 0.2s; }
.timeline-point.is-active .timeline-dot { width: 18px; height: 18px; box-shadow: 0 0 16px currentColor; }
.timeline-name { font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; color: var(--muted); transition: color 0.2s; }
.timeline-point.is-active .timeline-name { color: #fff; }
.grid-timeline { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 1024px) { .grid-timeline { grid-template-columns: 2fr 1fr; } }
.timeline-metrics-group { display: none; }
.timeline-metrics-group.is-active { display: contents; }

/* Performance page */
.metric-tab.is-active { background: #0eeacc1a; color: var(--teal); border-color: #0eeacc4d; }
.perf-row { display: grid; grid-template-columns: 3.5rem 1fr 5rem; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid #ffffff0d; }
.perf-row:last-child { border-bottom: none; }
.perf-label { font-family: var(--font-display); font-weight: 700; font-size: 0.875rem; }
.perf-meter { height: 10px; }
.perf-value { font-family: var(--font-mono); font-size: 0.8rem; text-align: right; color: #cbd5e1; }
.perf-table { width: 100%; border-collapse: collapse; min-width: 600px; font-size: 0.875rem; }
.perf-table th { text-align: left; padding: 0.5rem 0.75rem; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid #ffffff1a; }
.perf-table td { padding: 0.625rem 0.75rem; border-bottom: 1px solid #ffffff0d; font-family: var(--font-mono); color: #cbd5e1; }

/* Simulator page */
.sim-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .sim-grid { grid-template-columns: 1fr 2fr; } }
.sim-controls { display: flex; flex-direction: column; gap: 1.25rem; }
.sim-controls h2 { margin-bottom: 0.25rem; }
.sim-results { display: flex; flex-direction: column; gap: 1.5rem; }
.sim-slider .range-labels { display: flex; justify-content: space-between; margin-top: 0.25rem; }
.sim-slider .range-labels span { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }

.score-row { border-radius: 0.5rem; padding: 0.625rem 0.75rem; margin-bottom: 0.625rem; background: #ffffff05; transition: all 0.3s; }
.score-row.is-best { background: #ffffff08; border: 1px solid; }
.score-bar-track { flex: 1; height: 8px; border-radius: 9999px; background: #ffffff0d; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 9999px; transition: width 0.7s ease-out; }
.score-checks { display: flex; gap: 1rem; margin-top: 0.375rem; margin-left: 2.75rem; font-size: 0.75rem; color: var(--muted); }

.uc-row { display: flex; align-items: center; gap: 0.625rem; border-radius: 0.5rem; padding: 0.625rem 0.75rem; margin-bottom: 0.375rem; }
.uc-row.is-viable { background: #10b9811a; border: 1px solid #10b98133; }
.uc-row.is-fail { background: #ffffff05; border: 1px solid #ffffff0d; opacity: 0.6; }

/* FAQ / Glossary */
dl, dt, dd { margin: 0; padding: 0; }
.faq-item summary { cursor: pointer; font-weight: 600; color: #fff; font-size: 0.95rem; }
.faq-item summary::marker { color: var(--teal); }
.faq-item[open] summary { margin-bottom: 0.25rem; }

/* Quiz */
#quiz-options .btn:hover { color: #fff; }

/* Cookie consent banner */
.consent-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200;
  max-width: 40rem; margin: 0 auto;
  background: #111827f2; border: 1px solid #ffffff1a; border-radius: 0.75rem;
  padding: 1.25rem; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 10px 40px #00000066;
  display: flex; flex-direction: column; gap: 1rem;
}
.consent-banner p { font-size: 0.875rem; color: #cbd5e1; line-height: 1.5; }
.consent-banner a { color: var(--teal); text-decoration: underline; }
.consent-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
@media (min-width: 640px) {
  .consent-banner { flex-direction: row; align-items: center; justify-content: space-between; }
  .consent-actions { flex-shrink: 0; }
}

/* Text colors */
.text-muted { color: var(--muted); }
.text-dim { color: #94a3b8; }
.text-body-2 { color: #cbd5e1; }
.text-teal { color: var(--teal); }

/* Misc spacing helpers used across pages */
.section { padding: 0 1.5rem 4rem; }
.page-hero { padding-top: 6rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.text-center { text-align: center; }
