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

:root {
  --teal-900: #063a55;
  --teal-800: #074a6e;
  --teal-700: #0b6e99;
  --teal-500: #1592b8;
  --aqua: #7aded0;
  --aqua-50: #e9f7f6;
  --sky-50: #eef7fb;
  --orange: #ff9b22;
  --orange-ink: #a85200; /* orange dark enough for text on white and cream (>= 4.5:1) */
  --yellow: #ffc905;
  --green: #2f8a3c;
  --green-ink: #256b2f; /* green dark enough for small text on its pale tint (>= 4.5:1) */
  --green-50: #e8f5ea;
  --ink: #17303f;
  --ink-soft: #4b6170;
  --paper: #ffffff;
  --cream: #fffaf2;
  --line: #dce8ee;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(7, 74, 110, 0.12);
  --shadow-sm: 0 4px 14px rgba(7, 74, 110, 0.10);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", system-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(--cream);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-700); }
a:hover { color: var(--teal-900); }
/* Orange ring with a dark halo: visible (>= 3:1) on both the light and the dark sections. */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; box-shadow: 0 0 0 6px var(--teal-900); border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--paper); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 16px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 250, 242, 0.88);
  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(--teal-900); font-family: var(--font-display); font-size: 19px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.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(--aqua-50); color: var(--ink); }
.lang {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 800; font-size: 14px;
  padding: 6px 30px 6px 12px; border-radius: 999px; cursor: pointer; margin-left: 6px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%234b6170'/%3E%3C/svg%3E") right 8px center / 18px no-repeat;
}
.lang:hover { background-color: var(--aqua-50); }
@media (max-width: 820px) { .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.22);
  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; }
@media (prefers-reduced-motion: reduce) { .store { transition: none; } .store:hover { transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(122, 222, 208, 0.28), transparent 45%),
    radial-gradient(circle at 10% 110%, rgba(255, 155, 34, 0.22), transparent 40%),
    linear-gradient(160deg, var(--teal-700), var(--teal-800) 70%);
}
.hero::after { /* soft dotted "path" texture */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.12;
  background-image: radial-gradient(#fff 1.4px, transparent 1.6px); background-size: 26px 26px;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding: 72px 0 96px; }
.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(38px, 5.6vw, 64px); line-height: 1.05; margin: 18px 0 16px; letter-spacing: -1px; }
.hero h1 em { font-style: normal; color: var(--yellow); }
.hero p.lead { font-size: clamp(18px, 2vw, 21px); max-width: 36ch; opacity: 0.94; margin: 0 0 28px; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero .cta .note { font-size: 14px; opacity: 0.85; }

.hero-art { position: relative; justify-self: center; width: min(470px, 100%); aspect-ratio: 1 / 0.92; }
.hero-art .card {
  position: absolute; width: 46%; background: #fff; padding: 7px; border-radius: 26px; box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
}
.hero-art .card img { border-radius: 20px; }
.hero-art .card .num { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); }
.hero-art .c1 { left: 0; top: 8%; transform: rotate(-6deg); }
.hero-art .c2 { left: 27%; top: 0; z-index: 2; transform: rotate(1deg); }
.hero-art .c3 { right: 0; top: 14%; transform: rotate(6deg); }
.hero-art .ninja { position: absolute; width: 30%; right: -4%; bottom: -24%; z-index: 3; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.3)); animation: hop 5s ease-in-out infinite; }
@keyframes hop { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art .ninja { animation: none; } }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; padding: 48px 0 80px; }
  .hero p.lead { margin-inline: auto; }
  .hero .cta { justify-content: center; }
  .hero-art { width: min(380px, 92%); }
}

/* Numbered circle used across the site (the app's slot badges). */
.num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--orange); color: var(--ink); font-family: var(--font-display); font-size: 19px; /* dark digits: >= 4.5:1 on orange */
  border: 3px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* ---------- Sections ---------- */
main, section { scroll-margin-top: 64px; }
section { padding: 88px 0; }
section.alt { background: var(--paper); }
.kicker { color: var(--orange-ink); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; font-size: 13px; margin: 0 0 8px; }
h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.12; letter-spacing: -0.5px; margin: 0 0 14px; color: var(--teal-900); }
.sub { color: var(--ink-soft); font-size: 19px; max-width: 62ch; margin: 0 0 40px; }
.sub.centered { margin-inline: auto; }
.sound .off { display: none; }
.center { text-align: center; }
.center .sub { margin-inline: auto; }
@media (max-width: 720px) { section { padding: 64px 0; } }

/* ---------- Try it (mini sequence) ---------- */
.try-card {
  background: linear-gradient(160deg, #e3f5f3, #d3eef6);
  border: 1px solid #c7e6ea; border-radius: 32px; padding: 32px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 0.85fr 1.4fr; gap: 32px; align-items: center;
}
.try-card h2 { font-size: 28px; margin: 0 0 8px; line-height: 1.15; color: var(--teal-900); }
.try-card p { margin: 0 0 14px; color: var(--ink-soft); }
.try-status { font-weight: 800; min-height: 3.2em; color: var(--teal-800); }
.try-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font: inherit; font-weight: 800; font-size: 15px; background: var(--paper); color: var(--teal-800);
  border: 1px solid #bcdde3; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.pill:hover { background: var(--aqua-50); }
.pill svg { width: 18px; height: 18px; fill: currentColor; }

.board { display: grid; gap: 18px; }
.slots, .tray { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.slot {
  position: relative; aspect-ratio: 1; border-radius: 20px; border: 3px dashed #9fcfd8; background: rgba(255, 255, 255, 0.6);
  display: grid; place-items: center;
}
.slot > .num { position: absolute; top: -14px; left: -10px; width: 34px; height: 34px; font-size: 16px; z-index: 2; }
.slot.target { border-color: var(--orange); background: #fff4e6; }
.slot.filled { border-style: solid; border-color: var(--green); background: #fff; }
.slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.slot .ghost { color: #9fcfd8; font-family: var(--font-display); font-size: 34px; }
.tray { min-height: 60px; }
.piece {
  aspect-ratio: 1; padding: 0; border: 3px solid #fff; border-radius: 20px; background: #fff; cursor: grab;
  box-shadow: var(--shadow-sm); touch-action: none; transition: transform 0.15s ease, opacity 0.2s ease;
}
.piece img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.piece:hover { transform: translateY(-3px); }
.piece.dragging { cursor: grabbing; position: relative; z-index: 10; box-shadow: 0 18px 30px rgba(7, 74, 110, 0.28); transition: none; }
.piece.used { visibility: hidden; }
.piece.nope { animation: nope 0.45s ease; }
.slot.just { animation: snap 0.45s ease; }
@keyframes nope { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes snap { 50% { transform: scale(1.06); } }
.stars { display: flex; gap: 6px; justify-content: center; min-height: 34px; }
.stars svg { width: 34px; height: 34px; fill: var(--yellow); stroke: #e0a800; stroke-width: 1; animation: pop 0.5s ease backwards; }
.stars svg:nth-child(2) { animation-delay: 0.15s; }
.stars svg:nth-child(3) { animation-delay: 0.3s; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .piece, .piece:hover { transition: none; transform: none; }
  .piece.nope, .slot.just, .stars svg { animation: none; }
}
@media (max-width: 860px) { .try-card { grid-template-columns: 1fr; text-align: center; padding: 24px 18px; } .try-actions { justify-content: center; } }
@media (max-width: 420px) { .slots, .tray { gap: 8px; } .slot > .num { width: 28px; height: 28px; font-size: 14px; top: -10px; left: -6px; } }

/* ---------- How it works ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; position: relative; }
.steps li { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 26px 26px; position: relative; text-align: left; }
.steps li .num { position: absolute; top: -20px; left: 24px; }
.steps h3 { margin: 4px 0 6px; font-size: 21px; color: var(--teal-900); }
.steps p { margin: 0; color: var(--ink-soft); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Library: levels and stories ---------- */
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 900px; margin: 0 auto 32px; text-align: left; }
.level { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; box-shadow: var(--shadow-sm); }
.level .dots { display: flex; gap: 6px; margin-bottom: 12px; }
.level .dots i { width: 22px; height: 28px; border-radius: 6px; background: var(--aqua); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7); }
.level.lv-1 .dots i { background: var(--green); }
.level.lv-2 .dots i { background: var(--teal-500); }
.level.lv-3 .dots i { background: var(--orange); }
.level h3 { margin: 0 0 2px; font-size: 21px; color: var(--teal-900); }
.level p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
.stories { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; }
.story { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.story img { width: 100%; aspect-ratio: 356 / 280; object-fit: cover; }
.story div { padding: 14px 16px 18px; }
.story h3 { margin: 0 0 8px; font-size: 18px; color: var(--teal-900); line-height: 1.25; }
.tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--aqua-50); color: var(--teal-800); }
.tag.lv-1 { background: var(--green-50); color: var(--green-ink); }
.tag.lv-3 { background: #fff1de; color: var(--orange-ink); }
.free-note { margin: 28px auto 0; font-size: 15px; color: var(--ink-soft); }
@media (max-width: 760px) { .levels { grid-template-columns: 1fr; max-width: 420px; } .stories { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .stories { grid-template-columns: 1fr; } }

/* ---------- Make your own ---------- */
.create { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { border-radius: 28px; padding: 32px; position: relative; overflow: hidden; }
.panel h3 { margin: 14px 0 8px; font-size: 24px; line-height: 1.2; }
.panel p { margin: 0 0 12px; }
.panel .icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; }
.panel .icon svg { width: 30px; height: 30px; }
.panel.own { background: var(--paper); border: 1px solid var(--line); }
.panel.own h3 { color: var(--teal-900); }
.panel.own p { color: var(--ink-soft); }
.panel.own .icon { background: #fff1de; }
.panel.own .icon svg { fill: var(--orange-ink); }
.panel.ai { background: linear-gradient(150deg, var(--teal-700), var(--teal-900)); color: #fff; }
.panel.ai p { opacity: 0.92; }
.panel.ai .icon { background: rgba(255, 255, 255, 0.15); }
.panel.ai .icon svg { fill: var(--yellow); }
.panel .small { font-size: 14px; opacity: 0.85; }
.panel ul { margin: 0 0 12px; padding-left: 20px; }
@media (max-width: 860px) { .create { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--cream); border-radius: var(--radius); padding: 26px; border: 1px solid var(--line); }
.feature .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--aqua-50); }
.feature .ic svg { width: 26px; height: 26px; fill: var(--teal-700); }
.feature h3 { margin: 14px 0 6px; font-size: 19px; color: var(--teal-900); }
.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 & trust ---------- */
.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(--teal-700) 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(--teal-800); 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.93; }
.trust a { color: var(--yellow); font-weight: 800; }
.trust .ninja { position: absolute; width: 92px; right: 14px; bottom: -8px; opacity: 0.9; }
.trust .pad { padding-right: 90px; }
@media (max-width: 860px) { .parents { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .trust .ninja { display: none; } .trust .pad { padding-right: 0; } }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 900px; margin: 0 auto; text-align: left; }
.plan { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 30px; box-shadow: var(--shadow-sm); }
.plan.premium { border: 2px solid var(--orange); position: relative; }
.plan.premium .tag { background: #fff1de; color: var(--orange-ink); }
.plan h3 { margin: 12px 0 4px; font-size: 26px; color: var(--teal-900); }
.plan .price { margin: 0 0 16px; color: var(--ink-soft); font-weight: 700; }
.plan .checks li { font-weight: 500; }
.plan.premium .checks li::before { background-color: var(--orange-ink); }
.fine { font-size: 14px; color: var(--ink-soft); max-width: 70ch; margin: 24px auto 0; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Help / FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 0 22px; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 800; position: relative; color: var(--teal-900); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 26px; font-weight: 400; color: var(--orange-ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; color: var(--ink-soft); }
.faq details > div p { margin: 0 0 10px; }
.faq details > div ol, .faq details > div ul { margin: 0 0 10px; padding-left: 22px; }
.contact-card { max-width: 820px; margin: 28px auto 0; background: var(--aqua-50); border-radius: 20px; padding: 22px 26px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; }
.contact-card p { margin: 0; }
.contact-card a { font-weight: 800; }

/* ---------- Get it ---------- */
.get { text-align: center; background: linear-gradient(180deg, var(--cream), #fdeedd); }
.get img.icon { width: 120px; margin: 0 auto 20px; border-radius: 26px; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
footer { background: var(--teal-900); color: rgba(255, 255, 255, 0.86); 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 .fh { color: #fff; font-weight: 800; 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.86); 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.78; }
@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(--teal-700), var(--teal-900)); color: #fff; padding: 56px 0 48px; }
.doc-hero h1 { margin: 0 0 6px; font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.5px; }
.doc-hero p { margin: 0; opacity: 0.88; }
.doc-hero .wrap { max-width: 760px; }
.doc { padding: 48px 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -0.2px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; color: var(--teal-900); }
.doc p, .doc li { color: #26394a; }
.doc .tldr { background: var(--aqua-50); border-radius: var(--radius); padding: 24px 28px; margin-bottom: 8px; }
.doc .tldr h2 { margin-top: 0; }
.doc .note { font-size: 15px; color: var(--ink-soft); border-left: 4px solid var(--aqua); padding-left: 14px; }
.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(--sky-50); }
@media (max-width: 560px) { .doc table { font-size: 14px; } .doc th, .doc td { padding: 8px 4px; } }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; background: linear-gradient(160deg, var(--teal-700), var(--teal-900)); color: #fff; padding: 40px 0; }
.lost img { margin: 0 auto 24px; width: 160px; }
.lost h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 10px; }
.lost a { color: var(--yellow); font-weight: 800; }

/* Language switching: elements marked for another language are hidden.
   The page defaults to English (html lang="en"), so it reads fine without JavaScript. */
html:not([lang="en"]) [data-only="en"],
html:not([lang="es"]) [data-only="es"] { display: none !important; }
