/* Tokens de PoliglotaKidsApp: shared/.../Design.kt (23-09-2026). */
:root {
  --bg: #fdf8ff;
  --card: #ffffff;
  --ink: #2b2140;
  --ink2: #7d6e93;
  --dim: #ede7f4;
  --p: #432969;
  --p2: #6a46a8;
  --green: #3b8c3f;
  --green-soft: #e9f6ea;
  --gold: #f0c84b;
  --gold-d: #d9a72b;
  --gold-soft: #fbf0d4;
  --k-red: #e4674f;
  --k-gold: #d9a72b;
  --k-green: #3fa96b;
  --k-blue: #3e8fd6;
  --shadow: 0 14px 34px rgba(67, 41, 105, 0.12);
  --radius: 26px;
  font-family: Nunito, system-ui, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); overflow-x: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, .wordmark { font-family: "Bricolage Grotesque", Nunito, sans-serif; }

/* ---------- Barra ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(253, 248, 255, 0.92);
  backdrop-filter: blur(8px);
}
.topbar__back { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-weight: 800; text-decoration: none; }
.topbar__back img { border-radius: 8px; }
.topbar__sep { color: var(--dim); font-weight: 800; }
.topbar__cta { margin-left: auto; }

.wordmark { font-weight: 800; color: var(--p); letter-spacing: -0.02em; }
.wordmark b { font-weight: 800; }
.wordmark .k { color: var(--k-red); }
.wordmark .i { color: var(--k-gold); }
.wordmark .d { color: var(--k-green); }
.wordmark .s { color: var(--k-blue); }
.wordmark--small { font-size: 18px; }
.sparkle { font-size: 0.6em; vertical-align: 0.5em; }

/* ---------- Botones ---------- */
.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 26px;
  background: var(--p);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(67, 41, 105, 0.22);
  transition: transform 150ms ease;
}
.pill-button:hover { transform: translateY(-1px); }
.pill-button--ghost { background: var(--card); color: var(--p); box-shadow: inset 0 0 0 2px var(--dim); }
.pill-button--small { min-height: 38px; padding: 0 16px; font-size: 14px; box-shadow: none; }

/* ---------- Portada ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 40px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 70px;
}
.hero__floaters { position: absolute; inset: 0; pointer-events: none; }
.hero__floaters img {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 82px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  transform: rotate(var(--r));
  animation: bob 7s ease-in-out infinite;
  animation-delay: var(--d);
  opacity: 0.9;
}
@keyframes bob { 50% { transform: rotate(var(--r)) translateY(-12px); } }

.hero__copy { position: relative; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 7px 14px;
  background: var(--gold-soft);
  border-radius: 999px;
  font-weight: 800;
  color: #8a6512;
}
.status-chip__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold-d); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero h1 { margin: 0; }
.hero h1 .wordmark { display: block; font-size: clamp(40px, 6vw, 64px); line-height: 1; }
.hero__headline { display: block; margin-top: 14px; font-size: clamp(26px, 3.3vw, 38px); line-height: 1.12; color: var(--ink); }
.hero__lead { margin: 16px 0 26px; max-width: 520px; font-size: 19px; line-height: 1.5; color: var(--ink2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__actions--center { justify-content: center; }

/* ---------- Teléfono con recorrido ---------- */
.hero__device { position: relative; display: grid; justify-items: center; gap: 14px; }
.phone {
  width: min(320px, 78vw);
  aspect-ratio: 540 / 1133;
  padding: 10px;
  background: #1d1628;
  border-radius: 44px;
  box-shadow: 0 30px 60px rgba(43, 33, 64, 0.28);
}
.phone__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 34px; background: var(--bg); }
.phone__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0;
  transform: translateX(18%) scale(0.98);
  transition: opacity 600ms ease, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.phone__shot.is-active { opacity: 1; transform: none; }
.phone__shot.is-leaving { opacity: 0; transform: translateX(-18%) scale(0.98); }
.phone__shot.is-active.is-scrolling { animation: peek-scroll 5s ease-in-out 700ms both; }
@keyframes peek-scroll { 40%, 70% { object-position: 0 60%; } }
.tour-caption {
  max-width: 320px;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  font-weight: 700;
  text-align: center;
}
.tour-dots { display: flex; gap: 8px; }
.tour-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: var(--dim); transition: width 200ms; }
.tour-dots button[aria-selected="true"] { width: 28px; background: var(--p2); }

/* ---------- Secciones ---------- */
.section { max-width: 1060px; margin: 0 auto; padding: 60px 24px; }
.section__head { max-width: 640px; margin: 0 auto 30px; text-align: center; }
.section__head h2 { margin: 6px 0 10px; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; color: var(--ink); }
.section__head p { margin: 0; font-size: 18px; color: var(--ink2); }
.eyebrow { margin: 0; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; color: var(--p2); }

/* ---------- Demo ---------- */
.demo-card {
  display: grid;
  gap: 22px;
  max-width: 760px;
  margin: 0 auto;
  padding: 26px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.demo-card__stage { min-height: 360px; display: grid; }
.demo-start { display: grid; place-items: center; gap: 14px; }
.demo-start__mascot { width: 170px; animation: bob 5s ease-in-out infinite; --r: 0deg; }
.demo-play[hidden], .demo-done[hidden], .demo-start[hidden] { display: none; }
.demo-play { display: grid; gap: 20px; align-content: start; }
.demo-bubble { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 14px; }
.demo-bubble img { width: 70px; }
.demo-bubble p { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 26px; font-weight: 800; }
.speaker { width: 56px; height: 56px; border: 0; border-radius: 50%; background: var(--gold-soft); font-size: 24px; }
.speaker.is-playing { animation: ring 600ms ease-in-out infinite; }
@keyframes ring { 50% { transform: scale(1.08); } }
.demo-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.demo-option {
  position: relative;
  padding: 10px;
  background: var(--card);
  border: 3px solid var(--dim);
  border-radius: 22px;
  transition: transform 160ms, border-color 160ms, opacity 200ms;
}
.demo-option:hover { transform: translateY(-3px); }
.demo-option img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.demo-option.is-right { border-color: var(--green); background: var(--green-soft); animation: win 500ms ease; }
.demo-option.is-wrong { border-color: var(--k-red); animation: nope 400ms ease; }
.demo-option.is-faded { opacity: 0.35; }
.demo-option__label { display: block; margin-top: 6px; font-weight: 800; font-size: 18px; min-height: 1.4em; }
@keyframes win { 40% { transform: scale(1.06); } }
@keyframes nope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.demo-done { display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; }
.demo-done__title { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 34px; font-weight: 800; color: var(--green); }
.demo-done p { max-width: 460px; color: var(--ink2); font-size: 17px; }

.mini-album { padding: 16px; background: #f4eefb; border-radius: 20px; }
.mini-album__title { margin: 0 0 10px; font-weight: 800; color: var(--p); }
.mini-album__slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.slot {
  position: relative;
  aspect-ratio: 3 / 3.6;
  display: grid;
  place-items: center;
  background: #e6ddf1;
  border: 2px dashed #cdbfe0;
  border-radius: 16px;
  overflow: hidden;
}
.slot img { width: 76%; mix-blend-mode: multiply; filter: grayscale(1) contrast(1.4) opacity(0.22) blur(1px); }
.slot.is-won { background: var(--card); border: 2px solid var(--gold); animation: stick 520ms cubic-bezier(0.2, 1.4, 0.4, 1); }
.slot.is-won img { filter: none; mix-blend-mode: normal; }
.slot__stars { position: absolute; bottom: 6px; font-size: 13px; }
@keyframes stick { 0% { transform: scale(0.6) rotate(-10deg); } 100% { transform: none; } }
.fly {
  position: fixed;
  z-index: 50;
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: all 650ms cubic-bezier(0.5, 0, 0.2, 1);
  pointer-events: none;
}

/* ---------- Idiomas ---------- */
.lang-showcase { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: center; max-width: 820px; margin: 0 auto; }
.flip-card {
  padding: 18px 18px 22px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 420ms ease;
  transform-style: preserve-3d;
}
.flip-card.is-flipping { transform: rotateY(90deg); }
.flip-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
.flip-card__word { margin: 14px 0 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 40px; font-weight: 800; }
.flip-card__lang { margin: 2px 0 0; color: var(--ink2); font-weight: 700; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-row button {
  min-height: 48px;
  padding: 0 18px;
  background: var(--card);
  border: 2px solid var(--dim);
  border-radius: 999px;
  font-weight: 800;
  font-size: 16px;
  color: var(--p);
}
.chip-row button[aria-pressed="true"] { background: var(--p); border-color: var(--p); color: #fff; }
.thumb-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 12px; }
.thumb-row button { width: 64px; padding: 4px; background: var(--card); border: 2px solid transparent; border-radius: 16px; box-shadow: 0 4px 10px rgba(67, 41, 105, 0.1); }
.thumb-row button[aria-pressed="true"] { border-color: var(--gold); }
.thumb-row img { border-radius: 11px; }


/* ---------- Familias ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.trust-grid li { display: grid; gap: 4px; padding: 20px; background: var(--card); border-radius: 20px; color: var(--ink2); }
.trust-grid span { font-size: 26px; }
.trust-grid strong { color: var(--ink); font-size: 17px; }

/* ---------- Lanzamiento ---------- */
.launch-card {
  position: relative;
  max-width: 720px;
  margin: 30px auto 0;
  padding: 58px 30px 34px;
  background: linear-gradient(160deg, #fff6d8, #fdf8ff 70%);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  text-align: center;
}
.launch-card__mascot { position: absolute; top: -54px; left: 50%; width: 110px; transform: translateX(-50%); }
.launch-card h2 { margin: 6px 0 10px; font-size: clamp(28px, 3.4vw, 38px); }
.launch-card p { max-width: 520px; margin: 0 auto 20px; color: var(--ink2); font-size: 18px; }
.launch-card__note { margin-top: 16px !important; font-size: 14px !important; color: #8a6512 !important; }
.launch-card__note[hidden] { display: none; }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; max-width: 1060px; margin: 0 auto; padding: 30px 24px 50px; color: var(--ink2); font-size: 14px; }
.footer a { color: var(--p); font-weight: 800; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; text-align: left; }
  .hero__floaters { display: none; }
  .lang-showcase { grid-template-columns: 1fr; justify-items: center; }
  .flip-card { width: min(300px, 100%); }
  .lang-controls { width: 100%; }
  .trust-grid { grid-template-columns: 1fr; }
  .demo-card { padding: 18px; }
  .demo-options { gap: 10px; }
  .demo-bubble p { font-size: 22px; }
  .topbar__back span, .topbar__sep { display: none; }
}
@media (max-width: 480px) {
  .topbar__back { font-size: 0; }
  .mini-album__slots { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Cabecera común (header.css) y pie ---------- */
.site-header { background: rgba(253, 248, 255, 0.94); }
.site-foot { display: grid; gap: 10px; justify-items: center; max-width: 1060px; margin: 0 auto; padding: 26px 24px 44px; text-align: center; font-size: 14px; color: var(--ink2); border-top: 1px solid var(--dim); }
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.site-foot a { color: var(--p); font-weight: 800; text-decoration: none; }

/* ---------- Datos bajo el móvil (15 colecciones · 0 anuncios) ---------- */
.phone-wrap { position: relative; }
.hero-stats { display: flex; justify-content: center; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.hero-stats li {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 10px 16px 10px 10px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(67, 41, 105, 0.1);
}
.hero-stats__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #f1eafb;
  border-radius: 14px;
  font-size: 20px;
}
.hero-stats__icon--green { background: var(--green-soft); }
.hero-stats strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 24px; line-height: 1; color: var(--p); }
.hero-stats li span:last-child { font-size: 13px; font-weight: 800; color: var(--ink2); line-height: 1.2; }

/* ---------- Pestañas de etapa ---------- */
.stage-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 760px;
  margin: 0 auto 16px;
}
.stage-tabs button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(67, 41, 105, 0.08);
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms, transform 160ms;
}
.stage-tabs button:hover { transform: translateY(-2px); }
.stage-tabs button[aria-selected="true"] { border-color: var(--green); background: var(--green-soft); }
.stage-tabs img { width: 46px; flex: none; }
.stage-tabs span { display: grid; line-height: 1.2; }
.stage-tabs strong { font-family: "Bricolage Grotesque", sans-serif; font-size: 20px; color: var(--p); }
.stage-tabs small { color: var(--ink2); font-weight: 700; font-size: 14px; }

/* ---------- Demo: columna de idiomas + juego ---------- */
.demo-card { grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 22px; max-width: 900px; }
.demo-main { display: grid; gap: 20px; min-width: 0; }
.demo-card__stage { min-height: 300px; }
.demo-langs { display: grid; gap: 6px; padding: 12px 10px; background: #f8f4fc; border-radius: 18px; }
.demo-langs__label { margin: 0 4px 4px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink2); }
.demo-langs__list { display: grid; gap: 4px; }
.demo-langs__note { margin: 6px 4px 0; font-size: 12px; font-weight: 700; color: var(--ink2); }
.demo-lang {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--p);
  font-weight: 800;
  font-size: 14px;
  text-align: left;
}
.demo-lang img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(43, 33, 64, 0.15); }
.demo-lang:hover { background: var(--card); }
.demo-lang[aria-pressed="true"] { background: var(--card); border-color: var(--gold); }
.demo-lang.is-off { cursor: not-allowed; opacity: 0.45; }
.demo-lang.is-off img { filter: grayscale(1); }
.demo-lang.is-off:hover { background: transparent; }
.demo-lang i { margin-left: auto; font-style: normal; font-size: 13px; }

/* Pantalla de inicio: la etapa manda, la mascota no ocupa sitio. */
.demo-start { align-content: center; gap: 8px; text-align: center; }
.demo-start__icon { width: 84px; }
.demo-start__name { margin: 0; font-family: "Bricolage Grotesque", sans-serif; font-size: 28px; font-weight: 800; color: var(--p); }
.demo-start__what { max-width: 420px; margin: 0 0 10px; color: var(--ink2); font-size: 17px; }
.demo-bubble { grid-template-columns: 56px 1fr auto; }
.demo-bubble img { width: 56px; }
.demo-bubble p { font-size: 24px; }
.speaker[hidden], .demo-options[hidden], .demo-picture[hidden], .word-cells[hidden], .tray[hidden], .tray-actions[hidden] { display: none; }

/* Brote y Árbol: dibujo, casillas y bandeja de letras (App.kt). */
.demo-picture { justify-self: center; width: 160px; padding: 8px; background: var(--card); border-radius: 24px; box-shadow: var(--shadow); }
.demo-picture img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
.word-cells { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cell {
  display: grid;
  place-items: center;
  width: 50px;
  height: 58px;
  border-radius: 14px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
}
.cell.is-given { background: var(--dim); color: var(--ink2); }
.cell.is-hole { background: var(--card); border: 3px dashed var(--gold); }
.cell.is-typed { background: var(--gold-soft); border: 3px solid var(--gold); }
.cell.is-retry { border-color: var(--k-red); animation: nope 400ms ease; }
.cell.is-done { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.tray { display: grid; grid-template-columns: repeat(6, minmax(0, 60px)); justify-content: center; gap: 8px; }
.tray--vowels { grid-template-columns: repeat(auto-fit, minmax(0, 66px)); }
.tray__key {
  height: 60px;
  background: var(--card);
  border: 0;
  border-radius: 16px;
  box-shadow: inset 0 -3px 0 var(--dim), 0 4px 10px rgba(67, 41, 105, 0.1);
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--p);
}
.tray__key:active { transform: translateY(2px); }
.tray-actions { display: flex; justify-content: center; gap: 12px; }

/* ---------- Idiomas con bandera ---------- */
.chip-row button { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px 0 8px; }
.chip-row img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px rgba(43, 33, 64, 0.15); }

/* ---------- Familias ---------- */
.trust-grid p { margin: 0; }

@media (max-width: 860px) {
  .stage-tabs { gap: 8px; }
  .stage-tabs button { flex-direction: column; gap: 4px; padding: 10px 6px; text-align: center; }
  .stage-tabs span { justify-items: center; }
  .stage-tabs img { width: 40px; }
  .stage-tabs strong { font-size: 17px; }
  .stage-tabs small { font-size: 12px; }
  .demo-card { grid-template-columns: 1fr; gap: 14px; }
  .demo-langs { padding: 8px; }
  .demo-langs__label { display: none; }
  .demo-langs__list { display: flex; justify-content: space-between; }
  .demo-lang { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 11px; }
  .demo-lang i { position: absolute; top: 0; right: 2px; }
  .demo-langs__note { margin: 0; text-align: center; }
  .demo-card__stage { min-height: 260px; }
  .cell { width: 42px; height: 50px; font-size: 24px; }
  .tray { grid-template-columns: repeat(5, minmax(0, 56px)); }
  .tray__key { height: 54px; font-size: 22px; }
}
