/* Ten Ten Island landing page. Legal pages keep using style.css. */
@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ocean: #59BCEB;
  --teal: #42CBB0;
  --sun: #FFD45E;
  --coral: #FF887A;
  --lavender: #B7A6F5;
  --cream: #FFF9ED;
  --navy: #243653;
  --navy-soft: #54637D;
  --night: #16233B;
  --lagoon: #0E6B78;
  --sand: #FBE9C8;
  --display: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --section: clamp(72px, 11vw, 150px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--navy); font: 500 17px/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 5.6vw, 4rem); line-height: 1.04; letter-spacing: -0.015em; }
h3 { font-size: 1.3rem; line-height: 1.2; }
p { margin: 0; max-width: 34em; text-wrap: pretty; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.lede { font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--navy-soft); margin-top: 18px; }

/* Entrances: only when scripts run, and never for people who ask for less motion. */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 20px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px; transition: background .3s ease, box-shadow .3s ease; }
.nav.stuck { background: rgba(255, 249, 237, .9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(36, 54, 83, .1); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.2rem/1 var(--display); color: var(--navy); }
.brand img { border-radius: 10px; }
.nav-links { display: none; margin-left: auto; gap: 28px; font-weight: 700; font-size: .98rem; }
.nav-links a { text-decoration: none; padding: 6px 2px; background: linear-gradient(var(--navy), var(--navy)) 0 100% / 0 2px no-repeat; transition: background-size .25s ease; }
.nav-links a:hover { background-size: 100% 2px; }
.nav-cta { margin-left: auto; text-decoration: none; background: var(--navy); color: #fff; font-weight: 800; font-size: .92rem; padding: 9px 16px; border-radius: 999px; transition: transform .2s ease; }
.nav-cta:hover { transform: translateY(-1px); }
.nav-cta.soon, .dock a.soon { background: rgba(36, 54, 83, .12); color: var(--navy); }
@media (min-width: 860px) { .nav-links { display: flex; } .nav-cta { margin-left: 0; } }

/* ---------- Buttons ---------- */
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.store { display: inline-flex; align-items: center; gap: 12px; background: #0b1220; color: #fff; text-decoration: none; padding: 11px 22px 11px 18px; border-radius: 16px;
  box-shadow: 0 10px 24px -10px rgba(11, 18, 32, .7); transition: transform .2s ease, box-shadow .2s ease; }
.store span { display: grid; line-height: 1.05; text-align: left; }
.store small { font-size: .72rem; font-weight: 600; opacity: .85; }
.store b { font: 600 1.45rem/1.1 var(--display); letter-spacing: .01em; }
.store:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(11, 18, 32, .8); }
.store:active { transform: translateY(0); }
.store.soon { cursor: default; }
.store-light { background: #fff; color: var(--night); }
.ghost { font-weight: 800; text-decoration: none; padding: 14px 20px; border-radius: 16px; background: rgba(255, 255, 255, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .2s ease; }
.ghost:hover { background: rgba(255, 255, 255, .85); }
.text-link { font-weight: 800; text-underline-offset: 4px; text-decoration-thickness: 2px; text-decoration-color: var(--coral); }

/* ---------- Phone ---------- */
.phone { position: relative; width: var(--phone, 260px); aspect-ratio: 660 / 1434; padding: 9px; border-radius: 15.5% / 7.2%; background: #101827;
  box-shadow: 0 0 0 2px #2c3a52 inset, 0 40px 60px -30px rgba(16, 24, 39, .55), 0 18px 30px -18px rgba(16, 24, 39, .4); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 13.5% / 6.3%; }

/* ---------- 1. Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; background: #F58B6E; min-height: min(100svh, 980px); display: flex; }
.hero-art { position: absolute; inset: 0; z-index: -1; }
.hero-bg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(1.06); transform-origin: 50% 0; will-change: transform; }
.hero-art::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(214, 78, 58, .5), rgba(226, 100, 70, .28) 38%, rgba(226, 100, 70, 0) 62%); }
.hero-art::after { z-index: 1; content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: linear-gradient(to bottom, rgba(255, 249, 237, 0), var(--cream)); }
.cloud { position: absolute; width: 46vw; max-width: 520px; aspect-ratio: 3.2; border-radius: 999px; background: radial-gradient(closest-side, rgba(255, 244, 232, .85), rgba(255, 244, 232, 0)); filter: blur(6px); animation: drift 70s linear infinite; }
.c1 { top: 13%; left: -20%; }
.c2 { top: 30%; left: 40%; animation-duration: 95s; animation-delay: -40s; opacity: .8; }
.c3 { top: 6%; left: 70%; animation-duration: 120s; animation-delay: -70s; opacity: .6; }
@keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(110vw); } }

.hero-inner { width: min(1180px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: calc(92px + env(safe-area-inset-top)) 0 0; display: grid; gap: 34px; align-content: start; }
.hero h1 { font-size: clamp(2.7rem, 11.5vw, 5.4rem); font-weight: 700; line-height: .98; letter-spacing: -0.02em; color: #fff; text-shadow: 0 3px 22px rgba(120, 40, 30, .38); }
.hero-sub { margin-top: 18px; font-size: clamp(1.08rem, 2.3vw, 1.3rem); font-weight: 700; line-height: 1.45; color: #fff; text-shadow: 0 1px 10px rgba(110, 40, 30, .55); max-width: 26em; }
.hero-note { margin-top: 16px; font-size: .92rem; font-weight: 700; color: #fff; text-shadow: 0 1px 10px rgba(110, 40, 30, .8); }
.hero-device { position: relative; justify-self: center; --phone: min(62vw, 270px); margin-bottom: -70px; will-change: transform; }
.hero-nova { position: absolute; width: 58%; left: -47%; bottom: 13%; filter: drop-shadow(0 16px 14px rgba(60, 30, 20, .35)); animation: bob 5s ease-in-out infinite; }
.hero-gem { position: absolute; width: 22%; right: -19%; top: 16%; animation: bob 6s ease-in-out -2s infinite; }
.hero-coin { position: absolute; width: 19%; right: -24%; top: 47%; animation: bob 4.4s ease-in-out -1s infinite; }
[data-float] { animation: float 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }

@media (min-width: 900px) {
  .hero { min-height: min(100svh, 900px); }
  .hero h1 { font-size: clamp(3.2rem, 5.1vw, 4.9rem); }
  .hero-inner { grid-template-columns: 1.4fr .6fr; align-items: center; align-content: center; padding-top: 96px; padding-bottom: 40px; }
  .hero-device { --phone: clamp(250px, 23vw, 318px); margin-bottom: 0; }
  .hero-bg { object-position: 50% 30%; }
}

/* ---------- 2. The idea ---------- */
.idea { padding: calc(var(--section) + 40px) 0 var(--section); text-align: center; }
.idea .lede { margin-inline: auto; }
.tens { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3vw, 36px); margin: clamp(40px, 7vw, 72px) 0; }
.ten { position: relative; width: clamp(140px, 38vw, 280px); aspect-ratio: 1; }
.ten svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ten circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ten .track { stroke: rgba(36, 54, 83, .08); }
.ten .ring { stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset 1.6s cubic-bezier(.3, .7, .2, 1) .25s; }
.ten-play .ring { stroke: var(--coral); }
.ten-learn .ring { stroke: var(--lagoon); transition-delay: .7s; }
.tens.in .ring, html:not(.js) .ring { stroke-dashoffset: 0; }
.ten-label { position: absolute; inset: 0; display: grid; place-content: center; }
.ten-label b { font: 700 clamp(3.1rem, 11vw, 7.4rem)/.9 var(--display); }
.ten-play b { color: #E9604C; }
.ten-learn b { color: var(--lagoon); }
.ten-label span { font-weight: 800; font-size: clamp(.7rem, 2.2vw, 1.05rem); max-width: 6.2em; line-height: 1.15; margin: 4px auto 0; }
.plus { font: 600 clamp(2rem, 6vw, 4rem)/1 var(--display); color: var(--navy-soft); }
.rhythm { display: grid; gap: 28px; text-align: left; counter-reset: step; }
.rhythm li { counter-increment: step; padding-top: 18px; border-top: 3px solid var(--navy); }
.rhythm li::before { content: counter(step); font: 600 1rem/1 var(--display); color: var(--navy-soft); }
.rhythm h3 { margin: 8px 0 8px; font-size: 1.5rem; }
.rhythm p { color: var(--navy-soft); }
@media (min-width: 800px) { .rhythm { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

/* ---------- 3. Explore ---------- */
.chapter { padding: var(--section) 0; }
.split { display: grid; gap: 44px; align-items: center; }
.split > * { min-width: 0; }
.split .visual { position: relative; justify-self: center; --phone: min(64vw, 280px); }
.copy h2 + p { margin-top: 20px; }
.copy p + p { margin-top: 14px; }
.copy p { font-size: 1.12rem; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .split .visual { --phone: 300px; }
  .split-flip .visual { order: 2; }
}

.chapter-island { background: linear-gradient(#2E86BE, #2B7DB3); color: #fff; }
.chapter-island .visual { width: 100%; max-width: 520px; padding-bottom: 60px; }
.map { width: 100%; border-radius: 44% 56% 52% 48% / 46% 44% 56% 54%; box-shadow: 0 0 0 10px rgba(255, 255, 255, .14), 0 40px 70px -30px rgba(8, 40, 70, .8); }
.phone-over { position: absolute; right: 3%; bottom: 0; --phone: clamp(128px, 34%, 190px); transform: rotate(5deg); }
.places { margin-top: 26px; display: grid; gap: 0; }
.places li { padding: 16px 0; border-top: 1px solid rgba(255, 255, 255, .28); font-size: 1.05rem; }
.places b { display: block; font: 600 1.3rem/1.2 var(--display); }

.chapter-arcade { background: var(--night); color: #fff; }
.copy-wide { max-width: 760px; }
.copy-wide p { color: #C5D0E6; }
.covers { margin-top: clamp(36px, 6vw, 64px); display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.covers li { position: relative; border-radius: 22px; overflow: hidden; background: #0e1830; }
.covers img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.covers li:hover img { transform: scale(1.06); }
.covers div { position: absolute; inset: auto 0 0 0; padding: 34px 14px 12px; background: linear-gradient(to top, rgba(10, 16, 32, .92), rgba(10, 16, 32, 0)); display: grid; }
.covers b { font: 600 1.08rem/1.2 var(--display); }
.covers span { font-size: .8rem; color: #C5D0E6; display: none; }
.more { margin-top: 26px; color: #C5D0E6; max-width: 44em; }
@media (min-width: 720px) {
  .covers { grid-template-columns: repeat(6, 1fr); gap: 18px; }
  .covers li { grid-column: span 2; }
  .covers li:nth-child(1), .covers li:nth-child(2) { grid-column: span 3; }
  .covers b { font-size: 1.3rem; }
  .covers span { display: block; font-size: .92rem; }
  .covers div { padding: 50px 20px 16px; }
}

.chapter-learn { background: var(--cream); }
.games { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.games li { padding: 11px 0; border-bottom: 1px solid rgba(36, 54, 83, .13); font-weight: 800; }
.games span { display: inline-block; width: 1.7em; }

.chapter-stop { background: var(--sun); }
.chapter-stop .copy p { color: #4a3d12; }

/* ---------- 4. Characters ---------- */
.cast { padding: var(--section) 0 0; text-align: center; }
.cast .lede { margin-inline: auto; }
.heroes { margin-top: clamp(40px, 6vw, 70px); display: grid; }
.hero-card { position: relative; padding: 46px 20px 40px; overflow: hidden; }
.hero-card.nova { background: var(--coral); }
.hero-card.bo { background: var(--ocean); }
.hero-card.tiki { background: var(--teal); }
.hero-card img { height: clamp(230px, 34vw, 380px); width: auto; margin: 0 auto; filter: drop-shadow(0 22px 16px rgba(36, 54, 83, .28)); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 50% 100%; }
.hero-card:hover img { transform: translateY(-8px) rotate(-3deg) scale(1.04); }
.hero-card.bo:hover img { transform: translateY(-8px) rotate(3deg) scale(1.04); }
.hero-card h3 { margin-top: 20px; font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 700; line-height: 1; }
.hero-card p { margin: 6px auto 0; font-weight: 800; font-size: 1.1rem; }
@media (min-width: 760px) { .heroes { grid-template-columns: repeat(3, 1fr); } .hero-card { padding: 70px 20px 60px; } }

/* ---------- 5. Maths ---------- */
.maths { padding: var(--section) 0; }
.maths .split { align-items: start; }
.maths .visual { position: sticky; top: 110px; }
.maths-tiki { position: absolute; width: 46%; left: -30%; bottom: -4%; filter: drop-shadow(0 14px 12px rgba(36, 54, 83, .25)); }
.years { margin-top: 30px; }
.year-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: none; }
.year-tabs::-webkit-scrollbar { display: none; }
.year-tabs button { flex: none; font: 600 1.02rem/1 var(--display); color: var(--navy); background: transparent; border: 2px solid rgba(36, 54, 83, .2); border-radius: 999px; padding: 11px 17px; cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.year-tabs button:hover { border-color: var(--navy); }
.year-tabs button[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
html:not(.js) .year-tabs { display: none; }
.year-panel { background: #fff; border-radius: 26px; padding: 26px clamp(20px, 4vw, 34px) 22px; margin-top: 4px; box-shadow: 0 24px 50px -34px rgba(36, 54, 83, .45); }
html:not(.js) .year-panel { margin-top: 16px; }
.year-panel h3 { font-size: 1.7rem; }
.year-panel h3 span { font: 700 .95rem var(--body); color: var(--navy-soft); margin-left: 8px; }
.year-panel ul { margin-top: 14px; columns: 2; column-gap: 28px; }
.year-panel li { break-inside: avoid; padding: 7px 0 7px 18px; position: relative; font-weight: 700; font-size: .98rem; line-height: 1.35; }
.year-panel li::before { content: ""; position: absolute; left: 0; top: .82em; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
@media (max-width: 420px) { .year-panel ul { columns: 1; } }
.how { margin-top: 44px; display: grid; gap: 0; }
.how > div { padding: 18px 0; border-top: 1px solid rgba(36, 54, 83, .14); }
.how dt { font: 600 1.25rem/1.25 var(--display); }
.how dd { color: var(--navy-soft); margin-top: 4px; max-width: 32em; }
@media (max-width: 899px) { .maths .visual { position: relative; top: 0; order: -1; } .maths-tiki { left: -34%; } }

/* ---------- 6. Parents ---------- */
.parents { padding: var(--section) 0; background: #fff; }
.trust { margin-top: 28px; }
.trust li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 15px 0; border-top: 1px solid rgba(36, 54, 83, .12); }
.trust svg { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: #DDF6EF; fill: none; stroke: #12806A; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trust b { display: block; font: 600 1.18rem/1.3 var(--display); }
.trust span { color: var(--navy-soft); }
.trust + p { margin-top: 22px; }

/* ---------- 7. Download ---------- */
.finale { position: relative; isolation: isolate; overflow: hidden; background: #123c48; color: #fff; text-align: center; }
.finale-bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
.finale::before { content: ""; position: absolute; inset: 0 0 45% 0; z-index: -1; background: linear-gradient(rgba(10, 40, 50, .55), rgba(10, 40, 50, 0)); }
.finale-inner { width: min(900px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: var(--section) 0 0; display: grid; justify-items: center; }
.finale h2 { text-shadow: 0 6px 30px rgba(5, 25, 35, .6); }
.finale h2 + p { margin-top: 18px; font-size: clamp(1.1rem, 2.2vw, 1.35rem); font-weight: 700; text-shadow: 0 2px 14px rgba(5, 25, 35, .7); }
.finale .store { margin-top: 30px; }
.finale-note { margin-top: 14px; font-size: .92rem; font-weight: 700; opacity: .9; }
.finale-stage { position: relative; margin-top: 50px; --phone: min(60vw, 270px); margin-bottom: -120px; }
.finale-bo, .finale-nova { position: absolute; bottom: 120px; width: 62%; filter: drop-shadow(0 16px 14px rgba(0, 0, 0, .4)); }
.finale-bo { right: 78%; }
.finale-nova { left: 80%; }

/* ---------- Footer and dock ---------- */
.foot { background: var(--night); color: #C5D0E6; padding: 44px 0 calc(110px + env(safe-area-inset-bottom)); font-size: .95rem; }
.foot .wrap { display: grid; gap: 18px; }
.foot .brand { color: #fff; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; font-weight: 700; }
.foot nav a { text-underline-offset: 4px; }
@media (min-width: 860px) { .foot { padding-bottom: 44px; } .foot .wrap { grid-template-columns: auto 1fr; align-items: center; } .foot nav { justify-content: flex-end; } .foot p { grid-column: 1 / -1; } }

.dock { position: fixed; z-index: 40; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 22px;
  background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 16px 40px -14px rgba(22, 35, 59, .5), 0 0 0 1px rgba(36, 54, 83, .08);
  transform: translateY(140%); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.dock.show { transform: none; }
.dock img { border-radius: 11px; flex: none; }
.dock div { display: grid; line-height: 1.25; min-width: 0; }
.dock b { font: 600 1.02rem var(--display); }
.dock span { font-size: .8rem; color: var(--navy-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock a { margin-left: auto; flex: none; text-decoration: none; background: var(--navy); color: #fff; font-weight: 800; font-size: .92rem; padding: 10px 16px; border-radius: 999px; }
.dock a span { color: inherit; font-size: inherit; }
@media (min-width: 860px) { .dock { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ten .ring { stroke-dashoffset: 0; }
}
