/* Peaceful Kids Tales: site styles. No build step, mobile-first.
   Motion only runs inside prefers-reduced-motion: no-preference blocks and only animates transform/opacity. */

/* ---------------------------------------------------------------- fonts */
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}
/* Metric-matched fallbacks, so the swap to the web fonts does not shift the layout. */
@font-face {
  font-family: "Fredoka Fallback";
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Arial");
  font-weight: 300 700;
  size-adjust: 94.9%;
  ascent-override: 102.7%;
  descent-override: 24.9%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Nunito Fallback";
  src: local("Arial"), local("ArialMT");
  font-weight: 200 1000;
  size-adjust: 102.5%;
  ascent-override: 98.6%;
  descent-override: 34.4%;
  line-gap-override: 0%;
}

/* ---------------------------------------------------------------- tokens */
:root {
  --sky-top: #0f1236;
  --sky-mid: #25275e;
  --sky-low: #4b3f86;
  --hill-far: #2f3672;
  --hill-mid: #232a5e;
  --hill-near: #171d47;
  --deep: #0b0e2e;
  --band: #141943;
  --peri: #9aa6e0;
  --peri-light: #b3bcee;
  --honey: #f7c873;
  --honey-core: #ffe6a8;
  --cream: #f6eedf;
  --ink: #2a2d52;
  --text: #e9e4f4;
  --muted: #c9c7ea;
  --line: rgba(179, 188, 238, 0.15);
  --card: linear-gradient(180deg, #21265a 0%, #1b1f50 100%);
  --font-head: "Fredoka", "Fredoka Fallback", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: "Nunito", "Nunito Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --gutter: 16px;
  color-scheme: dark;
}

/* ---------------------------------------------------------------- base */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--deep);
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--hill-near);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img,
svg {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--cream);
  text-wrap: balance;
}
p {
  margin: 0 0 1rem;
  text-wrap: pretty;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 3px;
  border-radius: 8px;
}
::selection {
  background: rgba(247, 200, 115, 0.35);
  color: var(--cream);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
@media (min-width: 600px) {
  :root {
    --gutter: 24px;
  }
  body {
    font-size: 1.125rem;
  }
}
@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--honey);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}

/* ---------------------------------------------------------------- buttons & links */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0.8rem 1.6rem;
  border: 0;
  border-radius: 999px;
  font: 700 1.0625rem/1.2 var(--font-body);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn::after {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(closest-side, rgba(247, 200, 115, 0.5), rgba(247, 200, 115, 0));
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
  pointer-events: none;
}
.btn:hover::after,
.btn:focus-visible::after {
  opacity: 1;
}
.btn-primary {
  color: var(--ink);
  background: linear-gradient(180deg, #ffe7ad 0%, #f7c873 58%, #efb758 100%);
  box-shadow: 0 10px 24px -10px rgba(247, 200, 115, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-ghost {
  color: var(--cream);
  background: rgba(246, 238, 223, 0.07);
  box-shadow: inset 0 0 0 1.5px rgba(179, 188, 238, 0.5);
}
.btn-ghost::after {
  background: radial-gradient(closest-side, rgba(179, 188, 238, 0.32), rgba(179, 188, 238, 0));
}
.btn-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.text-link {
  color: var(--honey-core);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(247, 200, 115, 0.5);
}
.text-link:hover {
  text-decoration-color: var(--honey);
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  color: var(--cream);
  text-decoration: none;
  border-radius: 999px;
}
.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(246, 238, 223, 0.22), 0 0 20px rgba(247, 200, 115, 0.28);
}
.brand-name {
  font: 600 1.125rem/1 var(--font-head);
  letter-spacing: 0.01em;
}
.site-nav {
  display: none;
}
.site-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(246, 238, 223, 0.86);
  font-weight: 700;
  font-size: 0.97rem;
  text-decoration: none;
  transition: background-color 0.3s, color 0.3s;
}
.site-nav a:hover {
  color: var(--cream);
  background: rgba(246, 238, 223, 0.08);
}
@media (min-width: 1024px) {
  .site-nav {
    display: block;
  }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: linear-gradient(180deg, var(--sky-top) 0%, #191b4d 34%, var(--sky-mid) 58%, #372f75 84%, var(--sky-low) 100%);
}
.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.sky .layer {
  position: absolute;
  inset: 0;
}
.layer {
  will-change: transform;
}
.stars {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: calc(100% + var(--tile));
  background-repeat: repeat;
}
.stars-far {
  --tile: 420px;
  background-size: 420px 360px;
  background-image:
    radial-gradient(circle at 171px 83px, rgba(255, 248, 231, 0.5) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 280px 54px, rgba(255, 248, 231, 0.5) 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 265px 115px, rgba(255, 248, 231, 0.62) 0 0.6px, transparent 1.5px),
    radial-gradient(circle at 41px 129px, rgba(255, 248, 231, 0.62) 0 0.6px, transparent 1.5px),
    radial-gradient(circle at 180px 210px, rgba(255, 248, 231, 0.7) 0 1px, transparent 1.9px),
    radial-gradient(circle at 396px 196px, rgba(255, 248, 231, 0.61) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 119px 29px, rgba(255, 248, 231, 0.5) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 220px 79px, rgba(255, 248, 231, 0.68) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 292px 352px, rgba(255, 248, 231, 0.68) 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 333px 102px, rgba(255, 248, 231, 0.67) 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 38px 294px, rgba(255, 248, 231, 0.53) 0 0.6px, transparent 1.5px),
    radial-gradient(circle at 354px 278px, rgba(255, 248, 231, 0.58) 0 0.8px, transparent 1.7px),
    radial-gradient(circle at 305px 238px, rgba(255, 248, 231, 0.55) 0 0.7px, transparent 1.6px),
    radial-gradient(circle at 98px 130px, rgba(255, 248, 231, 0.57) 0 0.6px, transparent 1.5px);
}
.stars-mid {
  --tile: 640px;
  background-size: 640px 520px;
  background-image:
    radial-gradient(circle at 512px 357px, rgba(255, 248, 231, 0.7) 0 1.3px, transparent 2.2px),
    radial-gradient(circle at 80px 126px, rgba(255, 248, 231, 0.66) 0 1.2px, transparent 2.1px),
    radial-gradient(circle at 356px 161px, rgba(255, 248, 231, 0.75) 0 1.4px, transparent 2.3px),
    radial-gradient(circle at 85px 327px, rgba(255, 248, 231, 0.72) 0 1.1px, transparent 2px),
    radial-gradient(circle at 514px 473px, rgba(255, 248, 231, 0.63) 0 1px, transparent 1.9px),
    radial-gradient(circle at 282px 491px, rgba(255, 248, 231, 0.62) 0 1.3px, transparent 2.2px),
    radial-gradient(circle at 323px 462px, rgba(255, 248, 231, 0.74) 0 1.1px, transparent 2px),
    radial-gradient(circle at 361px 29px, rgba(255, 248, 231, 0.72) 0 1.4px, transparent 2.3px),
    radial-gradient(circle at 631px 125px, rgba(255, 248, 231, 0.68) 0 1.2px, transparent 2.1px);
}
.stars-near {
  --tile: 900px;
  background-size: 900px 700px;
  background-image:
    radial-gradient(circle at 300px 138px, rgba(255, 248, 231, 0.9) 0 1.9px, transparent 2.8px),
    radial-gradient(circle at 300px 138px, rgba(255, 233, 168, 0.24) 0, transparent 10px),
    radial-gradient(circle at 514px 88px, rgba(255, 248, 231, 0.85) 0 1.6px, transparent 2.5px),
    radial-gradient(circle at 514px 88px, rgba(255, 233, 168, 0.22) 0, transparent 8px),
    radial-gradient(circle at 742px 318px, rgba(255, 248, 231, 0.95) 0 1.9px, transparent 2.8px),
    radial-gradient(circle at 742px 318px, rgba(255, 233, 168, 0.22) 0, transparent 10px),
    radial-gradient(circle at 291px 431px, rgba(255, 248, 231, 0.9) 0 1.8px, transparent 2.7px),
    radial-gradient(circle at 395px 242px, rgba(255, 248, 231, 0.8) 0 1.6px, transparent 2.5px),
    radial-gradient(circle at 128px 586px, rgba(255, 248, 231, 0.9) 0 1.5px, transparent 2.4px);
}

/* The moon: faceless, soft, with a warm halo. */
.moon {
  position: absolute;
  top: 16px;
  right: max(16px, 5vw);
  width: 46px;
  aspect-ratio: 1;
}
.moon-halo {
  position: absolute;
  inset: -170%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 233, 168, 0.26) 0%, rgba(255, 233, 168, 0.1) 28%, rgba(255, 233, 168, 0) 60%);
}
.moon-disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 24% 57%, rgba(234, 214, 166, 0.55) 0 8%, transparent 9.5%),
    radial-gradient(circle at 66% 27%, rgba(234, 214, 166, 0.5) 0 5%, transparent 6.5%),
    radial-gradient(circle at 60% 72%, rgba(234, 214, 166, 0.45) 0 3.5%, transparent 5%),
    radial-gradient(circle at 40% 36%, #fffdf3 0%, #fff4d6 66%, #f1dfae 100%);
  box-shadow: 0 0 24px 4px rgba(255, 233, 168, 0.35);
}
@media (max-width: 359px) {
  .brand-name {
    font-size: 1rem;
  }
}
@media (min-width: 600px) {
  .moon {
    top: 96px;
    width: 72px;
  }
}
@media (min-width: 960px) {
  .moon {
    top: clamp(110px, 15vh, 150px);
    right: 10%;
    width: clamp(80px, 7vw, 112px);
  }
}

/* Little sleepy sounds drifting up out of the grass. */
.sound {
  position: absolute;
  bottom: 16%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  opacity: 0;
}
.sound-giggle {
  left: 7%;
  background: radial-gradient(circle at 35% 32%, #fff8e2 0 16%, #ffd98a 48%, #f3bd59 100%);
  box-shadow: 0 0 16px 5px rgba(255, 217, 138, 0.42);
}
.sound-ring {
  left: 88%;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(168, 230, 217, 0.92);
  box-shadow: 0 0 14px 4px rgba(168, 230, 217, 0.3), inset 0 0 6px rgba(168, 230, 217, 0.4);
}
.sound-drop {
  left: 54%;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle at 40% 35%, #f3ecff 0 18%, #c9b6f0 70%);
  box-shadow: 0 0 12px 4px rgba(201, 182, 240, 0.38);
}

/* Rolling hills at the bottom of the sky. */
.sky .hills {
  position: absolute;
  inset: auto -48px 0;
  height: clamp(120px, 17vw, 250px);
}
.hills svg {
  width: 100%;
  height: 100%;
}
.hills-far path {
  fill: var(--hill-far);
}
.hills-mid path {
  fill: var(--hill-mid);
}
.sky .hills-near {
  z-index: 1;
  inset: auto 0 0;
}
.hills-near path {
  fill: var(--hill-near);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  padding-top: 92px;
}
.hero-copy {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.65rem, 1.55rem + 4.9vw, 4.75rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 30px rgba(247, 200, 115, 0.18);
}
.honey {
  color: var(--honey);
}
.tagline {
  margin: 0.75rem 0 0;
  font: 500 clamp(1.2rem, 1rem + 1vw, 1.6rem)/1.3 var(--font-head);
  color: #f3e7ff;
}
.lede {
  margin: 0.85rem auto 0;
  max-width: 31rem;
  color: var(--muted);
}
.cta-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1.6rem;
}
@media (min-width: 480px) {
  .cta-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

.hero-art {
  --art-w: min(86vw, 380px);
  position: relative;
  width: var(--art-w);
  margin: 18px auto 0;
}
.hero-art .layer {
  position: relative;
}
.art-settle {
  position: relative;
}
/* Noola's own mossy mound: same colour as the near hill, so she always sits exactly on the ground. */
.hero-mound {
  position: absolute;
  left: -24%;
  right: -24%;
  top: 86.5%;
  bottom: -64px;
  border-radius: 50% 50% 0 0 / 46px 46px 0 0;
  background: var(--hill-near);
}
.noola-breathe {
  position: relative;
  transform-origin: 50% 90%;
}
.hero-noola {
  position: relative;
  width: 100%;
}
.lantern-glow {
  position: absolute;
  z-index: 1;
  width: 30%;
  aspect-ratio: 1;
  margin: -15% 0 0 -15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 184, 0.5) 0%, rgba(247, 200, 115, 0.26) 32%, rgba(247, 200, 115, 0) 68%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.lantern-glow-l {
  left: 12.8%;
  top: 79.7%;
}
.lantern-glow-r {
  left: 79.4%;
  top: 77.5%;
}
@media (min-width: 600px) {
  .hero-inner {
    padding-top: 150px;
  }
  .hero-art {
    --art-w: 440px;
  }
}
@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: end;
    column-gap: 24px;
    min-height: clamp(640px, 90vh, 840px);
    padding-top: 120px;
  }
  .hero-copy {
    align-self: center;
    text-align: left;
    margin: 0;
    padding-bottom: clamp(90px, 13vh, 150px);
  }
  .lede {
    margin-left: 0;
  }
  .cta-row {
    justify-content: flex-start;
  }
  .hero-art {
    --art-w: clamp(440px, 40vw, 560px);
    justify-self: end;
    margin: 0;
  }
}

/* ---------------------------------------------------------------- sections */
.section {
  position: relative;
  padding-block: clamp(72px, 10vw, 128px);
  overflow-x: clip;
  scroll-margin-top: 12px;
}
.section-head {
  max-width: 46rem;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding-top: 14px;
  font: 800 0.8125rem/1 var(--font-body);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--honey);
}
/* The lantern that hangs beside every section heading, on a little ribbon like Noola's ears. */
.lantern-dot {
  position: relative;
  flex: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #fff6dc 0%, #ffe6a8 30%, #f7c873 66%, #e7a84d 100%);
  box-shadow: 0 0 0 3px rgba(247, 200, 115, 0.12), 0 0 16px 5px rgba(247, 200, 115, 0.42);
  transform-origin: 50% -14px;
}
.lantern-dot::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(rgba(179, 188, 238, 0), rgba(179, 188, 238, 0.75));
}
.lantern-dot::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 200, 115, 0.45), rgba(247, 200, 115, 0) 70%);
  opacity: 0.6;
}
.section h2 {
  margin: 0;
  font-size: clamp(2rem, 1.35rem + 2.5vw, 3.05rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.section-lede {
  margin: 1rem 0 0;
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--muted);
}
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 24px 50px -32px rgba(4, 5, 22, 0.9);
}
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(247, 200, 115, 0.38), 0 22px 60px -24px rgba(247, 200, 115, 0.38);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}
@media (hover: hover) {
  .card:hover::after {
    opacity: 1;
  }
}

/* ---------------------------------------------------------------- latest story */
.section-watch {
  background: linear-gradient(180deg, var(--hill-near) 0%, #171c48 100%);
  padding-top: clamp(48px, 7vw, 96px);
}
.episode {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 12px 12px 26px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--card);
  box-shadow: 0 40px 80px -40px rgba(4, 5, 22, 0.95);
}
.episode-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: var(--sky-top);
}
.facade {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  color: inherit;
}
.facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.facade:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: -6px;
  border-radius: 20px;
}
.facade-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 18, 54, 0) 50%, rgba(15, 18, 54, 0.55) 100%);
}
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin: -30px 0 0 -30px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, #fff3cf 0%, #f7c873 62%, #eab25a 100%);
  box-shadow: 0 12px 30px -8px rgba(247, 200, 115, 0.75), 0 0 0 10px rgba(247, 200, 115, 0.16);
}
.play::before {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 200, 115, 0.38), rgba(247, 200, 115, 0) 70%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.play svg {
  width: 24px;
  height: 24px;
  margin-left: 3px;
  fill: var(--ink);
}
@media (min-width: 600px) {
  .play {
    width: 78px;
    height: 78px;
    margin: -39px 0 0 -39px;
  }
  .play svg {
    width: 30px;
    height: 30px;
    margin-left: 4px;
  }
}
.facade:hover .play::before,
.facade:focus-visible .play::before {
  opacity: 1;
}
.duration {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 0.4rem 0.6rem;
  border-radius: 9px;
  background: rgba(15, 18, 54, 0.82);
  color: var(--cream);
  font: 800 0.875rem/1 var(--font-body);
  letter-spacing: 0.02em;
}
.player-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.episode-copy {
  padding: 2px 12px 0;
}
.episode-kicker {
  margin: 0 0 0.6rem;
  font: 800 0.8125rem/1 var(--font-body);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--peri-light);
}
.episode h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.55rem, 1.2rem + 1.3vw, 2.1rem);
  font-weight: 600;
  line-height: 1.15;
}
.episode-copy > p {
  color: var(--muted);
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}
.meta li {
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(154, 166, 224, 0.24);
  border-radius: 999px;
  background: rgba(154, 166, 224, 0.12);
  color: var(--cream);
  font: 700 0.9375rem/1.1 var(--font-body);
}
.episode-more {
  margin: 1.3rem 0 0;
}
.episode-more .text-link {
  display: inline-block;
  padding-block: 10px;
  font-weight: 700;
}
.episode-giggle {
  position: absolute;
  top: -46px;
  right: 6px;
  width: 104px;
  pointer-events: none;
}
@media (min-width: 960px) {
  .episode {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    padding: 14px 40px 14px 14px;
  }
  .episode-copy {
    padding: 0;
  }
  .episode-giggle {
    top: -52px;
    right: -30px;
    width: 124px;
  }
}

/* ---------------------------------------------------------------- friends */
.section-friends {
  background: linear-gradient(180deg, #171c48 0%, var(--band) 100%);
}
.friends {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.friend {
  padding: 18px 20px 26px;
}
.friend-art {
  display: grid;
  place-items: end center;
  height: 230px;
  margin-bottom: 18px;
  padding-bottom: 6px;
  border-radius: 18px;
  background:
    radial-gradient(55% 58% at 50% 72%, rgba(154, 166, 224, 0.2), rgba(154, 166, 224, 0) 72%),
    radial-gradient(60% 34% at 50% 84%, rgba(247, 200, 115, 0.12), rgba(247, 200, 115, 0) 72%);
}
.friend-art img {
  width: auto;
  max-width: 100%;
  max-height: 214px;
}
.friend h3 {
  margin: 0 0 0.6rem;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.15;
}
.friend-role {
  display: block;
  margin-top: 0.4rem;
  font: 800 0.8125rem/1.35 var(--font-body);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--peri-light);
}
.friend p {
  color: var(--muted);
}
.friend .friend-quote {
  margin: 1rem 0 0;
  font: 500 1.15rem/1.4 var(--font-head);
  color: var(--honey);
}
.friend-quote-note {
  font: 600 0.95rem/1.4 var(--font-body);
  color: var(--muted);
}
@media (min-width: 640px) and (max-width: 919px) {
  .friend {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    column-gap: 26px;
    align-items: start;
  }
  .friend-art {
    grid-row: span 3;
    margin-bottom: 0;
  }
}
@media (min-width: 920px) {
  .friends {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

/* ---------------------------------------------------------------- the three little hums */
.section-hums {
  background:
    linear-gradient(180deg, var(--band) 0%, rgba(20, 25, 67, 0) 22%),
    radial-gradient(110% 60% at 50% 18%, #25275e 0%, #161a47 50%, var(--sky-top) 100%);
}
.hums-sky {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.75;
  pointer-events: none;
}
.hums-grid {
  position: relative;
  display: grid;
  gap: 40px;
}
.hums-copy > p {
  color: var(--muted);
}
.hums-copy h2 {
  margin-bottom: 1rem;
}
.hum-steps {
  display: grid;
  gap: 12px;
  margin: 1.6rem 0;
  padding: 0;
  list-style: none;
  counter-reset: hum;
}
.hum-steps li {
  position: relative;
  padding: 14px 18px 14px 64px;
  border: 1px solid rgba(154, 166, 224, 0.18);
  border-radius: 18px;
  background: rgba(154, 166, 224, 0.08);
  counter-increment: hum;
}
.hum-steps li::before {
  content: counter(hum);
  position: absolute;
  left: 15px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: -17px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 34%, #fff3cf, #f7c873 70%);
  box-shadow: 0 0 16px rgba(247, 200, 115, 0.45);
  color: var(--ink);
  font: 600 1.05rem/1 var(--font-head);
}
.hum-steps strong {
  color: var(--cream);
}
.hums-copy .hums-tip {
  margin: 0;
  font-size: 1rem;
}

.breathe {
  position: relative;
  padding: 18px 18px 26px;
  border: 1px solid rgba(179, 188, 238, 0.18);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(37, 39, 94, 0.82) 0%, rgba(20, 25, 66, 0.92) 100%);
  box-shadow: 0 50px 90px -46px rgba(2, 3, 18, 0.95), inset 0 1px 0 rgba(246, 238, 223, 0.06);
  text-align: center;
}
.breathe-stage {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 1;
  margin: 0 auto;
}
.breathe-halo,
.breathe-ring,
.breathe-lantern {
  position: absolute;
  left: 14%;
  top: 4%;
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
}
.breathe-halo {
  left: -6%;
  top: -16%;
  width: 112%;
  background: radial-gradient(circle, rgba(247, 200, 115, 0.3) 0%, rgba(247, 200, 115, 0.1) 40%, rgba(247, 200, 115, 0) 66%);
  opacity: 0.7;
  transition: opacity var(--phase-ms, 1.2s) var(--ease-in-out);
}
.breathe-ring {
  border: 1.5px solid rgba(255, 230, 168, 0.4);
  box-shadow: 0 0 22px rgba(247, 200, 115, 0.2), inset 0 0 22px rgba(247, 200, 115, 0.12);
  opacity: 0.25;
  transform: scale(var(--r, 0.72));
  transition: transform var(--phase-ms, 1.2s) var(--ease-in-out), opacity var(--phase-ms, 1.2s) var(--ease-in-out);
}
.breathe-lantern {
  background: radial-gradient(circle, rgba(255, 246, 220, 0.98) 0%, rgba(255, 230, 168, 0.9) 20%, rgba(247, 200, 115, 0.6) 42%, rgba(247, 200, 115, 0.2) 60%, rgba(247, 200, 115, 0) 71%);
  opacity: 0.85;
  transform: scale(var(--s, 0.7));
  transition: transform var(--phase-ms, 1.2s) var(--ease-in-out), opacity var(--phase-ms, 1.2s) var(--ease-in-out);
}
.breathe-notes i {
  position: absolute;
  bottom: 46%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffe9b5;
  box-shadow: 0 0 10px 3px rgba(247, 200, 115, 0.55);
  opacity: 0;
}
.breathe-notes i:nth-child(1) { left: 30%; }
.breathe-notes i:nth-child(2) { left: 44%; width: 6px; height: 6px; }
.breathe-notes i:nth-child(3) { left: 57%; }
.breathe-notes i:nth-child(4) { left: 68%; width: 6px; height: 6px; }
.breathe-notes i:nth-child(5) { left: 38%; width: 5px; height: 5px; }
.breathe-noola {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transition: opacity 1.8s var(--ease-in-out);
}
.breathe-noola-awake {
  width: 78%;
  margin-left: -39%;
}
.breathe-noola-asleep {
  width: 58%;
  margin-left: -29%;
  opacity: 0;
}
.breathe-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.7em;
  margin: 10px auto 0;
  max-width: 22ch;
  font: 600 clamp(1.3rem, 1.1rem + 0.9vw, 1.62rem)/1.3 var(--font-head);
  color: var(--cream);
}
.breathe-timer {
  display: none;
}
.breathe-stars {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 18px;
  padding: 0;
  list-style: none;
}
.breathe-stars li {
  position: relative;
  width: 28px;
  height: 28px;
}
.breathe-stars li::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 200, 115, 0.55), rgba(247, 200, 115, 0) 68%);
  opacity: 0;
  transition: opacity 0.9s var(--ease-out);
}
.breathe-stars svg {
  position: relative;
  width: 100%;
  height: 100%;
  fill: rgba(179, 188, 238, 0.3);
  transition: fill 0.9s var(--ease-out);
}
.breathe-stars li.is-lit::before {
  opacity: 1;
}
.breathe-stars li.is-lit svg {
  fill: #ffe6a8;
}
.breathe-toggle {
  min-width: min(100%, 290px);
}
.breathe-note {
  margin: 14px auto 0;
  max-width: 30ch;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* phases: in = the lantern grows, out = it shrinks while the hum floats up, sleep = a dim nightlight */
.breathe[data-phase="in"] {
  --s: 1;
  --r: 1.08;
}
.breathe[data-phase="in"] .breathe-ring {
  opacity: 0.7;
}
.breathe[data-phase="in"] .breathe-ring-2 {
  --r: 1.2;
}
.breathe[data-phase="in"] .breathe-ring-3 {
  --r: 1.32;
}
.breathe[data-phase="in"] .breathe-halo {
  opacity: 1;
}
.breathe[data-phase="out"],
.breathe[data-phase="rest"] {
  --s: 0.62;
  --r: 0.66;
}
.breathe[data-phase="out"] .breathe-halo,
.breathe[data-phase="rest"] .breathe-halo {
  opacity: 0.55;
}
.breathe[data-phase="sleep"] {
  --s: 0.46;
  --r: 0.5;
}
.breathe[data-phase="sleep"] .breathe-lantern {
  opacity: 0.45;
}
.breathe[data-phase="sleep"] .breathe-ring {
  opacity: 0;
}
.breathe[data-phase="sleep"] .breathe-halo {
  opacity: 0.32;
}
.breathe[data-phase="sleep"] .breathe-noola-awake {
  opacity: 0;
}
.breathe[data-phase="sleep"] .breathe-noola-asleep {
  opacity: 1;
}
@media (max-width: 359px) {
  .breathe-cue {
    min-height: 3.9em;
  }
}
@media (min-width: 960px) {
  .hums-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 64px;
  }
  .breathe {
    padding: 26px 30px 32px;
  }
}

/* ---------------------------------------------------------------- grown-ups */
.section-grownups {
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--hill-near) 22%, var(--hill-near) 100%);
}
.expect {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.expect-item {
  padding: 24px 24px 26px;
}
.expect-icon {
  width: 48px;
  height: 48px;
  padding: 11px;
  border-radius: 15px;
  background: rgba(247, 200, 115, 0.12);
  fill: none;
  stroke: var(--honey);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.expect-item h3 {
  margin: 18px 0 6px;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}
.expect-item p {
  margin: 0;
  color: var(--muted);
}
.expect-privacy {
  border-color: rgba(247, 200, 115, 0.3);
  background: linear-gradient(180deg, rgba(247, 200, 115, 0.11) 0%, rgba(247, 200, 115, 0.04) 100%), var(--card);
}
.expect-privacy .text-link {
  display: inline-block;
  padding-block: 8px;
  font-weight: 700;
}
@media (min-width: 640px) {
  .expect {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .expect {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

/* ---------------------------------------------------------------- faq */
.section-faq {
  background: var(--band);
}
.faq {
  display: grid;
  gap: 14px;
}
.faq-item {
  padding: 22px 24px;
  border: 1px solid rgba(154, 166, 224, 0.15);
  border-radius: 22px;
  background: rgba(154, 166, 224, 0.07);
}
.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.22rem;
  font-weight: 600;
  line-height: 1.3;
}
.faq-item p {
  margin: 0;
  color: var(--muted);
}
@media (min-width: 900px) {
  .faq {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }
}

/* ---------------------------------------------------------------- goodnight + footer */
.goodnight {
  position: relative;
  padding-block: clamp(16px, 3vw, 40px) clamp(48px, 7vw, 80px);
  overflow: clip;
  background: linear-gradient(180deg, var(--band) 0%, var(--sky-top) 55%, var(--deep) 100%);
  text-align: center;
}
.goodnight-sky {
  position: absolute;
  inset: 0;
  opacity: 0.8;
  pointer-events: none;
}
.goodnight-inner {
  position: relative;
  display: grid;
  justify-items: center;
}
.goodnight-inner::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  width: 360px;
  height: 300px;
  margin-left: -180px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(247, 200, 115, 0.16), rgba(247, 200, 115, 0));
  pointer-events: none;
}
.goodnight-noola {
  position: relative;
  width: 220px;
  margin-bottom: 10px;
}
.goodnight-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
}
.goodnight p {
  color: var(--muted);
  margin-bottom: 1.4rem;
}

.site-footer {
  padding: 36px 0 26px;
  border-top: 1px solid rgba(179, 188, 238, 0.08);
  background: var(--deep);
}
.footer-inner {
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}
.footer-nav ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.3s;
}
.footer-nav a:hover {
  background: rgba(154, 166, 224, 0.12);
}
.legal {
  margin: 0;
  font-size: 0.9375rem;
  color: #aeadd8;
}
.credit {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
  color: #9897c6;
}
.credit a {
  display: inline-block;
  padding: 12px 2px;
  margin: -12px 0;
  color: var(--peri-light);
  text-decoration: underline;
  text-decoration-color: rgba(179, 188, 238, 0.4);
  text-underline-offset: 3px;
}
.credit a:hover {
  color: var(--cream);
  text-decoration-color: var(--cream);
}
@media (min-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr auto;
    justify-items: start;
    align-items: center;
    row-gap: 10px;
    text-align: left;
  }
  .footer-nav,
  .credit {
    justify-self: end;
  }
}

/* ---------------------------------------------------------------- simple pages (privacy, 404) */
.page {
  position: relative;
  overflow: clip;
  padding: 120px 0 clamp(64px, 9vw, 112px);
  background: linear-gradient(180deg, var(--sky-top) 0%, #191b4d 220px, var(--hill-near) 640px);
}
.page .sky {
  height: 420px;
  bottom: auto;
}
.prose {
  position: relative;
  max-width: 44rem;
}
.prose h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.3rem, 1.6rem + 3vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
}
.prose h2 {
  margin: 2.2rem 0 0.6rem;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.25;
}
.prose p,
.prose li {
  color: var(--muted);
}
.prose ul {
  padding-left: 1.2rem;
}
.prose li + li {
  margin-top: 0.4rem;
}
.prose strong {
  color: var(--cream);
}
.updated {
  font-size: 0.95rem;
}
.not-found {
  position: relative;
  display: grid;
  justify-items: center;
  max-width: 34rem;
  text-align: center;
}
.not-found img {
  width: 240px;
  margin-bottom: 12px;
}
.not-found h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
}
.not-found p {
  color: var(--muted);
  margin-bottom: 1.6rem;
}

/* ================================================================ motion
   Everything below is opt-in for people who have not asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Entrance: staggered fade-and-rise, about 1.2 s in total. */
  .enter {
    animation: enter 0.95s var(--ease-out) both;
  }
  .enter-1 { animation-delay: 0.05s; }
  .enter-2 { animation-delay: 0.14s; }
  .enter-3 { animation-delay: 0.26s; }
  .enter-4 { animation-delay: 0.36s; }
  .enter-5 { animation-delay: 0.46s; }
  .enter-6 { animation-delay: 0.54s; }
  @keyframes enter {
    from {
      opacity: 0;
      transform: translate3d(0, 22px, 0);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  /* Noola settles onto her hill (transform only: the hero image is the LCP element and is never hidden). */
  .art-settle {
    animation: settle 1.4s var(--ease-out) both 0.08s;
  }
  @keyframes settle {
    from {
      transform: translate3d(0, 26px, 0) scale(0.965);
    }
    to {
      transform: none;
    }
  }
  .sky > .layer:not(.hills) {
    animation: fade-in 2.2s ease both 0.15s;
  }
  @keyframes fade-in {
    from {
      opacity: 0;
    }
  }

  /* Star fields drift slowly at three depths and twinkle (all slower than 0.3 Hz). */
  .stars-far {
    animation: drift 260s linear infinite, twinkle 7s ease-in-out infinite alternate;
  }
  .stars-mid {
    animation: drift 200s linear infinite, twinkle 9.5s ease-in-out -3s infinite alternate;
  }
  .stars-near {
    animation: drift 170s linear infinite, twinkle 12s ease-in-out -6s infinite alternate;
  }
  @keyframes drift {
    to {
      transform: translate3d(calc(-1 * var(--tile)), 0, 0);
    }
  }
  @keyframes twinkle {
    0% {
      opacity: 1;
    }
    50% {
      opacity: 0.55;
    }
    100% {
      opacity: 0.95;
    }
  }
  .moon-halo {
    animation: halo 9s var(--ease-in-out) infinite alternate;
  }
  @keyframes halo {
    from {
      opacity: 0.75;
      transform: scale(0.97);
    }
    to {
      opacity: 1;
      transform: scale(1.04);
    }
  }

  /* Sleepy sounds float up and fade, one at a time. */
  .sound-giggle {
    animation: float-a 24s var(--ease-in-out) 1.5s infinite;
  }
  .sound-ring {
    animation: float-b 28s var(--ease-in-out) 9s infinite;
  }
  .sound-drop {
    animation: float-a 26s var(--ease-in-out) 17s infinite;
  }
  @keyframes float-a {
    0% {
      opacity: 0;
      transform: translate3d(0, 0, 0) scale(0.7);
    }
    12% {
      opacity: 0.95;
    }
    50% {
      transform: translate3d(22px, -22vh, 0) scale(1);
    }
    80% {
      opacity: 0.75;
    }
    100% {
      opacity: 0;
      transform: translate3d(-8px, -46vh, 0) scale(0.9);
    }
  }
  @keyframes float-b {
    0% {
      opacity: 0;
      transform: translate3d(0, 0, 0) scale(0.7);
    }
    12% {
      opacity: 0.9;
    }
    50% {
      transform: translate3d(-24px, -20vh, 0) scale(1);
    }
    80% {
      opacity: 0.7;
    }
    100% {
      opacity: 0;
      transform: translate3d(10px, -44vh, 0) scale(0.9);
    }
  }

  /* Noola breathes (grounded, from her feet) and her lanterns pulse softly. */
  .noola-breathe {
    animation: breathe 5.2s var(--ease-in-out) infinite;
  }
  @keyframes breathe {
    0%,
    100% {
      transform: none;
    }
    45% {
      transform: scale(0.994, 1.018);
    }
  }
  .lantern-glow-l {
    animation: lantern 3.8s var(--ease-in-out) infinite alternate;
  }
  .lantern-glow-r {
    animation: lantern 4.6s var(--ease-in-out) -1.7s infinite alternate;
  }
  @keyframes lantern {
    from {
      opacity: 0.45;
      transform: scale(0.9);
    }
    to {
      opacity: 1;
      transform: scale(1.08);
    }
  }
  .hero.is-offscreen *,
  .section-hums.is-offscreen .stars,
  .goodnight.is-offscreen .stars {
    animation-play-state: paused;
  }

  /* Micro-interactions: lift and glow. */
  .btn {
    transition: transform 0.45s var(--ease-out);
  }
  .btn:hover {
    transform: translate3d(0, -2px, 0);
  }
  .btn:active {
    transform: translate3d(0, 0, 0) scale(0.97);
    transition-duration: 0.12s;
  }
  .facade img,
  .play {
    transition: transform 0.8s var(--ease-out);
  }
  .facade:hover img {
    transform: scale(1.035);
  }
  .facade:hover .play,
  .facade:focus-visible .play {
    transform: scale(1.08);
  }
  .facade:active .play {
    transform: scale(0.96);
    transition-duration: 0.12s;
  }
  .card {
    transition: translate 0.55s var(--ease-out);
  }
  @media (hover: hover) {
    .card:hover {
      translate: 0 -6px;
    }
  }
  .episode-giggle {
    animation: bob 6s var(--ease-in-out) infinite;
  }
  @keyframes bob {
    0%,
    100% {
      transform: translate3d(0, 0, 0);
    }
    50% {
      transform: translate3d(0, -10px, 0) rotate(4deg);
    }
  }

  /* Section lanterns sway gently on their ribbons. */
  .lantern-dot {
    animation: sway 5.5s var(--ease-in-out) infinite alternate;
  }
  .lantern-dot::after {
    animation: glow 3.4s var(--ease-in-out) infinite alternate;
  }
  @keyframes sway {
    from {
      transform: rotate(-7deg);
    }
    to {
      transform: rotate(7deg);
    }
  }
  @keyframes glow {
    from {
      opacity: 0.35;
    }
    to {
      opacity: 0.9;
    }
  }

  /* Scroll reveal (hidden from the first paint only when scripting is on; see site.js). */
  @media (scripting: enabled) {
    .reveal {
      opacity: 0;
      transform: translate3d(0, 30px, 0);
      transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out), translate 0.55s var(--ease-out);
    }
    .reveal.is-visible {
      opacity: 1;
      transform: none;
    }
    .reveal-d1 { transition-delay: 0.08s, 0.08s, 0s; }
    .reveal-d2 { transition-delay: 0.16s, 0.16s, 0s; }
    .reveal-d3 { transition-delay: 0.24s, 0.24s, 0s; }
    .reveal .lantern-dot {
      opacity: 0;
      scale: 0.4;
      transition: opacity 0.8s var(--ease-out) 0.35s, scale 1s var(--ease-out) 0.35s;
    }
    .reveal.is-visible .lantern-dot {
      opacity: 1;
      scale: 1;
    }
    /* Safety net: if site.js never runs, show everything after a few seconds. */
    html:not(.js-ran) .reveal {
      animation: reveal-fallback 0.6s ease 4s forwards;
    }
    @keyframes reveal-fallback {
      to {
        opacity: 1;
        transform: none;
      }
    }
  }

  /* The breathing guide: hum sparkles float up on every out-breath. */
  .breathe[data-phase="idle"] .breathe-halo,
  .breathe[data-phase="ready"] .breathe-halo {
    animation: halo-idle 6s var(--ease-in-out) infinite alternate;
  }
  @keyframes halo-idle {
    from {
      opacity: 0.55;
    }
    to {
      opacity: 0.9;
    }
  }
  .breathe[data-phase="out"] .breathe-notes i {
    animation: note 4.6s var(--ease-out) both;
  }
  .breathe[data-phase="out"] .breathe-notes i:nth-child(2) { animation-delay: 0.6s; }
  .breathe[data-phase="out"] .breathe-notes i:nth-child(3) { animation-delay: 1.2s; }
  .breathe[data-phase="out"] .breathe-notes i:nth-child(4) { animation-delay: 1.8s; }
  .breathe[data-phase="out"] .breathe-notes i:nth-child(5) { animation-delay: 2.4s; }
  @keyframes note {
    0% {
      opacity: 0;
      transform: translate3d(0, 10px, 0) scale(0.6);
    }
    20% {
      opacity: 1;
    }
    60% {
      transform: translate3d(10px, -60px, 0) scale(1);
    }
    100% {
      opacity: 0;
      transform: translate3d(-6px, -118px, 0) scale(0.8);
    }
  }
}

/* Reduced motion: the guide keeps working with text cues, a seconds counter and brightness only. */
@media (prefers-reduced-motion: reduce) {
  .breathe-ring,
  .breathe-notes {
    display: none;
  }
  .breathe-lantern {
    transform: scale(0.82);
    transition: opacity 1.2s ease;
  }
  .breathe[data-phase="in"] .breathe-lantern {
    opacity: 1;
  }
  .breathe[data-phase="out"] .breathe-lantern,
  .breathe[data-phase="rest"] .breathe-lantern {
    opacity: 0.5;
  }
  .breathe-timer {
    display: block;
    min-height: 1.6em;
    margin: 2px 0 0;
    font: 700 1rem/1.6 var(--font-body);
    color: var(--peri-light);
  }
}
