/* Never Stop Splorin' - coming-soon site. No external resources. */

/* Rounded digits (Fredoka subset, ~1.7 KB each) so "2026" doesn't get Atkinson's slashed zero */
@font-face {
  font-family: "NSS Digits";
  src: url("/assets/fonts/digits-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: "NSS Digits";
  src: url("/assets/fonts/digits-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0030-0039;
}
@font-face {
  font-family: "Fredoka";
  src: url("/assets/fonts/fredoka-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Home world: warm cream paper, honey, Sunny's yellows */
  --paper: #fbf4e6;
  --paper-deep: #f5e9d2;
  --honey: #f3b74b;        /* Sunny's pajamas: decoration only, never text */
  --honey-soft: #fbe3b0;
  --ink: #3b2a22;          /* 12.4:1 on paper */
  --ink-soft: #5e4636;     /* 8.0:1 on paper */
  /* Call to action: the ONLY place this colour is used */
  --cta: #b23c22;          /* white text 5.9:1 */
  --cta-hover: #93301a;
  /* Dream worlds */
  --canada-sky: #dceaf3;
  --canada-snow: #f8fbfd;
  --canada-pine: #2f6b6a;
  --canada-ink: #1e4f4c;   /* 7.5:1 on canada-sky */
  --ireland-mist: #e2eee4;
  --ireland-clover: #5f9a6c;
  --ireland-ink: #2f5e3a;  /* 6.3:1 on ireland-mist */

  --radius: 28px;
  --shadow: 0 2px 0 rgba(59, 42, 34, 0.06), 0 14px 34px -18px rgba(59, 42, 34, 0.35);
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink);
  --display: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "NSS Digits", "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--paper);
  /* Subtle paper grain: two soft radial washes, no image request */
  background-image:
    radial-gradient(1200px 600px at 10% -10%, #fff9ee 0%, transparent 60%),
    radial-gradient(900px 700px at 110% 30%, var(--paper-deep) 0%, transparent 55%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.1875rem; /* 19px */
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 5.5vw, 2.6rem); }
h3 { font-size: clamp(1.35rem, 3.6vw, 1.6rem); }
p { margin: 0 0 1em; }

a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -100px;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; border-radius: 12px; z-index: 10; text-decoration: none;
}
.skip-link:focus-visible { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header { padding: 18px 0 6px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 1.25rem;
  text-decoration: none; color: var(--ink); min-height: 44px;
}
.wordmark img { width: 40px; height: 40px; }
.header-note { font-size: 1rem; color: var(--ink-soft); margin: 0; text-align: right; }

/* ---------- Hero ---------- */
.hero { padding: 12px 0 40px; position: relative; overflow: hidden; }
.hero .wrap { display: grid; gap: 8px; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: 1rem; letter-spacing: 0.02em;
  background: var(--honey-soft); border-radius: 999px; padding: 6px 14px; margin-bottom: 14px;
}
.hero h1 .apostrophe-word { white-space: nowrap; }
.promise { font-size: clamp(1.25rem, 3.6vw, 1.5rem); line-height: 1.45; max-width: 32ch; }
.hero-art { position: relative; justify-self: center; width: min(62vw, 400px); margin: 4px 0 8px; }
.hero-art::before {
  /* soft honey glow behind Sunny, like lamplight */
  content: ""; position: absolute; inset: 8% 2% 0; border-radius: 50%;
  background: radial-gradient(closest-side, #fde8b8, rgba(253, 232, 184, 0) 100%);
  z-index: -1;
}

/* Floating dream sparkles (pure CSS) */
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles span {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 35%, rgba(255, 255, 255, 0) 70%);
  box-shadow: 0 0 10px 3px rgba(255, 236, 170, 0.75);
  animation: drift 7s ease-in-out infinite;
  opacity: 0.85;
}
.sparkles span:nth-child(1) { top: 8%; left: 6%; animation-delay: -1s; }
.sparkles span:nth-child(2) { top: 18%; right: 10%; width: 7px; height: 7px; animation-delay: -3s; }
.sparkles span:nth-child(3) { top: 58%; left: 2%; width: 6px; height: 6px; animation-delay: -5s; }
.sparkles span:nth-child(4) { bottom: 10%; right: 4%; animation-delay: -2s; }
.sparkles span:nth-child(5) { top: 40%; right: 0; width: 6px; height: 6px; animation-delay: -4s; }
@keyframes drift {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.85; }
  50% { transform: translateY(-14px) scale(0.8); opacity: 0.45; }
}

/* ---------- Signup card ---------- */
.signup {
  background: #fffaf1;
  border: 2px solid var(--honey-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 20px 20px;
  max-width: 560px;
}
.signup h2 { font-size: clamp(1.5rem, 4.6vw, 1.9rem); margin-bottom: 0.3em; }
.signup .lede { margin-bottom: 14px; }
.field-label { display: block; font-weight: 700; margin-bottom: 6px; }
.email-input {
  width: 100%; min-height: 54px; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid #8a7262; border-radius: 16px; padding: 10px 16px;
}
.email-input:focus-visible { border-color: var(--ink); border-radius: 16px; }
.check {
  display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 16px; cursor: pointer;
  font-size: 1.125rem; line-height: 1.45;
}
.check input {
  flex: 0 0 auto; width: 26px; height: 26px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer;
}
.check input:focus-visible { box-shadow: var(--focus); border-radius: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 12px 28px; width: 100%;
  font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: 0.01em;
  color: #fff; background: var(--cta); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 0 var(--cta-hover);
  transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
  text-decoration: none;
}
.btn:hover { background: var(--cta-hover); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--cta-hover); }
.btn:focus-visible { box-shadow: var(--focus); border-radius: 999px; }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.fine-print { font-size: 1.125rem; color: var(--ink-soft); margin: 12px 0 0; }
.form-status { margin: 12px 0 0; font-weight: 700; }
.form-status:empty { display: none; }
.form-status.is-error {
  background: #fdecea; border-left: 6px solid #8f2a17; color: #5c1a0e; padding: 10px 14px; border-radius: 10px;
}
/* Honeypot: off-screen for people, still in the DOM for bots */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Sections ---------- */
section { padding: 44px 0; }
.section-head { max-width: 40ch; margin-bottom: 22px; }
.section-head p { color: var(--ink-soft); }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
.step {
  counter-increment: step;
  display: grid; grid-template-columns: 116px 1fr; gap: 16px; align-items: center;
  background: #fffaf1; border-radius: var(--radius); padding: 14px 18px 14px 14px; box-shadow: var(--shadow);
}
.step img { width: 116px; height: 116px; object-fit: contain; }
.step h3 { margin-bottom: 0.2em; }
.step h3::before {
  content: counter(step); display: inline-grid; place-items: center;
  width: 1.6em; height: 1.6em; margin-right: 0.45em; border-radius: 50%;
  background: var(--honey-soft); font-size: 0.8em; vertical-align: 0.12em;
}
.step p { margin: 0; font-size: 1.125rem; }
.step.is-dream { background: linear-gradient(160deg, var(--canada-snow), var(--canada-sky)); }

/* Book teasers */
.books { display: grid; gap: 22px; }
.book {
  position: relative; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 22px 26px;
}
.book h3 { font-size: clamp(1.45rem, 4.2vw, 1.8rem); }
.book .series { display: block; font-size: 0.68em; letter-spacing: 0.01em; }
.book p { margin-bottom: 0.8em; }
.book .facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.book .facts li {
  font-weight: 700; font-size: 0.98rem; border-radius: 999px; padding: 4px 12px;
  background: rgba(255, 255, 255, 0.7);
}
.badge {
  display: inline-block; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 999px; padding: 4px 12px; margin-bottom: 12px; background: #fff;
}
.book-art { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 4px 0 14px; min-height: 180px; }
.book-art img { width: auto; height: 190px; }
.book-art .tall { height: 220px; }

.book.canada {
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 22%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 78% 12%, #fff 0 2.5px, transparent 4px),
    radial-gradient(circle at 88% 46%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 8% 60%, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 60% 30%, #fff 0 1.5px, transparent 3px),
    linear-gradient(180deg, var(--canada-sky) 0%, #e9f2f8 55%, var(--canada-snow) 100%);
}
.book.canada .badge { color: var(--canada-ink); }
.book.canada h3 { color: var(--canada-ink); }
.book.canada .book-art { position: relative; }
.book.canada .pines { position: absolute; left: -22px; right: -22px; bottom: 0; width: calc(100% + 44px); height: 120px; opacity: 0.28; pointer-events: none; z-index: 0; }
.book-art img, .book-art .mystery { position: relative; z-index: 1; }

.book.ireland {
  background:
    radial-gradient(120% 60% at 50% 105%, #cfe4d3 0%, transparent 60%),
    linear-gradient(180deg, #edf4ee 0%, var(--ireland-mist) 100%);
}
.book.ireland .badge, .book.ireland h3 { color: var(--ireland-ink); }
.mystery {
  position: relative; width: 150px; height: 190px; display: grid; place-items: center;
}
.mystery svg { width: 140px; height: 180px; }
.mystery-q {
  position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 76px;
  font-family: var(--display); font-weight: 600; font-size: 3.4rem; color: #fff;
}

/* Meet the characters */
.meet { display: grid; gap: 22px; }
.who {
  background: #fffaf1; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; display: grid; gap: 14px; grid-template-columns: 1fr; justify-items: center; text-align: center;
}
.who img { height: 230px; width: auto; }
.who.sloth { background: linear-gradient(170deg, #fffaf1 0%, #fdeccd 100%); }
.who p { margin-bottom: 0.6em; max-width: 46ch; }
.who .tag { font-size: 1.125rem; color: var(--ink-soft); }

/* Second signup */
.join { padding-bottom: 56px; }
.join .wrap { display: grid; gap: 18px; justify-items: center; }
.join-art { width: min(60vw, 260px); }
.join .signup { width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
  background: #f1e3c8; padding: 32px 0 40px; font-size: 1.125rem; color: var(--ink);
}
.site-footer p { margin: 0 0 0.6em; }
.site-footer nav ul { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer nav a { display: inline-block; min-height: 44px; padding: 10px 0; font-weight: 700; }
.ai-note { color: var(--ink-soft); max-width: 60ch; }

/* ---------- Simple pages (thanks, privacy, 404) ---------- */
.page { padding: 20px 0 56px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); }
.page h2 { font-size: clamp(1.45rem, 4.4vw, 1.8rem); margin-top: 1.4em; }
.page ul { padding-left: 1.2em; }
.page li { margin-bottom: 0.4em; }
.center-card {
  text-align: center; background: #fffaf1; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 22px 30px; position: relative; overflow: hidden;
}
.center-card img { margin: 0 auto 10px; height: 240px; width: auto; }
.center-card .btn { width: auto; }
.center-card .next { text-align: left; max-width: 52ch; margin: 0 auto 1em; }
.center-card .next h2 { text-align: center; margin-top: 0.6em; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* ---------- Wider screens ---------- */
@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .books { grid-template-columns: 1fr 1fr; }
  .meet { grid-template-columns: 1fr 1fr; }
  .who { grid-template-columns: 1fr; }
}
@media (min-width: 960px) {
  body { font-size: 1.25rem; }
  .hero { padding: 24px 0 56px; }
  .hero .wrap {
    grid-template-columns: 1.1fr 0.9fr; grid-template-areas: "copy art" "form art"; column-gap: 48px; align-items: start;
  }
  .hero-copy { grid-area: copy; padding-top: 24px; }
  .hero-art { grid-area: art; width: 100%; max-width: 470px; align-self: center; }
  .hero .signup { grid-area: form; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { grid-template-columns: 1fr; text-align: center; padding: 20px 18px 24px; align-content: start; }
  .step img { width: 150px; height: 150px; margin: 0 auto 6px; }
  .who { grid-template-columns: 200px 1fr; text-align: left; justify-items: start; align-items: center; }
  .who img { justify-self: center; }
  .join .wrap { grid-template-columns: 300px 1fr; justify-items: start; align-items: center; max-width: 900px; }
  .join-art { width: 280px; }
}

/* =====================================================================
   Delight layer. Motion uses transform and opacity only; all of it is
   switched off by the prefers-reduced-motion block below, and fx.js
   adds no motion classes when reduced motion is requested.
   ===================================================================== */

/* ---- Day to dream sky (opacity driven by scroll in fx.js) ---- */
.dusk {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, #cfc9ea 0%, #d6dcf1 42%, #e3e8f4 78%, #efe9ee 100%);
  will-change: opacity;
}
.moon {
  position: absolute; right: 9vw; top: 10vh; width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle at 36% 36%, #fffef6 0%, #fbf1cf 55%, #efdc9c 100%);
  box-shadow: 0 0 34px 10px rgba(255, 247, 214, 0.7);
  transform: translate3d(0, 38vh, 0); will-change: transform;
}
.moon::after {
  content: ""; position: absolute; left: 30%; top: 52%; width: 10px; height: 8px; border-radius: 50%;
  background: rgba(222, 200, 140, 0.5); box-shadow: 15px -17px 0 -2px rgba(222, 200, 140, 0.4);
}
.dusk .star {
  position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.85);
  animation: twinkle 3.4s ease-in-out infinite;
}
.dusk .star:nth-of-type(1) { top: 8%;  left: 12%; }
.dusk .star:nth-of-type(2) { top: 18%; left: 34%; animation-delay: -1.1s; }
.dusk .star:nth-of-type(3) { top: 6%;  left: 58%; animation-delay: -2.3s; }
.dusk .star:nth-of-type(4) { top: 26%; left: 72%; animation-delay: -0.6s; width: 3px; height: 3px; }
.dusk .star:nth-of-type(5) { top: 40%; left: 6%;  animation-delay: -1.8s; width: 3px; height: 3px; }
.dusk .star:nth-of-type(6) { top: 52%; left: 92%; animation-delay: -2.9s; }
.dusk .star:nth-of-type(7) { top: 70%; left: 20%; animation-delay: -0.3s; width: 3px; height: 3px; }
.dusk .star:nth-of-type(8) { top: 84%; left: 80%; animation-delay: -1.5s; }
@media (min-width: 960px) { .moon { width: 84px; height: 84px; right: 7vw; } }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Extra hero twinkles */
.sparkles span:nth-child(6) { top: 30%; left: 46%; width: 5px; height: 5px; animation-delay: -6s; }
.sparkles span:nth-child(7) { bottom: 28%; left: 38%; width: 7px; height: 7px; animation-delay: -2.6s; }
.sparkles span:nth-child(8) { top: 4%; left: 62%; width: 6px; height: 6px; animation-delay: -4.4s; }

/* ---- Scroll reveal (only for things that start below the fold) ---- */
.fx .reveal-pending {
  opacity: 0; translate: 0 28px;
  transition:
    opacity 0.7s ease var(--d, 0ms),
    translate 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0ms),
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fx .reveal-pending.is-in { opacity: 1; translate: 0 0; }

/* ---- Cards: lift, tilt, soft shadow ---- */
.lift { position: relative; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.lift::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  box-shadow: 0 28px 46px -24px rgba(59, 42, 34, 0.5); opacity: 0; transition: opacity 0.35s ease;
}
@media (hover: hover) {
  .lift:hover { transform: translate3d(0, -6px, 0) rotate(-0.6deg); }
  .lift:nth-child(even):hover { transform: translate3d(0, -6px, 0) rotate(0.6deg); }
  .lift:hover::after { opacity: 1; }
  .lift:hover .hop { animation: hop 0.7s cubic-bezier(0.3, 0.7, 0.4, 1.4); }
}
.lift.is-tapped .hop { animation: hop 0.7s cubic-bezier(0.3, 0.7, 0.4, 1.4); }
@keyframes hop {
  0% { transform: translateY(0); }
  30% { transform: translateY(-14px) rotate(-3deg); }
  55% { transform: translateY(0) scale(1.04, 0.96); }
  75% { transform: translateY(-4px) rotate(1deg); }
  100% { transform: none; }
}

/* ---- Characters breathing / bobbing ---- */
.idle-sway { transform-origin: 50% 100%; animation: sway 5.5s ease-in-out infinite; }
.idle-sway.slow { animation-duration: 7.5s; animation-delay: -2s; }
.idle-bob { animation: bob 4.2s ease-in-out infinite; }
.idle-hug img { transform-origin: 50% 92%; animation: squeeze 4.8s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes squeeze {
  0%, 100% { transform: scale(1); }
  42%, 58% { transform: scale(1.022, 1.012); }
}

/* ---- Plushie comes alive (hover / tap) ---- */
.alive-swap { position: relative; display: grid; place-items: end center; }
.alive-swap > img { grid-area: 1 / 1; transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.3, 0.7, 0.4, 1.5); }
.alive-swap .as-alive { opacity: 0; transform: translateY(10px) scale(0.9); }
.is-alive .alive-swap .as-plush { opacity: 0; transform: scale(0.9); }
.is-alive .alive-swap .as-alive { opacity: 1; transform: none; animation: alive 0.8s cubic-bezier(0.3, 0.7, 0.4, 1.5) 0.08s; }
@keyframes alive {
  0% { transform: translateY(8px) scale(0.92); }
  40% { transform: translateY(-12px) scale(1.04); }
  70% { transform: translateY(0) scale(0.98, 1.02); }
  100% { transform: none; }
}
.hint { display: none; }
.js .hint { display: inline; }

/* ---- Dream cards: clouds, snow, mist ---- */
.book-fx { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; z-index: 0; }
.book > *:not(.book-fx) { position: relative; z-index: 1; }
.book.ireland .book-fx { z-index: 2; } /* the mist rolls over the mystery friend */
.clouds span {
  position: absolute; left: 0; top: 18px; width: 160px; height: 46px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  opacity: 0.8; animation: drift-x 38s linear infinite; animation-delay: -12s;
}
.clouds span:nth-child(2) { top: 76px; width: 110px; height: 34px; opacity: 0.6; animation-duration: 54s; animation-delay: -30s; }
@keyframes drift-x { from { transform: translate3d(-180px, 0, 0); } to { transform: translate3d(640px, 0, 0); } }

.snow {
  position: absolute; left: 0; right: 0; top: -240px; height: calc(100% + 240px);
  background-image:
    radial-gradient(circle at 20px 30px, #fff 0 2px, transparent 2.6px),
    radial-gradient(circle at 92px 84px, #fff 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 152px 140px, #fff 0 2.2px, transparent 2.8px),
    radial-gradient(circle at 60px 186px, #fff 0 1.4px, transparent 2px),
    radial-gradient(circle at 206px 222px, #fff 0 1.8px, transparent 2.4px);
  background-size: 240px 240px; opacity: 0.95;
  animation: snowfall 18s linear infinite;
}
.snow-near { background-position: 118px 64px; opacity: 0.7; animation-duration: 11s; }
@keyframes snowfall { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 240px, 0); } }

.mist span {
  position: absolute; left: -30%; width: 160%; height: 80px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
  animation: mist 15s ease-in-out infinite alternate;
}
.mist span:nth-child(1) { top: 120px; }
.mist span:nth-child(2) { top: 176px; height: 64px; animation-duration: 21s; animation-direction: alternate-reverse; }
.mist span:nth-child(3) { top: 92px; height: 50px; opacity: 0.7; animation-duration: 26s; }
/* keep Ireland's overlay clouds below the badge so its text stays crisp */
.book.ireland .clouds span { top: 96px; }
.book.ireland .clouds span:nth-child(2) { top: 150px; }
@keyframes mist { from { transform: translate3d(-12%, 0, 0); } to { transform: translate3d(12%, 0, 0); } }

.mystery svg { transform-origin: 50% 70%; animation: pulse 3.6s ease-in-out infinite; }
.mystery-q { animation: qwobble 3.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes qwobble { 0%, 100% { transform: translateY(0) rotate(-5deg); } 50% { transform: translateY(-5px) rotate(5deg); } }

/* ---- Buttons: shine, wiggle, press ---- */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  transform: translateX(-170%) skewX(-18deg); transition: transform 0.8s ease;
}
@media (hover: hover) {
  .btn:hover::after { transform: translateX(340%) skewX(-18deg); }
  .btn:hover { animation: wiggle 0.5s ease; }
}
.btn:active { transform: translateY(2px) scale(0.98); }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.4deg); } 60% { transform: rotate(1.1deg); } }

/* ---- Sparkle bursts and the desktop twinkle trail ---- */
.fx-spark {
  position: fixed; left: 0; top: 0; width: 9px; height: 9px; margin: -4px 0 0 -4px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 30%, #ffe08a 58%, rgba(255, 224, 138, 0) 72%);
  pointer-events: none; z-index: 50;
  animation: spark var(--dur, 800ms) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.fx-spark.is-star {
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 0; background: #ffcf4d;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
@keyframes spark {
  0% { transform: translate3d(0, 0, 0) scale(0.4); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate3d(var(--dx), var(--dy), 0) scale(1) rotate(120deg); opacity: 0; }
}
.fx-trail {
  position: fixed; width: 7px; height: 7px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none; z-index: 50;
  background: radial-gradient(circle, #fff 0 35%, rgba(255, 214, 120, 0.9) 55%, rgba(255, 214, 120, 0) 72%);
  animation: trail 0.9s ease-out forwards;
}
@keyframes trail { from { transform: scale(1); opacity: 0.9; } to { transform: translate3d(0, 16px, 0) scale(0.3); opacity: 0; } }

/* Pause looping animations while a section is off screen */
.fx-paused, .fx-paused *, .fx-paused *::before, .fx-paused *::after { animation-play-state: paused !important; }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Forced colours / high contrast ---------- */
@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  :focus-visible { outline: 3px solid Highlight; }
}
