/* Landing de Atina.
   Concepto: la hoja de respuestas del examen. Fondo de tinta con
   cuadrícula de papel milimetrado, burbujas A-B-C-D como motivo, el punto
   ámbar de la «i» de Atina como diana. Un solo look oscuro (la marca ya
   vive sobre tinta en la app), colores de categoría iguales a la app:
   teoría azul, psicotécnicos turquesa, personalidad coral, simulacro ámbar. */

@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* Colores de la marca (marca/entregables/atina/LEEME.md): noche, azul,
     blanco roto, turquesa y ámbar. */
  --bg: #0b1b2b;
  --bg-2: #0e2133;
  --panel: #12283d;
  --panel-2: #18324b;
  --line: rgba(156, 196, 235, 0.14);
  --line-strong: rgba(156, 196, 235, 0.28);
  --fg: #f7f9fb;
  --muted: #94a9bf;
  --blue: #2f8fea;
  --blue-deep: #1e6fd9;
  --amber: #f5a623;
  --teal: #4fb3bf;
  --coral: #f07a62;
  --violet: #8b6cff;
  --right: #2fca73;
  --wrong: #f2726b;
  --on-amber: #0b1b2b;

  --font-display: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.9rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3.2rem);
  --step-4: clamp(2.8rem, 1.4rem + 4.6vw, 5.2rem);

  --radius: 18px;
  --radius-sm: 12px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
  /* Papel milimetrado muy tenue. */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(47, 143, 234, 0.18), transparent 60%),
    radial-gradient(40rem 30rem at 0% 30%, rgba(245, 166, 35, 0.08), transparent 60%),
    linear-gradient(transparent, var(--bg) 85%);
  z-index: -1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--blue);
}
a:hover {
  color: #7cc0ff;
}
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}
[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--amber);
  color: var(--on-amber);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 100;
  font-weight: 700;
}
.skip:focus {
  top: 12px;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.muted {
  color: var(--muted);
}
/* Aviso de convocatoria encima del titular (data-until lo caduca). */
.news-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 166, 35, 0.45);
  background: rgba(245, 166, 35, 0.12);
  color: var(--fg);
  font-size: var(--step--1);
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.news-pill:hover,
.news-pill:focus-visible {
  background: rgba(245, 166, 35, 0.22);
  border-color: var(--amber);
}
.news-pill strong {
  color: var(--amber);
  font-weight: 700;
}
.news-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--right);
  box-shadow: 0 0 0 4px rgba(47, 202, 115, 0.2);
}
.eyebrow-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.eyebrow-link:hover {
  color: var(--fg);
}
.small {
  font-size: var(--step--1);
}
.center {
  text-align: center;
}

/* ---------- Marca ---------- */
.brand-logo {
  display: block;
  height: 30px;
  width: auto;
}
/* El anillo del símbolo se dibuja al cargar (arco de 270°, ver LEEME de la marca). */
.brand-logo #anillo {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: draw-ring 1.1s 0.2s var(--ease) forwards;
}
.brand-logo #punto-ambar {
  transform-box: fill-box;
  transform-origin: center;
  animation: pop 0.5s 1.1s var(--ease) both;
}
@keyframes draw-ring {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes pop {
  from {
    transform: scale(0);
  }
  70% {
    transform: scale(1.3);
  }
}
.footer-logo {
  height: 32px;
  width: auto;
}
.app-logo {
  height: 18px;
  width: auto;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: 0 10px 30px -10px rgba(245, 166, 35, 0.6);
}
.btn-primary:hover {
  color: var(--on-amber);
  background: #ffb840;
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  color: var(--fg);
  border-color: var(--fg);
}
.btn-lg {
  padding: 18px 26px;
  font-size: 1.05rem;
}
.btn-sm {
  padding: 10px 16px;
  font-size: 0.95rem;
}
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Navegación ---------- */
.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(7, 18, 29, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-beta {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--amber);
  border: 1px solid rgba(245, 166, 35, 0.5);
  border-radius: 6px;
  padding: 3px 6px;
}
.menu {
  display: flex;
  align-items: center;
  gap: 22px;
}
.menu a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.menu a:not(.btn):hover {
  color: var(--fg);
}
.menu-login {
  color: var(--fg) !important;
}
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s var(--ease);
}
.menu-bars::before,
.menu-bars::after {
  content: "";
  position: relative;
}
.menu-bars::before {
  top: -6px;
}
.menu-bars::after {
  top: 4px;
}
.menu-toggle[aria-expanded="true"] .menu-bars {
  background: transparent;
}
.menu-toggle[aria-expanded="true"] .menu-bars::before {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 960px) {
  .menu-toggle {
    display: block;
  }
  .menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px var(--gutter-r) 20px var(--gutter);
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .menu.is-open {
    display: flex;
  }
  .menu a:not(.btn) {
    padding: 12px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line);
  }
  .menu .btn {
    margin-top: 10px;
  }
}

/* ---------- Hoja de respuestas lateral ---------- */
.rail {
  position: fixed;
  right: max(18px, env(safe-area-inset-right, 0px));
  top: 50%;
  translate: 0 -50%;
  z-index: 40;
  display: none;
  padding: 14px 10px;
  border-radius: 16px;
  background: rgba(11, 27, 43, 0.75);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.rail-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 auto 10px;
}
.rail ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.rail a {
  position: relative;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.rail-bubble {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
.rail a.is-filled .rail-bubble {
  background: var(--fg);
  border-color: var(--fg);
  color: var(--bg);
}
.rail a[aria-current] .rail-bubble {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--on-amber);
  transform: scale(1.15);
}
.rail-label {
  position: absolute;
  right: calc(100% + 12px);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg);
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 8px;
  opacity: 0;
  translate: 6px 0;
  pointer-events: none;
  transition: opacity 0.2s, translate 0.2s;
}
.rail a:hover .rail-label,
.rail a:focus-visible .rail-label {
  opacity: 1;
  translate: 0 0;
}
@media (min-width: 1280px) {
  .rail {
    display: block;
  }
}

/* ---------- Héroe ---------- */
.hero-stage {
  position: relative;
}
/* Solo con el cubo cargado (y en pantallas anchas) el héroe se queda
   fijo mientras se despliega; sin él, la página no tiene scroll vacío. */
.has-cube .hero-stage {
  height: 210vh;
}
.hero-sticky {
  position: relative;
  top: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 96px 40px;
  overflow: hidden;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
}
.hero-copy {
  display: grid;
  gap: 24px;
  min-width: 0;
  transition: opacity 0.4s, transform 0.4s;
}
.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--right);
  box-shadow: 0 0 0 0 rgba(47, 202, 115, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(47, 202, 115, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 202, 115, 0);
  }
}
.hero-title {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
}
.hero-accent {
  color: var(--amber);
}
.hero-lead {
  font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.3rem);
  color: #c7d6e5;
  max-width: 38ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.has-cube .hero-sticky {
  position: sticky;
}
/* Oposiciones disponibles: Ertzaintza destaca, pero se ve que hay más. */
.exam-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exam-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fg);
  text-decoration: none;
}
.exam-chip.is-main {
  border-color: var(--amber);
  background: rgba(245, 166, 35, 0.12);
}
.exam-chip.is-ask {
  border-style: dashed;
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s;
}
.exam-chip.is-ask:hover {
  color: var(--fg);
  border-color: var(--fg);
}
.exam-chip.is-soon {
  color: var(--teal);
  border-color: rgba(79, 179, 191, 0.5);
}
.exam-chip.is-soon:hover {
  color: var(--fg);
  border-color: var(--teal);
}
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1.05;
  max-width: 100%;
  min-width: 0;
}
.cube-canvas {
  position: absolute;
  inset: -12% -18%;
  width: 136%;
  height: 124%;
  display: block;
  opacity: 0;
  transition: opacity 0.8s;
}
.has-cube .cube-canvas {
  opacity: 1;
}
.cube-fallback {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  filter: drop-shadow(0 30px 60px rgba(47, 143, 234, 0.25));
  animation: float 6s ease-in-out infinite;
  transition: opacity 0.6s;
}
.has-cube .cube-fallback {
  opacity: 0;
}
@keyframes float {
  50% {
    transform: translateY(-10px);
  }
}
.unfold-caption {
  position: absolute;
  right: calc(100% + 32px);
  bottom: 18%;
  width: 380px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(11, 27, 43, 0.85);
  border: 1px solid var(--line);
  display: grid;
  gap: 4px;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}
.scroll-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  translate: -50% 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-hint::after {
  content: "";
  width: 2px;
  height: 28px;
  background: linear-gradient(var(--amber), transparent);
  animation: drip 1.8s infinite;
}
@keyframes drip {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}
/* Cuando el cubo se despliega (lo marca el script con la clase). */
.is-unfolded .hero-copy {
  opacity: 0.06;
  transform: translateX(-24px);
}
.is-unfolded .unfold-caption {
  opacity: 1;
  transform: translateY(0);
}
.is-unfolded .scroll-hint {
  opacity: 0;
}
.scroll-hint {
  transition: opacity 0.3s;
}

@media (max-width: 860px) {
  .has-cube .hero-stage {
    height: auto;
  }
  .has-cube .hero-sticky,
  .hero-sticky {
    position: relative;
    min-height: 0;
    padding-block: 32px 64px;
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    order: -1;
    width: min(360px, 82vw);
    margin-inline: auto;
    aspect-ratio: 1;
  }
  .cube-canvas {
    inset: -20%;
    width: 140%;
    height: 140%;
  }
  .unfold-caption,
  .scroll-hint {
    display: none;
  }
}

/* ---------- Secciones ---------- */
.band {
  position: relative;
  padding-block: clamp(72px, 10vw, 128px);
}
/* Bloques secundarios (oposiciones, FAQ): menos aire, se leen de pasada. */
.band-tight {
  padding-block: clamp(40px, 6vw, 72px);
}
.opos {
  display: grid;
  gap: 16px;
}
.opos .section-title {
  margin-top: 0;
}
.faq-title {
  font-size: var(--step-2);
}
.section-title {
  font-size: var(--step-3);
  font-weight: 700;
  margin-top: 12px;
  max-width: 20ch;
}
.section-lead {
  margin-top: 16px;
  max-width: 62ch;
  color: #c7d6e5;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split-reverse > :first-child {
  order: 2;
}
.split-copy {
  display: grid;
  gap: 18px;
  min-width: 0;
}
.split-copy > p:not(.eyebrow) {
  max-width: 58ch;
  color: #c7d6e5;
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split-reverse > :first-child {
    order: 0;
  }
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ticks li {
  position: relative;
  padding-left: 30px;
  color: #c7d6e5;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2307121d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.ticks strong {
  color: var(--fg);
}

/* Aparición: el contenido es visible sin JS; solo se anima si se puede. */
.can-reveal [data-reveal] {
  opacity: 0.35;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.can-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.chip-theory {
  color: var(--blue);
}
.chip-psychometric {
  color: var(--teal);
}
.chip-personality {
  color: var(--coral);
}

.card-kicker {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Cita legal (feedback de la demo). */
.law-chip {
  display: inline-block;
  width: fit-content;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  background: rgba(47, 143, 234, 0.12);
  border: 1px solid rgba(47, 143, 234, 0.4);
  border-radius: 6px;
  padding: 3px 8px;
}

/* ---------- Demo ---------- */
.band-demo {
  background: linear-gradient(180deg, transparent, rgba(47, 143, 234, 0.06) 30%, transparent);
}
.demo-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.demo-intro {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 100px;
}
.demo-intro > p:not(.eyebrow) {
  color: #c7d6e5;
}
.sheet-card {
  margin-top: 8px;
  padding: 18px;
  border-radius: var(--radius);
  background: #f4f1e8;
  color: #1d2b3a;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
  transform: rotate(-1.2deg);
}
.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b0412f;
  border-bottom: 1.5px solid rgba(176, 65, 47, 0.35);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.sheet {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.sheet-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: 8px;
}
.sheet-row.is-current {
  background: rgba(245, 166, 35, 0.18);
}
.sheet-num {
  width: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.bubble {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid #b0412f;
  color: #b0412f;
  font-size: 0.7rem;
  font-weight: 700;
  transition: background 0.3s, color 0.3s;
}
.bubble.is-filled {
  background: #1d2b3a;
  border-color: #1d2b3a;
  color: #f4f1e8;
  animation: ink 0.35s var(--ease);
}
@keyframes ink {
  from {
    transform: scale(0.6);
  }
}
.sheet-row[data-status="right"]::after,
.sheet-row[data-status="wrong"]::after {
  margin-left: auto;
  font-weight: 800;
  font-size: 1.1rem;
}
.sheet-row[data-status="right"]::after {
  content: "✓";
  color: #15803d;
}
.sheet-row[data-status="wrong"]::after {
  content: "✗";
  color: #b91c1c;
}

.demo-card {
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
  outline: none;
  min-width: 0;
}
.demo-card-inner {
  padding: clamp(20px, 3vw, 32px);
  display: grid;
  gap: 16px;
}
.demo-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.demo-timer {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 5px 12px;
}
.demo-timer [data-elapsed] {
  color: var(--fg);
  font-weight: 700;
}
.demo-timer.is-over [data-elapsed] {
  color: var(--amber);
}
.demo-instruction {
  color: var(--muted);
}
.demo-statement {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.demo-image {
  width: 100%;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 6px;
}
.demo-options {
  display: grid;
  gap: 10px;
}
.demo-options.is-letters {
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: 8px;
}
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--fg);
  background: var(--bg-2);
  border: 1.5px solid var(--line-strong);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.is-letters .option {
  justify-content: center;
  padding: 12px 0;
}
.option:hover:not(:disabled) {
  border-color: var(--blue);
  transform: translateY(-1px);
}
.option:disabled {
  cursor: default;
}
.option-letter {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  font-family: var(--font-display);
  font-weight: 700;
}
.option-text {
  min-width: 0;
}
.option.is-right {
  border-color: var(--right);
  background: rgba(47, 202, 115, 0.12);
}
.option.is-right .option-letter {
  background: var(--right);
  border-color: var(--right);
  color: var(--bg);
}
.option.is-wrong {
  border-color: var(--wrong);
  background: rgba(242, 114, 107, 0.12);
  animation: shake 0.4s;
}
.option.is-wrong .option-letter {
  background: var(--wrong);
  border-color: var(--wrong);
  color: var(--bg);
}
.option.is-chosen {
  border-color: var(--coral);
  background: rgba(240, 122, 98, 0.12);
}
@keyframes shake {
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
.demo-feedback {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  animation: rise 0.4s var(--ease);
}
.demo-feedback p {
  color: #c7d6e5;
}
.demo-feedback .btn {
  justify-self: start;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
.feedback-verdict {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}
.feedback-verdict[data-tone="right"] {
  color: var(--right) !important;
}
.feedback-verdict[data-tone="wrong"] {
  color: var(--wrong) !important;
}
.feedback-verdict[data-tone="neutral"] {
  color: var(--coral) !important;
}
.feedback-time {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.demo-result {
  display: grid;
  gap: 16px;
}
.result-big {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--muted);
}
.result-big span {
  font-size: clamp(3.5rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.04em;
  margin-right: 8px;
}
.formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.formula-term {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  animation: rise 0.5s var(--ease) both;
}
.formula-term:nth-child(3) {
  animation-delay: 0.15s;
}
.formula-term:nth-child(5) {
  animation-delay: 0.3s;
  border-color: var(--amber);
}
.formula-term.is-right {
  color: var(--right);
}
.formula-term.is-wrong {
  color: var(--wrong);
}
.formula-op {
  color: var(--muted);
  font-weight: 700;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
@media (max-width: 860px) {
  .demo-layout {
    grid-template-columns: 1fr;
  }
  .demo-intro {
    position: static;
  }
  .sheet-card {
    transform: none;
  }
}

/* ---------- Tarjetas de ejemplo (puntos débiles, liga) ---------- */
.heat-card,
.league-card {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
  min-width: 0;
}
/* ---------- Campos de formulario ---------- */
.field {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}
.field span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.field output {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.field input[type="number"],
.field input[type="email"],
.field input[type="text"],
.field select {
  width: 100%;
  font: inherit;
  font-weight: 500;
  color: var(--fg);
  background: var(--bg-2);
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
}
.field input:focus,
.field select:focus {
  border-color: var(--blue);
  outline: none;
}

/* ---------- Puntos débiles ---------- */
.heat-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 6px;
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 0;
  cursor: pointer;
  /* De coral (punto débil) a verde (dominado) según el % de aciertos. */
  background: var(--heat, var(--line-strong));
  opacity: 1;
  transform: scale(1);
  transition: transform 0.25s var(--ease), opacity 0.5s, box-shadow 0.2s;
}
.can-reveal .heat-grid:not(.is-lit) .heat-cell {
  opacity: 0.15;
  transform: scale(0.7);
}
.heat-cell:hover,
.heat-cell.is-active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--fg);
  z-index: 1;
}
.heat-tip {
  font-weight: 700;
  min-height: 1.6em;
}
.heat-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}
.heat-legend i {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--wrong), var(--right));
}
.heat-card .btn {
  justify-self: start;
}

/* ---------- Comunidad ---------- */
.band-violet {
  background: radial-gradient(50rem 30rem at 20% 50%, rgba(139, 108, 255, 0.12), transparent 70%);
}
.league-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.live {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--right);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--right);
  animation: pulse 2s infinite;
}
.league {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.league li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  transition: border-color 0.3s, background 0.3s;
}
.league li.is-me {
  border-color: var(--violet);
  background: rgba(139, 108, 255, 0.12);
}
.league li.is-up {
  border-color: var(--right);
}
.pos {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.league li:first-child .pos {
  color: var(--amber);
}
.who {
  font-weight: 700;
}
.pts {
  color: var(--muted);
  font-size: 0.9rem;
}
.pts b {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.challenge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed var(--violet);
}
.challenge-badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--violet);
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
}
.challenge-title {
  font-weight: 700;
}

/* ---------- Móvil ---------- */
.phone {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-width: 0;
}
.phone-frame {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 9 / 18.5;
  border-radius: 44px;
  padding: 12px;
  background: linear-gradient(145deg, #253b52, #0b1724);
  box-shadow:
    0 0 0 2px #2f4a66,
    0 50px 100px -40px rgba(0, 0, 0, 0.8),
    0 0 80px -20px rgba(47, 143, 234, 0.35);
  transform: rotate(-4deg);
  transition: transform 0.6s var(--ease);
}
.phone:hover .phone-frame {
  transform: rotate(0);
}
.phone-notch {
  position: absolute;
  top: 20px;
  left: 50%;
  translate: -50% 0;
  width: 86px;
  height: 22px;
  border-radius: 12px;
  background: #050b12;
  z-index: 2;
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 34px;
  background: #0a1622;
  overflow: hidden;
}
.screen {
  position: absolute;
  inset: 0;
  padding: 52px 16px 16px;
  display: grid;
  align-content: start;
  gap: 10px;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.5s, transform 0.5s var(--ease);
  font-size: 0.82rem;
}
.screen.is-active {
  opacity: 1;
  transform: none;
}
.app-head,
.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}
.app-bar {
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(90deg, #12406b, #2b86d9);
}
.streak {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: var(--amber);
  border: 1px solid rgba(245, 166, 35, 0.5);
  border-radius: 5px;
  padding: 2px 5px;
}
.app-hello {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}
.app-progress {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.ring {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: conic-gradient(var(--amber) calc(var(--v) * 360deg), var(--line) 0);
  display: grid;
  place-items: center;
}
.ring span {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--bg-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}
.app-tile {
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  border-left: 4px solid;
  background: var(--bg-2);
}
.tile-blue {
  border-color: var(--blue);
}
.tile-amber {
  border-color: var(--amber);
}
.tile-coral {
  border-color: var(--coral);
}
.tile-violet {
  border-color: var(--violet);
}
.app-nums {
  display: flex;
  gap: 6px;
}
.app-nums i {
  font-style: normal;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 0.75rem;
}
.app-nums i.on {
  border: 2px solid var(--fg);
  font-weight: 800;
}
.app-q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
}
.app-opt {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
}
.app-opt.is-right {
  border-color: var(--right);
  background: rgba(47, 202, 115, 0.12);
}
.app-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  text-align: center;
  color: var(--amber);
  margin-top: 16px;
}
.app-score small {
  font-size: 1rem;
  color: var(--muted);
}
.phone-dots {
  display: flex;
  gap: 8px;
}
.phone-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: var(--line-strong);
  cursor: pointer;
  transition: width 0.3s var(--ease), background 0.3s;
}
.phone-dots button[aria-current="true"] {
  width: 28px;
  border-radius: 5px;
  background: var(--amber);
}

/* ---------- Precio ---------- */
.plans {
  margin: 40px 0 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 900px;
}
.plan {
  position: relative;
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 30px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
}
.plan h3 {
  font-size: var(--step-2);
}
.plan-price {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: grid;
  line-height: 1.05;
}
.plan-price span {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--muted);
}
.plan-premium {
  border-color: var(--amber);
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.12), var(--panel) 60%);
}
.plan-flag {
  position: absolute;
  top: -13px;
  right: 24px;
  background: var(--amber);
  color: var(--on-amber);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 999px;
}
@media (max-width: 760px) {
  .plans {
    grid-template-columns: 1fr;
  }
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 860px;
  margin-top: 32px;
  display: grid;
  gap: 10px;
}
.faq details {
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color 0.2s;
}
.faq details[open] {
  border-color: var(--line-strong);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 54px 18px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  translate: 0 -50%;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--amber);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  padding: 0 20px 20px;
  color: #c7d6e5;
  max-width: 68ch;
}

/* ---------- Beta ---------- */
.band-cta {
  background: radial-gradient(40rem 26rem at 70% 40%, rgba(245, 166, 35, 0.12), transparent 70%);
}
.cta-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.cta-layout > div {
  display: grid;
  gap: 16px;
}
.cta-layout > div > p:not(.eyebrow) {
  color: #c7d6e5;
  max-width: 52ch;
}
.waitlist {
  display: grid;
  gap: 16px;
  padding: clamp(20px, 3vw, 30px);
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid rgba(245, 166, 35, 0.45);
  box-shadow: 0 40px 80px -40px rgba(245, 166, 35, 0.35);
  min-width: 0;
}
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.92rem;
  color: #c7d6e5;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--amber);
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  min-height: 1.5em;
  font-weight: 600;
}
.form-status[data-tone="right"] {
  color: var(--right);
}
.form-status[data-tone="wrong"] {
  color: var(--wrong);
}
.waitlist.is-done .field,
.waitlist.is-done .check,
.waitlist.is-done button {
  display: none;
}
.waitlist.is-done .form-status {
  font-size: 1.2rem;
  font-family: var(--font-display);
}
@media (max-width: 860px) {
  .cta-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Pie ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px));
  background: var(--bg-2);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 40px;
  align-items: center;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
}
.footer nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.footer nav a:hover {
  color: var(--fg);
}
.footer .small {
  grid-column: 1 / -1;
  max-width: 80ch;
}
@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer nav {
    justify-content: flex-start;
  }
}

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