@layer moonshot-pages {
.flight {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: linear-gradient(var(--book-sage) 0%, color-mix(in srgb, var(--book-paper) 85%, var(--book-sage)) 23%, color-mix(in srgb, var(--book-paper) 85%, var(--book-orange)) 44%, color-mix(in srgb, var(--book-paper) 62%, #eaa3b4) 64%, color-mix(in srgb, var(--book-paper) 58%, #bfa2dc) 86%, color-mix(in srgb, var(--book-paper) 70%, #bfa2dc) 100%);
}
/* The first screen is the whole window on every size, so step one never shows above the fold
   (Adam, November 29, 2026: "i never want to see dream up a hero above the fold. i want a very clean initial page"). */
.launch {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: 5rem 6rem;
  display: grid;
  align-content: center;
  background-position: center;
}
.launch .sky-nav { position: absolute; inset: 12px 0 auto; z-index: 4; }
.launch .sky-nav a, .launch .sky-nav .brand { color: var(--ui-on-sage); }
.launch .brand { font-size: clamp(24px, 3vw, 36px); }
/* The first screen says what Moonshot is and shows it: a kid's idea, the character drawn from it and a page of its adventure (Adam, November 29, 2026). */
.launch-hero { position: relative; z-index: 2; width: min(1160px, 88%); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; column-gap: clamp(32px, 5vw, 80px); }
.invitation { position: relative; z-index: 2; }
.invitation h1 { margin: 0 0 calc(.15em + 26px); max-width: 16ch; font: 600 clamp(44px, 4.6vw, 66px)/1.06 var(--title); letter-spacing: -.03em; text-wrap: balance; color: var(--ui-on-sage); }
/* Measure from the ink: Fraunces descenders hang about .15em below the heading box. */
.invitation h1 span { color: color-mix(in srgb, var(--ui-on-sage) 78%, var(--book-orange)); }
.launch-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; }
.launch-actions a { min-height: 46px; display: inline-flex; align-items: center; font-weight: 700; color: var(--ui-on-sage); }
.launch-actions .front-primary { background: var(--book-orange); color: var(--ui-on-accent); border: 1px solid color-mix(in srgb, var(--book-orange) 55%, var(--book-ink)); border-radius: 46% 54% 49% 51% / 12% 13% 14% 15%; box-shadow: none; padding-inline: 23px; }
.launch-actions a:hover { text-decoration: underline; }
/* The page leads; the character it was drawn from sits on its own sheet beside it, low, with the idea under it.
   The sheets never overlap, so both drawings stay whole (M1). */
.launch-proof { container-type: inline-size; position: relative; margin: 0; display: grid; grid-template-columns: 36fr 5fr 59fr; align-items: end; }
.proof-page { grid-column: 3; grid-row: 1; rotate: 1.2deg; }
.proof-page img, .proof-character img { display: block; width: 100%; height: auto; }
.proof-character { grid-column: 1; grid-row: 1; position: relative; z-index: 1; }
.proof-character .ui-paper { rotate: -4deg; }
.proof-character figcaption { margin-top: 10px; font: italic 600 clamp(14px, 1.15vw, 17px)/1.25 var(--title); color: var(--ui-on-sage); text-wrap: balance; }
/* Tablets stack the hero like a phone, so the page stays large enough to read. */
@media (min-width: 701px) and (max-width: 960px) {
  .launch-hero { grid-template-columns: 1fr; row-gap: 48px; }
  .launch-proof { width: min(100%, 560px); }
}
/* The rocket waits just above the page it is carrying, smaller than when it flies the route, and never over either drawing. */
.departure { --launch-scale: .6; position: absolute; top: -9cqw; left: 44cqw; }
/* Stacked heroes set the page to the right and the pad near its right edge, so the waiting rocket never covers the buttons above it. */
@media (max-width: 960px) { .departure { --launch-scale: .7; left: 78cqw; top: -14cqw; } .launch-proof { justify-self: end; } }
.traveler { position: absolute; z-index: 5; pointer-events: none; width: clamp(225px, 33vw, 545px); left: 75%; top: max(273px, 40.5svh); transform: translate(-50%, -50%); transform-origin: center; }
.flight.is-flying .traveler { left: 0; top: 0; z-index: 5; will-change: transform; } /* Over every picture, heading, line of text and button, resting on its pad or flying the route, never behind (Adam, November 28 and 29, 2026). It ignores clicks, so the buttons under it still work. */
/* Separate pencil illustrations give each layer its own silhouette and scale. */
.cloud { position: absolute; z-index: 0; pointer-events: none; direction: ltr;
  background: center / contain no-repeat; aspect-ratio: 3 / 1; }
.cloud-bank { opacity: .88; background-image: url('/assets/clouds/bank.webp'); }
.cloud-wisp { opacity: .74; background-image: url('/assets/clouds/wisp.webp'); }
.cloud-puff { opacity: .84; background-image: url('/assets/clouds/puff.webp'); }
.cloud-trail { opacity: .8; background-image: url('/assets/clouds/trail.webp'); }

/* Compose each stretch of sky independently, including the gaps between stops. */
.launch .cloud-bank { top: 13%; left: -7%; width: clamp(160px, 32vw, 490px); }
/* A larger cloud fills the open sky between the rocket and the title. */
.launch .cloud-gap { top: 33%; left: 3%; width: clamp(240px, 40vw, 600px); opacity: .9; }
@media (max-width: 700px) { .launch .cloud-gap { top: 47%; left: -6%; width: 72vw; } }
#characters .cloud-trail { bottom: 19%; left: -5%; width: clamp(185px, 29vw, 410px); }
#stories .cloud-puff { top: 3%; left: 2%; width: clamp(135px, 19vw, 265px); }
#stories .cloud-wisp { top: 46%; left: 75%; width: clamp(148px, 22vw, 310px); scale: -1 1; }
#stories .cloud-bank { bottom: 3%; left: -12%; width: clamp(185px, 30vw, 430px); scale: -1 1; }
.observatory .cloud-trail { top: 14%; left: 66%; width: clamp(150px, 22vw, 315px); scale: -1 1; }
.observatory .cloud-puff { bottom: 8%; left: 5%; width: clamp(132px, 20vw, 280px); }
#detail-preview .cloud-wisp { top: 37%; left: 76%; width: clamp(160px, 27vw, 395px); }
.planet-stop { max-width: 1240px; margin: auto; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 7%; padding: clamp(60px, 9vw, 135px) 7%; }
.planet-view { position: relative; text-align: center; }
.planet-view > .color-in-planet { width: min(56%, 208px); margin: auto; }
.observatory .planet-view > .color-in-planet { width: min(68%, 264px); }

.planet-copy { position: relative; z-index: 2; }
/* Every section heading shares one style, a step below the page headline, and
   breaks into even lines with no word left alone (Adam, November 29, 2026, T33). */
.planet-copy h2, .flight .front-section h2 { font: 600 clamp(28px, 3.6vw, 48px)/1.1 var(--title); margin: 0; letter-spacing: -.02em; text-wrap: balance; }
/* The three sections read as how it works (Adam, November 29, 2026: "Dream up a hero, pick their adventure, print and color").
   Each number is a crayon-filled orange badge centered on its heading, with lining figures so a 3 never hangs below the line (Adam, November 29, 2026: "the number isnt aligned"). */
.planet-copy h2:has(.step-number), .flight .front-section h2:has(.step-number) { display: flex; align-items: center; gap: .3em; }
.step-number { flex: none; display: grid; place-items: center; width: 2.05em; height: 2.05em; rotate: -6deg; background: url(/assets/pencil-ring.svg) center / 100% 100% no-repeat, radial-gradient(closest-side, var(--book-orange) 80%, transparent 84%); font-size: .6em; font-weight: 700; line-height: 1; font-variant-numeric: lining-nums; color: var(--book-ink); }
/* "See how!" waits just above the fold and leads to step one; the first screen holds nothing else below it
   (Adam, November 29, 2026: "see how should be right above the fold. a little bit larger"). */
.follow { z-index: 2; position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ui-on-sage, var(--book-ink)); font-weight: 700; font-size: 19px; text-decoration: none; padding: 8px 12px; }
.follow-arrow { width: 30px; height: 22px; transform: rotate(90deg); }
.planet-copy p { max-width: 42ch; margin: 17px 0; line-height: 1.5; }
.planet-copy .sample-row { mix-blend-mode: multiply; }
.planet-copy .sample-row a { background: transparent; border: 0; font-size: 13px; color: var(--book-ink); }
.planet-copy .sample-row img { mix-blend-mode: multiply; height: 75px; }
.observatory { direction: rtl; }
.observatory > * { direction: ltr; }


@media (max-width: 700px) {
  .launch { padding-block: 64px 72px; background-position: 65% center; }
  /* A wide gap between the buttons and the drawings holds the waiting rocket, so it never covers a button, stacked or side by side (Adam, November 29, 2026: "no breathing room"). */
  .launch-hero { width: auto; margin-inline: 7%; grid-template-columns: 1fr; row-gap: 32vw; }
  .flight .launch::before { mask-image: linear-gradient(black 35%, transparent 65%); }
  .invitation h1 { font-size: clamp(32px, 9vw, 44px); max-width: 15ch; }
  .launch-actions { gap: 12px 15px; }
  .launch-actions a { font-size: 14px; }
  .launch-actions .front-primary { padding-inline: 13px; }
  .launch-proof { width: min(100%, 420px); }
  .departure { --launch-scale: .8; top: -17cqw; left: 68cqw; }
  .traveler { width: min(56vw, 275px); top: max(170px, 27svh); left: 61%; }
  .planet-stop { display: block; padding: 38px 7% 48px; }
  .planet-view { display: flex; align-items: center; width: 100%; min-height: 190px; }
  .planet-view > .color-in-planet { width: min(34vw, 131px); margin: 0 0 0 8%; }

  .observatory .planet-view { min-height: 220px; justify-content: center; }
  .observatory .planet-view > .color-in-planet { width: min(42vw, 155px); margin: 0; }

}
/* Side-by-side buttons sit lower, over the waiting rocket's antenna, so give them a little more room (adam-taste T34). */
@media (min-width: 410px) and (max-width: 700px) { .launch-hero { row-gap: 42vw; } }
.sky-washes {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  display: grid; grid-template-rows: repeat(4, 1fr);
  mix-blend-mode: luminosity; opacity: .49;
}
.sky-washes i {
  margin-block: -4rem;
  background: url('/creator-art/sky-background.webp') 65% center / cover;
  mask-image: linear-gradient(transparent, black 12% 88%, transparent);
}
.sky-washes i:nth-child(even) { transform: scaleX(-1); }
.launch::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--book-sage), color-mix(in srgb, var(--book-sage) 80%, transparent) 35%, transparent 68%), url('/creator-art/sky-background.webp') center / cover;
  background-position: inherit;
  mask-image: linear-gradient(black 88%, transparent);
}
.planet-stop, .flight .front-section { position: relative; }
.flight .front-section { border: 0; padding-block: clamp(44px, 7vw, 100px); }
.flight .story-shelf, .flight .front-section h2, .flight .detail-preview > :not(.cloud) { position: relative; z-index: 2; }
.flight .story-shelf span, .flight figcaption, .flight .sample-read { color: var(--book-ink); }
.flight .detail-preview figure { background: transparent; }
.planet-stop { min-height: min(72svh, 700px); }
/* Wide screens: less empty sky between stops, and larger hero art so the first screen is full
   (Adam, November 29, 2026: "a lot of empty space on the page"). Phones keep their own spacing. */
@media (min-width: 701px) {
  .planet-stop { min-height: 0; padding-block: clamp(40px, 5vw, 72px); }
  .flight .front-section { padding-block: clamp(28px, 4vw, 56px); }
}
@media (min-width: 961px) {
  .launch { padding-block: 104px 88px; }
  .launch-hero { width: min(1280px, 92%); grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); column-gap: clamp(32px, 4vw, 64px); }
  /* The rocket is the centerpiece: full size above the page it carries (Adam, November 29, 2026: "the rocket was a center piece, now its kind of an afterthought"). */
  .launch-proof { padding-top: 52%; }
  .departure { --launch-scale: .9; top: 25cqw; left: 66cqw; }
}
.traveler { aspect-ratio: 670 / 640; transform-origin: 57% 73%; }
.rocket-art { width: 100%; height: 100%; }
.is-flying .rocket-art {
  /* Retract the painted plume into the nozzle as the rocket touches down. */
  mask-image: linear-gradient(48deg, transparent var(--plume-cut, 0%), black calc(var(--plume-cut, 0%) + 3%));
}
/* The exhaust is painted into the rocket sprite so it shares its exact heading. */
.color-in-planet { position: relative; z-index: 1; display: block; flex: none; isolation: isolate; }
.color-in-planet > img { display: block; width: 100%; height: auto; }
.color-in-planet.coloring-ready > img { opacity: 0; }
.color-in-planet > canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* Fade the opening sky into the route below, so the section's end never shows as a hard line on the first screen. */
.launch { background-color: transparent; background-image: linear-gradient(var(--book-sage) calc(100% - 160px), transparent); }

.storyfront { background: var(--book-paper); }
}
