:root {
  --bg: #07090f;
  --bg-elev: #0d111a;
  --bg-card: #111622;
  --bg-card-hover: #161d2d;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef2f9;
  --text-muted: #9aa7bd;
  --text-dim: #66738a;

  --gold: #f5b942;
  --cyan: #38bdf8;
  --emerald: #34d399;
  --coral: #fb7185;
  --violet: #a78bfa;
  --amber: #fb923c;

  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

/* Top Sticky Navigation */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 9, 15, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  box-shadow: 0 0 12px rgba(245, 185, 66, 0.7);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
.head-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--emerald);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(1200px 600px at 70% -10%, rgba(245, 185, 66, 0.14), transparent 60%),
              radial-gradient(900px 500px at 15% 10%, rgba(56, 189, 248, 0.12), transparent 60%),
              var(--bg);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/canyon_hero.jpg');
  background-size: cover;
  background-position: 62% 52%;
  transform: scale(1.22);
  opacity: 0.24;
  filter: saturate(1.2) contrast(1.06) blur(0.4px);
  mask-image: radial-gradient(ellipse 75% 85% at 75% 38%, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.28) 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 75% 38%, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.28) 55%, transparent 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 1380px;
  margin: 0 auto;
  padding: 58px 24px 48px;
}
.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 22, 34, 0.85);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.chip.gold { color: var(--gold); border-color: rgba(245, 185, 66, 0.35); background: rgba(245, 185, 66, 0.1); }
.chip.cyan { color: var(--cyan); border-color: rgba(56, 189, 248, 0.35); background: rgba(56, 189, 248, 0.1); }
.chip.emerald { color: var(--emerald); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }
.chip.violet { color: var(--violet); border-color: rgba(167, 139, 250, 0.35); background: rgba(167, 139, 250, 0.1); }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  max-width: 960px;
}
.hero h1 .grad {
  background: linear-gradient(95deg, var(--gold) 0%, #ffe09a 35%, var(--cyan) 75%, var(--emerald) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  font-size: 17px;
  color: #c7d2e4;
  max-width: 860px;
  margin: 0 0 32px;
}

/* Hero KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.kpi-card {
  background: rgba(14, 18, 28, 0.84);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent, var(--cyan));
  opacity: 0.85;
}
.kpi-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.kpi-value {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
.kpi-sub {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}
.delta-pill {
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  color: var(--emerald);
  white-space: nowrap;
}
.delta-pill.gold { background: rgba(245, 185, 66, 0.15); color: var(--gold); }
.delta-pill.cyan { background: rgba(56, 189, 248, 0.15); color: var(--cyan); }
.delta-pill.violet { background: rgba(167, 139, 250, 0.15); color: var(--violet); }

/* Main Container & Sections */
.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.section {
  padding-top: 64px;
}
.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.section-desc {
  color: var(--text-muted);
  max-width: 780px;
  margin: 0;
  font-size: 14.5px;
}

/* Cards & Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid-asymmetric {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
}
.grid-asymmetric-rev {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card-title {
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  margin: 0 0 3px;
}
.card-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
}
.chart-wrap {
  position: relative;
  height: 330px;
  width: 100%;
}
.chart-wrap.tall { height: 390px; }
.chart-wrap.short { height: 270px; }

/* Segmented Controls & Pills */
.seg-group {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active {
  background: rgba(56, 189, 248, 0.18);
  color: var(--cyan);
}

.era-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.era-pill {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.era-pill:hover { border-color: var(--border-strong); color: var(--text); }
.era-pill.active {
  background: rgba(245, 185, 66, 0.16);
  border-color: rgba(245, 185, 66, 0.55);
  color: var(--gold);
  font-weight: 600;
}

/* Comparison Mini-Metrics */
.era-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.mini-stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
}
.mini-stat .k {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mini-stat .v {
  font-family: var(--font-mono);
  font-size: 15.5px;
  font-weight: 600;
  margin-top: 2px;
}
.mini-stat .d {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Callout Insights */
.insight-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.insight {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent, var(--cyan));
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.insight h4 {
  font-family: var(--font-display);
  font-size: 14px;
  margin: 0 0 4px;
}
.insight p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* SVG Architecture Pipeline */
.arch-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  overflow-x: auto;
}
.arch-svg {
  width: 100%;
  min-width: 960px;
  height: auto;
  display: block;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-elev);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  white-space: nowrap;
}
td.r, th.r { text-align: right; }
td.r.mono { white-space: nowrap; }
#steadyTable td, #steadyTable th, #flightTable td, #flightTable th { padding: 8px 8px; font-size: 12px; }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
tbody tr:last-child td { border-bottom: none; }
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  margin-right: 4px;
}
.tag.fps { background: rgba(56, 189, 248, 0.14); color: var(--cyan); }
.tag.wire { background: rgba(167, 139, 250, 0.14); color: var(--violet); }
.tag.conv { background: rgba(245, 185, 66, 0.14); color: var(--gold); }
.tag.qual { background: rgba(52, 211, 153, 0.14); color: var(--emerald); }
.tag.cpu { background: rgba(251, 146, 60, 0.14); color: var(--amber); }
.tag.arch { background: rgba(251, 113, 133, 0.14); color: var(--coral); }

/* Scenario Cards */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.scenario-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
}
.scenario-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.scenario-id {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245, 185, 66, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
}
.scenario-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 8px;
}
.scenario-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.scenario-metrics strong { color: var(--text); }

/* World Showcase Gallery */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.gallery-tab {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}
.gallery-tab:hover { color: var(--text); border-color: var(--border-strong); }
.gallery-tab.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--cyan);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.shot-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.18s, border-color 0.18s;
}
.shot-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}
.shot-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #05070c;
}
.shot-meta {
  padding: 13px 15px;
}
.shot-meta h4 {
  font-family: var(--font-display);
  font-size: 14.5px;
  margin: 0 0 4px;
}
.shot-meta .telemetry {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
  margin-bottom: 4px;
}
.shot-meta p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Filter Toolbar for Cycle Log */
.log-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.search-input {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: 999px;
  width: 280px;
  outline: none;
}
.search-input:focus { border-color: var(--cyan); }

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 6, 11, 0.92);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  max-width: 1220px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.lightbox-inner img {
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: #04060b;
  display: block;
}
.lightbox-bar {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lightbox-close {
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* Live Demo CTA Buttons & Static vs Dynamic Badges */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.demo-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  color: #07090f;
  background: linear-gradient(135deg, var(--gold), #fcd374);
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(245, 185, 66, 0.28);
  transition: transform 0.15s, box-shadow 0.15s;
}
.demo-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 22px rgba(245, 185, 66, 0.45);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 28px;
}
.hero-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #07090f;
  background: linear-gradient(135deg, var(--gold), #5eead4);
  padding: 10px 20px;
  border-radius: 999px;
  box-shadow: 0 6px 26px rgba(56, 189, 248, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.hero-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.4);
}
.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  background: rgba(17, 22, 34, 0.85);
  border: 1px solid var(--border-strong);
  padding: 9px 16px;
  border-radius: 999px;
  transition: border-color 0.15s, background 0.15s;
}
.hero-cta-secondary:hover {
  border-color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
}
.delta-win {
  color: var(--emerald);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.delta-tie {
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.delta-trade {
  color: var(--amber);
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.28);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px 48px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
footer a { color: var(--cyan); text-decoration: none; }

@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-asymmetric, .grid-asymmetric-rev { grid-template-columns: 1fr; }
  .grid-3, .insight-strip, .scenario-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .kpi-grid, .grid-3, .insight-strip, .scenario-grid, .gallery-grid { grid-template-columns: 1fr; }
  .head-badge, .nav-links { display: none; }
  .search-input { width: 100%; }
}
