/* SoundMatch by EdNinja: shared styles for every page of the site. */

:root {
  --blue-900: #0b3f63;
  --blue-700: #0e5b8e;
  --blue-500: #1878c6;
  --sky: #e8f5ff;
  --sun: #ffc93c;
  --orange: #f47b20;
  --green: #5bb318;
  --ink: #142433;
  --ink-soft: #4a5b6b;
  --paper: #ffffff;
  --paper-2: #f5f9fc;
  --line: #dde7ef;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(11, 63, 99, 0.12);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-500); }
a:hover { color: var(--blue-700); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

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

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a { text-decoration: none; color: var(--ink-soft); font-weight: 700; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.top nav a:hover { background: var(--paper-2); color: var(--ink); }
.lang {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font: inherit; font-weight: 800; font-size: 14px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.lang:hover { background: var(--paper-2); }
@media (max-width: 720px) { .top nav a.hide-sm { display: none; } }

/* ---------- Buttons ---------- */
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff; text-decoration: none;
  padding: 10px 20px 10px 16px; border-radius: 14px; line-height: 1.1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.store:hover { color: #fff; transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; fill: currentColor; }
.store small { display: block; font-size: 11px; opacity: 0.85; }
.store strong { font-size: 20px; letter-spacing: -0.2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(160deg, rgba(14, 91, 142, 0.92), rgba(11, 63, 99, 0.96)), url("img/jungle.webp") center / cover;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 72px 0 88px; }
.eyebrow { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; background: rgba(255, 255, 255, 0.14); padding: 6px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.02; margin: 18px 0 16px; letter-spacing: -1.5px; }
.hero h1 span { color: var(--sun); }
.hero p.lead { font-size: clamp(18px, 2vw, 21px); max-width: 33ch; opacity: 0.92; margin: 0 0 28px; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero .cta .note { font-size: 14px; opacity: 0.8; }
.hero-art { position: relative; justify-self: center; width: min(440px, 100%); }
.hero-art .icon { width: 64%; margin: 0 auto; border-radius: 22%; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); animation: float 6s ease-in-out infinite; }
.hero-art .boy, .hero-art .girl { position: absolute; bottom: -24px; width: 36%; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.3)); }
.hero-art .boy { left: -6%; }
.hero-art .girl { right: -6%; }
@keyframes float { 50% { transform: translateY(-12px) rotate(-1.5deg); } }
@media (prefers-reduced-motion: reduce) { .hero-art .icon { animation: none; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding: 48px 0 72px; }
  .hero p.lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .hero-art { width: min(340px, 90%); }
}

/* ---------- Sections ---------- */
section { padding: 88px 0; scroll-margin-top: 64px; }
section.alt { background: var(--paper-2); }
.kicker { color: var(--orange); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.8px; margin: 0 0 14px; color: var(--blue-900); }
.sub { color: var(--ink-soft); font-size: 19px; max-width: 60ch; margin: 0 0 40px; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* ---------- Mini game ---------- */
.game-card {
  background: linear-gradient(160deg, #0f6a3f, #0b3f2c);
  border-radius: 32px; padding: 32px; color: #fff; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; align-items: center;
}
.game-card h3 { font-size: 28px; margin: 0 0 8px; line-height: 1.15; }
.game-card p { margin: 0 0 16px; opacity: 0.9; }
.game-status { font-weight: 800; min-height: 1.6em; color: var(--sun); }
.reset { font: inherit; font-weight: 800; background: rgba(255, 255, 255, 0.15); color: #fff; border: 0; padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.reset:hover { background: rgba(255, 255, 255, 0.25); }
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { aspect-ratio: 1; perspective: 800px; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.tile .in { display: block; position: relative; width: 100%; height: 100%; transition: transform 0.45s cubic-bezier(.3, 1.4, .6, 1); transform-style: preserve-3d; }
.tile.open .in, .tile.done .in { transform: rotateY(180deg); }
.tile .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.tile .face img { width: 100%; height: 100%; object-fit: contain; }
.tile .front { transform: rotateY(180deg); }
.tile .front svg { position: absolute; width: 42%; height: 42%; fill: #fff; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); }
.tile.done { cursor: default; }
.tile.done .front { animation: pop 0.5s ease; }
.tile.playing .front svg { animation: pulse 0.6s ease-in-out infinite; }
@keyframes pop { 50% { transform: rotateY(180deg) scale(1.08); } }
@keyframes pulse { 50% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .tile .in { transition: none; } .tile.done .front, .tile.playing .front svg { animation: none; } }
@media (max-width: 860px) { .game-card { grid-template-columns: 1fr; text-align: center; padding: 24px; } }

/* ---------- Levels ---------- */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.level { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.level .badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; font-size: 22px; margin-bottom: 14px; }
.level h3 { margin: 0 0 6px; font-size: 22px; }
.level p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .levels { grid-template-columns: 1fr; } }

/* ---------- Worlds ---------- */
.worlds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.world { text-align: center; }
.world img { width: 78%; margin: 0 auto 10px; transition: transform 0.25s ease; filter: drop-shadow(0 10px 16px rgba(11, 63, 99, 0.2)); }
.world:hover img { transform: translateY(-6px) rotate(-3deg); }
.world strong { display: block; font-size: 17px; }
.world span { font-size: 13px; font-weight: 800; color: var(--green); text-transform: uppercase; letter-spacing: 0.6px; }
.world span.premium { color: var(--orange); }
@media (max-width: 720px) { .worlds { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--paper); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.feature .em { font-size: 30px; line-height: 1; }
.feature h3 { margin: 12px 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--ink-soft); font-size: 16px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- Parents ---------- */
.parents { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.checks li::before { content: ""; flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6 11-11-1.4-1.4z' fill='%23fff'/%3E%3C/svg%3E") center / 18px no-repeat; }
.trust { background: var(--blue-700); color: #fff; border-radius: 28px; padding: 32px; position: relative; overflow: hidden; }
.trust h3 { margin: 0 0 12px; font-size: 24px; }
.trust p { margin: 0 0 10px; opacity: 0.92; }
.trust a { color: var(--sun); font-weight: 800; }
.trust .shuriken { position: absolute; width: 90px; right: -18px; top: -18px; opacity: 0.25; animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .trust .shuriken { animation: none; } }
@media (max-width: 860px) { .parents { grid-template-columns: 1fr; } }

/* ---------- Dojo teaser ---------- */
.dojo { background: radial-gradient(circle at 50% 0%, #1b4f78, #0b2236 70%); color: #fff; }
.dojo h2 { color: #fff; }
.dojo .sub { color: rgba(255, 255, 255, 0.8); }
.mystery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; max-width: 820px; margin: 0 auto; }
.mystery div { position: relative; aspect-ratio: 1; border-radius: 24%; overflow: hidden; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4); animation: breathe 4s ease-in-out infinite; }
.mystery div:nth-child(2n) { animation-delay: -1.3s; }
.mystery div:nth-child(3n) { animation-delay: -2.6s; }
.mystery img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.mystery div::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 900; color: rgba(255, 255, 255, 0.85); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4); }
@keyframes breathe { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .mystery div { animation: none; } }
@media (max-width: 720px) { .mystery { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Get it ---------- */
.get { text-align: center; }
.get img.icon { width: 120px; margin: 0 auto 20px; border-radius: 26px; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
footer { background: var(--blue-900); color: rgba(255, 255, 255, 0.85); padding: 56px 0 40px; font-size: 15px; }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
footer img.logo { width: 170px; margin-bottom: 12px; }
footer h4 { color: #fff; margin: 0 0 10px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.8px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
footer a:hover { color: #fff; text-decoration: underline; }
footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.15); padding-top: 20px; font-size: 13px; opacity: 0.75; }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr 1fr; } footer .wrap > div:first-child { grid-column: 1 / -1; } }

/* ---------- Legal pages ---------- */
.doc-hero { background: linear-gradient(160deg, var(--blue-700), var(--blue-900)); color: #fff; padding: 56px 0 48px; }
.doc-hero h1 { margin: 0 0 6px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -1px; }
.doc-hero p { margin: 0; opacity: 0.85; }
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.3px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: #26394a; }
.doc .tldr { background: var(--sky); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 8px; }
.doc .tldr h2 { margin-top: 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.doc th { background: var(--paper-2); }

/* Language switching: elements marked for the other language are hidden. */
html[lang="en"] [data-only="es"], html[lang="es"] [data-only="en"] { display: none !important; }
