/* ============================================================
   CLOUDTOPIA — single-page presentation site (v2)
   Static CSS. Palette via custom properties (see §5 of guide).
   v2: pointer-parallax-ready float system, sundrop hunt,
   per-cloudling accents, rainbow scroll trail, map zoom,
   speech-bubble friends, nightfall footer with shooting star.
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* sky */
  --sky-1: #9FD4F2;
  --sky-2: #5BB4E5;
  --sky-deep: #3F9BD4;
  /* clouds / surfaces */
  --cloud: #FDFEFF;
  --cloud-2: #F2F8FC;
  --cloud-3: #E8F3FB;
  /* sunset warmth */
  --peach: #FFD0A6;
  --coral: #FF9E7A;
  --coral-deep: #FF7E55;
  --gold: #FFD45E;
  /* rainbow accents */
  --pink: #FFA7D1;
  --lilac: #C9A7F2;
  --mint: #9BE3C4;
  --green: #3C9C72;
  --purple: #8257C9;
  /* ink */
  --ink: #2B3A55;
  --ink-soft: #4D5D7A;   /* darkened for AA contrast on sunset-zone backgrounds */
  --ink-faint: #76859E;

  --radius: 22px;
  --radius-lg: 34px;
  --shadow-sm: 0 6px 18px rgba(43, 58, 85, 0.08);
  --shadow: 0 14px 40px rgba(43, 58, 85, 0.12);
  --shadow-lg: 0 26px 70px rgba(43, 58, 85, 0.18);
  --maxw: 1200px;
  --nav-h: 70px;

  --font-display: "Fredoka", "Baloo 2", system-ui, sans-serif;
  --font-body: "Nunito", "Quicksand", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);       /* easeOutQuint — confident, premium */
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1); /* playful overshoot */
}

/* ---------- 2. Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  /* The sky journey: scrolling down descends through Cloudtopia's
     ever-changing sky — bright morning at the top, warm golden sunset by
     the footer. The gradient spans the whole document height, so scroll
     position == time of day. */
  background:
    linear-gradient(180deg,
      #4FB0E6 0%,
      #6FBEEB 6%,
      #8ECEF1 14%,
      #A9D9F3 24%,
      #C3E5F6 36%,
      #D8ECF4 47%,
      #E7EFEF 57%,
      #F2E7D7 68%,
      #F8D9BC 79%,
      #F6C9A2 88%,
      #F1BA95 96%,
      #EBAC88 100%);
  background-attachment: scroll;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(255, 158, 122, 0.32); color: var(--ink); }
/* crisp hairline definition on media against the sky */
.feature__media, .gallery__item, .map-show, .panorama { box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.4); }
.gallery__item { box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 255, 255, 0.45); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; padding: 0; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  background: var(--ink); color: #fff; font-family: var(--font-display);
  padding: 0.6em 1.2em; border-radius: 0 0 14px 14px;
  transition: top 0.2s ease;
}
.skip-link:focus-visible { top: 0; }

/* ---------- 3. Layout utilities ---------- */
.container { width: min(100% - 2.4rem, var(--maxw)); margin-inline: auto; }
.section { position: relative; padding: clamp(4rem, 8vw, 7rem) 0; }
/* a faint frosted veil for gentle rhythm — lets the sky glow through */
.section--tint { background: rgba(255, 255, 255, 0.22); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto clamp(2.2rem, 5vw, 3.4rem); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral-deep);
  background: rgba(255, 158, 122, 0.14);
  padding: 0.35em 1em;
  border-radius: 100px;
  margin-bottom: 1rem;
}
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); }
.section__head .lede { margin-top: 0.9rem; }

/* ---------- 3b. Custom icon system ---------- */
.ic { display: inline-block; vertical-align: middle; width: 1.5rem; height: 1.5rem; flex: none; }
.ic--sm { width: 1rem; height: 1rem; }

/* ---------- 4. Buttons / badges ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 500;
  padding: 0.85em 1.6em;
  border-radius: 100px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(-1px) scale(0.97); }
.btn--primary {
  background: linear-gradient(135deg, var(--coral), var(--coral-deep));
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 126, 85, 0.40);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(255, 126, 85, 0.50); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { transform: translateY(-3px); background: #fff; }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--sky-deep); outline-offset: 3px;
}

.store-badges { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
.store-badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--ink);
  color: #fff;
  padding: 0.6em 1.1em;
  border-radius: 16px;
  font-size: 0.82rem;
  opacity: 0.92;
  cursor: default;
}
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge small { display: block; font-size: 0.66rem; opacity: 0.7; line-height: 1; margin-bottom: 2px; }
.store-badge b { font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; line-height: 1; }

.pill-soon {
  font-family: var(--font-display);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sky-deep);
  background: rgba(91, 180, 229, 0.16);
  padding: 0.3em 0.85em; border-radius: 100px;
}

/* ---------- 5. Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  display: flex; align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.nav.is-scrolled {
  background: rgba(253, 254, 255, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.nav__brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; }
.nav__brand .dot { color: var(--coral-deep); }
.nav__links { display: flex; align-items: center; gap: 0.3rem; }
.nav__links a {
  font-family: var(--font-display); font-weight: 400; font-size: 0.95rem;
  padding: 0.45em 0.85em; border-radius: 100px; color: var(--ink-soft);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav__links a:hover { color: var(--ink); background: rgba(91, 180, 229, 0.12); }
.nav__links a.is-active { color: var(--ink); background: rgba(91, 180, 229, 0.18); }
.nav__links a.is-cta {
  color: var(--coral-deep); background: rgba(255, 158, 122, 0.14);
}
.nav__links a.is-cta.is-active { background: rgba(255, 158, 122, 0.26); }
.nav__toggle { display: none; width: 42px; height: 42px; border-radius: 12px; flex: none; }
.nav__toggle span { display: block; width: 22px; height: 2.5px; background: var(--ink); margin: 4px auto; border-radius: 2px; transition: transform 0.25s ease, opacity 0.2s ease; }
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* the sundrop hunt score — appears once the first sundrop is collected */
.sun-score {
  display: inline-flex; align-items: center; gap: 0.35em; flex: none;
  font-family: var(--font-display); font-size: 0.88rem; color: var(--ink);
  background: rgba(255, 212, 94, 0.35);
  border: 1.5px solid rgba(255, 158, 66, 0.45);
  padding: 0.28em 0.85em; border-radius: 100px;
  transition: transform 0.25s var(--ease-pop), background 0.3s ease;
}
.sun-score[hidden] { display: none; }
.sun-score.bump { transform: scale(1.18); }
.sun-score.is-done {
  background: linear-gradient(135deg, var(--gold), var(--coral));
  border-color: rgba(255, 126, 85, 0.5);
  color: #fff;
}
.sun-score b { font-weight: 600; }

/* rainbow trail: fills as you journey down through the sky */
.sky-progress {
  position: absolute; left: 0; right: 0; bottom: -4px; height: 4px;
  pointer-events: none;
}
.sky-progress span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--coral) , var(--gold), var(--mint), var(--sky-2), var(--lilac), var(--pink));
  border-radius: 0 4px 4px 0;
  opacity: 0.9;
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  /* sits on the body sky; a soft warm sun-glow adds depth */
  background: radial-gradient(120% 80% at 72% 12%, rgba(255, 222, 140, 0.45), rgba(255, 222, 140, 0) 55%);
  padding: calc(var(--nav-h) + 2rem) 0 6rem;
}
.hero__clouds { position: absolute; inset: 0; pointer-events: none; }
.hero__cloud { position: absolute; background: #fff; border-radius: 50%; filter: blur(2px); opacity: 0.9; }
.hero__cloud::before, .hero__cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.c1 { width: 180px; height: 60px; top: 18%; left: 8%; opacity: 0.85; }
.c1::before { width: 90px; height: 90px; top: -38px; left: 28px; }
.c1::after { width: 70px; height: 70px; top: -26px; left: 92px; }
.c2 { width: 240px; height: 78px; top: 30%; right: 6%; opacity: 0.7; }
.c2::before { width: 120px; height: 120px; top: -52px; left: 40px; }
.c2::after { width: 90px; height: 90px; top: -34px; left: 120px; }
.c3 { width: 140px; height: 46px; top: 58%; left: 14%; opacity: 0.6; }
.c3::before { width: 70px; height: 70px; top: -30px; left: 22px; }
.c3::after { width: 54px; height: 54px; top: -20px; left: 70px; }
.c4 { width: 200px; height: 64px; top: 12%; left: 46%; opacity: 0.5; }
.c4::before { width: 100px; height: 100px; top: -44px; left: 34px; }
.c4::after { width: 76px; height: 76px; top: -28px; left: 104px; }
.hero__sun {
  position: absolute; top: 8%; right: 16%;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 40%, rgba(255, 212, 94, 0) 72%);
  filter: blur(2px); opacity: 0.85;
}
/* slow-turning sun rays — barely there, pure atmosphere */
.hero__rays {
  position: absolute; inset: -90%; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 212, 94, 0.16) 0 7deg, rgba(255, 212, 94, 0) 7deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  animation: rays-spin 90s linear infinite;
}
@keyframes rays-spin { to { transform: rotate(360deg); } }

/* floating cloudling cast in the hero */
.hero__cast { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.cast {
  position: absolute; height: auto;
  filter: drop-shadow(0 14px 20px rgba(43, 58, 85, 0.20));
}
.cast--castella { top: 13%; left: 4%; width: clamp(90px, 11vw, 165px); }
.cast--knucki   { top: 11%; right: 5%; width: clamp(90px, 11vw, 160px); }
.cast--alto     { bottom: 6%; left: 6%; width: clamp(110px, 13vw, 195px); }
.cast--luci     { bottom: 4%; right: 7%; width: clamp(110px, 14vw, 205px); }

.hero__inner { position: relative; z-index: 2; padding: 0 1.2rem; }
.wordmark { display: inline-block; margin-bottom: 0.4rem; }
.wordmark img, .wordmark svg {
  width: min(84vw, 560px); height: auto;
  filter: drop-shadow(0 10px 20px rgba(43, 58, 85, 0.22));
}
/* the real logo breathes ever so gently, like it's floating on the sky */
.wordmark img { animation: logo-bob 7s ease-in-out infinite; }
@keyframes logo-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero__tagline {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.4rem, 3.6vw, 2.3rem);
  color: var(--ink); margin-top: 0.2rem;
}
.hero__sub { font-size: clamp(1rem, 1.8vw, 1.2rem); color: var(--ink-soft); margin-top: 0.7rem; }
.hero__cta { margin-top: 2rem; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.hero__cta-row { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; justify-content: center; }
.hero__scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--ink-soft); font-family: var(--font-display); font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.hero__scroll .mouse {
  width: 24px; height: 38px; border: 2px solid var(--ink-soft); border-radius: 14px; position: relative;
}
.hero__scroll .mouse::after {
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 7px; border-radius: 4px; background: var(--ink-soft);
  animation: scrolldot 1.6s ease-in-out infinite;
}
@keyframes scrolldot { 0%, 100% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 10px); } }

/* the float system: keyframes read --px/--py so JS parallax (pointer +
   scroll) composes with the idle bobbing instead of fighting it */
@keyframes float {
  0%, 100% { transform: translate3d(var(--px, 0px), var(--py, 0px), 0); }
  50% { transform: translate3d(var(--px, 0px), calc(var(--py, 0px) - 22px), 0); }
}
.floaty { animation: float 9s ease-in-out infinite; }
.floaty--slow { animation-duration: 13s; }
.floaty--slower { animation-duration: 17s; }

/* hero entrance: wordmark and lines rise softly into place on load */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.rise { opacity: 0; animation: rise-in 0.9s var(--ease) forwards; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.22s; }
.rise-3 { animation-delay: 0.36s; }
.rise-4 { animation-delay: 0.5s; }

/* ---------- 7. Ambient atmosphere (drifting clouds behind everything) ---------- */
.atmosphere { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.drift-cloud {
  position: absolute; display: block; background: #fff; border-radius: 100px;
  filter: blur(7px); will-change: transform;
  animation: drift linear infinite;
}
.drift-cloud::before, .drift-cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.drift-cloud::before { width: 55%; height: 190%; top: -78%; left: 10%; }
.drift-cloud::after  { width: 42%; height: 155%; top: -58%; left: 48%; }
.dc1 { top: 9%;  width: 260px; height: 70px; opacity: 0.55; animation-duration: 95s; }
.dc2 { top: 28%; width: 180px; height: 52px; opacity: 0.40; animation-duration: 72s; animation-delay: -25s; }
.dc3 { top: 52%; width: 140px; height: 42px; opacity: 0.35; animation-duration: 60s; animation-delay: -42s; }
.dc4 { top: 68%; width: 320px; height: 88px; opacity: 0.45; animation-duration: 115s; animation-delay: -12s; }
.dc5 { top: 40%; width: 200px; height: 58px; opacity: 0.32; animation-duration: 84s; animation-delay: -58s; }
.dc6 { top: 84%; width: 120px; height: 36px; opacity: 0.42; animation-duration: 66s; animation-delay: -33s; }
@keyframes drift { from { transform: translateX(-32vw); } to { transform: translateX(132vw); } }

/* ---------- 8. Vision pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.pillar {
  background: #fff; border-radius: var(--radius-lg); padding: 2.2rem 1.8rem;
  text-align: center; box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.pillar__icon {
  width: 76px; height: 76px; margin: 0 auto 1.1rem; border-radius: 24px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--sky-1), var(--sky-2));
  transition: transform 0.3s var(--ease-pop);
}
.pillar:hover .pillar__icon { transform: rotate(-5deg) scale(1.08); }
.pillar:nth-child(2) .pillar__icon { background: linear-gradient(135deg, var(--mint), #6FCBA0); }
.pillar:nth-child(3) .pillar__icon { background: linear-gradient(135deg, var(--peach), var(--coral)); }
.pillar__icon svg { width: 40px; height: 40px; }
.pillar p { color: var(--ink-soft); margin-top: 0.5rem; }

/* ---------- 9. Cloudlings ---------- */
.cloudlings { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
.cloudling {
  --accent: var(--sky-2);
  background: linear-gradient(180deg, #fff, var(--cloud-2));
  border-radius: var(--radius-lg); padding: 1.4rem 1.4rem 1.8rem;
  text-align: center; box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  position: relative; overflow: hidden;
  border-bottom: 5px solid var(--accent);
  cursor: pointer;
}
.cloudling--alto     { --accent: var(--sky-2); }
.cloudling--luci     { --accent: var(--pink); }
.cloudling--castella { --accent: var(--lilac); }
.cloudling--knucki   { --accent: var(--gold); }
.cloudling::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 120px;
  background: radial-gradient(circle at 50% 0%, rgba(255, 212, 94, 0.22), transparent 70%);
}
.cloudling:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
/* two stacked poses: the happy pose cross-fades to the transform pose on
   hover / focus / tap — the site demonstrates the core "transform to
   solve" mechanic. `.is-played` is the JS tap/keyboard state. */
.cloudling__art { height: 210px; position: relative; z-index: 1; }
.cloudling__art .pose {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  max-height: 210px; width: auto;
  filter: drop-shadow(0 12px 16px rgba(43, 58, 85, 0.16));
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.pose--transform { opacity: 0; transform: translateX(-50%) scale(0.94) rotate(-2deg); }
.cloudling:hover .pose--base, .cloudling:focus-within .pose--base, .cloudling.is-played .pose--base { opacity: 0; }
.cloudling:hover .pose--transform, .cloudling:focus-within .pose--transform, .cloudling.is-played .pose--transform {
  opacity: 1; transform: translateX(-50%) scale(1.05) rotate(0deg);
}
.transform-hint {
  position: absolute; top: 6px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.3em;
  font-family: var(--font-display); font-size: 0.72rem; color: var(--accent);
  background: rgba(255, 255, 255, 0.92); padding: 0.25em 0.7em; border-radius: 100px;
  box-shadow: var(--shadow-sm); opacity: 0; transform: translateY(-4px);
  transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none;
}
.cloudling:hover .transform-hint, .cloudling:focus-within .transform-hint, .cloudling.is-played .transform-hint { opacity: 1; transform: none; }
.cloudling h3 { margin-top: 0.9rem; }
.cloudling__role { font-family: var(--font-display); font-size: 0.82rem; color: var(--coral-deep); letter-spacing: 0.04em; }
.cloudling p { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.5rem; }
.cloudling__love { margin-top: 0.8rem; font-size: 0.86rem; font-style: italic; color: var(--sky-deep); }

/* ---------- 10. The App ---------- */
.app-block { margin-bottom: clamp(3rem, 6vw, 4.5rem); position: relative; }
.app-block:last-child { margin-bottom: 0; }
.app-block__title { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.4rem; }
.app-block__title .num {
  font-family: var(--font-display); font-size: 0.9rem; color: #fff;
  background: linear-gradient(135deg, var(--sky-2), var(--sky-deep));
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
}
.app-block__lede { margin-bottom: 1.4rem; }

.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.story-card {
  background: #fff; border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm);
  border-top: 5px solid var(--sky-2); transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.story-card:nth-child(2) { border-top-color: var(--coral); }
.story-card:nth-child(3) { border-top-color: var(--mint); }
.story-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.story-card__icon { line-height: 0; margin-bottom: 0.1rem; }
.story-card__icon .ic { width: 40px; height: 40px; }
.stories .story-card:nth-child(1) .story-card__icon { color: var(--sky-deep); }
.stories .story-card:nth-child(2) .story-card__icon { color: var(--coral-deep); }
.stories .story-card:nth-child(3) .story-card__icon { color: var(--green); }
.story-card h4 { font-family: var(--font-display); font-size: 1.2rem; margin: 0.5rem 0 0.4rem; }
.story-card p { font-size: 0.94rem; color: var(--ink-soft); }
.eco-beat {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1rem;
  font-size: 0.8rem; font-family: var(--font-display); color: var(--green);
  background: rgba(155, 227, 196, 0.25); padding: 0.35em 0.85em; border-radius: 100px;
}
.stories__next {
  margin-top: 1.2rem; text-align: center; font-family: var(--font-display);
  font-size: 0.92rem; color: var(--green);
}
.stories__next .ic { color: var(--green); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.gallery__item {
  border: none; padding: 0; border-radius: 16px; overflow: hidden; position: relative;
  aspect-ratio: 16 / 9; box-shadow: var(--shadow-sm); background: var(--cloud-3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.4s var(--ease); }
.gallery__item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item::after {
  content: ""; position: absolute; top: 9px; right: 10px; width: 18px; height: 18px;
  background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-7 7M10 20H4v-6M4 20l7-7'/%3E%3C/svg%3E");
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  opacity: 0; transition: opacity 0.2s ease;
}
.gallery__item:hover::after { opacity: 1; }

/* real in-app game names — authentic universe detail */
.game-names {
  margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  justify-content: center;
}
.game-names__label { font-family: var(--font-display); font-size: 0.88rem; color: var(--ink-soft); margin-right: 0.3rem; }
.game-names .chip { background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow-sm); }
.game-names .chip--more { background: transparent; box-shadow: none; color: var(--ink-faint); font-style: italic; }

.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.feature--rev .feature__media { order: 2; }
.feature__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.feature__media img { width: 100%; }
.feature h4 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 0.7rem; }
.feature p { color: var(--ink-soft); margin-bottom: 0.8rem; }
.feature ul.ticks li { position: relative; padding-left: 1.7rem; margin-bottom: 0.5rem; color: var(--ink-soft); }
.feature ul.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
  border-radius: 50%;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.chip { font-size: 0.8rem; font-family: var(--font-display); background: var(--cloud-3); color: var(--ink-soft); padding: 0.35em 0.85em; border-radius: 100px; }

/* ---------- 11. Panorama dividers ---------- */
.panorama {
  position: relative; height: clamp(220px, 36vw, 420px); overflow: hidden;
  display: grid; place-items: center; text-align: center; color: #fff;
}
.panorama img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panorama::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(43,58,85,0.18), rgba(43,58,85,0.42)); }
.panorama__text { position: relative; z-index: 2; padding: 1.2rem; max-width: 760px; }
.panorama__text p { font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 2.1rem); text-shadow: 0 3px 18px rgba(0,0,0,0.35); }

/* ---------- 12. World + map ---------- */
.world-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 2.4rem; }
.world-card {
  background: #fff; border-radius: var(--radius); padding: 1.5rem 1.6rem; box-shadow: var(--shadow-sm);
  display: flex; gap: 0.9rem; align-items: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.world-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.world-card .ic { width: 1.9rem; height: 1.9rem; color: var(--sky-deep); }
.world-card:nth-child(3) .ic { color: #E8A13B; }
.world-card:nth-child(5) .ic, .world-card:nth-child(6) .ic { color: var(--green); }
.world-card > div { min-width: 0; }
.world-card h4 { font-family: var(--font-display); font-size: 1.08rem; margin-bottom: 0.25rem; }
.world-card p { font-size: 0.9rem; color: var(--ink-soft); }
.map-show {
  border: none; padding: 0; width: 100%; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); position: relative; display: block; background: var(--sky-1);
}
.map-show img { width: 100%; display: block; transition: transform 6s ease; }
.map-show:hover img { transform: scale(1.05); }
.map-show__hint {
  position: absolute; bottom: 14px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.4em;
  background: rgba(255,255,255,0.9); color: var(--ink); font-family: var(--font-display);
  font-size: 0.82rem; padding: 0.4em 1em; border-radius: 100px; box-shadow: var(--shadow-sm);
}

/* ---------- 13. Friends gallery ---------- */
.friends { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.friend {
  background: #fff; border-radius: var(--radius); padding: 1rem 0.8rem 1.1rem; text-align: center;
  box-shadow: var(--shadow-sm); transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.friend:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.friend__art { height: 110px; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.friend__art img { max-height: 110px; width: auto; filter: drop-shadow(0 8px 10px rgba(43,58,85,0.14)); transition: transform 0.25s ease, opacity 0.3s ease; }
.friend:hover .friend__art img { transform: scale(1.1) rotate(-2deg); }
.friend h4 { font-family: var(--font-display); font-size: 0.95rem; margin-top: 0.6rem; }
.friend span { display: block; font-size: 0.76rem; color: var(--ink-faint); margin-top: 0.1rem; }
/* a little speech bubble floats up on hover — every character gets a voice */
.friend__quote {
  position: absolute; left: 6px; right: 6px; top: -12px; z-index: 3;
  background: #fff; border-radius: 14px; padding: 0.5em 0.7em;
  font-size: 0.74rem; line-height: 1.35; font-style: italic; color: var(--ink-soft);
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px) scale(0.96);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease-pop);
  pointer-events: none;
}
.friend__quote::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px; background: #fff; border-radius: 2px;
}
.friend:hover .friend__quote, .friend:focus-within .friend__quote { opacity: 1; transform: translateY(0) scale(1); }
/* cheeky foes get a stormier card */
.friend--foe { background: linear-gradient(180deg, #fff, #EDEBF4); }
.friend--foe span { color: var(--purple); }
/* Pooloo rolls out the cannon on hover */
.friend__art .swap--alt { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); opacity: 0; }
.friend:hover .swap--base { opacity: 0; }
.friend:hover .swap--alt { opacity: 1; transform: translateX(-50%) scale(1.1) rotate(-2deg); }

/* ---------- 14. Learn & Grow ---------- */
.learn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.learn-card { background: #fff; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-sm); }
.learn-card h3 { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.1rem; }
.learn-card h3 .ic { width: 1.6rem; height: 1.6rem; }
.learn-card--edu h3 .ic { color: var(--sky-deep); }
.learn-card--eco h3 .ic { color: var(--green); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tag {
  font-family: var(--font-display); font-size: 0.9rem; padding: 0.5em 1.05em; border-radius: 100px;
  background: var(--cloud-2); color: var(--ink-soft);
  transition: transform 0.2s var(--ease-pop);
}
.tag:hover { transform: translateY(-2px) rotate(-1deg); }
.learn-card--edu .tag { background: rgba(91,180,229,0.14); color: var(--sky-deep); }
.learn-card--eco .tag { background: rgba(155,227,196,0.28); color: var(--green); }
.pullquote {
  margin-top: 2.4rem; text-align: center; max-width: 820px; margin-inline: auto;
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  color: var(--ink); line-height: 1.3;
}
.pullquote span { color: var(--coral-deep); }

/* ---------- 15. Road ahead ---------- */
.roadmap { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
/* a dotted sky-path peeks through the gaps between the steps */
.roadmap::before {
  content: ""; position: absolute; left: 2%; right: 2%; top: 50%; z-index: 0;
  border-top: 3px dashed rgba(43, 58, 85, 0.22);
}
.road-step {
  background: #fff; border-radius: var(--radius); padding: 1.8rem 1.4rem; box-shadow: var(--shadow-sm);
  position: relative; text-align: center; z-index: 1;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.road-step:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.road-step__badge {
  font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3em 0.9em; border-radius: 100px; display: inline-block; margin-bottom: 0.9rem;
}
.road-step--now .road-step__badge { background: var(--coral); color: #fff; }
.road-step--vision .road-step__badge { background: rgba(201,167,242,0.25); color: var(--purple); }
.road-step__ic { line-height: 0; margin-bottom: 0.7rem; }
.road-step__ic .ic { width: 44px; height: 44px; }
.road-step--now .road-step__ic { color: var(--coral-deep); }
.road-step--vision .road-step__ic { color: var(--purple); }
.road-step h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 0.4rem; }
.road-step p { font-size: 0.9rem; color: var(--ink-soft); }
.road-note { text-align: center; margin-top: 1.8rem; font-size: 0.9rem; color: var(--ink-faint); font-style: italic; }

/* ---------- 16. Company ---------- */
.company { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: center; }
.company__lede { margin-top: 1rem; }
.company__credits { display: grid; gap: 1rem; }
.credit { background: #fff; border-radius: var(--radius); padding: 1.2rem 1.5rem; box-shadow: var(--shadow-sm); }
.credit h4 { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.5rem; }
.credit p { color: var(--ink); }
.credit p b { font-weight: 700; }
.partners-logos { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.partner-logo { font-family: var(--font-display); font-size: 0.95rem; background: var(--cloud-2); padding: 0.5em 1.1em; border-radius: 12px; color: var(--ink-soft); }

/* ---------- 17. Partners / investors ---------- */
.snapshot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-bottom: 2.6rem; }
.snap {
  background: rgba(255,255,255,0.9); border-radius: var(--radius); padding: 1.6rem 1.4rem; text-align: center;
  box-shadow: var(--shadow-sm);
}
.snap__big { font-family: var(--font-display); font-size: 1.9rem; color: var(--coral-deep); line-height: 1; }
.snap__big .ic { width: 42px; height: 42px; }
.snap h4 { font-family: var(--font-display); font-size: 1rem; margin: 0.5rem 0 0.3rem; }
.snap p { font-size: 0.86rem; color: var(--ink-soft); }
.cta-band {
  background: linear-gradient(135deg, var(--sky-2), var(--sky-deep));
  border-radius: var(--radius-lg); padding: clamp(2.2rem, 5vw, 3.4rem); text-align: center; color: #fff;
  box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; top: -60px; right: -40px; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
  border-radius: 50%;
}
.cta-band h3 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cta-band p { color: rgba(255,255,255,0.92); max-width: 560px; margin: 0.8rem auto 1.6rem; }

/* ---------- 18. Footer (nightfall) ---------- */
.footer { background: var(--ink); color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; position: relative; }
.footer .container { position: relative; z-index: 2; }
.footer__topclouds { position: absolute; left: 0; top: 0; width: 100%; line-height: 0; transform: translateY(-99%); pointer-events: none; }
.footer__topclouds svg { width: 100%; height: clamp(44px, 6vw, 82px); display: block; }
.footer__stars { position: absolute; inset: 0 0 auto 0; height: 220px; overflow: hidden; pointer-events: none; z-index: 1; }
.star { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: 0.5; box-shadow: 0 0 4px rgba(255,255,255,0.6); animation: twinkle ease-in-out infinite; }
.s1 { top: 30px; left: 12%; animation-duration: 3.5s; }
.s2 { top: 64px; left: 26%; width: 2px; height: 2px; animation-duration: 4.2s; animation-delay: -1s; }
.s3 { top: 44px; left: 41%; animation-duration: 3s; animation-delay: -2s; }
.s4 { top: 80px; left: 57%; width: 2px; height: 2px; animation-duration: 5s; animation-delay: -0.5s; }
.s5 { top: 36px; left: 68%; animation-duration: 3.8s; animation-delay: -1.5s; }
.s6 { top: 70px; left: 82%; animation-duration: 4.5s; animation-delay: -2.5s; }
.s7 { top: 52px; left: 90%; width: 2px; height: 2px; animation-duration: 3.2s; }
.s8 { top: 96px; left: 33%; width: 2px; height: 2px; animation-duration: 4.8s; animation-delay: -3s; }
.star-sparkle { position: absolute; width: 16px; height: 16px; animation: twinkle ease-in-out infinite; }
.ss1 { top: 24px; left: 49%; width: 18px; height: 18px; animation-duration: 4s; }
.ss2 { top: 74px; left: 73%; width: 13px; height: 13px; animation-duration: 5.2s; animation-delay: -1.5s; }
@keyframes twinkle { 0%, 100% { opacity: 0.25; transform: scale(0.8); } 50% { opacity: 0.95; transform: scale(1.1); } }
/* once in a while a star shoots across the night sky */
.shooting-star {
  position: absolute; top: 18px; right: 6%;
  width: 90px; height: 2px; border-radius: 2px;
  background: linear-gradient(270deg, #fff, rgba(255,255,255,0));
  opacity: 0;
  animation: shoot 11s ease-in 4s infinite;
}
@keyframes shoot {
  0% { transform: translate(0, 0) rotate(-24deg); opacity: 0; }
  2% { opacity: 0.9; }
  9% { transform: translate(-360px, 150px) rotate(-24deg); opacity: 0; }
  100% { transform: translate(-360px, 150px) rotate(-24deg); opacity: 0; }
}
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2.4rem; }
.footer__brand { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.6rem; }
.footer__brand .dot { color: var(--coral); }
.footer p { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer a { color: rgba(255,255,255,0.85); }
.footer a:hover { color: #fff; }
.footer h5 { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 0.9rem; }
.footer__links li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.footer__poem { font-family: var(--font-display); font-style: italic; color: rgba(255,255,255,0.8) !important; font-size: 1.05rem !important; margin-top: 1rem; }
.footer__mail { margin-top: 0.8rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; font-size: 0.82rem; color: rgba(255,255,255,0.55); }

/* ---------- 19. Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex;
  background: rgba(20, 30, 48, 0.86); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 4vw;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.lightbox__stage { display: flex; align-items: center; justify-content: center; max-width: 94vw; max-height: 86vh; }
.lightbox img {
  max-width: 94vw; max-height: 86vh; border-radius: 14px; box-shadow: var(--shadow-lg);
  transform: scale(0.92); transition: transform 0.38s var(--ease);
}
.lightbox.is-open img { transform: scale(1); }
/* map mode: click to zoom in, drag to wander the world */
.lightbox--map .lightbox__stage { overflow: hidden; border-radius: 14px; }
.lightbox--map img { cursor: zoom-in; will-change: transform; }
.lightbox--map img.is-zoomed { cursor: grab; transition: none; }
.lightbox--map img.is-dragging { cursor: grabbing; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,0.16); color: #fff; border-radius: 50%;
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.4rem;
  transition: background 0.2s ease; z-index: 2;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.3); }
.lightbox__close { top: 4vw; right: 4vw; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav--prev { left: 3vw; }
.lightbox__nav--next { right: 3vw; }
.lightbox__cap { position: absolute; bottom: 4vw; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,0.8); font-family: var(--font-display); font-size: 0.9rem; }

/* ---------- 20. Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px) scale(0.985); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.07s; }
.reveal[data-delay="2"] { transition-delay: 0.14s; }
.reveal[data-delay="3"] { transition-delay: 0.21s; }
.reveal[data-delay="4"] { transition-delay: 0.28s; }

/* ---------- 21. Universe motifs (sundrop hunt, rainbow, peeking cast) ---------- */
/* sundrops — the in-game currency, hiding around the page. Tap to collect. */
.sundrops { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sundrop {
  position: absolute; width: 30px; height: 40px; opacity: 0.75;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M12 1C12 1 2 14 2 21a10 10 0 0 0 20 0C22 14 12 1 12 1Z' fill='%23FF9E42'/%3E%3Cellipse cx='8' cy='20' rx='2.4' ry='3.8' fill='%23ffffff' opacity='0.55'/%3E%3C/svg%3E");
  filter: drop-shadow(0 4px 6px rgba(255, 126, 66, 0.3));
  animation: sundrop-bob ease-in-out infinite;
  pointer-events: auto; cursor: pointer; z-index: 3;
  transition: filter 0.2s ease;
  border-radius: 50%;
}
.sundrop:hover { filter: drop-shadow(0 4px 10px rgba(255, 126, 66, 0.65)) brightness(1.1); }
.sundrop.is-got { animation: sundrop-pop 0.5s var(--ease) forwards; pointer-events: none; }
@keyframes sundrop-pop {
  0% { transform: scale(1); opacity: 0.9; }
  45% { transform: scale(1.45) rotate(8deg); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}
.sd1 { top: 12%; left: 4%;  width: 26px; height: 35px; animation-duration: 7s; }
.sd2 { top: 30%; right: 5%; width: 38px; height: 50px; opacity: 0.65; animation-duration: 9s; animation-delay: -2s; }
.sd3 { top: 58%; left: 7%;  width: 22px; height: 30px; opacity: 0.6; animation-duration: 6s; animation-delay: -1s; }
.sd4 { top: 74%; right: 8%; width: 30px; height: 40px; animation-duration: 8s; animation-delay: -3s; }
.sundrop--hero  { top: 26%; left: 21%; width: 24px; height: 32px; z-index: 2; animation-duration: 8s; animation-delay: -1.5s; }
.sundrop--world { top: 7%; right: 7%; width: 28px; height: 37px; animation-duration: 7.5s; animation-delay: -2.5s; }
.sundrop--learn { bottom: 10%; right: 5%; width: 26px; height: 35px; animation-duration: 6.5s; animation-delay: -1s; }
@keyframes sundrop-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-16px) rotate(4deg); } }
.sundrop-tip {
  margin-top: 1rem; font-size: 0.88rem; font-style: italic; color: var(--ink-faint);
}

/* sparkle burst particles (spawned by JS on collect / transform) */
.spark {
  position: fixed; z-index: 150; width: 10px; height: 10px; pointer-events: none;
  background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23FFD45E'%3E%3Cpath d='M12 3c.5 4.6 1.4 5.5 6 6-4.6.5-5.5 1.4-6 6-.5-4.6-1.4-5.5-6-6 4.6-.5 5.5-1.4 6-6Z'/%3E%3C/svg%3E");
  animation: spark-fly 0.65s ease-out forwards;
}
@keyframes spark-fly {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx, 0px), var(--dy, -30px)) scale(0.2) rotate(90deg); opacity: 0; }
}

/* a soft rainbow arc — the Rainbow Fountain motif glowing behind the world */
.rainbow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 560px; height: 280px; border-radius: 280px 280px 0 0;
  z-index: 0; pointer-events: none; opacity: 0.5;
  background:
    radial-gradient(circle at 50% 100%, transparent 178px,
      #FF9E7A 178px 192px, #FFD45E 192px 206px, #9BE3C4 206px 220px,
      #5BB4E5 220px 234px, #C9A7F2 234px 248px, transparent 248px);
  filter: blur(1px);
}

/* peeking characters — friends leaning into the sections they belong to */
.peek { position: absolute; z-index: 1; pointer-events: none; filter: drop-shadow(0 12px 16px rgba(43, 58, 85, 0.18)); }
/* sits over the Cloud House image (left column), not the text */
.peek--professor { left: -34px; bottom: -14px; width: clamp(100px, 11vw, 150px); }
/* Agricloud standing in his fields — over the lower-left of the world map */
.peek--agricloud { left: 3%; bottom: 1.5%; width: clamp(96px, 10vw, 140px); z-index: 2; }
@media (max-width: 1100px) { .peek { display: none; } }

/* ---------- 22. Responsive ---------- */
@media (max-width: 980px) {
  .pillars, .stories, .roadmap, .snapshot { grid-template-columns: repeat(2, 1fr); }
  .roadmap::before { display: none; }
  .cloudlings { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .friends { grid-template-columns: repeat(4, 1fr); }
  .feature, .company, .learn-grid { grid-template-columns: 1fr; }
  .feature--rev .feature__media { order: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: rgba(253,254,255,0.97); backdrop-filter: blur(12px); padding: 1rem 1.4rem 1.6rem;
    gap: 0.2rem; box-shadow: var(--shadow); transform: translateY(-130%); transition: transform 0.3s ease;
  }
  .nav.is-open .nav__links { transform: translateY(0); }
  .nav__links a { padding: 0.8em 1em; font-size: 1.05rem; }
  .nav__toggle { display: block; }
  .sun-score { margin-left: auto; }
  /* keep the bottom cast clear of the wordmark/CTA on tablets */
  .cast--alto { bottom: 2%; left: 1%; }
  .cast--luci { bottom: 1%; right: 1%; }
}
@media (max-width: 600px) {
  /* on phones: hide the bottom pair, keep two small ones peeking up top */
  .cast--alto, .cast--luci { display: none; }
  .cast--castella { width: 66px; top: 9%; left: 2%; }
  .cast--knucki   { width: 66px; top: 8%; right: 2%; }
  .sundrop--hero { display: none; }
  .rainbow { width: 380px; height: 190px; top: -10px;
    background:
      radial-gradient(circle at 50% 100%, transparent 118px,
        #FF9E7A 118px 128px, #FFD45E 128px 138px, #9BE3C4 138px 148px,
        #5BB4E5 148px 158px, #C9A7F2 158px 168px, transparent 168px); }
}
@media (max-width: 560px) {
  .pillars, .stories, .roadmap, .snapshot, .cloudlings, .gallery, .friends { grid-template-columns: 1fr 1fr; }
  .stories, .roadmap, .world-grid { grid-template-columns: 1fr; }
  .friends { grid-template-columns: repeat(3, 1fr); }
  .friend__quote { display: none; }
}

/* ---------- 23. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .rise { opacity: 1; animation: none; }
  .wordmark img { animation: none; }
  .floaty { animation: none; }
  .drift-cloud { animation: none; transform: none; }
  .sundrop { animation: none; }
  .hero__rays { animation: none; }
  .shooting-star { display: none; }
  .star, .star-sparkle { animation: none; opacity: 0.7; }
}
