:root {
  --bg: #05070d;
  --surface: #090f1c;
  --surface-light: #101a30;
  --blue: #0055ff;
  --blue-light: #2f7bff;
  --white: #f7f9ff;
  --text: #e8ecf5;
  --muted: #aeb8ca;
  --line: rgba(62, 131, 255, 0.28);

  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --size-caption: 0.78rem;
  --size-small: 0.9rem;
  --size-body: 1rem;
  --size-card-title: 1.08rem;
  --size-hero-title: clamp(1.45rem, 3vw, 2rem);
  --size-section-title: clamp(2rem, 4vw, 3rem);

  --radius-small: 10px;
  --radius: 16px;
  --radius-card: 20px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--size-body);
  line-height: 1.65;
}

img {
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.narrow {
  max-width: 720px;
  text-align: center;
}

.center {
  margin-top: 36px;
  text-align: center;
}

/* Navegación */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(0, 85, 255, 0.18);
  background: rgba(5, 7, 13, 0.82);
  backdrop-filter: blur(14px) saturate(145%);
  -webkit-backdrop-filter: blur(14px) saturate(145%);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
}

.nav-name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
}

.nav-name b {
  color: var(--blue-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a:not(.btn) {
  color: var(--muted);
  font-size: var(--size-small);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:not(.btn):hover {
  color: var(--white);
}

/* Marco de logo */

.logo-frame {
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(47, 123, 255, 0.58);
  background: linear-gradient(
    145deg,
    rgba(20, 49, 104, 0.9),
    rgba(4, 8, 18, 0.98)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 8px 22px rgba(0, 30, 100, 0.3);
}

.logo-frame.has-logo {
  display: inline-flex;
}

.logo-frame-nav {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.logo-frame-hero {
  width: 96px;
  height: 96px;
  border-radius: 18px;
}

.logo-img,
.logo-hero {
  display: block;
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.logo-img[hidden],
.logo-hero[hidden] {
  display: none;
}

/* Botones */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  background: var(--blue);
  box-shadow: 0 0 28px rgba(0, 85, 255, 0.4);
  color: #fff;
  font-size: var(--size-body);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--blue-light);
  box-shadow: 0 12px 32px rgba(0, 85, 255, 0.36);
}

.btn-lg {
  min-height: 56px;
  padding: 17px 38px;
  font-size: 1.05rem;
}

.btn-sm {
  min-height: 36px;
  padding: 8px 17px;
  box-shadow: none;
  font-size: var(--size-small);
}

a:focus-visible,
button:focus-visible,
.result-card:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* Menú móvil */

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
}

.mobile-menu {
  position: absolute;
  top: 64px;
  right: 0;
  left: 0;
  padding: 12px 4%;
  border-bottom: 1px solid rgba(0, 85, 255, 0.22);
  background: rgba(5, 7, 13, 0.98);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a:not(.btn) {
  display: block;
  padding: 12px;
  color: var(--muted);
  font-size: var(--size-body);
  text-decoration: none;
}

.mobile-menu .btn {
  width: 100%;
  margin-top: 8px;
}

/* Hero */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: calc(100svh - 64px);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 0%, #172b4c 0%, transparent 54%),
    radial-gradient(ellipse at 88% 95%, #09265f 0%, transparent 49%),
    var(--bg);
  text-align: center;
}

.hero::before,
.hero::after {
  position: absolute;
  width: 3px;
  height: 70%;
  background: var(--blue);
  box-shadow: 0 0 18px var(--blue);
  content: "";
  opacity: 0.65;
  transform: rotate(35deg);
}

.hero::before {
  top: -10%;
  left: 4%;
}

.hero::after {
  right: 5%;
  bottom: -15%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(5, 7, 13, 0.12),
    rgba(5, 7, 13, 0.88)
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 70px 0;
}

.hero-brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.crown {
  width: 78px;
  margin-bottom: 5px;
  filter: drop-shadow(0 0 10px var(--blue));
}

.hero-brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.hero-brand-text {
  text-align: center;
}

.brand {
  color: #fff;
  font-size: clamp(3.4rem, 10vw, 7rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 0.9;
  text-shadow: 0 4px 30px rgba(0, 85, 255, 0.35);
}

.brand-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--blue-light);
  font-size: clamp(1rem, 2.8vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand-sub span {
  width: clamp(25px, 7vw, 100px);
  height: 3px;
  background: var(--blue);
}

.headline {
  margin-top: 30px;
  font-size: var(--size-hero-title);
  font-weight: 700;
  line-height: 1.25;
}

.lead {
  max-width: 650px;
  margin: 15px auto 28px;
  color: var(--muted);
  font-size: var(--size-body);
  line-height: 1.7;
}

.lead strong {
  color: var(--white);
}

.microcopy {
  margin-top: 11px;
  color: var(--muted);
  font-size: var(--size-caption);
  font-weight: 500;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 25px;
  list-style: none;
}

.badges li {
  padding: 6px 14px;
  border: 1px solid rgba(0, 85, 255, 0.58);
  border-radius: 999px;
  color: var(--muted);
  font-size: var(--size-small);
}

/* Secciones */

.section {
  padding: clamp(70px, 9vw, 104px) 0;
}

.section.alt {
  background: var(--surface);
}

.title {
  margin-bottom: 16px;
  color: var(--white);
  font-size: var(--size-section-title);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.card {
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #121e37, #0d1425);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.icon {
  margin-bottom: 11px;
  font-size: 2rem;
}

.card h3 {
  margin-bottom: 8px;
  color: var(--white);
  font-size: var(--size-card-title);
  font-weight: 700;
  line-height: 1.3;
}

.card p,
.results-copy {
  color: var(--muted);
  font-size: var(--size-small);
  line-height: 1.65;
}

/* Resultados */

.results-heading {
  max-width: 670px;
  margin: 0 auto 34px;
  text-align: center;
}

.results-heading .title {
  margin-bottom: 12px;
}

.results-copy {
  font-size: var(--size-body);
  line-height: 1.7;
}

.note {
  max-width: 480px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: var(--size-caption);
  line-height: 1.55;
}

/* Ruleta horizontal 3D */

.roulette-stage {
  position: relative;
  height: 430px;
  margin: 0 auto;
  overflow: hidden;
  perspective: 1200px;
  touch-action: pan-y;
  user-select: none;
}

.roulette-stage[hidden] {
  display: none;
}

.roulette-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, 95%);
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(0, 85, 255, 0.22),
    rgba(0, 35, 140, 0.08) 48%,
    transparent 73%
  );
  filter: blur(20px);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.roulette-floor {
  position: absolute;
  bottom: 25px;
  left: 50%;
  width: min(660px, 86%);
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(0, 85, 255, 0.24),
    rgba(0, 25, 80, 0.08) 46%,
    transparent 72%
  );
  filter: blur(7px);
  pointer-events: none;
  transform: translateX(-50%);
}

.roulette-track {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.result-card {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 224px;
  height: 296px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid rgba(62, 135, 255, 0.5);
  border-radius: var(--radius-card);
  background: linear-gradient(
    145deg,
    rgba(25, 58, 117, 0.97),
    rgba(4, 8, 19, 0.99)
  );
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.56);
  cursor: pointer;
  opacity: 0;
  transform:
    translate(-50%, -50%)
    translateX(0)
    translateZ(0)
    rotateY(0)
    scale(0.8);
  transform-style: preserve-3d;
  will-change: transform, opacity, filter;
}

.result-card::before {
  position: absolute;
  z-index: 2;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  content: "";
  pointer-events: none;
}

.result-card::after {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 9px;
  left: 9px;
  height: 32%;
  border-radius: 14px 14px 32px 32px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.14),
    transparent 84%
  );
  content: "";
  pointer-events: none;
}

.result-card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  background: #070a12;
  object-fit: contain;
  pointer-events: none;
}

.result-card.is-active {
  border-color: rgba(75, 148, 255, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.15),
    0 0 0 1px rgba(47, 123, 255, 0.45),
    0 28px 70px rgba(0, 50, 185, 0.62);
}

.roulette-hint {
  max-width: 680px;
  margin: -4px auto 0;
  color: var(--muted);
  font-size: var(--size-caption);
  line-height: 1.55;
  text-align: center;
}

.picks-empty {
  max-width: 560px;
  margin: 0 auto;
  padding: 26px;
  border: 1px dashed rgba(0, 85, 255, 0.44);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: var(--size-small);
  text-align: center;
}

.picks-empty[hidden] {
  display: none;
}

/* Pasos */

.steps-wrap {
  max-width: 700px;
}

.steps {
  display: grid;
  gap: 16px;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  border: 1px solid rgba(0, 85, 255, 0.12);
  border-radius: var(--radius-small);
  background: var(--surface-light);
  font-size: var(--size-body);
}

.steps span {
  display: grid;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.about p {
  color: var(--muted);
  font-size: var(--size-body);
  line-height: 1.75;
}

/* CTA final */

.cta {
  padding: clamp(70px, 9vw, 104px) 0;
  background: linear-gradient(135deg, #0a2a6b, #0055ff 70%);
  text-align: center;
}

.cta h2 {
  font-size: var(--size-section-title);
  font-weight: 800;
  line-height: 1.15;
}

.cta p {
  margin: 12px 0 27px;
  font-size: var(--size-body);
}

.cta .btn {
  background: #fff;
  box-shadow: none;
  color: var(--blue);
}

/* Footer */

.footer {
  padding: 34px 0 94px;
  color: var(--muted);
  font-size: var(--size-caption);
  line-height: 1.65;
  text-align: center;
}

.footer p + p {
  margin-top: 9px;
}

.float-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 20px rgba(0, 85, 255, 0.6);
  color: #fff;
  font-size: var(--size-small);
  font-weight: 700;
  text-decoration: none;
}

/* Modal */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.92);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 100%;
  max-height: 90svh;
  padding: 5px;
  border: 1px solid rgba(47, 123, 255, 0.56);
  border-radius: var(--radius);
  background: #071022;
}

.lightbox button {
  position: absolute;
  top: 12px;
  right: 20px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
  font-size: 2.7rem;
  line-height: 1;
}

/* Tablet */

@media (min-width: 901px) {
  .float-btn {
    display: none;
  }
}

@media (max-width: 900px) {
  .nav-links a:not(.btn),
  .nav-links .btn {
    display: none;
  }

  .nav-links {
    margin-left: auto;
  }

  .menu-toggle {
    display: block;
  }

  .roulette-stage {
    height: 385px;
  }

  .result-card {
    width: 192px;
    height: 258px;
  }
}

/* Móvil: corrección principal de visibilidad */

@media (max-width: 640px) {
  .container {
    width: min(100% - 32px, 1100px);
  }

  .nav-inner {
    height: 58px;
  }

  .mobile-menu {
    top: 58px;
  }

  .nav-name {
    font-size: 1rem;
  }

  .logo-frame-nav {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: calc(100svh - 58px);
  }

  .hero-content {
    padding: 56px 0;
  }

  .crown {
    width: 64px;
  }

  .hero-brand-row {
    gap: 12px;
  }

  .logo-frame-hero {
    width: 66px;
    height: 66px;
    border-radius: 14px;
  }

  .brand {
    font-size: clamp(2.8rem, 13vw, 4.5rem);
  }

  .brand-sub {
    gap: 9px;
    font-size: 0.92rem;
    letter-spacing: 0.13em;
  }

  .brand-sub span {
    width: 20px;
  }

  .headline {
    margin-top: 25px;
  }

  .btn-lg {
    width: 100%;
  }

  .badges {
    align-items: flex-start;
    flex-direction: column;
    width: max-content;
    margin: 22px auto 0;
  }

  .section {
    padding: 70px 0;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  /*
    El alto se fija para que la ruleta tenga espacio visible.
    Las tarjetas están centradas vertical y horizontalmente.
  */
  .roulette-stage {
    height: 330px;
    min-height: 330px;
    margin: 0 -16px;
    overflow: hidden;
  }

  .roulette-track {
    height: 330px;
  }

  /*
    La imagen central se ve completa en teléfonos.
    Las laterales aparecen parcialmente para dar efecto de ruleta.
  */
  .result-card {
    width: 158px;
    height: 218px;
    padding: 5px;
    border-radius: 17px;
  }

  .result-card img {
    border-radius: 11px;
  }

  .result-card::before {
    inset: 2px;
    border-radius: 13px;
  }

  .roulette-floor {
    bottom: 35px;
    width: 82%;
  }

  .roulette-glow {
    top: 50%;
    width: 110%;
    height: 220px;
  }

  .roulette-hint {
    max-width: 260px;
    margin: 8px auto 0;
    padding: 0 4px;
  }

  .center {
    margin-top: 30px;
  }

  /*
    El botón flotante se mueve un poco arriba para no tapar
    contenido importante en navegadores móviles.
  */
  .float-btn {
    right: 14px;
    bottom: 78px;
    padding: 11px 18px;
  }

  .footer {
    padding-bottom: 150px;
  }
}

/* Preferencia de movimiento reducido */

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