:root {
  --bg: #05060a;
  --ink: #eef1f8;
  --muted: #8b93a7;
  --accent: #ff3d5a;   /* ESP red */
  --accent2: #35e0d8;  /* cyan */
  --glass: rgba(18, 21, 32, 0.55);
  --stroke: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #0b1020, #05060a 70%);
  transition: opacity 0.8s ease, visibility 0.8s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { display: grid; place-items: center; gap: 22px; }
.loader-ring {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.12);
  border-top-color: var(--accent);
  border-right-color: var(--accent2);
  animation: spin 0.9s linear infinite;
}
.loader-text {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: 0.4em; color: var(--muted);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{opacity:.4} 50%{opacity:1} }

/* ---------- Scene ---------- */
#scene { position: fixed; inset: 0; z-index: 1; }
#scene canvas { display: block; }

/* subtle vignette + grid over the canvas */
.ui::before {
  content: "";
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(120% 90% at 70% 30%, transparent 55%, rgba(5,6,10,0.75) 100%),
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px) 0 0 / 44px 100%;
}

/* ---------- UI layout ---------- */
.ui {
  position: fixed; inset: 0; z-index: 3;
  display: flex; flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.ui a, .ui button { pointer-events: auto; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 40px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 20px; font-weight: 700; letter-spacing: 0.02em;
}
.brand b { color: var(--accent); font-weight: 700; }
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 14px var(--accent2);
  animation: pulse 2s ease-in-out infinite;
}
.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  font-weight: 500; transition: color 0.25s; cursor: pointer;
}
.nav a:hover, .nav a.active { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  padding: 0 40px;
  max-width: 640px;
  margin-top: -4vh;
}
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px; letter-spacing: 0.28em; color: var(--accent2);
  margin-bottom: 20px;
}
h1 {
  font-size: clamp(36px, 6vw, 74px);
  line-height: 0.98; font-weight: 700; letter-spacing: -0.02em;
}
.grad {
  background: linear-gradient(100deg, var(--accent), #ff8a5a 40%, var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede {
  margin-top: 22px; max-width: 460px;
  color: var(--muted); font-size: 16px; line-height: 1.6;
}
.cta { display: flex; gap: 14px; margin-top: 30px; }
.btn {
  font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 13px 24px; border-radius: 40px; cursor: pointer;
  border: 1px solid var(--stroke); transition: transform .2s, box-shadow .3s, background .3s;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn.primary {
  background: linear-gradient(100deg, var(--accent), #ff6a4a);
  color: #fff; border: none;
  box-shadow: 0 8px 30px rgba(255,61,90,0.35);
}
.btn.primary:hover { box-shadow: 0 10px 40px rgba(255,61,90,0.55); }
.btn.ghost {
  background: var(--glass); color: var(--ink);
  backdrop-filter: blur(10px);
}
.btn.ghost:hover { background: rgba(255,255,255,0.08); }

/* ---------- Stats ---------- */
.stats {
  list-style: none; display: flex; gap: 40px;
  padding: 0 40px; margin-top: 40px;
}
.stats li { display: flex; flex-direction: column; }
.stats b {
  font-size: 30px; font-weight: 700;
  background: linear-gradient(180deg, #fff, #9aa4bd);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats span { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ---------- Specs strip ---------- */
.specs {
  position: absolute; right: 40px; top: 50%;
  transform: translateY(-50%);
  display: grid; gap: 10px; width: 230px;
  pointer-events: none;
}
.spec-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--stroke);
  backdrop-filter: blur(14px);
  opacity: 0; transform: translateX(30px);
  animation: slideIn 0.6s forwards;
}
.specs .spec-card:nth-child(1){ animation-delay: .1s }
.specs .spec-card:nth-child(2){ animation-delay: .18s }
.specs .spec-card:nth-child(3){ animation-delay: .26s }
.specs .spec-card:nth-child(4){ animation-delay: .34s }
.specs .spec-card:nth-child(5){ animation-delay: .42s }
.specs .spec-card:nth-child(6){ animation-delay: .5s }
@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }
.spec-card .k {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
}
.spec-card .v { font-size: 13px; font-weight: 600; }

/* ---------- Footer ---------- */
.foot {
  display: flex; justify-content: space-between;
  padding: 22px 40px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.05em;
}
.foot .hint { color: var(--accent2); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .specs { display: none; }
  .nav a:not(.active):not(#toggle-rotate) { display: none; }
}
@media (max-width: 620px) {
  .topbar, .hero, .stats, .foot { padding-left: 22px; padding-right: 22px; }
  .stats { gap: 22px; flex-wrap: wrap; }
  .stats b { font-size: 24px; }
  .foot { flex-direction: column; gap: 6px; }
}
