/* Readero · landing page
   Colores tomados de app/src/main/java/com/readero/ui/theme */

@font-face {
  font-family: "Playwrite ES";
  src: url("fonts/playwrite_es.ttf") format("truetype");
  font-display: swap;
}

:root {
  --grape: #6C4AB6;
  --grape-dark: #4E3290;
  --grape-light: #E8DFFF;
  --sunshine: #FFC93C;
  --sunshine-light: #FFF1C9;
  --coral: #D9482B;
  --mint: #00796B;
  --mint-light: #C8F2E6;
  --cream: #FFF9EC;
  --ink: #2B2440;
  --ink-soft: #5E5673;
  --leaf: #34B65A;
  --sky: #2FA8E6;
  --bubblegum: #F2589B;
  --tangerine: #FF8A2A;
  --white: #FFFFFF;

  --radius: 28px;
  --shadow: 0 18px 40px -18px rgba(43, 36, 64, .35);
  --shadow-pop: 0 6px 0 rgba(43, 36, 64, .9);
  --hand: "Playwrite ES", "Segoe Script", cursive;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--grape); }
h1, h2, h3 { line-height: 1.15; margin: 0; }
p { margin: 0; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(780px, 100% - 32px); }

.hand {
  font-family: var(--hand);
  font-weight: 400;
  color: var(--grape);
  white-space: nowrap;
}

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: 10px; z-index: 100;
}
.skip:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--grape); color: var(--white);
  font-weight: 800; text-decoration: none;
  padding: 14px 26px; border-radius: 999px;
  border: 3px solid var(--ink);
  box-shadow: var(--shadow-pop);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(43, 36, 64, .9); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(43, 36, 64, .9); }
.btn--small { padding: 8px 18px; font-size: 16px; box-shadow: 0 4px 0 rgba(43, 36, 64, .9); }

.store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: var(--white);
  text-decoration: none; font-weight: 800; font-size: 20px; line-height: 1.1;
  padding: 12px 24px 12px 18px; border-radius: 18px;
  box-shadow: 0 6px 0 var(--sunshine);
  transition: transform .15s, box-shadow .15s;
}
.store small { display: block; font-size: 12px; font-weight: 600; opacity: .8; letter-spacing: .02em; }
.store:hover { transform: translateY(-2px) rotate(-1deg); box-shadow: 0 8px 0 var(--sunshine); }
.store:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--sunshine); }
.store--big { font-size: 24px; padding: 16px 30px 16px 22px; }

.link-arrow { font-weight: 800; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Navegación ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 249, 236, .88);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(108, 74, 182, .12);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--grape);
  font-family: var(--hand); font-size: 26px;
}
.brand img { transition: transform .3s; }
.brand:hover img { transform: rotate(-10deg) scale(1.06); }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { color: var(--ink); font-weight: 700; text-decoration: none; }
.nav__links a:hover { color: var(--grape); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 201, 60, .35), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(242, 88, 155, .15), transparent 40%),
    var(--cream);
  padding: 64px 0 120px;
  overflow: hidden;
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
.pill {
  display: inline-block;
  background: var(--white); border: 2px solid var(--grape-light);
  padding: 6px 16px; border-radius: 999px;
  font-weight: 800; font-size: 15px; color: var(--grape);
}
.hero h1 {
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 900; letter-spacing: -.02em;
  margin: 18px 0 20px;
}
.hero h1 .hand { display: inline-block; transform: rotate(-3deg); color: var(--grape); }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--ink-soft); max-width: 34ch; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin: 32px 0 26px; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 700; }
.checks li::before { content: "✓"; color: var(--white); background: var(--leaf); border-radius: 50%; display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 13px; margin-right: 8px; }

.hero__phone { position: relative; height: 560px; }
.hero__phone .phone { position: absolute; width: 250px; }
.hero__phone .phone:first-child { right: 18%; top: 10px; z-index: 2; }
.hero__phone .phone--back { right: 52%; top: 70px; z-index: 1; opacity: .95; }

.bubble {
  position: absolute; z-index: 3;
  background: var(--sunshine); color: var(--ink);
  font-weight: 900; padding: 10px 18px; border-radius: 18px;
  border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink);
  animation: bob 3.5s ease-in-out infinite;
}
.bubble--score { right: 4%; bottom: 70px; transform: rotate(6deg); }

.hero__deco { position: absolute; inset: 0; pointer-events: none; }
.tile {
  position: absolute;
  font-family: var(--hand); font-size: 30px; color: var(--ink);
  background: var(--sunshine-light);
  padding: 4px 18px 12px; border-radius: 16px;
  box-shadow: 0 8px 18px -8px rgba(43, 36, 64, .4);
  animation: bob 5s ease-in-out infinite;
}
.tile--a { left: 46%; top: 7%; transform: rotate(-12deg); }
.tile--b { left: 2%; bottom: 9%; background: var(--mint-light); font-family: var(--body); font-weight: 800; font-size: 26px; padding: 8px 16px; animation-delay: -1s; }
.tile--c { left: 47%; bottom: 20%; background: var(--grape-light); animation-delay: -2.5s; }
.tile--d { right: 3%; top: 8%; background: #FFD9E8; animation-delay: -3.5s; }
.float { position: absolute; width: 70px; animation: bob 6s ease-in-out infinite; }
.float--a { left: 47%; top: 38%; width: 56px; animation-delay: -2s; opacity: .9; }
.float--b { right: 2%; bottom: 22%; animation-delay: -4s; }

.wave { position: absolute; left: 0; bottom: -1px; width: 100%; height: 80px; fill: var(--grape); }

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* ---------- Móvil (marco) ---------- */

.phone {
  background: var(--ink);
  padding: 10px;
  border-radius: 38px;
  box-shadow: var(--shadow), 0 0 0 2px rgba(255, 255, 255, .5) inset;
}
.phone img { border-radius: 29px; width: 100%; height: auto; }
.phone--tilt-r { transform: rotate(5deg); }
.phone--tilt-l { transform: rotate(-6deg); }

/* ---------- Cifras ---------- */

.stats { background: var(--grape); color: var(--white); padding: 18px 0 64px; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-size: 52px; font-weight: 900; color: var(--sunshine); line-height: 1.1; }
.stat span { font-weight: 700; opacity: .92; }

/* ---------- Secciones ---------- */

.section { padding: 96px 0; }
.section--cream { background: var(--cream); }
.section--grape {
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, .12), transparent 30%),
    var(--grape);
  color: var(--white);
}
.section__head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.kicker {
  display: inline-block;
  font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: 14px;
  color: var(--coral); margin-bottom: 10px;
}
.section h2 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 900; letter-spacing: -.01em; }
.section__lead { font-size: 20px; color: var(--ink-soft); margin-top: 16px; }
.section__head--light .kicker { color: var(--sunshine); }
.section__head--light .hand { color: var(--sunshine); }

/* ---------- Tarjetas de beneficios ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  --tint: var(--grape-light);
  --accent: var(--grape);
  background: var(--tint);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  border: 3px solid transparent;
  transition: transform .2s, border-color .2s;
}
.card:nth-child(odd) { transform: rotate(-.6deg); }
.card:nth-child(even) { transform: rotate(.6deg); }
.card:hover { transform: translateY(-6px) rotate(0); border-color: var(--accent); }
.card--sun { --tint: var(--sunshine-light); --accent: #C99400; }
.card--mint { --tint: var(--mint-light); --accent: var(--mint); }
.card--coral { --tint: #FFE1D9; --accent: var(--coral); }
.card--sky { --tint: #DDF1FC; --accent: var(--sky); }
.card--pink { --tint: #FFE0EE; --accent: var(--bubblegum); }
.card__icon {
  width: 64px; height: 64px; border-radius: 20px;
  display: grid; place-items: center; font-size: 34px;
  background: var(--white); margin-bottom: 18px;
  box-shadow: 0 6px 0 var(--accent);
}
.card h3 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.card p { color: var(--ink-soft); }
.card em { font-family: var(--hand); font-style: normal; color: var(--ink); }

/* ---------- Juegos ---------- */

.game {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center;
  margin-bottom: 96px;
}
.game--flip .game__media { order: 2; }
.game__media {
  display: grid; place-items: center;
  padding: 40px 0;
  position: relative;
}
.game__media::before {
  content: ""; position: absolute; z-index: 0;
  width: 360px; height: 360px; border-radius: 46% 54% 42% 58% / 55% 45% 55% 45%;
  background: var(--grape-light);
}
.game:nth-of-type(2) .game__media::before { background: var(--sunshine-light); }
.game:nth-of-type(3) .game__media::before { background: #FFE0EE; }
.game:nth-of-type(4) .game__media::before { background: var(--mint-light); }
.game__media > * { position: relative; z-index: 1; }
.game__media .phone { width: 270px; transform: rotate(-3deg); }
.game--flip .game__media .phone { transform: rotate(3deg); }
.game__num {
  font-family: var(--hand); font-size: 42px; color: var(--grape);
  display: block; margin-bottom: 4px;
}
.game h3 { font-size: clamp(30px, 3.6vw, 42px); font-weight: 900; margin-bottom: 14px; }
.game p { font-size: 19px; color: var(--ink-soft); }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 36px; font-weight: 700; }
.ticks li::before {
  content: "★"; position: absolute; left: 0; top: 0;
  color: var(--sunshine); font-size: 24px; line-height: 1.1;
  -webkit-text-stroke: 1px #C99400;
}
.soon {
  text-align: center; font-size: 20px;
  background: var(--white); border: 3px dashed var(--grape);
  padding: 18px 24px; border-radius: var(--radius);
  max-width: 560px; margin: -24px auto 0;
}

/* Ilustración de «Lee y elige» */
.mock {
  width: 300px; height: 380px;
  background: var(--cream);
  border: 10px solid var(--ink);
  border-radius: 38px;
  box-shadow: var(--shadow);
  position: relative;
  transform: rotate(3deg);
}
.mock__pic { position: absolute; width: 120px; left: 50%; top: 42%; translate: -50% -50%; }
.mock__word {
  position: absolute;
  font-weight: 900; font-size: 18px; letter-spacing: .04em;
  background: var(--white); border-radius: 14px; padding: 6px 12px;
  box-shadow: 0 4px 0 var(--grape-light), 0 0 0 2px var(--grape-light);
}
.mock__word--1 { left: 16px; top: 26px; transform: rotate(-6deg); }
.mock__word--2 { right: 16px; top: 46px; transform: rotate(5deg); }
.mock__word--3 { left: 12px; top: 210px; transform: rotate(4deg); }
.mock__word--4 { right: 18px; top: 222px; transform: rotate(-5deg); }
.mock__word.is-right { opacity: .35; }
.mock__slot {
  position: absolute; left: 50%; bottom: 28px; translate: -50% 0;
  min-width: 140px; text-align: center;
  font-weight: 900; font-size: 22px; letter-spacing: .04em;
  background: var(--leaf); color: var(--white);
  border-radius: 14px; padding: 8px 18px;
  box-shadow: 0 5px 0 #1F8A3F;
  animation: drop 3s ease-in-out infinite;
}
@keyframes drop {
  0% { transform: translateY(-150px) scale(.8); opacity: 0; }
  30%, 85% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 0; }
}

/* ---------- Familias ---------- */

.families { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.families .section__lead { margin-bottom: 32px; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.features li { display: flex; gap: 18px; align-items: flex-start; }
.features li > span {
  flex: none; width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center; font-size: 26px;
  background: var(--sunshine-light);
}
.features h3 { font-size: 21px; font-weight: 900; margin-bottom: 2px; }
.features p { color: var(--ink-soft); }
.families__media { position: relative; display: flex; justify-content: center; gap: 0; }
.families__media .phone { width: 230px; }
.families__media .phone--offset { margin-left: -40px; margin-top: 90px; }

/* ---------- Pasos ---------- */

.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  counter-reset: none;
}
.steps li {
  background: rgba(255, 255, 255, .1);
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: var(--radius);
  padding: 34px 28px;
  text-align: center;
}
.steps__n {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--sunshine); color: var(--ink);
  font-family: var(--hand); font-size: 30px;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .25);
  margin-bottom: 16px;
}
.steps h3 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.steps p { opacity: .9; }

/* ---------- Galería ---------- */

.gallery {
  display: flex; gap: 28px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 20px max(16px, calc((100% - 1160px) / 2)) 36px;
  scrollbar-width: thin; scrollbar-color: var(--grape) transparent;
}
.gallery figure { flex: none; width: 220px; margin: 0; scroll-snap-align: center; text-align: center; }
.gallery figure:nth-child(odd) .phone { transform: rotate(-2deg); }
.gallery figure:nth-child(even) .phone { transform: rotate(2deg); }
.gallery figcaption { margin-top: 16px; font-family: var(--hand); font-size: 20px; color: var(--grape); }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 14px; }
.faq details {
  background: var(--cream);
  border: 2px solid var(--grape-light);
  border-radius: 20px;
  padding: 0 24px;
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--grape); background: var(--white); }
.faq summary {
  cursor: pointer; list-style: none;
  font-weight: 800; font-size: 19px;
  padding: 20px 40px 20px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; translate: 0 -50%;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grape); color: var(--white); font-size: 22px; font-weight: 900;
  transition: rotate .2s;
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding-bottom: 22px; color: var(--ink-soft); }

/* ---------- CTA final ---------- */

.final {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, .5), transparent 60%),
    var(--sunshine);
  padding: 96px 0;
  overflow: hidden;
}
.final__inner { position: relative; text-align: center; max-width: 820px; }
.final__logo { margin: 0 auto 22px; width: 96px; height: 96px; transform: rotate(-6deg); filter: drop-shadow(0 8px 0 rgba(43, 36, 64, .2)); }
.final h2 { font-size: clamp(34px, 5vw, 58px); font-weight: 900; }
.final h2 .hand { color: var(--grape); }
.final p { font-size: 20px; margin: 18px auto 34px; max-width: 46ch; }
.final .store { box-shadow: 0 6px 0 var(--grape); }
.final .store:hover { box-shadow: 0 8px 0 var(--grape); }
.final__float { position: absolute; width: 72px; animation: bob 5s ease-in-out infinite; }
.final__float--a { left: -40px; top: 10px; }
.final__float--b { right: -30px; top: 30px; animation-delay: -2s; }
.final__float--c { right: 20px; bottom: -20px; animation-delay: -3s; }

/* ---------- Pie ---------- */

.footer { background: var(--ink); color: rgba(255, 255, 255, .8); padding: 36px 0; font-size: 15px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer a { color: var(--white); }
.brand--footer { color: var(--white); font-size: 22px; text-decoration: none; }
.footer__credits { margin-left: auto; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { padding-top: 40px; }
  .hero__inner, .families { grid-template-columns: 1fr; }
  .hero__copy { text-align: center; }
  .lead { margin-inline: auto; }
  .hero__cta, .checks { justify-content: center; }
  .hero__phone { height: 480px; max-width: 460px; width: 100%; margin: 0 auto; }
  .hero__phone .phone { width: 210px; }
  .hero__phone .phone:first-child { right: 8%; }
  .hero__phone .phone--back { right: auto; left: 4%; }
  .tile--b, .tile--c, .float--a { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .game, .game--flip { grid-template-columns: 1fr; gap: 24px; margin-bottom: 72px; }
  .game--flip .game__media { order: 0; }
  .game__copy { max-width: 620px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; }
  .families__media { margin-top: 16px; }
  .final__float--a { left: 0; }
  .final__float--b { right: 0; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .brand span { font-size: 22px; }
  .hero__phone { height: 400px; }
  .hero__phone .phone { width: 170px; }
  .bubble--score { right: 0; bottom: 30px; }
  .tile { font-size: 22px; }
  .tile--a { left: 4%; top: 1%; }
  .tile--d { top: 1%; }
  .float--b { display: none; }
  .cards { grid-template-columns: 1fr; }
  .stat b { font-size: 40px; }
  .section { padding: 72px 0; }
  .game__media::before { width: 280px; height: 280px; }
  .game__media .phone { width: 220px; }
  .mock { width: 260px; height: 340px; }
  .mock__word { font-size: 15px; }
  .mock__word--3 { top: 190px; }
  .mock__word--4 { top: 200px; }
  .families__media .phone { width: 160px; }
  .families__media .phone--offset { margin-left: -30px; margin-top: 60px; }
  .gallery figure { width: 180px; }
  .final__float { width: 48px; }
  .final__float--c { display: none; }
  .footer__credits { margin-left: 0; }
}

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