/* One stylesheet for every page: one night told as a fairy tale, with Petrykivka ornament (D-182), mobile first.
   The font is self-hosted Nunito (D-184). */

@font-face {
  font-family: "Nunito";
  src: url(/assets/fonts/nunito-cyrillic.63b14e3ef0.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Nunito";
  src: url(/assets/fonts/nunito-latin.ba344451ea.woff2) format("woff2");
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-21FF, U+2212, U+2215;
}

:root {
  color-scheme: dark;
  --navy: #0a1433;
  --navy-2: #101d47;
  --line: rgb(233 180 76 / 22%);
  --card: rgb(12 22 56 / 84%);
  --ink: #fbf3e2;
  --muted: #d9d3ea;
  --soft: #b4aed2;
  --gold: #e9b44c;
  --gold-2: #ffd98a;
  --berry: #e2384f;
  --radius: 22px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* 0 at the top of the page, 1 at the bottom; the script sets it as the page scrolls. */
  --t: 0;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font: 600 1.125rem/1.6 var(--font);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--gold-2);
  text-underline-offset: 0.18em;
}

h1,
h2,
h3 {
  margin: 0 0 0.45em;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 10.5vw, 4.4rem);
  font-weight: 1000;
}

h1 em {
  font-style: normal;
  color: var(--gold-2);
}

h2 {
  font-size: clamp(1.9rem, 7.6vw, 3rem);
  text-shadow: 0 2px 18px rgb(5 10 35 / 70%);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--gold-2);
  outline-offset: 3px;
  border-radius: 8px;
}

main,
.footer {
  overflow-x: hidden;
  overflow-x: clip;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

.skip {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 60;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--gold-2);
  color: var(--navy);
  font-weight: 900;
}

.skip:focus {
  top: 8px;
}

.small {
  color: var(--soft);
  font-size: 0.95rem;
}

/* The sky: dusk turns to night and the moon rises as the page scrolls */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #1d1650 0%, #3d2468 40%, #7a3d68 72%, #b8625c 100%);
  pointer-events: none;
}

.sky__night {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #050b26 0%, #0a1433 55%, #111f4e 100%);
  opacity: clamp(0, calc(var(--t) * 5 - 0.15), 1);
}

.sky__stars {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  opacity: clamp(0.15, calc(var(--t) * 6), 1);
}

.sky__stars--far {
  background-image:
    radial-gradient(1.2px 1.2px at 20px 30px, #fff 50%, transparent 52%),
    radial-gradient(1px 1px at 110px 140px, #fff 50%, transparent 52%),
    radial-gradient(1.1px 1.1px at 170px 70px, #ffe9b0 50%, transparent 52%);
  background-size: 210px 210px;
  animation: twinkle 6s ease-in-out infinite;
}

.sky__stars--near {
  background-image:
    radial-gradient(1.8px 1.8px at 60px 90px, #fff 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 230px 190px, #ffe9b0 50%, transparent 52%);
  background-size: 300px 300px;
  animation: twinkle 8s ease-in-out infinite reverse;
}

@keyframes twinkle {
  50% { filter: brightness(0.55); }
}

/* The sun sets low on the right, in the west, while dusk turns to night. On phones it starts at the right
   edge beside the button, above the phone, so the phone does not hide it. */
.sky__sun {
  position: absolute;
  bottom: 31vh;
  left: 90%;
  width: 180px;
  height: 180px;
  margin-left: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe7b3 0%, #ffbf73 45%, rgb(255 140 90 / 0%) 70%);
  opacity: clamp(0, calc(1 - var(--t) * 8), 1);
  transform: translate(calc(var(--t) * 140vw), calc(var(--t) * 80vh));
  will-change: transform;
}

/* As the sun goes down, a young moon comes up on the left, in the east, and crosses the sky in a half
   circle to the right, the way it moves at night. --m runs from 0 at moonrise to 0.92, low on the right,
   at the bottom of the page. The cards are frosted glass, so the moon glows softly through them. */
.sky__moon {
  --m: clamp(0, calc((var(--t) - 0.06) / 0.94 * 0.92), 0.92);
  --a: calc(var(--m) * 180deg);
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  background: url(/assets/img/moon.67635e4093.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 14px rgb(255 217 138 / 50%));
  opacity: clamp(0, calc((var(--t) - 0.06) * 14), 1);
  transform: translate(calc(50vw - cos(var(--a)) * 40vw), calc(94vh - sin(var(--a)) * 78vh)) rotate(calc(var(--m) * 50deg - 20deg));
  /* Its own layer: a step moves the glowing moon without painting its shadow again (D-219). */
  will-change: transform;
}

.ages,
.step,
.world,
.player,
.story,
.note,
.tier,
.more,
.faq details {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

/* Buttons: gold, like the ornament */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  padding: 16px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #241600;
  font: 900 1.15rem/1.2 var(--font);
  text-decoration: none;
  box-shadow: 0 0 0 2px rgb(255 217 138 / 30%), 0 14px 34px rgb(233 180 76 / 32%);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgb(255 255 255 / 55%) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: shine 4.5s ease-in-out infinite;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgb(255 217 138 / 45%), 0 18px 40px rgb(233 180 76 / 42%);
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  flex: none;
  width: 22px;
  height: 22px;
  fill: currentColor;
}

@keyframes shine {
  55%, 100% { transform: translateX(120%); }
}

.btn--small {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 0.98rem;
  white-space: nowrap;
  box-shadow: none;
}

.btn--small::after {
  display: none;
}

.btn--small .icon {
  width: 18px;
  height: 18px;
}

.btn--paper {
  min-height: 48px;
  padding: 12px 22px;
  background: var(--navy);
  color: var(--ink);
  font-size: 1.02rem;
  box-shadow: 0 8px 20px rgb(0 0 0 / 25%);
}

.btn--paper::after {
  display: none;
}

.btn__short {
  display: none;
}

@media (max-width: 419px) {
  .btn__long {
    display: none;
  }

  .btn__short {
    display: inline;
  }
}

@media (max-width: 339px) {
  .btn--small span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* Header */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgb(10 20 51 / 70%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 1.12rem;
  font-weight: 1000;
  white-space: nowrap;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgb(233 180 76 / 45%);
}

/* Hero: dusk over the hills */

.hero {
  position: relative;
  padding: 30px 0 0;
}

.hero__in {
  display: grid;
  gap: 40px;
  padding-bottom: 40px;
}

.hero__in > * {
  min-width: 0;
}

.hero__kicker {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  border: 1px solid rgb(255 217 138 / 45%);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 0.95rem;
  font-weight: 900;
}

.lead {
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.hero__cta {
  margin: 26px 0 12px;
}

.hero__note {
  margin: 0;
  color: var(--soft);
  font-size: 0.98rem;
}

.hills {
  display: block;
  width: 100%;
  height: 90px;
  margin-top: -40px;
}

.hills__far {
  fill: #172357;
}

.hills__near {
  fill: var(--navy);
}

/* The phone: the evening reminder and a story arrive in a Telegram chat */

.phone {
  position: relative;
  justify-self: center;
  width: min(86vw, 340px);
  margin: 0;
  padding: 11px;
  border-radius: 42px;
  background: linear-gradient(160deg, #22306a, #0e1840);
  box-shadow: 0 40px 80px rgb(0 0 0 / 45%), 0 0 0 1px rgb(255 217 138 / 30%);
}

.phone__peek {
  position: absolute;
  top: -86px;
  right: -22px;
  width: 132px;
  height: 132px;
  transform: rotate(8deg);
  filter: drop-shadow(0 12px 18px rgb(0 0 0 / 45%));
}

.screen {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 470px;
  padding: 14px 12px 16px;
  overflow: hidden;
  border-radius: 32px;
  background: radial-gradient(120% 60% at 50% 0%, #1d2c66, transparent 70%), #0b1438;
}

.chat__top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  font-weight: 900;
}

.chat__top img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.chat__top small {
  display: block;
  color: var(--soft);
  font-size: 0.75rem;
  font-weight: 700;
}

.msg {
  max-width: 90%;
  padding: 9px 12px;
  border-radius: 16px 16px 16px 5px;
  background: #1c2a62;
  font-size: 0.93rem;
  line-height: 1.45;
}

.msg--sticker {
  width: 108px;
  height: 108px;
  padding: 0;
  background: none;
}

.msg--sticker video {
  width: 108px;
  height: 108px;
}

/* The parent's tap on the reminder's button, shown as their reply on the right (D-199) */
.msg--out {
  align-self: flex-end;
  border-radius: 16px 16px 5px 16px;
  background: #3d4aa0;
}

.msg--out small {
  margin-left: 8px;
  color: var(--gold-2);
  font-size: 0.72rem;
}

.msg--story b {
  display: block;
  margin-bottom: 3px;
  color: var(--gold-2);
}

.msg--story .name {
  color: var(--gold-2);
  font-weight: 900;
}

.typing {
  display: inline-flex;
  align-self: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px 16px 16px 5px;
  background: #1c2a62;
}

.typing[hidden] {
  display: none;
}

.typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--soft);
  animation: dots 1.2s ease-in-out infinite;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes dots {
  40% { transform: translateY(-4px); opacity: 1; }
  0%, 80%, 100% { opacity: 0.4; }
}

.voice-msg {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-msg__play {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.8rem;
}

.eq {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
  color: var(--gold-2);
}

.eq i {
  width: 3px;
  height: 30%;
  border-radius: 2px;
  background: currentColor;
  animation: eq 1s ease-in-out infinite;
  animation-play-state: paused;
}

.eq i:nth-child(2n) { animation-delay: 0.15s; }
.eq i:nth-child(3n) { animation-delay: 0.3s; }
.eq i:nth-child(5n) { animation-delay: 0.45s; }

.is-playing .eq i,
.voice-msg .eq i {
  animation-play-state: running;
}

@keyframes eq {
  0%, 100% { height: 25%; }
  50% { height: 100%; }
}

.js .chat-step {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.js .chat-step.is-shown {
  opacity: 1;
  transform: none;
}

/* Chapters: a golden vine grows down the left side; each chapter opens with a flower */

.chapters {
  position: relative;
  background: linear-gradient(180deg, var(--navy) 0, transparent 160px);
}

.vine {
  position: absolute;
  top: 40px;
  bottom: 40px;
  left: max(6px, calc((100vw - 1120px) / 2 + 4px));
  width: 28px;
  pointer-events: none;
}

.vine i {
  display: block;
  width: 28px;
  height: calc(var(--grow, 1) * 100%);
  background: url(/assets/img/vine-leaves.1e10500288.svg) repeat-y top center / 28px 140px;
  filter: drop-shadow(0 0 6px rgb(233 180 76 / 35%));
}

/* The vine's stem runs 20px from the left edge on phones; the text keeps clear of it. */
.chapters .wrap {
  padding-left: 64px;
}

/* On phones chapters sit closer: 88px above and below made a near-empty screen between two of them (D-219). */
.section {
  position: relative;
  padding: 56px 0;
}

.chapter-head {
  position: relative;
  margin-bottom: 34px;
}

/* Centred on the stem: 20px from the edge, 64px left of the text. */
.bloom {
  position: absolute;
  top: -8px;
  left: -71px;
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 4px 12px rgb(0 0 0 / 45%));
}

.js .bloom {
  transform: scale(0.2) rotate(-40deg);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.6s ease;
}

.js .is-in .bloom {
  transform: none;
  opacity: 1;
}

.chapter {
  margin: 0 0 4px;
  text-shadow: 0 1px 10px rgb(5 10 35 / 85%);
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chapter-head h2 {
  margin: 0;
}

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Chapter I: ages. One row per age band saying what changes in the story; on wide screens the bands sit on
   one gold line from the youngest to the oldest. */

.ages__lead {
  margin: 0 0 22px;
  color: var(--muted);
}

.ages {
  position: relative;
  display: grid;
  margin: 0;
  padding: 6px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  list-style: none;
}

.ages li {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}

.ages li + li {
  border-top: 1px solid var(--line);
}

.ages b {
  display: grid;
  place-items: center;
  height: 40px;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: var(--navy);
  color: var(--gold-2);
  font-size: 1.05rem;
  font-weight: 1000;
}

.ages span {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Chapter II: how it works */

.steps {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 18px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.step__media {
  width: 78px;
  height: 78px;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 40%, #22306a, #0e1840);
  overflow: hidden;
}

.step__media video {
  width: 78px;
  height: 78px;
}

.step__time {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 900;
}

.step h3 {
  margin: 0 0 2px;
  font-size: 1.2rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

/* Chapter III: worlds, snap-scrolled on phones */

.worlds {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 44%;
  gap: 12px;
  margin: 0 -18px 0 -64px;
  padding: 6px 18px 16px 64px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 64px;
  scrollbar-width: none;
  list-style: none;
}

.worlds::-webkit-scrollbar {
  display: none;
}

.world {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  min-height: 160px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  scroll-snap-align: start;
  text-align: center;
  font-weight: 900;
}

.world__icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 2px solid rgb(233 180 76 / 60%);
  border-radius: 50%;
  background: radial-gradient(circle, #22306a, #0e1840);
  box-shadow: 0 0 0 5px rgb(233 180 76 / 10%);
  font-size: 2.2rem;
  line-height: 1;
  transition: transform 0.3s ease;
}

.world:hover .world__icon {
  transform: rotate(-8deg) scale(1.06);
}

.world--own {
  border-style: dashed;
  border-color: rgb(233 180 76 / 55%);
}

.swipe-hint {
  margin: 4px 0 0;
  color: var(--soft);
  font-size: 0.9rem;
}

/* Chapter IV: the player and the sample stories */

.player {
  margin: 0 0 56px;
  padding: 22px;
  border: 1px solid rgb(233 180 76 / 40%);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(233 180 76 / 12%), rgb(226 56 79 / 8%)), var(--card);
}

.player__voices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  border-radius: 999px;
  background: rgb(0 0 0 / 30%);
}

.player__voices button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: 900 0.98rem var(--font);
  cursor: pointer;
}

.player__voices button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--navy);
}

.player__main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player__play {
  display: grid;
  flex: none;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: var(--navy);
  cursor: pointer;
  box-shadow: 0 10px 26px rgb(233 180 76 / 35%);
}

/* Drawn icons, not ▶ and ❚❚: a glyph centres its box, so the triangle sat off the circle's middle. The
   triangle's centre of mass is on the circle's centre (D-219). */
.player__icon {
  width: 26px;
  height: 26px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.player__icon--pause,
.is-playing .player__icon--play {
  display: none;
}

.is-playing .player__icon--pause {
  display: block;
}

/* The waveform spans the player: bars of 4px spread to the edge, and on a narrow phone they thin to 2px. */
.player .eq {
  flex: 1;
  justify-content: space-between;
  height: 46px;
  gap: 2px;
}

.player .eq i {
  flex: 0 1 4px;
  min-width: 2px;
}

.player__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--soft);
  font-size: 0.9rem;
}

.player__bar {
  height: 6px;
  margin-top: 10px;
  border-radius: 6px;
  background: rgb(255 255 255 / 10%);
  overflow: hidden;
}

.player__bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--berry));
}

.player__fallback {
  display: none;
}

.player__fallback audio {
  width: 100%;
  margin-top: 8px;
}

html:not(.js) .player__main,
html:not(.js) .player__meta,
html:not(.js) .player__bar,
html:not(.js) .player__voices {
  display: none;
}

html:not(.js) .player__fallback {
  display: block;
}

.stories__title {
  margin: 0 0 14px;
}

.stories {
  display: grid;
  gap: 18px;
}

.story {
  padding: 18px 18px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.story h3 {
  margin-bottom: 0.25em;
  font-size: 1.35rem;
}

.story__meta {
  margin-bottom: 0.4em;
  color: var(--soft);
  font-size: 0.95rem;
}

.story__note {
  display: inline-block;
  margin-bottom: 0.6em;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgb(111 191 143 / 16%);
  color: #bfe9cf;
  font-size: 0.92rem;
}

.story__text {
  color: var(--ink);
  font: 500 1.1rem/1.7 var(--font);
}

.story__text p {
  margin: 0 0 0.85em;
}

.story__more summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--gold-2);
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.story__more summary::-webkit-details-marker {
  display: none;
}

.story__more summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.story__more[open] summary {
  display: none;
}

/* Under the steps: what a parent can count on, and what the bot keeps about the child. */
.note {
  margin: 28px 0 0;
  padding: 16px 18px;
  border: 1px solid rgb(111 191 143 / 40%);
  border-radius: var(--radius);
  background: rgb(22 39 65 / 86%);
}

.note p {
  margin: 0;
}

.note p + p {
  margin-top: 8px;
}

/* Chapter V: prices */

.free {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 14px 12px;
  margin: 0 0 34px;
  padding: 24px 22px;
  border-radius: 26px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgb(255 217 138 / 45%), transparent 60%),
    linear-gradient(140deg, #f7e7c4, #f1d59c);
  color: var(--navy);
  box-shadow: 0 20px 50px rgb(233 180 76 / 20%);
}

.free img {
  width: 56px;
}

/* The picture and the title share the first row; the line and the button run full width under them. */
.free > div {
  display: contents;
}

.free__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 1000;
  line-height: 1.15;
}

.free__sub {
  grid-column: 1 / -1;
  margin: 0;
  color: #3a3360;
  font-size: 1rem;
}

.free .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.tiers {
  display: grid;
  gap: 24px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.tier {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 24px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.tier--accent {
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 4px rgb(233 180 76 / 12%), 0 16px 40px rgb(0 0 0 / 30%);
}

.tier__badge {
  position: absolute;
  top: -13px;
  left: 18px;
  margin: 0;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--gold);
  color: #241600;
  font-size: 0.85rem;
  font-weight: 1000;
}

.tier__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tier h3 {
  margin: 0;
  font-size: 1.35rem;
}

.tier__price {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 1000;
  line-height: 1.1;
  text-align: right;
  white-space: nowrap;
}

.tier__later {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.tier__sub {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.tier__voice {
  justify-self: start;
  margin: 4px 0 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(255 255 255 / 6%);
  color: var(--soft);
  font-size: 0.92rem;
}

.tier__voice.is-voiced {
  background: rgb(111 191 143 / 14%);
  color: #bfe9cf;
}

.more {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.more summary {
  padding: 16px 20px;
  font-weight: 900;
  cursor: pointer;
}

.more .packs,
.more p {
  width: calc(100% - 40px);
  margin: 0 20px 16px;
}

.packs {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.packs caption {
  padding: 0 0 8px;
  font-weight: 900;
  text-align: left;
}

.packs th,
.packs td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.packs thead th {
  color: var(--soft);
  font-size: 0.9rem;
}

.packs tbody tr:last-child > * {
  border-bottom: 0;
}

/* Chapter VI: questions */

.faq details {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
}

.faq summary {
  position: relative;
  padding: 17px 54px 17px 18px;
  font-size: 1.06rem;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

/* The plus is drawn with two bars, not a glyph, so it sits exactly in the middle of its ring: 28 px inside,
   12 by 2 px bars. Open, it turns into a cross. */
.faq summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background:
    linear-gradient(var(--gold-2), var(--gold-2)) center / 12px 2px no-repeat,
    linear-gradient(var(--gold-2), var(--gold-2)) center / 2px 12px no-repeat;
  transform: translateY(-50%);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq details > :not(summary) {
  margin: 0;
  padding: 0 18px 14px;
  color: var(--muted);
}

.faq details ul {
  padding-left: 36px;
}

/* The finale: deep night */

.finale {
  position: relative;
  padding: 30px 0 90px;
  text-align: center;
}

.finale video {
  width: 170px;
  height: 170px;
  margin: 0 auto 6px;
}

.finale .chapter {
  margin-bottom: 8px;
}

/* Footer */

.footer {
  position: relative;
  padding: 44px 0 120px;
  background: #060c24;
  color: var(--muted);
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--berry), var(--gold), transparent);
}

.footer__in {
  display: grid;
  gap: 22px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer__brand img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgb(233 180 76 / 35%);
}

.footer__name {
  margin: 0;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 1000;
}

.footer__tag {
  margin: 0;
  color: var(--soft);
  font-size: 0.95rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer__pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.footer__pill:hover {
  border-color: var(--gold);
  background: rgb(233 180 76 / 10%);
}

.footer__pill svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  fill: currentColor;
}

/* The bot's own channels as logos without text, apart from the contacts (D-253). */
.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer__social {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.footer__social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.footer__social:hover {
  border-color: var(--gold);
  background: rgb(233 180 76 / 10%);
  color: var(--gold);
}

/* The legal pages as plain text links, apart from the buttons. */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  font-size: 0.95rem;
}

.footer__legal:empty {
  display: none;
}

.footer__legal a {
  color: var(--muted);
}

.footer__legal a:hover {
  color: var(--gold-2);
}

.footer__fine {
  margin: 0;
  color: var(--soft);
  font-size: 0.88rem;
}

/* The phone button that stays at hand */

.sticky-cta {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 40;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.sticky-cta .btn {
  width: 100%;
}

.js .sticky-cta {
  transform: translateY(140%);
  opacity: 0;
}

.js .sticky-cta.is-visible {
  transform: none;
  opacity: 1;
}

/* Privacy policy and terms */

.doc {
  padding: 34px 0 60px;
}

.doc__text {
  max-width: 46rem;
  color: var(--ink);
  font-weight: 500;
}

.doc__text h1 {
  font-size: clamp(1.9rem, 7vw, 2.8rem);
}

.doc__text h2 {
  margin-top: 1.7em;
  font-size: 1.45rem;
}

.doc__text ul {
  padding-left: 1.3em;
}

.doc__text li {
  margin-bottom: 0.5em;
}

.doc__back {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  max-width: 46rem;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

/* 404 */

.notfound {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 40px 0;
  text-align: center;
}

.notfound img {
  width: 160px;
  margin: 0 auto 16px;
}

.notfound__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
}

/* Wider screens */

@media (min-width: 640px) {
  .wrap {
    padding: 0 28px;
  }

  .section {
    padding: 88px 0;
  }

  .chapters .wrap {
    padding-left: 104px;
  }

  .bloom {
    left: -116px;
    width: 64px;
    height: 64px;
  }

  .worlds {
    grid-auto-columns: 30%;
    margin: 0 -28px 0 -104px;
    padding: 6px 28px 16px 104px;
    scroll-padding-left: 104px;
  }

  .tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Side by side, cards are 185-315px wide, and below about 250px the name and the price no longer fit
     in a row (D-254): the price goes under the name, in every card alike. */
  .tier__head {
    flex-direction: column;
    gap: 6px;
  }

  .tier__price {
    text-align: left;
  }

  .free {
    grid-template-columns: 110px 1fr;
    gap: 10px 24px;
    padding: 28px 32px;
  }

  .free img {
    grid-row: 1 / span 3;
    width: 110px;
  }

  .free__title {
    font-size: 1.5rem;
  }

  .free__sub,
  .free .btn {
    grid-column: 2;
  }
}

@media (min-width: 960px) {
  .section {
    padding: 128px 0;
  }

  .hero {
    padding-top: 60px;
  }

  .hero__in {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 56px;
    padding-bottom: 60px;
  }

  .hills {
    height: 140px;
    margin-top: -80px;
  }

  .sky__sun {
    bottom: 10vh;
    left: 58%;
  }

  .sky__moon {
    width: 96px;
    height: 96px;
    margin: -48px 0 0 -48px;
  }

  .ages {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 28px 16px 30px;
  }

  .ages::before {
    content: "";
    position: absolute;
    top: 48px;
    right: 10%;
    left: 10%;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--berry));
  }

  .ages li {
    position: relative;
    grid-template-columns: 1fr;
    align-content: start;
    justify-items: center;
    gap: 14px;
    padding: 0 10px;
    text-align: center;
  }

  .ages li + li {
    border-top: 0;
  }

  .ages b {
    width: 76px;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worlds {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .swipe-hint {
    display: none;
  }

  .stories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .tiers {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sticky-cta {
    display: none;
  }

  .footer {
    padding-bottom: 48px;
  }

  .footer__in {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .footer__links {
    justify-content: flex-end;
  }

  /* The legal links under the brand, the channels' logos under the contacts. */
  .footer__legal {
    grid-row: 2;
    grid-column: 1;
  }

  .footer__socials {
    grid-row: 2;
    grid-column: 2;
    justify-content: flex-end;
  }

  .footer__fine {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  /* A still night: the sky does not follow the scroll, and the vine is shown whole. */
  :root {
    --t: 0.6 !important;
  }

  .vine i {
    height: 100%;
  }

  .js .reveal,
  .js .chat-step,
  .js .bloom {
    opacity: 1;
    transform: none;
  }
}
