/* ============================================================
   FuturIA Kids — hoja de estilos
   ============================================================ */
:root {
  --bg: #FFF9F2;
  --bg-tint: #F3EEFF;
  --ink: #221B4A;
  --ink-soft: #5A527E;
  --white: #FFFFFF;

  --purple: #7C5CFF;
  --purple-dark: #5B44C7;
  --purple-200: #D8CCFF;
  --pink: #FF5DA2;
  --yellow: #FFC93C;
  --cyan: #5CF2FF;
  --cyan-dark: #00C2D1;
  --green: #3DDC97;

  --dark: #12102B;
  --dark-2: #1D1A40;

  --radius: 24px;
  --shadow: 0 10px 30px rgba(34, 27, 74, 0.10);
  --shadow-lg: 0 18px 50px rgba(34, 27, 74, 0.16);

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

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 600; }

.container { width: min(1140px, 92%); margin-inline: auto; }
.container--narrow { width: min(820px, 92%); }

.grad-text {
  background: linear-gradient(90deg, var(--purple), var(--pink) 55%, var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- chips & botones ---------- */
.chip {
  display: inline-block;
  background: var(--white);
  border: 2px solid var(--purple-200);
  color: var(--purple-dark);
  font-weight: 800;
  font-size: .85rem;
  padding: .35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.chip--glow {
  background: rgba(124, 92, 255, .15);
  border-color: rgba(124, 92, 255, .55);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(124, 92, 255, .35);
}

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  padding: .8rem 1.7rem;
  font-size: 1rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:active { transform: scale(.96); }
.btn--lg { padding: 1rem 2.1rem; font-size: 1.1rem; }
.btn--sm { padding: .5rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; }
.btn--primary {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: var(--white);
  box-shadow: 0 8px 22px rgba(124, 92, 255, .45);
}
.btn--primary:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 0 14px 30px rgba(255, 93, 162, .45); }
.btn--ghost {
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, .45);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .22); transform: translateY(-3px); }
.btn--outline {
  background: var(--white);
  color: var(--purple-dark);
  border: 2px solid var(--purple-200);
}
.btn--outline:hover { border-color: var(--purple); transform: translateY(-3px); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 16, 43, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 0;
}
.nav__logo { display: flex; align-items: center; gap: .5rem; }
.nav__logo-bot { font-size: 1.7rem; animation: bounce 2.4s ease-in-out infinite; }
.nav__logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; color: var(--white); }
.nav__links { display: flex; align-items: center; gap: 1.4rem; }
.nav__links a { color: #CFC9F2; font-weight: 700; font-size: .95rem; transition: color .15s; }
.nav__links a:hover { color: var(--cyan); }
.nav__links a.nav__cta { color: var(--white); }
.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.nav__burger span { display: block; width: 26px; height: 3px; background: var(--white); border-radius: 2px; margin: 5px 0; transition: .25s; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(1200px 600px at 75% -10%, #33265E 0%, var(--dark) 60%);
  color: var(--white);
  padding: 4.5rem 0 6.5rem;
  overflow: hidden;
}
.hero__stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 12% 25%, #fff8, transparent),
    radial-gradient(2px 2px at 28% 70%, #fff6, transparent),
    radial-gradient(3px 3px at 45% 15%, #ffd97a99, transparent),
    radial-gradient(2px 2px at 63% 45%, #fff7, transparent),
    radial-gradient(2px 2px at 80% 20%, #9ef7ff99, transparent),
    radial-gradient(2px 2px at 90% 65%, #fff6, transparent),
    radial-gradient(3px 3px at 55% 85%, #ff9ecb88, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2.5rem;
  align-items: center;
}
.hero__sub { font-size: 1.15rem; color: #D9D4F7; margin: 1.1rem 0 1.7rem; max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: 1.6rem; }
.hero__badges li { font-weight: 800; font-size: .92rem; color: #BDB5EA; }

.hero__art { position: relative; display: grid; place-items: center; min-height: 380px; }
.robi { width: min(320px, 80%); position: relative; z-index: 2; animation: floaty 4s ease-in-out infinite; filter: drop-shadow(0 24px 30px rgba(0,0,0,.4)); }
.robi__antenna-tip { animation: pulse 1.6s ease-in-out infinite; transform-origin: 160px 14px; }
.robi__arm--l { transform-origin: 69px 210px; animation: waveArm 3s ease-in-out infinite; }
@keyframes waveArm {
  0%, 70%, 100% { transform: rotate(0deg); }
  78%, 92% { transform: rotate(-18deg); }
  85% { transform: rotate(6deg); }
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.blob--1 { width: 340px; height: 340px; background: var(--purple); top: 0; right: -40px; }
.blob--2 { width: 260px; height: 260px; background: var(--pink); bottom: -30px; left: 0; opacity: .35; }

.hero__float { position: absolute; font-size: 2rem; z-index: 3; animation: floaty 3.4s ease-in-out infinite; }
.hero__float--1 { top: 8%; left: 6%; animation-delay: .3s; }
.hero__float--2 { bottom: 14%; right: 4%; animation-delay: .9s; }
.hero__float--3 { top: 18%; right: 12%; animation-delay: 1.4s; font-size: 1.5rem; }
.hero__float--4 { bottom: 6%; left: 16%; animation-delay: .6s; }

.hero__wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 70px; }

/* ---------- ticker ---------- */
.ticker { background: var(--yellow); overflow: hidden; padding: .55rem 0; transform: rotate(-1deg) scale(1.02); box-shadow: var(--shadow); }
.ticker__track { display: flex; gap: 2.6rem; width: max-content; animation: ticker 22s linear infinite; }
.ticker__track span { font-family: var(--font-head); font-weight: 600; color: var(--dark); white-space: nowrap; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats { padding: 3.2rem 0 1rem; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.stat__num { display: block; font-family: var(--font-head); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--purple); }
.stat__label { font-weight: 800; color: var(--ink-soft); font-size: .92rem; }

/* ---------- secciones ---------- */
.section { padding: 4.5rem 0; }
.section--tint { background: var(--bg-tint); }
.section--dark { background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%); color: var(--white); }
.section__head { text-align: center; max-width: 46rem; margin: 0 auto 2.8rem; }
.section__head p { color: var(--ink-soft); margin-top: .8rem; font-size: 1.06rem; }
.section__head--light p { color: #C9C3EE; }

/* ---------- cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.8rem;
}
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.pillar { text-align: center; border-top: 6px solid transparent; transition: transform .2s ease, box-shadow .2s ease; }
.pillar:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: var(--shadow-lg); }
.pillar--code  { border-color: var(--cyan-dark); }
.pillar--logic { border-color: var(--yellow); }
.pillar--robot { border-color: var(--green); }
.pillar--ai    { border-color: var(--pink); }
.pillar__icon { font-size: 2.6rem; margin-bottom: .6rem; }
.pillar p { color: var(--ink-soft); font-size: .95rem; margin: .5rem 0 1rem; }
.pillar__tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 900;
  background: var(--bg-tint);
  color: var(--purple-dark);
  border-radius: 999px;
  padding: .3rem .8rem;
}

/* ---------- rutas ---------- */
.route { position: relative; display: flex; flex-direction: column; gap: .8rem; padding-top: 0; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.route:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.route__banner {
  margin: 0 -1.8rem;
  padding: 1.6rem 1.8rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between;
}
.route__banner--green  { background: linear-gradient(135deg, #3DDC97, #9BEFC9); }
.route__banner--purple { background: linear-gradient(135deg, #7C5CFF, #B9A6FF); }
.route__banner--pink   { background: linear-gradient(135deg, #FF5DA2, #FFA1C9); }
.route__emoji { font-size: 2.4rem; }
.route__age { font-family: var(--font-head); font-weight: 700; background: rgba(255,255,255,.85); border-radius: 999px; padding: .3rem .9rem; font-size: .9rem; }
.route p { color: var(--ink-soft); font-size: .95rem; }
.route__list { display: grid; gap: .45rem; margin-bottom: .6rem; font-weight: 700; font-size: .92rem; }
.route .btn { margin-top: auto; text-align: center; }
.route--featured { border: 3px solid var(--purple); transform: scale(1.03); }
.route--featured:hover { transform: scale(1.03) translateY(-8px); }
.route__pop {
  position: absolute; top: 14px; right: -38px;
  background: var(--yellow);
  font-weight: 900; font-size: .78rem;
  padding: .35rem 3rem;
  transform: rotate(38deg);
  z-index: 2;
}

/* ---------- mapa de aventura ---------- */
.quest { position: relative; margin-top: 1rem; }
.quest__path { position: absolute; top: 26px; left: 0; width: 100%; height: 120px; }
.quest__steps { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; text-align: center; }
.quest__step h4 { margin: .7rem 0 .3rem; font-size: 1.05rem; }
.quest__step p { font-size: .86rem; color: var(--ink-soft); }
.quest__orb {
  display: inline-grid; place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--orb, var(--purple));
  color: var(--dark);
  font-family: var(--font-head);
  font-weight: 700; font-size: 1.4rem;
  box-shadow: 0 6px 0 rgba(34,27,74,.18), var(--shadow);
  transition: transform .2s ease;
}
.quest__step:hover .quest__orb { transform: translateY(-6px) scale(1.08); }

/* ---------- gamificación ---------- */
.gamify {
  margin-top: 3.2rem;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.5rem;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.8rem 2rem;
}
.gamify__xp-head { display: flex; justify-content: space-between; font-weight: 900; margin-bottom: .5rem; }
.xpbar { height: 22px; background: var(--bg-tint); border-radius: 999px; overflow: hidden; border: 2px solid var(--purple-200); }
.xpbar__fill {
  height: 100%; width: 0%;
  background: repeating-linear-gradient(45deg, var(--purple), var(--purple) 12px, var(--pink) 12px, var(--pink) 24px);
  border-radius: 999px;
  transition: width 1.6s cubic-bezier(.22, 1, .36, 1);
}
.gamify__hint { margin-top: .6rem; font-size: .85rem; color: var(--ink-soft); }
.gamify__badges { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.badge {
  display: grid; place-items: center; gap: .15rem;
  width: 92px; padding: .8rem .4rem;
  background: var(--bg-tint);
  border: 2px dashed var(--purple-200);
  border-radius: 18px;
  font-size: 1.6rem;
  transition: transform .18s ease;
}
.badge:hover { transform: rotate(-4deg) scale(1.07); }
.badge small { font-size: .68rem; font-weight: 900; color: var(--purple-dark); text-align: center; }
.badge--locked { opacity: .55; filter: grayscale(.6); }

/* ---------- mini juego ---------- */
.game {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.2rem;
  align-items: start;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 2rem;
}
.game__board {
  display: grid;
  grid-template-columns: repeat(5, 64px);
  grid-template-rows: repeat(5, 64px);
  gap: 6px;
}
.game__cell {
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 2rem;
  transition: background .15s;
}
.game__cell--goal { background: rgba(255, 201, 60, .22); }
.game__cell--wall { background: rgba(255, 93, 162, .18); font-size: 1.6rem; }
.game__cell--robi { background: rgba(92, 242, 255, .18); }
.game__label { font-weight: 900; color: #C9C3EE; margin-bottom: .5rem; }
.game__program {
  min-height: 58px;
  background: rgba(0,0,0,.3);
  border: 2px dashed rgba(255,255,255,.25);
  border-radius: 14px;
  padding: .6rem;
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: 1.1rem;
}
.game__empty { color: #8F87C4; font-weight: 700; font-size: .9rem; align-self: center; }
.game__chip {
  background: var(--purple);
  border-radius: 10px;
  padding: .25rem .55rem;
  font-size: 1.25rem;
  cursor: pointer;
  border: none;
  transition: transform .12s;
}
.game__chip:hover { transform: scale(1.12); background: var(--pink); }
.game__pad { display: grid; grid-template-columns: repeat(4, 58px); gap: .5rem; margin-bottom: 1.2rem; }
.game__btn {
  font-size: 1.5rem;
  padding: .5rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: rgba(255,255,255,.14);
  transition: transform .12s, background .12s;
}
.game__btn:hover { transform: translateY(-3px); background: rgba(92,242,255,.3); }
.game__actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.game__msg { margin-top: 1rem; font-weight: 800; color: var(--yellow); min-height: 1.6em; }

/* ---------- testimonios ---------- */
.quote blockquote { font-size: .98rem; color: var(--ink-soft); margin: .6rem 0 1rem; }
.quote__stars { letter-spacing: 2px; }
.quote figcaption { display: flex; align-items: center; gap: .6rem; font-weight: 900; font-size: .9rem; }
.quote__avatar {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--av, var(--purple));
  color: var(--dark);
  font-family: var(--font-head);
  font-weight: 700;
}

/* ---------- faq ---------- */
.faq { display: grid; gap: .9rem; }
.faq__item {
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.1rem 1.4rem;
  border: 2px solid transparent;
  transition: border-color .2s;
}
.faq__item[open] { border-color: var(--purple-200); }
.faq__item summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "➕"; font-size: .9rem; transition: transform .2s; }
.faq__item[open] summary::after { content: "➖"; }
.faq__item p { margin-top: .7rem; color: var(--ink-soft); font-size: .96rem; }

/* ---------- cta ---------- */
.cta { background: radial-gradient(900px 500px at 20% 0%, #33265E 0%, var(--dark) 65%); color: var(--white); }
.cta__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.cta__copy p { color: #D9D4F7; margin: .9rem 0 1.2rem; font-size: 1.08rem; }
.cta__perks { display: grid; gap: .5rem; font-weight: 800; }
.cta__form { color: var(--ink); display: grid; gap: 1rem; }
.cta__form h3 { text-align: center; }
.cta__form label { display: grid; gap: .35rem; font-weight: 900; font-size: .88rem; }
.cta__form input, .cta__form select {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: .75rem 1rem;
  border-radius: 14px;
  border: 2px solid var(--purple-200);
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.cta__form input:focus, .cta__form select:focus { border-color: var(--purple); box-shadow: 0 0 0 4px rgba(124,92,255,.18); }
.cta__ok { text-align: center; font-weight: 900; color: var(--purple-dark); background: var(--bg-tint); border-radius: 14px; padding: .8rem; }

/* ---------- footer ---------- */
.footer { background: var(--dark); color: #BDB5EA; padding: 3rem 0 1.4rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer__logo { font-size: 1.4rem; margin-bottom: .6rem; }
.footer__tag { font-size: .95rem; max-width: 26rem; }
.footer h4 { color: var(--white); margin-bottom: .7rem; }
.footer a { display: block; padding: .22rem 0; font-weight: 700; font-size: .95rem; transition: color .15s; }
.footer a:hover { color: var(--cyan); }
.footer__legal { text-align: center; font-size: .85rem; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.2rem; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__actions, .hero__badges { justify-content: center; }
  .cards4 { grid-template-columns: repeat(2, 1fr); }
  .cards3 { grid-template-columns: 1fr; max-width: 30rem; margin-inline: auto; }
  .route--featured { transform: none; }
  .route--featured:hover { transform: translateY(-8px); }
  .quest__path { display: none; }
  .quest__steps { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
  .gamify { grid-template-columns: 1fr; }
  .game { grid-template-columns: 1fr; justify-items: center; }
  .cta__inner { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; text-align: center; }
  .footer__tag { margin-inline: auto; }
}
@media (max-width: 760px) {
  .nav__burger { display: block; }
  .nav__links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--dark);
    padding: 1.2rem 0 1.6rem;
    gap: 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .cards4 { grid-template-columns: 1fr; max-width: 24rem; margin-inline: auto; }
  .quest__steps { grid-template-columns: 1fr; }
  .game__board { grid-template-columns: repeat(5, 52px); grid-template-rows: repeat(5, 52px); }
  .game__cell { font-size: 1.6rem; }
}
