/* The Kids App — site styles.
   Two spaces, like the app: the child's side (paper + a wall of flat tiles)
   and the grown-up side (night + lavender, the parental gate's colours). */

@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(../fonts/nunito.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(../fonts/nunito-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --paper: #F2F0F7;
  --paper-2: #E7E4F0;
  --ink: #26242E;
  --ink-2: #57536A;
  --night: #1E1D23;
  --night-2: #2A2931;
  --on-night: #E4E1F0;
  --on-night-2: #B3AEC8;
  --lavender: #AFA9EC;
  --violet: #4F46B0;
  --radius-frame: 34px;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  /* type scale — major third on an 18px body */
  --t-sm: 0.875rem; --t-body: 1.125rem; --t-md: 1.375rem; --t-lg: 1.6875rem;
  --t-xl: 2.125rem; --t-2xl: 2.6875rem; --t-3xl: 3.375rem; --t-4xl: 4.25rem;
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);   /* the app's BACK_OUT_BEZIER */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);      /* the app's EXPO_OUT_BEZIER */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-body)/1.6 'Nunito', ui-rounded, system-ui, sans-serif; font-optical-sizing: auto; }
img, video { display: block; max-width: 100%; }
a { color: var(--violet); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.night :focus-visible { outline-color: var(--lavender); }
h1, h2, h3 { margin: 0; font-weight: 850; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ── header ─────────────────────────────────────────── */
.top { padding-block: 18px; }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 850; font-size: var(--t-md); letter-spacing: -0.01em; }
.brand img { border-radius: 10px; }
.top__nav { display: flex; align-items: center; gap: 22px; font-weight: 700; }
.top__lang { color: var(--ink-2); text-decoration: none; }
.top__lang:hover { color: var(--ink); text-decoration: underline; }
.top__get { color: #fff; background: var(--ink); padding: 9px 18px; border-radius: 999px; text-decoration: none; }
.top__get:hover { background: #000; }

/* ── store button (text-built; swap for Apple's official badge if wanted) ── */
.store { display: inline-flex; align-items: center; gap: 12px; padding: 11px 22px 11px 18px;
  background: var(--ink); color: #fff; border-radius: 14px; text-decoration: none; line-height: 1.1; }
.store:hover { background: #000; }
.store__apple { width: 26px; height: 30px; flex: none; }
.store__text { display: grid; }
.store__pre { font-size: 0.8125rem; font-weight: 600; opacity: 0.85; }
.store__name { font-size: 1.4375rem; font-weight: 850; letter-spacing: -0.01em; }
.store--light, .night .store--light { background: #fff; color: var(--ink); }
.store--light:hover { background: var(--paper); }

/* ── hero: the child's side ─────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: clamp(32px, 6vw, 88px);
  align-items: center; padding-block: clamp(24px, 5vw, 64px) clamp(56px, 8vw, 104px); }
.hero h1 { font-size: clamp(var(--t-2xl), 5.6vw, var(--t-4xl)); font-weight: 900; letter-spacing: -0.03em; line-height: 1.02; }
.h1__line { display: block; }
.lede { font-size: var(--t-md); line-height: 1.5; color: var(--ink-2); margin-block: 22px 30px; max-width: 34ch; }
.fine { font-size: var(--t-sm); color: var(--ink-2); margin-top: 14px; }

.hero__demo { margin: 0; }
.device { padding: 12px; border-radius: var(--radius-frame); background: var(--ink);
  box-shadow: 0 30px 60px -28px rgba(38, 36, 46, 0.55), 0 0 0 1px rgba(38, 36, 46, 0.2); }
.wall { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); aspect-ratio: 1;
  border-radius: calc(var(--radius-frame) - 12px); overflow: hidden; background: #2B2A31; isolation: isolate; }
.tile { position: relative; display: grid; place-items: center; border: 0; margin: 0; padding: 0; cursor: pointer;
  background: var(--c); -webkit-tap-highlight-color: transparent; }
.tile::after { content: ''; position: absolute; inset: 0; background: #000; opacity: 0.08; transition: opacity 0.3s var(--ease-expo); }
.tile:hover::after { opacity: 0; }
.tile:active::after { opacity: 0.2; }
.tile img { width: 62%; height: auto; pointer-events: none; transition: transform 0.35s var(--ease-pop); }
.tile:active img { transform: scale(0.86); }
.tile:focus-visible { outline: 4px solid #fff; outline-offset: -4px; border-radius: 0; z-index: 1; }
.hint { margin-top: 16px; font-size: var(--t-sm); font-weight: 700; color: var(--ink-2); text-align: center; }

/* the one orchestrated moment: tiles pop in on the app's own stagger */
.js .wall:not(.is-in) .tile { transform: scale(0); }
.js .wall.is-in .tile { animation: pop 0.62s var(--ease-pop) both; animation-delay: calc(0.12s + var(--i) * 45ms); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* tapped tile → fullscreen photo (Expo.easeOut, like the app) */
.zoom { position: absolute; z-index: 2; background: var(--c); overflow: hidden; cursor: pointer;
  transition: inset 0.5s var(--ease-expo); display: grid; place-items: center; }
.zoom__icon { width: 44%; transition: opacity 0.3s ease 0.2s; }
.zoom__photo, .zoom__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.zoom__photo { transform: scale(1.08); transition: opacity 0.35s ease, transform 0.6s var(--ease-expo); }
.zoom.is-open .zoom__photo.is-loaded { opacity: 1; transform: scale(1); }
.zoom__video { transition: opacity 0.3s ease; }
.zoom.is-open .zoom__video.is-playing { opacity: 1; }
.zoom.is-open .zoom__photo.is-loaded ~ .zoom__icon { opacity: 0; }
.zoom__name { position: absolute; left: 16px; bottom: 16px; z-index: 1; padding: 6px 14px 7px; border-radius: 999px;
  background: rgba(30, 29, 35, 0.78); color: #fff; font-weight: 850; font-size: var(--t-md); letter-spacing: -0.01em; }
.zoom__close { position: absolute; right: 12px; top: 12px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(30, 29, 35, 0.78); color: #fff; cursor: pointer; display: grid; place-items: center; }
.zoom__close svg { width: 18px; height: 18px; }

/* ── twelve worlds ─────────────────────────────────── */
.worlds { padding-bottom: clamp(56px, 8vw, 104px); }
.worlds__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: 32px; }
.worlds__head h2 { font-size: var(--t-2xl); }
.worlds__head p { color: var(--ink-2); max-width: 40ch; }
.worlds__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px 12px; }
.worlds__list li { display: grid; justify-items: start; gap: 10px; font-weight: 750; font-size: 1rem; line-height: 1.25; }
.world__sw { display: grid; place-items: center; width: 100%; aspect-ratio: 1; background: var(--c); }
.world__sw img { width: 58%; height: auto; }

/* ── made by people ─────────────────────────────── */
.human { padding-bottom: clamp(64px, 9vw, 120px); }
.human h2 { font-size: clamp(var(--t-2xl), 5vw, var(--t-4xl)); font-weight: 900; letter-spacing: -0.03em; line-height: 1.02; max-width: 16ch; }
.human__lede { margin-top: 20px; font-size: var(--t-md); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.human__list { margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 56px); }
.human__list div { border-top: 3px solid var(--ink); padding-top: 16px; }
.human__list dt { font-weight: 900; font-size: var(--t-lg); letter-spacing: -0.02em; }
.human__list dd { margin: 6px 0 0; color: var(--ink-2); max-width: 30ch; }

/* ── film ──────────────────────────────────────────── */
.film { display: grid; grid-template-columns: minmax(0, 440px) auto; justify-content: start; gap: clamp(32px, 7vw, 96px); align-items: center;
  padding-bottom: clamp(64px, 9vw, 120px); }
.film h2 { font-size: var(--t-2xl); margin-bottom: 14px; }
.film p { color: var(--ink-2); max-width: 36ch; font-size: var(--t-md); line-height: 1.5; }
.film__video { width: min(340px, 78vw); height: auto; aspect-ratio: 9 / 16; border-radius: 26px; background: var(--night);
  box-shadow: 0 30px 60px -30px rgba(38, 36, 46, 0.6); }

/* ── the grown-up side ─────────────────────────────── */
.night { background: var(--night); color: var(--on-night); padding-block: clamp(72px, 10vw, 128px) 24px; }
.night h2 { color: #fff; font-size: var(--t-3xl); }
.night a { color: var(--lavender); }
.night section + section { margin-top: clamp(80px, 11vw, 136px); }
.grown__lede { color: var(--on-night-2); font-size: var(--t-md); margin-top: 16px; max-width: 42ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px clamp(32px, 6vw, 88px); margin-top: 56px; }
.fact { border-top: 2px solid var(--lavender); padding-top: 22px; }
.fact h3 { font-size: var(--t-lg); color: #fff; margin-bottom: 10px; }
.fact p { color: var(--on-night-2); max-width: 44ch; }

/* the app's LockToggle, playable: dark track, glyphs at both ends, white knob, green when locked */
.lock { position: relative; margin-top: 20px; width: 124px; height: 52px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); cursor: pointer; transition: background 0.3s ease; }
.lock[aria-checked='true'] { background: rgba(80, 180, 120, 0.85); }
.lock__g { position: absolute; top: 14px; width: 24px; height: 24px; opacity: 0.9; }
.lock__g--open { left: 16px; } .lock__g--shut { right: 16px; }
.lock__knob { position: absolute; top: 5px; left: 5px; width: 42px; height: 42px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: transform 0.45s var(--ease-pop); }
.lock[aria-checked='true'] .lock__knob { transform: translateX(72px); }

.plans__lede { color: var(--on-night-2); font-size: var(--t-md); margin-top: 16px; max-width: 48ch; }
.plans__row { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plans__row li { padding: 22px 28px 4px 0; border-top: 2px solid rgba(175, 169, 236, 0.35); }
.plans__row li + li { padding-left: 28px; border-left: 1px solid rgba(175, 169, 236, 0.18); }
.plans__row h3 { font-size: var(--t-lg); color: #fff; margin-bottom: 8px; }
.plans__row p { color: var(--on-night-2); font-size: 1rem; }
.plans__note { margin-top: 32px; color: var(--lavender); font-weight: 750; }

.dad p { margin-top: 20px; font-size: var(--t-md); line-height: 1.55; max-width: 52ch; color: var(--on-night); }

.faq__list { margin-top: 36px; max-width: 760px; }
.faq details { border-top: 1px solid rgba(175, 169, 236, 0.25); }
.faq details:last-child { border-bottom: 1px solid rgba(175, 169, 236, 0.25); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative; font-weight: 800; font-size: var(--t-md); color: #fff; line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 2.5px solid var(--lavender); border-bottom: 2.5px solid var(--lavender); transform: rotate(45deg); transition: transform 0.3s var(--ease-expo); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details p { padding: 0 44px 24px 0; color: var(--on-night-2); max-width: 60ch; }

.end { display: grid; justify-items: center; text-align: center; gap: 18px; padding-bottom: clamp(56px, 8vw, 96px); }
.end img { border-radius: 26px; }
.end h2 { font-size: var(--t-4xl); font-weight: 900; letter-spacing: -0.03em; }
.end p { color: var(--on-night-2); font-size: var(--t-md); margin-bottom: 8px; }

/* ── footer ───────────────────────────────────────── */
.foot { background: var(--night); color: var(--on-night-2); padding-block: 28px 40px; font-size: var(--t-sm); }
.page-support .foot, .page-privacy .foot, .page-terms .foot, .page-privacyterms .foot, .page-404 .foot { margin-top: 96px; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; border-top: 1px solid rgba(175, 169, 236, 0.18); padding-top: 24px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--on-night); text-decoration: none; font-weight: 700; }
.foot a:hover { text-decoration: underline; }

/* ── documents: support, privacy, terms ─────────────── */
.doc { max-width: 720px; padding-top: clamp(24px, 5vw, 56px); }
.doc h1 { font-size: clamp(2.125rem, 5vw, var(--t-3xl)); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 20px; overflow-wrap: break-word; hyphens: auto; }
.doc { overflow-wrap: break-word; }
.doc h2 { font-size: var(--t-lg); margin: 44px 0 12px; }
.doc h3 { font-size: var(--t-md); margin: 28px 0 8px; }
.doc p, .doc li { max-width: 66ch; }
.doc p + p { margin-top: 12px; }
.doc__lede { font-size: var(--t-md); line-height: 1.5; color: var(--ink-2); }
.doc__date { color: var(--ink-2); font-size: var(--t-sm); font-weight: 700; }
.doc__short { margin-top: 28px; padding: 22px 26px; background: var(--paper-2); border-left: 4px solid var(--violet); }
.doc__short h2, .doc__short h3 { margin-top: 0; }
.doc__short ul { margin: 12px 0 0; padding-left: 1.2em; }
.doc__short li + li { margin-top: 6px; }
.doc__plain { list-style: none; padding: 0; margin: 0; color: var(--ink-2); }
.doc__part { font-size: var(--t-2xl) !important; margin-top: 64px !important; }
.btn { display: inline-block; margin-top: 16px; padding: 12px 22px; background: var(--ink); color: #fff; border-radius: 999px; text-decoration: none; font-weight: 800; }

/* ── responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero__demo { max-width: 520px; }
  .worlds__head { grid-template-columns: 1fr; }
  .worlds__list { grid-template-columns: repeat(4, 1fr); }
  .plans__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans__row li:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
  :root { --t-body: 1.0625rem; }
  .top__get { display: none; }
  .lede { font-size: 1.1875rem; margin-block: 16px 24px; }
  .worlds__list { grid-template-columns: repeat(3, 1fr); }
  .film { grid-template-columns: 1fr; }
  .film__video { justify-self: center; }
  .facts { grid-template-columns: 1fr; gap: 36px; }
  .human__list { grid-template-columns: 1fr; gap: 24px; }
  .plans__row { grid-template-columns: 1fr; }
  .plans__row li, .plans__row li + li { padding-left: 0; border-left: 0; padding-bottom: 18px; }
  .night h2 { font-size: var(--t-2xl); }
  .end h2 { font-size: var(--t-3xl); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .zoom__photo { transform: none !important; }
}
