/* ==========================================================
   La Caja de los Planes — estilos
   Paleta tomada de las cartas.
   ========================================================== */

:root {
  --navy: #1d2b5e;
  --navy-deep: #152147;
  --blue: #6b8fd1;
  --blue-soft: #9fb6e4;
  --orange: #f08a3c;
  --green: #6dbf8e;
  --purple: #8b7fc2;
  --yellow: #f2c94c;
  --cream: #fbf6ea;
  --cream-deep: #f3ead3;
  --ink: #1d2b5e;
  --ink-soft: #4a567f;
  --white: #ffffff;
  --wa: #25d366;
  --wa-dark: #1ebe5a;

  --font-head: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow-card: 0 18px 40px -18px rgba(21, 33, 71, .45);
  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 700; }
h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto; }
.container--narrow { max-width: 760px; }

/* Puntitos tipo dorso de carta */
.dots {
  background-image: radial-gradient(rgba(255, 255, 255, .22) 1.6px, transparent 1.7px);
  background-size: 22px 22px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font: 800 17px/1 var(--font-body);
  text-decoration: none;
  border: 3px solid var(--navy);
  box-shadow: 0 5px 0 var(--navy);
  transition: transform .12s ease, box-shadow .12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--navy); }
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--navy); }
.btn--yellow { background: var(--yellow); color: var(--navy); }
.btn--navy { background: var(--navy); color: var(--white); border-color: var(--navy-deep); box-shadow: 0 5px 0 var(--navy-deep); }
.btn--wa { background: var(--wa); color: var(--navy); }
.btn--wa:hover { background: var(--wa-dark); }
.btn--sm { padding: 10px 16px; font-size: 15px; box-shadow: 0 3px 0 var(--navy); }
.btn--lg { padding: 18px 32px; font-size: 19px; }
.ico { width: 22px; height: 22px; fill: currentColor; flex: none; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px var(--gutter);
  background: rgba(29, 43, 94, .92);
  backdrop-filter: blur(10px);
  color: var(--white);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 18px var(--font-head); text-decoration: none; letter-spacing: .02em;
}
.brand__dots { display: inline-flex; gap: 4px; }
.brand__dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.brand__dots i:nth-child(1) { background: var(--orange); }
.brand__dots i:nth-child(2) { background: var(--green); }
.brand__dots i:nth-child(3) { background: var(--blue); }
.brand__dots i:nth-child(4) { background: var(--purple); }
.brand__dots i:nth-child(5) { background: var(--yellow); }
.topbar__nav { display: none; gap: 24px; font-weight: 700; font-size: 15px; }
.topbar__nav a { text-decoration: none; opacity: .85; }
.topbar__nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.topbar .btn--wa { display: none; }

/* ---------- Eyebrow / headers ---------- */
.eyebrow {
  display: inline-block;
  padding: 6px 14px; border-radius: 999px;
  background: var(--navy); color: var(--white);
  font: 800 13px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow--navy { background: var(--navy); }
.eyebrow--yellow { background: var(--yellow); color: var(--navy); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head--light { color: var(--white); }
.section-head__sub { margin-top: 14px; font-size: 18px; opacity: .9; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  padding: clamp(48px, 8vw, 96px) 0 120px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1.6px, transparent 1.7px);
  background-size: 24px 24px;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  width: min(var(--max), 100% - var(--gutter) * 2); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center;
}
.hero__inner > *, .step > *, .about__inner > *, .cta__inner > *, .step__strip > *, .cards > * { min-width: 0; }
.hero .eyebrow { background: var(--blue); color: var(--navy); }
.title {
  font-size: clamp(56px, 11vw, 112px);
  font-weight: 700; line-height: .92;
  text-transform: uppercase;
  display: flex; flex-direction: column;
}
.title__line {
  color: var(--white);
  text-shadow: 3px 3px 0 var(--navy-deep), 6px 6px 0 rgba(0, 0, 0, .25);
}
.title__line--yellow { color: var(--yellow); }
.hero__lead { font-size: clamp(18px, 2vw, 21px); max-width: 520px; margin: 24px 0 28px; opacity: .95; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__facts {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 32px; font-size: 15px; opacity: .9;
}
.hero__facts strong { color: var(--yellow); font-size: 18px; font-family: var(--font-head); }
.hero__photo {
  position: relative; margin: 0; justify-self: center;
  width: min(380px, 80%);
  transform: rotate(3deg);
}
.hero__photo img {
  border-radius: var(--radius);
  border: 6px solid var(--white);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}

/* Stickers (etiquetas) */
.sticker {
  position: absolute;
  padding: 10px 16px; border-radius: 16px;
  font: 700 18px/1.15 var(--font-head);
  color: var(--navy);
  border: 3px solid var(--navy);
  box-shadow: 0 4px 0 var(--navy);
  text-align: center;
}
.sticker--orange { background: var(--orange); right: -6px; top: -18px; transform: rotate(-8deg); }
.sticker--grey { background: var(--white); left: -10px; bottom: 24px; transform: rotate(-5deg); }
.sticker--blue { background: var(--blue); color: var(--white); right: -4px; top: 20px; transform: rotate(6deg); }

/* Ola entre hero y pasos */
.wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.wave svg { width: 100%; height: 70px; display: block; }
.wave path { fill: var(--cream); }

/* ---------- Cómo se juega ---------- */
.how { padding: clamp(56px, 8vw, 100px) 0; }
.steps { display: grid; gap: clamp(56px, 8vw, 96px); position: relative; }
.step {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center;
  position: relative;
}
.step__media { position: relative; justify-self: center; width: min(420px, 100%); }
.step__media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5; object-fit: cover;
}
.step__num {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--yellow); color: var(--navy);
  font: 700 34px var(--font-head);
  border: 3px solid var(--navy); box-shadow: 0 5px 0 var(--navy);
  margin-bottom: 16px;
}
.step:nth-child(2) .step__num { background: var(--blue); color: var(--white); }
.step:nth-child(3) .step__num { background: var(--orange); }
.step__text h3 { margin-bottom: 12px; }
.step__text p { font-size: 18px; color: var(--ink-soft); max-width: 46ch; }
.step__bullets { display: grid; gap: 8px; margin-top: 8px; font-weight: 700; }
.step__bullets li { padding-left: 28px; position: relative; }
.step__bullets li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green); color: var(--white); font-size: 12px; font-weight: 800;
  margin-top: 3px;
}
.step__strip { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step__strip figure { margin: 0; position: relative; }
.step__strip img {
  aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-card);
}
.step__strip figcaption {
  margin-top: 8px; text-align: center;
  font: 700 14px var(--font-head); color: var(--ink);
}
.step--wide { grid-template-columns: minmax(0, 1fr); }
.step--wide .step__text { text-align: center; }
.step--wide .step__text p { margin-inline: auto; }
.how__cta { text-align: center; margin-top: clamp(40px, 6vw, 72px); }

/* ---------- Misiones (cartas que giran) ---------- */
.missions {
  background: var(--navy); color: var(--white);
  padding: clamp(56px, 8vw, 100px) 0;
  position: relative;
}
.missions::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .11) 1.6px, transparent 1.7px);
  background-size: 24px 24px; pointer-events: none;
}
.missions .container { position: relative; }
.cards {
  display: grid; gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 920px; margin: 0 auto;
}
.cards li { text-align: center; }
.card {
  display: block; width: 100%; max-width: 280px; margin: 0 auto;
  aspect-ratio: 12 / 17;
  background: none; border: 0; padding: 0; cursor: pointer;
  perspective: 1200px;
  position: relative;
}
.card__face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform .65s cubic-bezier(.2, .8, .2, 1);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 40px -16px rgba(0, 0, 0, .6);
}
.card__face img { width: 100%; height: 100%; object-fit: cover; }
.card__face--front { transform: rotateY(180deg); }
.card[aria-pressed="true"] .card__face--back { transform: rotateY(-180deg); }
.card[aria-pressed="true"] .card__face--front { transform: rotateY(0); }
.card:hover { transform: translateY(-4px); }
.card:focus-visible { outline: 4px solid var(--yellow); outline-offset: 6px; border-radius: 18px; }
.card { transition: transform .2s ease; }
.card__caption { margin: 16px 0 0; display: grid; gap: 2px; }
.card__caption strong { font: 700 18px var(--font-head); }
.card__caption span { font-size: 14px; opacity: .8; }
.legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px;
  margin-top: 44px; font-weight: 700; font-size: 15px;
}
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 2px solid var(--white); }

/* ---------- Quién está detrás ---------- */
.about { padding: clamp(56px, 8vw, 100px) 0; background: var(--cream-deep); }
.about__inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.about__photo { margin: 0; justify-self: center; width: min(420px, 100%); transform: rotate(-2deg); }
.about__photo img {
  border-radius: var(--radius); border: 6px solid var(--white);
  box-shadow: var(--shadow-card); aspect-ratio: 4 / 5; object-fit: cover;
}
.about__text h2 { margin-bottom: 18px; }
.about__text p { font-size: 18px; color: var(--ink-soft); }
.about__sign { font: 700 18px var(--font-head); color: var(--ink); margin-top: 8px; }

/* ---------- FAQ ---------- */
.faq { padding: clamp(56px, 8vw, 100px) 0; }
.accordion { display: grid; gap: 12px; }
.accordion details {
  background: var(--white); border-radius: var(--radius-sm);
  border: 3px solid var(--navy); box-shadow: 0 4px 0 var(--navy);
  overflow: hidden;
}
.accordion summary {
  cursor: pointer; list-style: none;
  padding: 18px 56px 18px 22px;
  font: 700 19px var(--font-head);
  position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+"; position: absolute; right: 18px; top: 50%; translate: 0 -50%;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--yellow); color: var(--navy); font: 700 22px/1 var(--font-head);
  transition: rotate .2s ease;
}
.accordion details[open] summary::after { rotate: 45deg; }
.accordion details p { padding: 0 22px 20px; margin: 0; color: var(--ink-soft); }

/* ---------- CTA final ---------- */
.cta { background: var(--yellow); padding: clamp(56px, 8vw, 100px) 0; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(29, 43, 94, .12) 1.6px, transparent 1.7px);
  background-size: 24px 24px; pointer-events: none;
}
.cta__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; align-items: center; }
.cta__photo { margin: 0; justify-self: center; width: min(360px, 100%); transform: rotate(2deg); }
.cta__photo img {
  border-radius: var(--radius); border: 6px solid var(--white);
  box-shadow: 0 30px 50px -20px rgba(29, 43, 94, .5); aspect-ratio: 4 / 5; object-fit: cover;
}
.cta__text { text-align: center; }
.cta__text h2 { margin-bottom: 14px; }
.cta__text > p { font-size: 19px; max-width: 46ch; margin-inline: auto; }
.cta__phone { margin-top: 18px; font-size: 15px; }
.cta__phone a { font-weight: 800; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: var(--white); padding: 36px 0; }
.footer__inner { display: grid; gap: 14px; justify-items: center; text-align: center; }
.brand--footer { margin: 0; }
.footer__links { display: flex; gap: 20px; margin: 0; font-weight: 700; }
.footer__copy { margin: 0; font-size: 14px; opacity: .7; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: var(--navy);
  border: 3px solid var(--navy); box-shadow: 0 5px 0 var(--navy), 0 14px 30px -10px rgba(0, 0, 0, .4);
}
.wa-float .ico { width: 32px; height: 32px; }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; translate: 0 24px; transition: opacity .6s ease, translate .6s ease; }
.reveal.is-visible { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; translate: none; transition: none; }
  .card__face { transition: none; }
}

/* ==========================================================
   Desktop
   ========================================================== */
@media (min-width: 760px) {
  .topbar__nav { display: flex; }
  .topbar .btn--wa { display: inline-flex; }
  .wa-float { display: none; }

  .hero__inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .hero__photo { justify-self: end; width: min(420px, 100%); }

  .step { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .step:nth-child(even) .step__media { order: 2; }
  .step--wide { grid-template-columns: minmax(0, 1fr); }
  .step__media { width: min(460px, 100%); }

  .about__inner { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .cta__inner { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .cta__text { text-align: left; }
  .cta__text > p { margin-inline: 0; }

  .footer__inner { grid-template-columns: 1fr auto 1fr; justify-items: stretch; text-align: left; }
  .footer__links { justify-self: center; }
  .footer__copy { text-align: right; }
}

@media (max-width: 520px) {
  .step__strip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .step__strip figure:first-child { grid-column: 1 / -1; }
  .step__strip figure:first-child img { aspect-ratio: 16 / 10; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}
