/* Nina Plastelína welcome page, v2: look A (playful but calm) with a yellow hero and blue button.
   The engine's [data-sc-*] selectors are never restyled here. */

@font-face { font-family: 'Nunito'; src: url('assets/Nunito.ttf') format('truetype'); font-weight: 200 1000; font-display: swap; }

:root {
  --sc-canvas: #fbf1dc;  --sc-surface: #fffaf0;
  --sc-ink: #1d3557;     --sc-ink-soft: #42577a;
  --sc-accent: #4361ee;  --sc-accent-ink: #ffffff;
  /* One family. Nunito draws every Slovak letter (ť ď ľ č ž) properly; Fredoka substitutes ľ and ď. */
  --sc-font-display: "Nunito", "Trebuchet MS", system-ui, sans-serif;
  --sc-font-text: "Nunito", system-ui, sans-serif;
  --sc-shadow-color: 215 45% 22%;
  --sc-r-lg: 28px; --sc-r-md: 18px;

  --sun: #ffd166; --sun-dk: #e7a800; --sky: #4cc9f0; --sky-dk: #1f8db3; --green: #06d6a0; --rose: #f28482; --red: #e63946;
  --btn-edge: #2a3fb8;
  --clay-card: 0 6px 0 hsl(var(--sc-shadow-color) / 0.10), 0 16px 30px -8px hsl(var(--sc-shadow-color) / 0.22);
}

body { font-weight: 600; }
.sc-display { font-weight: 900; letter-spacing: -0.02em; line-height: 1.04; }
.sc-body { font-weight: 600; }

/* ------------------------------------------------------------ chrome -- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--sc-z-chrome);
  display: flex; align-items: center; gap: var(--sc-4);
  padding: 10px var(--sc-gutter); padding-top: max(10px, env(safe-area-inset-top));
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar__mark img { width: 112px; height: auto; filter: drop-shadow(0 4px 6px hsl(var(--sc-shadow-color) / 0.25)); }
/* Parents who already have an account: straight to the app's login */
.bar__login {
  margin-left: auto; padding: 10px 18px; border-radius: var(--sc-r-pill); white-space: nowrap;
  font: 800 0.95rem/1 var(--sc-font-display); color: var(--sc-ink); text-decoration: none;
  background: color-mix(in oklab, var(--sc-surface) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--sc-e1);
}
.bar__login:hover { background: var(--sc-surface); }
.bar__login:focus-visible { outline: 3px solid var(--sc-ink); outline-offset: 2px; }


.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 28px; white-space: nowrap;
  font: 900 1.08rem/1 var(--sc-font-display); letter-spacing: 0;
  color: var(--sc-accent-ink); background: var(--sc-accent);
  border-radius: var(--sc-r-pill); text-decoration: none;
  box-shadow: 0 5px 0 var(--btn-edge), 0 14px 24px -10px hsl(var(--sc-shadow-color) / 0.5);
  transition: transform 140ms var(--sc-ease-out), box-shadow 140ms var(--sc-ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--btn-edge), 0 6px 12px -8px hsl(var(--sc-shadow-color) / 0.5); }
.btn--small { min-height: 44px; padding: 0 18px; font-size: 0.95rem; box-shadow: 0 4px 0 var(--btn-edge); }
.btn--big { min-height: 64px; padding: 0 36px; font-size: 1.2rem; }

/* ------------------------------------------------------------ 1 hero -- */
#hero { position: relative; }
#hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 80% at 75% 40%, #ffe3a0 0%, transparent 60%); }
.hero {
  min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  gap: var(--sc-6); padding: 104px var(--sc-gutter) var(--sc-7); max-width: 92rem; margin: 0 auto;
}
.hero__copy { max-width: 38rem; position: relative; z-index: 2; }
.hero__title { font-size: clamp(2.7rem, 1.6rem + 4.8vw, 6rem); line-height: 1; margin: 0 0 var(--sc-5); text-wrap: balance; }
.hero__lead { font-size: var(--sc-t-lg); line-height: 1.5; margin-bottom: var(--sc-6); color: var(--sc-ink); opacity: 0.86; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sc-4); }
.hero__note { font-weight: 800; font-size: var(--sc-t-sm); }

.hero__scene { position: relative; width: min(540px, 100%); aspect-ratio: 1 / 1.08; justify-self: center; }
.hero__sun {
  position: absolute; left: 8%; right: 8%; bottom: 6%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffffff, var(--sky) 72%);
  box-shadow: 0 0 0 14px #fff, 0 16px 0 14px var(--sky-dk), 0 34px 60px hsl(var(--sc-shadow-color) / 0.3);
}
.hero__subjects, .hero__friends, .hero__ninawrap { position: absolute; inset: 0; }
.hero__subjects { list-style: none; margin: 0; padding: 0; }
.hero__subjects li {
  position: absolute; padding: 10px 18px; border-radius: var(--sc-r-pill); white-space: nowrap;
  background: #fffaf0; color: var(--sc-ink); font: 900 clamp(0.85rem, 0.6rem + 0.6vw, 1.15rem)/1 var(--sc-font-display);
  border-bottom: 6px solid var(--c);
  box-shadow: 0 8px 18px -6px hsl(var(--sc-shadow-color) / 0.35);
  animation: bob 4.4s ease-in-out infinite;
}
.hero__subjects li::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: 1px; }
.hero__subjects .s1 { left: 4%; top: 4%; transform: rotate(-4deg); animation-delay: -0.8s; }
.hero__subjects .s2 { right: 2%; top: 10%; animation-delay: -2s; }
.hero__subjects .s3 { left: -16%; top: 47%; animation-delay: -1.4s; }
.hero__subjects .s4 { right: -16%; top: 52%; animation-delay: -3s; }
.hero__subjects .s5 { left: -8%; top: 88%; animation-delay: -0.3s; }
.hero__subjects { z-index: 1; }
.hero__nina { position: absolute; bottom: 0; left: 50%; translate: -50% 0; height: 100%; width: auto; max-width: none; filter: drop-shadow(0 16px 16px hsl(var(--sc-shadow-color) / 0.3)); }
.hero__friends img {
  position: absolute; width: 19%; aspect-ratio: 1; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 5px #fff, 0 10px 18px hsl(var(--sc-shadow-color) / 0.28);
  animation: bob 3.6s ease-in-out infinite;
}
.hero__friends .f1 { left: -4%; top: 20%; }
.hero__friends .f2 { right: -4%; top: 28%; animation-delay: -1.2s; }
.hero__friends .f3 { left: 0%; top: 64%; animation-delay: -2.1s; width: 17%; }
.hero__friends .f4 { right: 0%; top: 72%; animation-delay: -0.6s; width: 17%; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }

/* trust seal: recommended by child psychologists */
.trust { display: flex; align-items: center; gap: var(--sc-4); margin-top: var(--sc-6); padding: 12px 18px 12px 12px; max-width: 34rem;
  background: color-mix(in oklab, #fffaf0 82%, transparent); border-radius: var(--sc-r-lg); box-shadow: var(--clay-card); }
.trust p { margin: 0; font-size: 0.98rem; line-height: 1.45; color: var(--sc-ink-soft); }
.trust b { display: block; color: var(--sc-ink); font: 900 1.08rem/1.25 var(--sc-font-display); margin-bottom: 2px; }
.seal { flex: none; width: 118px; height: 118px; transform: rotate(-8deg); filter: drop-shadow(0 6px 8px hsl(var(--sc-shadow-color) / 0.3)); }
.seal__ring { font: 900 15px var(--sc-font-display); fill: #1d3557; }

/* ------------------------------------------------------------ 2 globe -- */
.globe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--sc-6); padding: 96px var(--sc-gutter) var(--sc-6); max-width: 92rem; margin: 0 auto; }
.globe__ball { position: relative; width: min(560px, 92%); aspect-ratio: 1; justify-self: center; }
.globe__spin { width: 100%; height: 100%; transform: rotate(calc(var(--sc-p, 0) * -40deg)); }
.globe__spin img { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 30px 60px -18px hsl(var(--sc-shadow-color) / 0.45); animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }
.pin {
  position: absolute; width: 15%; aspect-ratio: 1; border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 8px 14px hsl(var(--sc-shadow-color) / 0.35);
  --k: clamp(0, (var(--sc-p, 0) - var(--at)) * 10, 1);
  opacity: var(--k);
  transform: translate(calc((1 - var(--k)) * var(--fx)), calc((1 - var(--k)) * var(--fy))) scale(calc(0.6 + 0.4 * var(--k)));
}
.pin--soon { display: grid; place-items: center; font-size: clamp(1.1rem, 2.4vw, 2rem); background: radial-gradient(circle at 40% 35%, #fff, var(--c) 75%); }
/* where each sits around the globe: places on it, other subjects orbit the rim */
.p1  { --at: 0.04; left: 36%; top: 80%; --fx: -40vw; --fy: 20vh; }
.p2  { --at: 0.10; left: 32%; top: 20%; --fx: -30vw; --fy: -30vh; }
.p3  { --at: 0.16; left: -3%; top: 46%; --fx: -50vw; --fy: 0vh; }
.p4  { --at: 0.22; left: 84%; top: 62%; --fx: 40vw; --fy: 20vh; }
.p5  { --at: 0.28; left: 66%; top: 12%; --fx: 40vw; --fy: -30vh; }
.p6  { --at: 0.34; left: 8%; top: 16%; --fx: -40vw; --fy: -20vh; }
.p7  { --at: 0.42; left: 58%; top: 42%; --fx: 30vw; --fy: 0vh; }
.p8  { --at: 0.52; left: 88%; top: 30%; --fx: 40vw; --fy: -10vh; }
.p9  { --at: 0.58; left: 14%; top: 78%; --fx: -40vw; --fy: 30vh; }
.p10 { --at: 0.64; left: 62%; top: 84%; --fx: 30vw; --fy: 30vh; }
.globe__copy { display: grid; }
.globe__copy > * { grid-area: 1 / 1; margin: 0; }
.globe__copy h2 { max-width: 15ch; }
.globe__second .sc-display { margin: 0 0 var(--sc-5); max-width: 17ch; }
.subjects { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.subjects li { padding: 10px 16px; border-radius: var(--sc-r-pill); background: var(--sc-surface); box-shadow: var(--clay-card); border-bottom: 5px solid var(--c); font: 900 1rem/1 var(--sc-font-display); }

/* ------------------------------------------------------------ 3 trip -- */
.trip__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trip__copy {
  max-width: 30rem; color: var(--sc-ink); background: var(--sc-surface);
  border-radius: var(--sc-r-lg); padding: var(--sc-5) var(--sc-6) var(--sc-6); box-shadow: var(--sc-e3);
}
.trip__copy h2 { margin: 0 0 var(--sc-3); font-size: var(--sc-t-2xl); }
.trip__copy .sc-body { color: var(--sc-ink-soft); font-size: var(--sc-t-lg); }
.trip__place {
  position: absolute; right: var(--sc-gutter); top: 96px; z-index: var(--sc-z-copy); margin: 0;
  padding: 10px 18px; border-radius: var(--sc-r-pill); background: var(--sc-surface); box-shadow: var(--sc-e2);
  font: 900 1.05rem/1 var(--sc-font-display);
  opacity: 0; transform: translateY(-6px); transition: opacity 260ms var(--sc-ease-out), transform 260ms var(--sc-ease-out);
}
.trip__place.on { opacity: 1; transform: none; }

/* ------------------------------------------------------------ 4 episodes -- */
.eps { display: flex; align-items: center; }
.eps__rail { gap: clamp(1rem, 2.5vw, 2rem); padding: 80px var(--sc-gutter) 0; align-items: center; }
.eps__lead { flex: 0 0 min(26rem, 84vw); }
.eps__lead .sc-body { margin-top: var(--sc-4); font-size: var(--sc-t-lg); }
.ep { flex: 0 0 clamp(15rem, 26vw, 23rem); }
.ep__img { position: relative; border-radius: var(--sc-r-lg); overflow: hidden; box-shadow: var(--clay-card); background: var(--sc-surface); }
.ep__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ep__theme { display: inline-block; margin: var(--sc-4) 0 0; padding: 5px 10px; border-radius: var(--sc-r-pill); font: 900 0.78rem/1 var(--sc-font-display); letter-spacing: 0.02em; background: color-mix(in oklab, var(--c) 28%, var(--sc-surface)); }
.ep h3 { font: 900 1.4rem/1.15 var(--sc-font-display); margin: var(--sc-2) 0 var(--sc-1); }
.ep p:not(.ep__theme) { margin: 0; color: var(--sc-ink-soft); max-width: 26ch; }
.eps__note { flex: 0 0 min(20rem, 70vw); font: 800 var(--sc-t-lg)/1.4 var(--sc-font-display); color: var(--sc-ink-soft); padding-right: var(--sc-gutter); }
@media (prefers-reduced-motion: no-preference) {
  .ep { --k: clamp(0, (var(--sc-p, 0) * 9 - var(--i, 0)) * 1.2 + 1, 1); opacity: calc(0.55 + 0.45 * var(--k)); }
}
/* placeholder thumbnails for future themes: same anatomy as the real ones (logo, title, badge) */
.ph {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background:
    radial-gradient(40% 55% at 80% 60%, color-mix(in oklab, var(--c) 60%, #fff) 0 60%, transparent 61%),
    radial-gradient(30% 40% at 12% 100%, color-mix(in oklab, var(--c) 45%, #fff) 0 60%, transparent 61%),
    linear-gradient(160deg, var(--c2), color-mix(in oklab, var(--c) 55%, var(--c2)));
}
.ph__logo { position: absolute; left: 6%; top: 7%; width: 30% !important; height: auto !important; aspect-ratio: auto !important; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.2)); }
.ph__icon { position: absolute; right: 9%; top: 50%; translate: 0 -50%; width: 34%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: clamp(2.2rem, 4.5vw, 3.6rem); background: #fffaf0; box-shadow: 0 0 0 6px #fff, 0 10px 18px hsl(var(--sc-shadow-color) / 0.25); }
.ph__title { position: absolute; left: 6%; bottom: 22%; width: 52%; font: 900 clamp(1rem, 1.7vw, 1.45rem)/1.05 var(--sc-font-display); color: var(--sc-ink); }
.ph__date { position: absolute; left: 6%; bottom: 7%; padding: 5px 10px; border-radius: var(--sc-r-pill); background: var(--sc-ink); color: #fff; font: 900 0.75rem/1 var(--sc-font-display); }
.ep--soon .ep__theme { background: color-mix(in oklab, var(--c) 30%, var(--sc-surface)); }

/* ------------------------------------------------------------ 5 calm screen -- */
.calm { display: grid; place-items: center; padding: 96px var(--sc-gutter) var(--sc-7); }
.calm__noise { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; pointer-events: none; }
.calm__noise li {
  /* three phases: hold in colour (p < 0.22), turn grey (0.22–0.42), then drift to the side and fade (0.42–0.66) */
  --g: clamp(0, (var(--sc-p, 0) - 0.22) * 5, 1);
  --q: clamp(0, (var(--sc-p, 0) - 0.42) * 4.2, 1);
  position: absolute; left: 50%; top: 50%;
  padding: 10px 16px 10px 40px; border-radius: 12px; white-space: nowrap;
  font: 900 1.15rem/1 var(--sc-font-display);
  box-shadow: 0 6px 16px rgba(29, 53, 87, 0.14);
  text-decoration: line-through; text-decoration-color: var(--fg, #fff); text-decoration-thickness: 3px;
  opacity: calc(1 - var(--q));
  transform: translate(-50%, -50%) translate(calc(var(--x) * (1 + var(--q) * 0.9)), var(--y)) rotate(var(--r));
}
.calm__noise li::before { content: ""; position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 14px; height: 14px; border-radius: 4px; background: rgba(255, 255, 255, 0.75); }
.calm__noise li { background: var(--bg); color: var(--fg); filter: grayscale(var(--g)) blur(calc(var(--q) * 5px)); }
.calm__core { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; max-width: 60rem; }
.calm__kicker { margin: 0 0 var(--sc-4); padding: 8px 16px; border-radius: var(--sc-r-pill); background: var(--green); color: #063d2f; font: 900 0.95rem/1 var(--sc-font-display); }
.calm__title { margin: 0; font: 900 clamp(2.4rem, 1.4rem + 4.2vw, 5.4rem)/1.02 var(--sc-font-display); letter-spacing: -0.025em; text-wrap: balance; }
.calm__points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sc-4); list-style: none; margin: var(--sc-7) 0 0; padding: 0; width: 100%; text-align: left; }
.calm__points li { display: grid; gap: 6px; background: var(--sc-surface); border-radius: var(--sc-r-lg); padding: var(--sc-5); box-shadow: var(--clay-card); border-top: 8px solid var(--c); }
.calm__points b { font: 900 1.25rem/1.15 var(--sc-font-display); }
.calm__points span { color: var(--sc-ink-soft); }

/* ------------------------------------------------------------ 6 family -- */
.family { padding-block: clamp(3.5rem, 7vw, 8rem); }
.family__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.family__fig { margin: var(--sc-6) 0 0; border-radius: var(--sc-r-lg); overflow: hidden; box-shadow: var(--clay-card); }
.family__fig img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.family__cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sc-4); }
.card { background: var(--sc-surface); border-radius: var(--sc-r-lg); padding: var(--sc-5) var(--sc-5) var(--sc-6); box-shadow: var(--clay-card); }
.card h3 { font: 900 1.3rem/1.15 var(--sc-font-display); margin: 0 0 var(--sc-3); }
.card p { margin: 0; color: var(--sc-ink-soft); }
.card--talk { grid-column: 1 / -1; border-top: 8px solid var(--sky); }
.card--talk ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sc-3); }
.card--talk li { display: flex; gap: 12px; align-items: baseline; font-size: 1.08rem; }
.lvl { flex: none; font: 900 0.8rem/1 var(--sc-font-display); padding: 6px 9px; border-radius: var(--sc-r-pill); background: color-mix(in oklab, var(--sky) 22%, var(--sc-surface)); }
.card--play { border-top: 8px solid var(--sun); }
.card--week { border-top: 8px solid var(--green); }
.card--bed { grid-column: 1 / -1; background: #1d3557; color: #fdf6e8; border-top: 8px solid #8fa3d8; }
.card--bed p { color: #d5dcf0; margin-bottom: var(--sc-5); }
.play {
  display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 22px 0 8px;
  border: 0; border-radius: var(--sc-r-pill); cursor: pointer;
  background: #fdf6e8; color: #1d3557; font: 900 1rem/1 var(--sc-font-display); box-shadow: 0 4px 0 #b8b2a2;
}
.play__icon { width: 38px; height: 38px; border-radius: 50%; background: var(--sun); position: relative; }
.play__icon::after { content: ""; position: absolute; left: 15px; top: 11px; border-left: 12px solid #1d3557; border-block: 8px solid transparent; }
.play[aria-pressed="true"] .play__icon::after { left: 13px; top: 12px; width: 4px; height: 14px; border: 0; background: #1d3557; box-shadow: 8px 0 0 #1d3557; }

/* ------------------------------------------------------------ 7 night -- */
/* Nina's room by day (Ep01), dusk, then the same girl at bedtime by a moonlit window (Ep07). */
.night { color: #fdf6e8; background: #14213d; }
.night__room { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.night__room--day { z-index: 0; object-position: 50% 40%; transform: scale(calc(1.06 - var(--sc-p, 0) * 0.06)); }
.night__dusk { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, #2b3a78 0%, #c46a5a 60%, #f2a65a 100%); mix-blend-mode: multiply;
  opacity: clamp(0, (var(--sc-p, 0) - 0.2) * 3.5, 0.85); }
.night__room--night { z-index: 2; object-position: 70% 50%; opacity: clamp(0, (var(--sc-p, 0) - 0.44) * 6, 1); transform: scale(calc(1.04 - var(--sc-p, 0) * 0.04)); }
.night__shade { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 18, 40, 0.72) 0%, rgba(10, 18, 40, 0.45) 45%, rgba(10, 18, 40, 0.1) 75%);
  opacity: clamp(0, (var(--sc-p, 0) - 0.24) * 4, 1); }
.night__shade::after { content: ""; position: absolute; inset: 0; background: rgba(10, 18, 40, 0.5); opacity: clamp(0, (var(--sc-p, 0) - 0.8) * 6, 1); }
.night__copy { position: absolute; z-index: 4; inset: 0; display: grid; align-items: center; justify-items: start; padding: 96px var(--sc-gutter) 90px; }
.night__copy > * { grid-area: 1 / 1; margin: 0; }
.night__card { align-self: start; justify-self: start; margin-top: 3vh !important; background: var(--sc-surface); color: var(--sc-ink); border-radius: var(--sc-r-lg); padding: var(--sc-5) var(--sc-6); box-shadow: var(--sc-e3); margin-bottom: 4vh !important; }
.night__card h2 { margin: 0; }
.night__dark, .night__tell { max-width: 13ch; text-shadow: 0 2px 18px rgba(10, 18, 40, 0.55); }
.night__end { justify-self: center; max-width: 36rem; display: grid; justify-items: center; gap: var(--sc-5); text-align: center; text-shadow: 0 2px 18px rgba(10, 18, 40, 0.55); }
.night__end .sc-body { color: #fdf6e8; font-size: var(--sc-t-lg); }
.night__small { margin: 0; font-weight: 800; color: #d5dcf0; }
.night__kinds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.night__kinds li { padding: 7px 14px; border-radius: 999px; background: rgba(255, 243, 207, 0.14); border: 1px solid rgba(255, 243, 207, 0.32); color: #fdf6e8; font-weight: 700; font-size: 0.95rem; text-shadow: none; }
.night__kinds b { color: #ffd166; }
.night .foot { z-index: 5; color: #d5dcf0; }

/* ------------------------------------------------------------ (old close) -- */
.close { display: grid; place-items: center; text-align: center; padding: 96px var(--sc-gutter) 120px; }
.close__nina { position: absolute; right: 6%; bottom: 0; height: 62%; width: auto; max-width: none; filter: drop-shadow(0 16px 16px hsl(var(--sc-shadow-color) / 0.3)); }
.close__inner { display: grid; justify-items: center; gap: var(--sc-6); position: relative; z-index: 2; }
.close__inner h2 { margin: 0; max-width: 16ch; }
.close__small { margin: 0; font-weight: 800; }
.foot { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 18px var(--sc-gutter); font-size: var(--sc-t-sm); color: var(--sc-ink); }

/* ------------------------------------------------------------ 4 episodes (grid) -- */
.eps2 { padding-block: clamp(3.5rem, 7vw, 7rem); }
.eps2__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--sc-4) clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: var(--sc-7); }
.eps2__head h2 { margin: 0; }
.eps2__head .themes { grid-column: 1 / -1; margin-top: var(--sc-5); }
.eps2__head .sc-body { margin: 0; font-size: var(--sc-t-lg); }
.themes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.theme {
  display: grid; gap: 2px; text-align: left; cursor: pointer; font: inherit; color: var(--sc-ink);
  padding: 10px 14px; border: 0; border-radius: var(--sc-r-md); background: var(--sc-surface);
  box-shadow: var(--clay-card); border-bottom: 5px solid var(--c);
  transition: transform 140ms var(--sc-ease-out), background-color 160ms var(--sc-ease-out);
}
.theme:hover { transform: translateY(-2px); }
.theme b { font: 900 1rem/1 var(--sc-font-display); }
.theme span { font-size: 0.8rem; font-weight: 800; color: var(--sc-ink-soft); }
.theme[aria-pressed="true"] { background: color-mix(in oklab, var(--c) 30%, var(--sc-surface)); box-shadow: inset 0 0 0 2px var(--c), var(--clay-card); }
.theme[data-filter="all"][aria-pressed="true"] { background: var(--sc-ink); color: #fff; }
.theme[data-filter="all"][aria-pressed="true"] span { color: #d5dcf0; }
.ep2 { transition: opacity 180ms var(--sc-ease-out), transform 220ms var(--sc-ease-out); }
.ep2.is-out { opacity: 0 !important; transform: scale(0.97) !important; }
.ep2[hidden] { display: none; }
.eps2__empty { grid-column: 1 / -1; margin: 0; font-weight: 800; color: var(--sc-ink-soft); }
.eps2__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sc-5) var(--sc-4); }
.ep2__img { border-radius: var(--sc-r-md); overflow: hidden; box-shadow: var(--clay-card); background: var(--sc-surface); }
.ep2__img > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.ep2__theme { display: inline-block; margin: var(--sc-3) 0 0; padding: 4px 9px; border-radius: var(--sc-r-pill); font: 900 0.72rem/1 var(--sc-font-display); background: color-mix(in oklab, var(--c) 28%, var(--sc-surface)); }
.ep2 h3 { font: 900 1.1rem/1.15 var(--sc-font-display); margin: 6px 0 2px; }
.ep2__q { margin: 0; font-size: 0.92rem; color: var(--sc-ink-soft); }
.ep2--soon .ph__title { display: none; }
.ep2--soon .ph__icon { right: 50%; translate: 50% -55%; }
.ep2--soon .ph__logo { width: 34% !important; }
.ep2--soon .ph__icon { font-size: clamp(1.5rem, 2.6vw, 2.4rem); }

/* ------------------------------------------------------------ 6 family (steps) -- */
.family__head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--sc-4) clamp(2rem, 5vw, 5rem); align-items: end; margin-bottom: var(--sc-7); }
.family__head h2 { margin: 0; }
.family__head .sc-body { margin: 0; font-size: var(--sc-t-lg); }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sc-4); list-style: none; margin: 0; padding: 0; }
.steps::before { content: ""; position: absolute; left: 6%; right: 6%; top: 26px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, color-mix(in oklab, var(--sc-ink) 22%, transparent) 0 14px, transparent 14px 24px); }
.step { position: relative; background: var(--sc-surface); border-radius: var(--sc-r-lg); padding: 70px var(--sc-5) var(--sc-5); box-shadow: var(--clay-card); border-top: 8px solid var(--c); margin-top: 26px; }
.step__n { position: absolute; top: -30px; left: var(--sc-5); width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: var(--sc-ink); font: 900 1.6rem/1 var(--sc-font-display); box-shadow: 0 0 0 6px var(--sc-canvas), 0 6px 0 6px color-mix(in oklab, var(--c) 60%, #000 10%); }
.step__when { margin: 0; font: 900 0.78rem/1 var(--sc-font-display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--sc-ink-soft); }
.step h3 { font: 900 1.35rem/1.15 var(--sc-font-display); margin: 6px 0 var(--sc-3); }
.step p:not(.step__when) { margin: 0; color: var(--sc-ink-soft); }
.step__media { border-radius: var(--sc-r-md); overflow: hidden; margin-bottom: var(--sc-3); }
.step__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.step__qs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sc-3); }
.step__qs li { display: flex; gap: 10px; align-items: baseline; }

/* night: tell the reader there is more below */
.night__hint {
  align-self: end; justify-self: center; margin: 0 0 7vh !important;
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 10px 10px 22px; border-radius: var(--sc-r-pill);
  background: rgba(20, 33, 61, 0.62); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fffaf0; font: 900 1.2rem/1.2 var(--sc-font-display); box-shadow: 0 10px 24px rgba(10, 18, 40, 0.3);
}
.night__arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: var(--sc-ink); font-size: 1.25rem; animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }

@media (max-width: 1100px) and (min-width: 861px) {
  .eps2__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--sc-7); }
  .steps::before { display: none; }
}

/* ------------------------------------------------------------ mobile -- */
@media (max-width: 860px) {
  .eps2__head, .family__head { grid-template-columns: 1fr; margin-bottom: var(--sc-6); }
  .eps2__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sc-4) var(--sc-3); }
  .ep2__q { display: none; }
  .ep2 h3 { font-size: 1rem; }
  .steps { grid-template-columns: 1fr; gap: var(--sc-6); padding-left: 0; }
  .steps::before { left: 28px; right: auto; top: 30px; bottom: 30px; width: 6px; height: auto; background: repeating-linear-gradient(180deg, color-mix(in oklab, var(--sc-ink) 22%, transparent) 0 14px, transparent 14px 24px); }
  .step { margin-top: 0; margin-left: 0; padding: var(--sc-5) var(--sc-5) var(--sc-5) 80px; border-top: 0; border-left: 8px solid var(--c); }
  .step__n { top: var(--sc-5); left: 10px; width: 50px; height: 50px; font-size: 1.4rem; }
  .night__hint { font-size: 0.9rem; padding: 8px 8px 8px 16px; margin-bottom: 9vh !important; max-width: calc(100vw - 32px); }
  .night__arrow { width: 34px; height: 34px; flex: none; }
  .bar { gap: var(--sc-2); padding-inline: 12px; }
  .bar__mark img { width: 84px; }
  .bar__login { padding: 9px 14px; font-size: 0.9rem; }

  .hero { grid-template-columns: 1fr; align-content: start; gap: var(--sc-5); padding-top: 88px; min-height: auto; padding-bottom: var(--sc-8); }
  .hero__title { font-size: clamp(2.3rem, 10vw, 3rem); margin-bottom: var(--sc-3); }
  .hero__lead { font-size: 1.04rem; margin-bottom: var(--sc-4); }
  .hero__scene { width: min(320px, 78vw); }
  .trust { margin-top: var(--sc-5); padding: 10px 14px 10px 10px; }
  .seal { width: 92px; height: 92px; }
  .trust p { font-size: 0.9rem; }
  .trust b { font-size: 1rem; }
  .hero__subjects li { padding: 7px 11px; font-size: 0.78rem; border-bottom-width: 4px; }
  .hero__subjects li::before { width: 7px; height: 7px; margin-right: 5px; }
  .hero__subjects .s3 { left: -10%; } .hero__subjects .s4 { right: -10%; }

  .globe { grid-template-columns: 1fr; align-content: center; gap: var(--sc-5); padding-top: 80px; }
  .globe__ball { width: min(300px, 74vw); }
  .globe__copy { text-align: center; justify-items: center; }
  .globe__copy h2 { font-size: clamp(1.7rem, 7.4vw, 2.3rem); }
  .globe__second .sc-display { font-size: clamp(1.3rem, 5.6vw, 1.7rem); margin-inline: auto; }
  .subjects { justify-content: center; gap: 6px; }
  .subjects li { padding: 8px 12px; font-size: 0.9rem; }

  .trip__place { top: 76px; right: 12px; }
  .trip__copy { bottom: 5vh; padding: var(--sc-4) var(--sc-5) var(--sc-5); }

  .eps__rail { padding-top: 72px; }

  .calm__noise li { font-size: 0.82rem; padding: 8px 12px 8px 32px; }
  .calm__noise li::before { left: 11px; width: 12px; height: 12px; }
  .calm__title { font-size: clamp(2rem, 9vw, 2.7rem); }
  .calm__points { grid-template-columns: 1fr; gap: var(--sc-3); margin-top: var(--sc-5); }
  .calm__points li { padding: var(--sc-4) var(--sc-5); }

  .family__grid { grid-template-columns: 1fr; }
  .family__cards { grid-template-columns: 1fr; }

  .night__end { gap: var(--sc-4); }
  .night__card { padding: var(--sc-4) var(--sc-5); align-self: start; margin-top: 2vh !important; margin-bottom: 0 !important; }
  .night__card h2, .night__dark, .night__tell { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .night__dark, .night__tell { align-self: start; margin-top: 2vh !important; }
  .night__shade { background: linear-gradient(180deg, rgba(10, 18, 40, 0.75) 0%, rgba(10, 18, 40, 0.35) 45%, rgba(10, 18, 40, 0.2) 100%); }
  .night__end .sc-body { font-size: 1.02rem; }
  .close { align-items: start; padding-top: 16vh; }
  .close__nina { height: 30%; right: 50%; translate: 50% 0; bottom: 64px; }
  .foot { flex-direction: column; gap: 2px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__friends img, .globe__spin img, .hero__subjects li, .night__arrow { animation: none; }
  .calm__noise { display: none; }
}
@media (max-width: 860px) {
  /* phone: the headline sits high, so the labels fill the space below it */
  .calm__noise li:nth-child(1) { --x: -22vw !important; --y: 0vh !important; }
  .calm__noise li:nth-child(2) { --x: 8vw !important; --y: 9vh !important; }
  .calm__noise li:nth-child(3) { --x: 22vw !important; --y: 18vh !important; }
  .calm__noise li:nth-child(4) { --x: -8vw !important; --y: 26vh !important; }
  .calm__noise li:nth-child(5) { --x: -22vw !important; --y: 35vh !important; }
  .calm__noise li:nth-child(6) { --x: 18vw !important; --y: 38vh !important; }
}

/* Two story samples side by side (wrap on phones); a spinning ring while one loads */
.night__plays { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.play.is-loading .play__icon { animation: play-spin 0.9s linear infinite; background: none; border: 4px solid rgba(255, 209, 102, 0.35); border-top-color: var(--sun); box-sizing: border-box; }
.play.is-loading .play__icon::after { display: none; }
@keyframes play-spin { to { transform: rotate(360deg); } }

/* Episode cards open a short preview */
.ep2__play { display: block; width: 100%; padding: 0; border: 0; cursor: pointer; position: relative; font: inherit; color: inherit; }
.ep2__play:focus-visible { outline: 3px solid var(--sc-ink); outline-offset: 3px; }
.ep2__badge { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border-radius: var(--sc-r-pill); background: rgba(253, 246, 232, 0.94); color: #1d3557; font: 900 0.85rem/1 var(--sc-font-display); box-shadow: 0 3px 0 rgba(29, 53, 87, 0.18); }
.ep2__badge i { width: 24px; height: 24px; border-radius: 50%; background: var(--sun); position: relative; }
.ep2__badge i::after { content: ""; position: absolute; left: 9px; top: 6px; border-left: 9px solid #1d3557; border-block: 6px solid transparent; }
.ep2__play:hover .ep2__badge { background: var(--sun); }
.ep2__play.no-preview { cursor: default; }
.ep2__play.no-preview .ep2__badge { display: none; }

.preview { padding: 0; border: 0; background: transparent; width: min(920px, calc(100vw - 32px)); max-width: none; }
.preview::backdrop { background: rgba(14, 18, 52, 0.72); backdrop-filter: blur(4px); }
.preview__box { position: relative; background: #fdf6e8; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.preview__video { position: relative; background: #0e1234; }
.preview__video video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0e1234; }
.preview__spin { display: none; position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  border: 5px solid rgba(255, 209, 102, 0.3); border-top-color: var(--sun); animation: play-spin 0.9s linear infinite; pointer-events: none; }
.preview.is-loading .preview__spin { display: block; }
.preview__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 20px 20px; }
.preview__kicker { margin: 0; font: 800 0.78rem/1 var(--sc-font-display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--sc-ink-soft); }
.preview__foot h3 { margin: 6px 0 0; font: 900 1.4rem/1.15 var(--sc-font-display); color: #1d3557; }
.preview__close { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(253, 246, 232, 0.94); color: #1d3557; font: 900 1.6rem/1 var(--sc-font-display); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); }
.preview__close:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* Upcoming episodes under the grid, and the next bedtime stories in the night scene */
.soon-list { margin-top: var(--sc-7, 48px); }
.soon-list__title { font: 900 1.5rem/1.1 var(--sc-font-display); margin: 0 0 14px; }
.soon-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.soon-list li { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--sc-r-md); background: var(--sc-surface); box-shadow: var(--clay-card); border-left: 8px solid var(--c); }
.soon-list li span { font: 800 0.78rem/1.2 var(--sc-font-display); letter-spacing: 0.04em; text-transform: uppercase; color: var(--sc-ink-soft); }
.soon-list li b { font: 900 1.1rem/1.2 var(--sc-font-display); color: #1d3557; }
.soon-list li small { color: var(--sc-ink-soft); }
.night__next { margin: 0; color: #fdf6e8; font-weight: 700; }
.night__next b { color: #ffd166; }
.soon-list__lead { margin: -8px 0 14px; color: var(--sc-ink-soft); }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.foot__links a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.soon-list li img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 4px; }
