/* Zpell. Misma estructura que las hojas de Fastitude y Lectorio, con la paleta
   del juego: la noche del cementerio y el verde del acido. El modo oscuro es el
   natural del juego; el claro es su version de dia. El acento es un degradado de
   lima a verde, como las fichas de las letras, y el texto sobre el va oscuro
   porque en blanco no tendria contraste. */

:root {
  --paper: #f4f8ee;
  --paper-2: #e9f1df;
  --ink: #142016;
  --ink-soft: #536558;
  --lime: #5aa51c;
  --green: #22894a;
  --lime-soft: #e1f0d1;
  --card: #ffffff;
  --border: rgba(20, 32, 22, 0.1);
  --on-accent: #0e1a0f;
  --accent-gradient: linear-gradient(135deg, #a6e34d 0%, #3fc56e 100%);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1312;
    --paper-2: #111b19;
    --ink: #eef6e8;
    --ink-soft: #9db1a3;
    --lime: #b4ec5a;
    --green: #5fd68a;
    --lime-soft: #17271c;
    --card: #15201d;
    --border: rgba(238, 246, 232, 0.09);
    --on-accent: #0e1a0f;
    --accent-gradient: linear-gradient(135deg, #b4ec5a 0%, #4fd27c 100%);
  }
}
:root[data-theme="dark"] {
  --paper: #0c1312;
  --paper-2: #111b19;
  --ink: #eef6e8;
  --ink-soft: #9db1a3;
  --lime: #b4ec5a;
  --green: #5fd68a;
  --lime-soft: #17271c;
  --card: #15201d;
  --border: rgba(238, 246, 232, 0.09);
  --on-accent: #0e1a0f;
  --accent-gradient: linear-gradient(135deg, #b4ec5a 0%, #4fd27c 100%);
}
:root[data-theme="light"] {
  --paper: #f4f8ee;
  --paper-2: #e9f1df;
  --ink: #142016;
  --ink-soft: #536558;
  --lime: #5aa51c;
  --green: #22894a;
  --lime-soft: #e1f0d1;
  --card: #ffffff;
  --border: rgba(20, 32, 22, 0.1);
  --on-accent: #0e1a0f;
  --accent-gradient: linear-gradient(135deg, #a6e34d 0%, #3fc56e 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Los halos de detrás del teléfono son absolutos y miden más que la
     pantalla de un celular: cuentan para el scroll y ensanchaban el documento,
     con lo que la página entera quedaba desplazada y el texto cortado a la
     derecha. Se recortan acá en vez de achicar el halo, que es justamente lo
     que tiene que desbordar. */
  overflow-x: hidden;
}

.wrap { max-width: 840px; margin: 0 auto; padding: 0 24px; }

/* ---------- Idioma + tema ---------- */

.controls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 6px 18px var(--border);
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.theme-toggle:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }

.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 6px 18px var(--border);
}
.lang-switch a {
  padding: 6px 13px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
.lang-switch a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
}
.lang-switch a:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
@media (max-width: 480px) {
  .controls { top: 14px; right: 14px; }
}

/* ---------- Portada ---------- */

header.hero {
  max-width: 1220px;
  margin: 0 auto;
  padding: 96px 24px 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
}
.hero-copy { max-width: 500px; }
.icon {
  width: 92px;
  height: 92px;
  border-radius: 21px;
  box-shadow: 0 8px 22px var(--border);
  margin-bottom: 30px;
  display: block;
}
h1 {
  font-size: clamp(44px, 6.4vw, 68px);
  font-weight: 800;
  line-height: 1.02;
  margin: 0 0 22px;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.subhead {
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 440px;
  margin: 0 0 26px;
  line-height: 1.5;
}
.differentiator {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--green);
  margin: 0 0 34px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.differentiator::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gradient);
  flex-shrink: 0;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-gradient);
  color: var(--on-accent);
  padding: 16px 30px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16.5px;
  box-shadow: 0 10px 26px rgba(110, 200, 60, 0.3);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.cta:hover { transform: translateY(-1px); opacity: 0.94; }
.cta:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.cta svg { width: 18px; height: 18px; flex-shrink: 0; }
.cta-note {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* Maqueta del teléfono, a puro CSS: grande, con un halo apenas perceptible
   detrás y una respiración lentísima. */
.phone-stage {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.phone-stage::before {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, var(--lime-soft) 0%, transparent 70%);
  filter: blur(4px);
}
.phone {
  flex-shrink: 0;
  width: 366px;
  /* Relación real de la captura (1206 × 2622 px). Tiene que coincidir con la
     de las imágenes: si no, object-fit: cover recorta los bordes y la isla
     dinámica —que ya viene en la propia captura— queda pisada por el bisel. */
  aspect-ratio: 201 / 437;
  background: #0a0a0a;
  border-radius: 46px;
  padding: 7px;
  box-shadow: 0 52px 100px -28px rgba(0, 0, 0, 0.55), 0 12px 28px var(--border);
  position: relative;
  z-index: 1;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 39px;
  display: block;
}
.phone-sm {
  width: 168px;
  border-radius: 24px;
  padding: 4px;
}
.phone-sm img { border-radius: 20px; }

@media (prefers-reduced-motion: no-preference) {
  .phone-stage::before { animation: breathe 7s ease-in-out infinite; }
  .hero-copy > * { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
  .hero-copy .icon { animation-delay: 0s; }
  .hero-copy h1 { animation-delay: 0.05s; }
  .hero-copy .subhead { animation-delay: 0.1s; }
  .hero-copy .differentiator { animation-delay: 0.15s; }
  .hero-copy .cta { animation-delay: 0.2s; }
  .phone-stage { animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.12s backwards; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.045); }
}

@media (max-width: 780px) {
  header.hero { flex-direction: column; padding-top: 60px; gap: 44px; text-align: center; }
  /* `width: 100%` no sobra: en una columna flex con `align-items: center`, el
     ancho del ítem lo fija su contenido y no el contenedor, así que con el
     `max-width` solo, la copy se pasaba del viewport en un teléfono angosto y
     el texto quedaba cortado a los costados. */
  .hero-copy { text-align: center; max-width: 460px; width: 100%; }
  .subhead, .cta-note { margin-left: auto; margin-right: auto; }
  .icon { margin-left: auto; margin-right: auto; }
  .differentiator { justify-content: center; }
  .phone { width: 268px; border-radius: 36px; padding: 5px; }
  .phone img { border-radius: 31px; }
  .phone-stage::before { width: 420px; height: 420px; }
}

/* ---------- Encabezado de sección (compartido) ---------- */

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 52px;
}
.section-head h2 {
  font-size: clamp(30px, 4.2vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  text-wrap: balance;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0;
}

section { padding: 100px 0; }
section + section { border-top: 1px solid var(--border); }

/* ---------- Beneficios ---------- */

.benefits-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 640px) {
  .benefits-grid { grid-template-columns: 1fr; }
}
.benefit-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
@media (hover: hover) {
  .benefit-card:hover {
    transform: translateY(-3px);
    border-color: var(--lime);
    box-shadow: 0 16px 32px var(--border);
  }
}
.benefit-card .icon-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--lime-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.benefit-card .icon-badge svg { width: 27px; height: 27px; stroke: var(--green); }
.benefit-card h3 { margin: 0 0 7px; font-size: 17.5px; font-weight: 700; letter-spacing: -0.01em; }
.benefit-card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- Protagonista (el lector) ---------- */

section.daily-experience { background: var(--paper-2); }
.spotlight {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.spotlight .phone-stage { margin-top: 8px; }
.spotlight .phone-stage::before { width: 460px; height: 460px; }
.spotlight .phone { width: 320px; border-radius: 41px; padding: 6px; }
.spotlight .phone img { border-radius: 35px; }
@media (max-width: 620px) {
  .spotlight .phone { width: 250px; border-radius: 34px; padding: 5px; }
  .spotlight .phone img { border-radius: 29px; }
  .spotlight .phone-stage::before { width: 360px; height: 360px; }
}

/* ---------- Galerías ---------- */

.gallery {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}
.gallery-item {
  margin: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gallery-item .phone { margin-bottom: 22px; }
.gallery-item h3 { margin: 0 0 5px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.gallery-item p { margin: 0; font-size: 13.5px; color: var(--ink-soft); text-align: center; }

.gallery .phone-sm { width: 188px; border-radius: 27px; padding: 4px; }
.gallery .phone-sm img { border-radius: 23px; }

.gallery.gallery-2 { gap: 44px; }
.gallery.gallery-2 .gallery-item { width: 250px; }
.gallery.gallery-2 .phone-sm { width: 236px; border-radius: 33px; padding: 5px; }
.gallery.gallery-2 .phone-sm img { border-radius: 28px; }

/* ---------- Privacidad ---------- */

section.privacy { text-align: center; }
section.privacy h2 {
  font-size: clamp(32px, 4.6vw, 46px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 26px;
  text-wrap: balance;
}
.privacy-marks {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}
.privacy-marks span { white-space: nowrap; }
section.privacy > .wrap > p {
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.6;
}
.privacy-icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 44px;
}
.privacy-icon {
  width: 42px;
  height: 42px;
  color: var(--ink-soft);
  opacity: 0.7;
}
.privacy-icon svg { width: 100%; height: 100%; stroke-width: 1.5; }

/* ---------- Cierre ---------- */

section.final-cta {
  text-align: center;
  background: var(--paper-2);
  position: relative;
  overflow: hidden;
  padding: 120px 0 100px;
}
section.final-cta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--lime-soft) 0%, transparent 68%);
  filter: blur(6px);
  pointer-events: none;
}
section.final-cta .wrap { position: relative; }
section.final-cta h2 {
  font-size: clamp(34px, 4.8vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 14px;
  text-wrap: balance;
}
section.final-cta > .wrap > p {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0 0 32px;
}

/* ---------- Nota al pie + pie ---------- */

.fine-print {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 24px 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-soft);
  opacity: 0.75;
  text-align: center;
  position: relative;
}

footer {
  padding: 32px 24px 44px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}
footer a { color: var(--ink-soft); text-decoration: underline; }
footer a:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
footer .links { margin-bottom: 10px; }
footer .links a { margin: 0 10px; }

/* ---------- Mundos ---------- */

/* Seis mundos: tres por fila en escritorio, dos en tablet, uno en telefono. */
section.worlds .gallery { max-width: 820px; gap: 40px 32px; }
section.worlds .gallery-item { width: 236px; }
section.worlds .gallery .phone-sm { width: 200px; border-radius: 29px; padding: 4px; }
section.worlds .gallery .phone-sm img { border-radius: 25px; }

/* Estrellas: fondo alternado, como el lector en Lectorio */
section.stars { background: var(--paper-2); }
