:root {
  --bg: #05070d;
  --bg-2: #0b1020;
  --panel: rgba(10, 18, 34, 0.76);
  --panel-strong: rgba(8, 12, 24, 0.92);
  --text: #eefcff;
  --muted: #9dc3cc;
  --cyan: #00f6ff;
  --cyan-soft: rgba(0, 246, 255, 0.18);
  --gold: #ffd84b;
  --pink: #ff43e9;
  --green: #63ff8a;
  --border: rgba(108, 255, 255, 0.22);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(0,246,255,.16), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(255,67,233,.12), transparent 24rem),
    linear-gradient(180deg, #03050a 0%, #081022 48%, #05070d 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
.shell { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--cyan); color: #001014; padding: 10px 12px; border-radius: 10px; z-index: 50; }
.skip-link:focus { left: 8px; }

.site-header {
  position: fixed;
  z-index: 20;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  width: min(1160px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(3, 8, 16, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, .34), inset 0 0 28px rgba(0, 246, 255, .05);
  transition: background .2s ease, border-color .2s ease;
}
.site-header.is-scrolled { background: rgba(3, 8, 16, 0.88); border-color: rgba(0, 246, 255, .36); }
.brand { display: flex; align-items: center; min-width: 138px; }
.brand img { width: 164px; height: auto; filter: drop-shadow(0 0 18px rgba(0,246,255,.35)); }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { padding: 12px 16px; border-radius: 999px; color: #d7fbff; font-weight: 750; letter-spacing: .02em; }
.nav a:hover, .nav a:focus-visible { background: var(--cyan-soft); color: white; outline: none; box-shadow: inset 0 0 0 1px rgba(0,246,255,.3); }
.nav-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--cyan-soft); }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--cyan); margin: 5px auto; border-radius: 2px; }

.hero { position: relative; min-height: 780px; display: grid; align-items: center; overflow: hidden; padding: 150px 0 88px; }
.hero-bg { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(3,5,10,.88) 0%, rgba(3,5,10,.64) 42%, rgba(3,5,10,.12) 100%), url('/assets/screenshots/circuit-overview.webp') center / cover no-repeat; transform: scale(1.02); }
.hero::after { content:""; position: absolute; inset: auto 0 0; height: 250px; background: linear-gradient(0deg, var(--bg), transparent); }
.hero-content { position: relative; z-index: 1; max-width: 720px; margin-left: max(16px, calc((100vw - 1160px)/2)); }
.eyebrow { margin: 0 0 12px; color: var(--cyan); text-transform: uppercase; letter-spacing: .22em; font-weight: 900; font-size: .82rem; text-shadow: 0 0 18px rgba(0,246,255,.55); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3.6rem, 8vw, 7.8rem); line-height: .86; letter-spacing: -.08em; max-width: 820px; margin-bottom: 22px; text-wrap: balance; }
h1 span { display: block; color: var(--cyan); text-shadow: 0 0 32px rgba(0,246,255,.45); }
.hero-copy { font-size: clamp(1.08rem, 1.7vw, 1.34rem); line-height: 1.7; color: #d5edf4; max-width: 650px; margin-bottom: 32px; }
.hero-actions, .cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 20px; border-radius: 999px; font-weight: 900; letter-spacing: .015em; border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--cyan), #70ffb2); color: #001114; box-shadow: 0 0 32px rgba(0,246,255,.26); }
.btn-ghost { background: rgba(4, 10, 21, .58); border-color: var(--border); color: #e7fdff; }
.btn-ghost:hover { box-shadow: 0 0 24px rgba(0,246,255,.18); background: rgba(0,246,255,.1); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 36px; max-width: 650px; }
.stat-row div { padding: 16px; border: 1px solid var(--border); border-radius: 20px; background: rgba(6, 14, 28, .62); backdrop-filter: blur(10px); }
.stat-row strong { display: block; font-size: 1.04rem; color: white; }
.stat-row span { color: var(--muted); font-size: .92rem; }

.feature-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: -42px; position: relative; z-index: 2; }
.feature-strip article { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--panel); box-shadow: var(--shadow); min-height: 190px; overflow: hidden; position: relative; }
.feature-strip img { width: 58px; height: 58px; object-fit: contain; margin-bottom: 16px; filter: drop-shadow(0 0 18px rgba(255,216,75,.3)); }
.feature-strip h2 { margin-bottom: 8px; font-size: 1.35rem; }
.feature-strip p { color: var(--muted); line-height: 1.6; margin-bottom: 0; }

.section { padding: 96px 0; }
.section-heading { max-width: 760px; margin-bottom: 32px; }
.section-heading h2 { font-size: clamp(2.1rem, 4vw, 4.15rem); line-height: .98; letter-spacing: -.05em; margin-bottom: 0; text-wrap: balance; }
.section-heading.split { max-width: none; display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: end; }
.section-heading.split p:not(.eyebrow) { color: var(--muted); line-height: 1.7; margin-bottom: 0; }

.screenshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shot { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; overflow: hidden; background: #06101e; cursor: zoom-in; box-shadow: var(--shadow); position: relative; min-height: 230px; }
.shot.feature-shot { grid-column: span 2; grid-row: span 2; }
.shot img { width: 100%; height: 100%; min-height: 230px; object-fit: cover; transition: transform .35s ease, filter .35s ease; }
.shot:hover img { transform: scale(1.04); filter: saturate(1.13); }
.shot span { position: absolute; left: 14px; bottom: 14px; padding: 9px 12px; border-radius: 999px; background: rgba(0,0,0,.58); border: 1px solid rgba(255,255,255,.14); font-weight: 900; box-shadow: 0 0 20px rgba(0,246,255,.14); }

.world-section { background: linear-gradient(180deg, transparent, rgba(0,246,255,.045), transparent); }
.world-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.world-card { overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow); }
.world-card img { width: 100%; height: 190px; object-fit: cover; }
.world-card div { padding: 20px; }
.world-card h3 { font-size: 1.35rem; margin-bottom: 8px; }
.world-card p { color: var(--muted); line-height: 1.6; margin-bottom: 0; }

.leaderboard-section { padding-top: 70px; }
.leaderboard-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.leaderboard-cards article { min-height: 160px; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; background: linear-gradient(145deg, rgba(10,18,34,.88), rgba(0,246,255,.07)); box-shadow: var(--shadow); }
.leaderboard-cards strong { display: block; font-size: 1.2rem; margin-bottom: 10px; color: white; }
.leaderboard-cards span { color: var(--muted); line-height: 1.6; }

.cta { padding-top: 20px; }
.cta-card { border-radius: 36px; border: 1px solid rgba(0,246,255,.38); background: radial-gradient(circle at 20% 0%, rgba(0,246,255,.18), transparent 32rem), radial-gradient(circle at 100% 100%, rgba(255,67,233,.12), transparent 26rem), var(--panel-strong); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; box-shadow: 0 26px 100px rgba(0,0,0,.44), inset 0 0 60px rgba(0,246,255,.045); }
.cta-card h2 { font-size: clamp(2.2rem, 5vw, 4.5rem); line-height: .9; letter-spacing: -.06em; margin-bottom: 14px; }
.cta-card p:not(.eyebrow) { color: var(--muted); line-height: 1.7; max-width: 620px; margin-bottom: 0; }
.cta-actions { justify-content: flex-end; }

.site-footer { padding: 36px 0 48px; border-top: 1px solid rgba(255,255,255,.08); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }
.footer-inner div { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-inner a { color: #dffcff; }
.footer-inner a:hover { color: var(--cyan); }

.lightbox { width: min(1120px, calc(100% - 28px)); border: 1px solid var(--border); border-radius: 24px; padding: 0; background: #03070f; color: white; box-shadow: 0 30px 120px rgba(0,0,0,.75); }
.lightbox::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(5px); }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; background: #000; }
.lightbox p { margin: 0; padding: 14px 18px 18px; color: var(--muted); font-weight: 850; }
.lightbox-close { position: absolute; right: 10px; top: 10px; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%; background: rgba(0,0,0,.66); color: white; font-size: 32px; line-height: 1; cursor: pointer; }

@media (max-width: 900px) {
  .site-header { top: 10px; border-radius: 24px; align-items: flex-start; }
  .brand img { width: 140px; }
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; padding: 12px; border: 1px solid var(--border); border-radius: 22px; background: rgba(3,8,16,.94); }
  .nav.is-open { display: flex; }
  .nav a { text-align: center; }
  .hero { min-height: 690px; padding-top: 126px; }
  h1 { font-size: clamp(3rem, 14vw, 6rem); }
  .stat-row, .feature-strip, .section-heading.split, .leaderboard-cards, .cta-card { grid-template-columns: 1fr; }
  .screenshot-grid { grid-template-columns: 1fr 1fr; }
  .shot.feature-shot { grid-column: span 2; }
  .world-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-actions { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1160px); }
  .hero { min-height: 620px; }
  .hero-bg { background-position: center top; }
  .hero-copy { font-size: 1rem; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .screenshot-grid, .world-grid { grid-template-columns: 1fr; }
  .shot.feature-shot { grid-column: auto; grid-row: auto; }
  .feature-strip { margin-top: -24px; }
  .section { padding: 72px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
