:root {
  --bg: #050807;
  --bg2: #0a110e;
  --ink: #eef4f0;
  --muted: #93a79b;
  --accent: #2ee59d;
  --phos: #00ff40;
  --line: rgba(238, 244, 240, 0.09);
  --card: rgba(255, 255, 255, 0.03);
  --display: "Space Grotesk", "Segoe UI", sans-serif;
  --body: "DM Sans", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 72rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

/* ——— Barra superior ——— */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: linear-gradient(180deg, rgba(5, 8, 7, 0.92), rgba(5, 8, 7, 0));
  backdrop-filter: blur(6px);
}
.logo {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo span { color: var(--accent); font-weight: 700; }
.topnav { display: flex; gap: 1.4rem; margin-left: auto; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.topnav a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { min-height: 2.3rem; padding: 0.45rem 1rem; font-size: 0.88rem; }
.btn-primary { background: var(--accent); color: #03140c; box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.4); }
.btn-primary:hover { box-shadow: 0 8px 30px -6px rgba(46, 229, 157, 0.55); color: #03140c; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

/* ——— Relato con scroll ——— */
.story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  max-width: 84rem;
  margin: 0 auto;
}
.story::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 40% at 70% 12%, rgba(46, 229, 157, 0.13), transparent 70%),
    radial-gradient(40% 30% at 20% 60%, rgba(40, 210, 230, 0.06), transparent 70%);
  pointer-events: none;
}
.stage-wrap {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  align-content: center;
}
.stage {
  position: relative;
  width: 100%;
  height: min(78vh, 46rem);
}
.stage canvas { display: block; width: 100% !important; height: 100% !important; }
.stage-fallback { display: none; border-radius: 14px; }
.stage.no-webgl .stage-fallback { display: block; margin: auto; }
.stage-note {
  margin: 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.75;
}
.steps { grid-column: 1; grid-row: 1; position: relative; z-index: 1; }
.step {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem clamp(1.2rem, 4vw, 3rem) 4rem;
  opacity: 0.25;
  transition: opacity 0.5s ease;
}
.step.is-active { opacity: 1; }
.step h1, .step h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0 0 1.1rem;
}
.step h1 { font-size: clamp(2.2rem, min(4.8vw, 8.5vh), 4.4rem); }
.step h2 { font-size: clamp(1.9rem, 4vw, 3.1rem); }
.step h1 em { font-style: normal; color: var(--accent); }
.step p { color: var(--muted); font-size: 1.08rem; max-width: 31rem; margin: 0; }
.step p strong { color: var(--ink); }
.step .lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.scroll-hint {
  margin-top: 2.5rem !important;
  font-family: var(--mono);
  font-size: 0.78rem !important;
  color: var(--accent) !important;
  animation: nudge 1.8s ease-in-out infinite;
}
@keyframes nudge { 50% { transform: translateY(5px); opacity: 0.6; } }

/* ——— Banda de números ——— */
.band {
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(46, 229, 157, 0.05), transparent 60%);
}
.stats {
  list-style: none;
  margin: 0 auto;
  padding: 2.2rem clamp(1rem, 4vw, 2.5rem);
  max-width: var(--max);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stats strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stats span { color: var(--muted); font-size: 0.92rem; }

/* ——— Secciones ——— */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) clamp(1rem, 4vw, 2.5rem) 0; }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.8rem;
}
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feature {
  padding: 1.5rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.feature::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% auto;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  border: 1px solid rgba(46, 229, 157, 0.12);
  box-shadow: 0 0 0 2rem rgba(46, 229, 157, 0.025), 0 0 0 4rem rgba(46, 229, 157, 0.02);
}
.feature-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--phos);
  border: 1px solid rgba(0, 255, 64, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}
.feature h3 { font-family: var(--display); font-size: 1.2rem; margin: 1.1rem 0 0.5rem; }
.feature p { color: var(--muted); font-size: 0.95rem; margin: 0; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin: clamp(3rem, 7vw, 5rem) 0;
}
.split-media { margin: 0; }
.split-media img {
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(40, 210, 230, 0.35);
}
figcaption { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 0.7rem; }
.split-copy h3 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.checks li { padding-left: 1.7rem; position: relative; color: var(--muted); }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px rgba(46, 229, 157, 0.6);
}

.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.mini { padding: 1.3rem 1.3rem 1.2rem; border-top: 1px solid rgba(46, 229, 157, 0.35); background: linear-gradient(180deg, rgba(46, 229, 157, 0.05), transparent); border-radius: 4px; }
.mini h4 { margin: 0 0 0.4rem; font-size: 1.02rem; }
.mini p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ——— Temas ——— */
.theme-viewer img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.chip {
  font: 700 0.85rem var(--mono);
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  background: #000;
  color: var(--c);
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 18px -2px color-mix(in srgb, var(--c) 60%, transparent); }
.chip-verde { --c: rgb(0, 255, 64); }
.chip-celes { --c: rgb(40, 210, 230); }
.chip-blanc { --c: rgb(230, 235, 240); }
.chip-ambar { --c: rgb(255, 175, 50); }
.chip-multi { --c: rgb(180, 220, 120); }
.fineprint { color: var(--muted); font-size: 0.82rem; margin: 0.9rem 0 0; }

/* ——— Diseño ——— */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img { border-radius: 16px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }

.specs {
  margin-top: 2.5rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}
.specs h3 { font-family: var(--display); margin: 0 0 1.2rem; font-size: 1.3rem; }
.specs dl { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2.5rem; }
.specs dl div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.specs dt { font-family: var(--mono); font-size: 0.78rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; padding-top: 0.15rem; }
.specs dd { margin: 0; color: var(--ink); }

/* ——— Novedades ——— */
.changelog { list-style: none; margin: 0; padding: 0; border-left: 1px solid rgba(46, 229, 157, 0.3); }
.changelog li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 1rem 0 1rem 1.5rem; position: relative; color: var(--muted); }
.changelog li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 1.35rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid rgba(46, 229, 157, 0.5);
}
.changelog li.is-latest::before { background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.changelog strong { color: var(--ink); }
.ver { font-family: var(--mono); font-weight: 700; color: var(--accent); }

/* ——— Contacto ——— */
.contact { padding-bottom: clamp(4rem, 9vw, 7rem); }
.contact-card {
  text-align: center;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.2rem, 4vw, 3rem);
  border-radius: 28px;
  border: 1px solid rgba(46, 229, 157, 0.25);
  background:
    repeating-radial-gradient(circle at 50% 120%, transparent 0 46px, rgba(46, 229, 157, 0.06) 46px 47px),
    radial-gradient(70% 90% at 50% 100%, rgba(46, 229, 157, 0.16), transparent 70%);
}
.contact-card h2 { font-family: var(--display); font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -0.03em; margin: 0 0 0.8rem; }
.contact-card p { color: var(--muted); margin: 0 auto; max-width: 30rem; }
.contact-card .cta { justify-content: center; }

.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.8rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ——— Aparición ——— */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ——— Responsive ——— */
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .specs dl { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .topnav { display: none; }
  .topbar .btn { margin-left: auto; }
  .story { grid-template-columns: 1fr; }
  .stage-wrap { grid-column: 1; height: 56svh; top: 3.5rem; align-content: start; z-index: 0; }
  .stage { height: 50svh; }
  .steps { grid-column: 1; grid-row: 2; margin-top: -10svh; }
  .step {
    min-height: 85svh;
    justify-content: flex-end;
    padding: 2rem 1.2rem 3rem;
    background: linear-gradient(180deg, transparent, rgba(5, 8, 7, 0.92) 35%);
  }
  .step:first-child { min-height: 60svh; }
  .split { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .mini-grid, .feature-grid { grid-template-columns: 1fr; }
  .changelog li { grid-template-columns: 1fr; gap: 0.2rem; }
  .specs dl div { grid-template-columns: 7rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
}
