/* =========================================================
   Vaivén — landing / página de presentación
   Paleta tomada del propio juego (index.html):
   fondo #0b1026 · índigo #818cf8/#a5b4fc · chispa #fcd34d
   ========================================================= */

:root {
  --bg:        #0b1026;
  --bg-2:      #0f1530;
  --ink:       #e2e8f0;
  --ink-soft:  #94a3b8;
  --ink-dim:   #64748b;
  --indigo:    #818cf8;
  --indigo-2:  #a5b4fc;
  --gold:      #fcd34d;
  --line:      rgba(148, 163, 184, .14);
  --card:      rgba(148, 163, 184, .055);
  --radius:    18px;
  --maxw:      1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Sora', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* lienzo de estrellas a pantalla completa, detrás de todo */
#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  display: block;
}
body::before {  /* halo índigo superior */
  content: "";
  position: fixed;
  top: -30vh; left: 50%;
  width: 120vw; height: 80vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(129, 140, 248, .18), transparent 60%);
  z-index: -1;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { display: block; }

/* ---------------- NAV ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  max-width: var(--maxw);
  margin: 0 auto;
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 9px; }
.brand-name {
  font-weight: 800;
  letter-spacing: .22em;
  font-size: 16px;
}
.nav-cta {
  font-weight: 600;
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--indigo-2);
  transition: border-color .2s, background .2s;
}
.nav-cta:hover { border-color: var(--indigo); background: rgba(129, 140, 248, .1); }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* ---------------- HERO ---------------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(36px, 7vw, 80px) 0 clamp(48px, 8vw, 96px);
}
.hero-copy { min-width: 0; }
.badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold);
  background: rgba(252, 211, 77, .1);
  border: 1px solid rgba(252, 211, 77, .35);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(38px, 6.5vw, 66px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.02em;
  margin: 0 0 20px;
}
.grad {
  background: linear-gradient(100deg, var(--indigo-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--ink-soft);
  max-width: 30em;
  margin: 0 0 30px;
}

/* botón de descarga */
.dl-block { margin-bottom: 18px; }
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 17px;
  font-weight: 700;
  color: #0b1026;
  background: linear-gradient(135deg, var(--indigo-2), var(--indigo));
  padding: 15px 30px;
  border-radius: 999px;
  box-shadow: 0 10px 34px -8px rgba(129, 140, 248, .7);
  transition: transform .15s ease, box-shadow .2s ease, filter .2s;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(129, 140, 248, .85); filter: brightness(1.05); }
.btn-download:active { transform: translateY(0); }
.btn-download svg { flex: none; }
.dl-meta { margin: 12px 2px 0; font-size: 13.5px; color: var(--ink-dim); }
.dl-hint {
  margin: 10px 2px 0;
  font-size: 13.5px;
  color: var(--gold);
  background: rgba(252, 211, 77, .07);
  border: 1px solid rgba(252, 211, 77, .25);
  border-radius: 10px;
  padding: 8px 12px;
  max-width: 24em;
}
.how-link { color: var(--indigo-2); font-weight: 600; font-size: 14.5px; }
.how-link:hover { text-decoration: underline; }

/* maqueta de móvil */
.hero-phone { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 296px;
  max-width: 78vw;
  aspect-ratio: 296 / 612;
  background: #05070f;
  border: 8px solid #1b2238;
  border-radius: 40px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(148, 163, 184, .1);
  overflow: hidden;
  z-index: 2;
}
.phone-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 20px;
  background: #1b2238;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
#demo { width: 100%; height: 100%; display: block; }
.phone-tap {
  position: absolute;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--ink-soft);
  background: rgba(11, 16, 38, .6);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  z-index: 3;
  animation: tapPulse 2.4s ease-in-out infinite;
}
@keyframes tapPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.phone-glow {
  position: absolute;
  inset: -10% -20%;
  background: radial-gradient(ellipse at center, rgba(129, 140, 248, .25), transparent 65%);
  filter: blur(30px);
  z-index: 1;
}

/* ---------------- SECCIONES ---------------- */
.section-title {
  text-align: center;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 clamp(28px, 5vw, 48px);
}

/* features */
.features { padding: clamp(24px, 5vw, 56px) 0; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform .18s ease, border-color .2s, background .2s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(129, 140, 248, .4); background: rgba(129, 140, 248, .06); }
.card .ic {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 24px;
  color: var(--c, var(--indigo-2));
  background: color-mix(in srgb, var(--c, var(--indigo-2)) 14%, transparent);
  border-radius: 13px;
  margin-bottom: 16px;
  text-shadow: 0 0 16px var(--c, var(--indigo-2));
}
.card h3 { margin: 0 0 7px; font-size: 18px; font-weight: 700; }
.card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }

/* instalar */
.install { padding: clamp(36px, 6vw, 72px) 0; }
.install-intro { text-align: center; color: var(--ink-soft); max-width: 36em; margin: -18px auto 38px; }
.steps {
  list-style: none;
  counter-reset: s;
  margin: 0 auto;
  padding: 0;
  max-width: 640px;
  display: grid;
  gap: 14px;
}
.steps li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.step-n {
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  font-weight: 800;
  color: #0b1026;
  background: linear-gradient(135deg, var(--indigo-2), var(--indigo));
  border-radius: 50%;
}
.steps h3 { margin: 2px 0 5px; font-size: 17px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.steps code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  background: rgba(148, 163, 184, .12);
  padding: 1px 7px;
  border-radius: 6px;
}
.install-note {
  text-align: center;
  color: var(--ink-dim);
  font-size: 13.5px;
  max-width: 40em;
  margin: 30px auto 0;
}

/* ---------------- FOOTER ---------------- */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 40px clamp(16px, 4vw, 40px) 56px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 13.5px;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--ink);
  margin-bottom: 10px;
}
.foot-brand img { border-radius: 7px; }
.foot p { margin: 4px 0; }
.foot-ver { color: var(--ink-dim); opacity: .8; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 24px;
  }
  .hero-copy { order: 2; }
  .hero-phone { order: 1; margin-bottom: 8px; }
  .lead { margin-left: auto; margin-right: auto; }
  .dl-hint { margin-left: auto; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
}
