/* LX (j, 2026-11-26: "lets go with it"): the landing page is one day on the island. Layered on styles.css (the site's
   tokens and parts). The sky behind the page is the day: dawn, morning, late morning, noon, afternoon, golden hour, dusk,
   night (the app's own skies: tools/art/make_icons.py's pale, deep, dusk and night, with a dawn and a golden hour
   between). The panels keep the visitor's own light or dark (N1-A); the section names are lettered (cream in an ink
   outline) so they read on any sky.
   LX-2 (j's go, 2026-11-26, after the critique):
   - each part owns its hour: the sky turns to it as that part comes into view (a view timeline per part, so the hour
     and the part agree on any screen), never by the page's length;
   - D-A: in dark, the day's hours are dimmed toward evening, so dark panels never sit on glare;
   - the sun sets below the edge before the moon rises (nothing crosses the screen), and is smaller on a phone;
   - Reduce Motion, and a browser without scroll-driven animation: each part on its own still band of its hour, each
     band starting where the one above ended (no seams);
   - the places vary: the island at each hour stands on the sky as a leaning cut-out with the words on paper beside it;
   - S-A: the night's help is calm (Nunito, the 48px rows, gold edge: the top piece) and /support is the same night.
   N2: in dark, only the top piece (the crisis panel) keeps the gold edge; cards, phones and rows rest on ink. */

@property --sky-top { syntax: '<color>'; inherits: true; initial-value: #c9dcf0; }
@property --sky-bot { syntax: '<color>'; inherits: true; initial-value: #ffe2c4; }

:root {
  --drop-card: var(--drop); --letter: #fff7d6;
  /* every card on the page is one width: Meet Juno's and Your Island's (j, 2026-11-27) */
  --row: 60rem;
  /* the hours (top, bottom) */
  --h-dawn-t: #c9dcf0; --h-dawn-b: #ffe2c4;
  --h-morning-t: #a9d4fb; --h-morning-b: #eaf6ff;
  --h-forenoon-t: #6fb6f0; --h-forenoon-b: #c8e8ff;
  --h-noon-t: #3d9be6; --h-noon-b: #a6dcff;
  --h-afternoon-t: #5aa3e0; --h-afternoon-b: #ffe9b8;
  --h-golden-t: #e98a6f; --h-golden-b: #ffd38e;
  --h-dusk-t: #2e2f72; --h-dusk-b: #f0946c;
  --h-night-t: #140f22; --h-night-b: #2e2f72;
}
@media (prefers-color-scheme: dark) {
  :root {
    --drop-card: #0b0710;
    /* D-A: the day, dimmed toward evening */
    --h-dawn-t: color-mix(in oklab, #c9dcf0 42%, #1c1d48); --h-dawn-b: color-mix(in oklab, #ffe2c4 42%, #1c1d48);
    --h-morning-t: color-mix(in oklab, #a9d4fb 42%, #1c1d48); --h-morning-b: color-mix(in oklab, #eaf6ff 42%, #1c1d48);
    --h-forenoon-t: color-mix(in oklab, #6fb6f0 42%, #1c1d48); --h-forenoon-b: color-mix(in oklab, #c8e8ff 42%, #1c1d48);
    --h-noon-t: color-mix(in oklab, #3d9be6 42%, #1c1d48); --h-noon-b: color-mix(in oklab, #a6dcff 42%, #1c1d48);
    --h-afternoon-t: color-mix(in oklab, #5aa3e0 42%, #1c1d48); --h-afternoon-b: color-mix(in oklab, #ffe9b8 42%, #1c1d48);
    --h-golden-t: color-mix(in oklab, #e98a6f 50%, #1c1d48); --h-golden-b: color-mix(in oklab, #ffd38e 50%, #1c1d48);
    --h-dusk-t: color-mix(in oklab, #2e2f72 80%, #140f22); --h-dusk-b: color-mix(in oklab, #f0946c 45%, #1c1d48);
  }
}
body.day .help-pill { margin-left: auto; }
body.day { background: var(--h-dawn-t); }
body.day > .sky { display: none; }

/* each part's hour, and the hour before it (where its still band starts) */
.at-morning { --t: var(--h-morning-t); --b: var(--h-morning-b); --pb: var(--h-morning-t); }
.at-forenoon { --t: var(--h-forenoon-t); --b: var(--h-forenoon-b); --pb: var(--h-morning-b); }
.at-noon { --t: var(--h-noon-t); --b: var(--h-noon-b); --pb: var(--h-forenoon-b); }
.at-afternoon { --t: var(--h-afternoon-t); --b: var(--h-afternoon-b); --pb: var(--h-noon-b); }
.at-golden { --t: var(--h-golden-t); --b: var(--h-golden-b); --pb: var(--h-afternoon-b); }
.at-dusk { --t: var(--h-dusk-t); --b: var(--h-dusk-b); --pb: var(--h-golden-b); }
.at-night { --t: var(--h-night-t); --b: var(--h-night-b); --pb: var(--h-dusk-b); }

/* the fallback (and Reduce Motion): each part on its own band, from where the band above ended; no fixed sky */
.daysky { display: none; }
.place { background: linear-gradient(to bottom, var(--pb), color-mix(in oklab, var(--pb), var(--t)) 22%, var(--t) 46%, var(--b)); }

/* ---------- the day, scrolled ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    body.day { timeline-scope: --h1, --h2, --h3, --h4, --h5, --h6, --h7; }
    .at-morning { view-timeline-name: --h1; }
    .at-forenoon { view-timeline-name: --h2; }
    .at-noon { view-timeline-name: --h3; }
    .at-afternoon { view-timeline-name: --h4; }
    .at-golden { view-timeline-name: --h5; }
    .at-dusk { view-timeline-name: --h6; }
    .at-night { view-timeline-name: --h7; }
    .place { background: none; }
    /* each part turns the sky from the hour before to its own as it comes into view; the last one begun holds */
    .daysky, .orb, .stars { animation-duration: auto; animation-timing-function: linear; animation-fill-mode: forwards; animation-range: entry 10% cover 45%; }
    .daysky {
      display: block; position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
      --sky-top: var(--h-dawn-t); --sky-bot: var(--h-dawn-b);
      background: linear-gradient(to bottom, var(--sky-top), var(--sky-bot));
      animation-name: sky1, sky2, sky3, sky4, sky5, sky6, sky7;
      animation-timeline: --h1, --h2, --h3, --h4, --h5, --h6, --h7;
    }
    .orb { animation-name: sun1, sun2, sun3, sun4, sun5, sun6, moon7; animation-timeline: --h1, --h2, --h3, --h4, --h5, --h6, --h7; }
    .stars { animation-name: stars6, stars7; animation-timeline: --h6, --h7; }
  }
}
@keyframes sky1 { from { --sky-top: var(--h-dawn-t); --sky-bot: var(--h-dawn-b); } to { --sky-top: var(--h-morning-t); --sky-bot: var(--h-morning-b); } }
@keyframes sky2 { from { --sky-top: var(--h-morning-t); --sky-bot: var(--h-morning-b); } to { --sky-top: var(--h-forenoon-t); --sky-bot: var(--h-forenoon-b); } }
@keyframes sky3 { from { --sky-top: var(--h-forenoon-t); --sky-bot: var(--h-forenoon-b); } to { --sky-top: var(--h-noon-t); --sky-bot: var(--h-noon-b); } }
@keyframes sky4 { from { --sky-top: var(--h-noon-t); --sky-bot: var(--h-noon-b); } to { --sky-top: var(--h-afternoon-t); --sky-bot: var(--h-afternoon-b); } }
/* (blue into coral through a warm lilac, never grey) */
@keyframes sky5 {
  from { --sky-top: var(--h-afternoon-t); --sky-bot: var(--h-afternoon-b); }
  50% { --sky-top: color-mix(in oklab, var(--h-golden-t) 55%, #9a7fd0); --sky-bot: color-mix(in oklab, var(--h-golden-b) 70%, #ffc9b0); }
  to { --sky-top: var(--h-golden-t); --sky-bot: var(--h-golden-b); }
}
@keyframes sky6 { from { --sky-top: var(--h-golden-t); --sky-bot: var(--h-golden-b); } to { --sky-top: var(--h-dusk-t); --sky-bot: var(--h-dusk-b); } }
@keyframes sky7 { from { --sky-top: var(--h-dusk-t); --sky-bot: var(--h-dusk-b); } to { --sky-top: var(--h-night-t); --sky-bot: var(--h-night-b); } }

/* the stars come out at dusk */
.stars {
  position: absolute; inset: 0; opacity: 0;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 27% 42%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 44% 12%, #fff, transparent), radial-gradient(1px 1px at 63% 30%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 78% 9%, #fff, transparent), radial-gradient(1px 1px at 88% 46%, #fff, transparent),
    radial-gradient(1px 1px at 8% 64%, #fff, transparent), radial-gradient(1.5px 1.5px at 52% 58%, #fff, transparent),
    radial-gradient(1px 1px at 70% 72%, #fff, transparent), radial-gradient(1px 1px at 33% 84%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 92% 22%, #fff, transparent), radial-gradient(1px 1px at 18% 34%, #fff, transparent);
}
@keyframes stars6 { from { opacity: 0; } to { opacity: 0.35; } }
@keyframes stars7 { from { opacity: 0.35; } to { opacity: 0.85; } }

/* the sun crosses the sky high up and sets below the edge; the moon rises on the other side once it is gone (the swap
   happens while both are out of sight: nothing streaks across) */
.orb {
  position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%; opacity: 0;
  border: 3px solid #221a2e; box-shadow: 3px 3px 0 #221a2e; background: #ffe680;
}
/* the sun keeps out of the headings' lane: it rises in the left margin, crosses behind the bar at noon, and sets in the
   right margin; on a phone (no margins) the sky's colour carries the hour, and only the moon comes out, at night */
@media (max-width: 700px) {
  .orb { width: 34px; height: 34px; border-width: 2.5px; box-shadow: 2px 2px 0 #221a2e; }
  .daysky .orb { animation-name: moon7; animation-timeline: --h7; }
}
@keyframes sun1 { from { opacity: 1; transform: translate(3vw, 46vh); background: #ffd9a0; } to { opacity: 1; transform: translate(5vw, 26vh); background: #ffe680; } }
@keyframes sun2 { from { opacity: 1; transform: translate(5vw, 26vh); background: #ffe680; } to { opacity: 1; transform: translate(8vw, 12vh); background: #fff0a0; } }
@keyframes sun3 { from { opacity: 1; transform: translate(8vw, 12vh); background: #fff0a0; } to { opacity: 1; transform: translate(47vw, -1vh); background: #fff3a8; } }
@keyframes sun4 { from { opacity: 1; transform: translate(47vw, -1vh); background: #fff3a8; } to { opacity: 1; transform: translate(88vw, 12vh); background: #ffd23f; } }
@keyframes sun5 { from { opacity: 1; transform: translate(88vw, 12vh); background: #ffd23f; } to { opacity: 1; transform: translate(91vw, 34vh); background: #ff9d5c; } }
@keyframes sun6 { from { opacity: 1; transform: translate(91vw, 34vh); background: #ff9d5c; } to { opacity: 1; transform: translate(93vw, 108vh); background: #ff7a3d; } }
@keyframes moon7 { from { opacity: 1; transform: translate(4vw, 108vh); background: #e8e6ff; } to { opacity: 1; transform: translate(6vw, 14vh); background: #f3f1ff; } }

/* ---------- the places ---------- */
.place {
  display: grid; justify-items: center; gap: 22px; text-align: center;
  padding: 76px max(20px, env(safe-area-inset-right)) 28px max(20px, env(safe-area-inset-left));
}
.place:last-of-type { padding-bottom: 76px; }
.lettered {
  font-family: var(--display); font-weight: 400; font-size: clamp(2.3rem, 3vw + 1.5rem, 3.6rem); letter-spacing: 2px; line-height: 1;
  color: var(--letter); -webkit-text-stroke: 6px #221a2e; paint-order: stroke fill; text-shadow: 4px 4px 0 #221a2e;
  max-width: 18ch; text-wrap: balance;
}
.place .panel { box-shadow: 6px 6px 0 var(--drop-card); }

/* a place: one paper card, its picture inside (a close shot of the island at that moment, all one size) and its words
   beside it; j (2026-11-27): every card the width of Meet Juno's and Your Island's, the side alternating */
.place-panel {
  width: 100%; max-width: var(--row); text-align: left;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: 26px; align-items: center; padding: 22px 24px;
}
.place-panel.is-flipped { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.place-panel.is-flipped > .place-pic { order: 2; }
.place-words { display: grid; gap: 10px; min-width: 0; justify-items: center; text-align: center; }
/* C1 (j, 2026-11-27): the cards' words centred, as Your Island's are; short blocks, balanced line by line */
.place-words .lead { max-width: none; }
.place-words p { text-wrap: balance; }
.place-pic { display: block; width: 100%; height: auto; min-width: 0; border: 2.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--drop-card); }
/* K1 (j, 2026-11-27): on desktop the words hold their half of the card (they read as a caption at 1.08rem) */
@media (min-width: 900px) {
  .place-words { gap: 14px; padding-inline: 8px; }
  .place-words .lead { font-size: clamp(1.55rem, 0.9vw + 1.1rem, 2rem); line-height: 1.25; }
  .place-words p:not(.lead) { font-size: 1.2rem; line-height: 1.6; }
}
@media (max-width: 600px) {
  .place-panel, .place-panel.is-flipped { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
  .place-panel.is-flipped > .place-pic { order: 0; }
}

.island-panel { width: 100%; max-width: var(--row); justify-items: center; text-align: center; padding: 26px 24px 28px; }
.island-panel .days img { box-shadow: 3px 3px 0 var(--drop-card); }

.place .private { width: 100%; max-width: var(--row); justify-items: start; text-align: left; padding: 24px 24px 26px; }
.place .private .lead { max-width: none; justify-self: center; text-align: center; } /* C2: only the card's top line centred; the points and Free to Grow stay left */
.place .points { margin-top: 6px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .place .points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.points h3 { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: 1px; line-height: 1.1; }
.price { width: 100%; display: grid; gap: 6px; margin-top: 10px; padding-top: 16px; border-top: 2.5px dashed var(--line); }
.price h3 { margin: 0; font: 400 1.6rem/1.1 var(--display); letter-spacing: 1px; }

.place .faq { max-width: var(--row); }
.place .faq-item { box-shadow: 3px 3px 0 var(--drop-card); }

/* ---------- night: help first, calm, the top piece; the lantern beside it ---------- */
.night {
  width: 100%; max-width: var(--row); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 30px; align-items: center; text-align: left;
}
.crisis-panel, .place .crisis-panel { padding: 22px 22px 24px; gap: 14px; box-shadow: 6px 6px 0 #ffd23f; }
.calm-title { margin: 0; font: 800 clamp(1.5rem, 1vw + 1.2rem, 1.9rem)/1.2 var(--sans); letter-spacing: 0; color: var(--ink); text-wrap: balance; }
.crisis-rows a { background: var(--page); }
.lantern {
  display: block; width: 100%; height: auto;
  border: var(--bw-lg) solid #221a2e; border-radius: var(--radius); box-shadow: 6px 6px 0 #221a2e; transform: rotate(0.8deg);
}
@media (max-width: 760px) { .night { grid-template-columns: minmax(0, 1fr); } }
.night-line { margin-top: 10px; font-weight: 800; font-size: clamp(1.25rem, 1.2vw + 1rem, 1.6rem); line-height: 1.3; color: #fff7d6; text-wrap: balance; text-shadow: 0 2px 0 #221a2e; }
.at-night .soon-label { color: #fff7d6; background: rgba(24, 17, 46, 0.55); border: 2px solid rgba(255, 247, 214, 0.7); }

/* the foot sits in the night too */
body.day .site-foot { margin-top: 0; background: #140f22; color: #cfc4dc; border-top-color: rgba(255, 247, 214, 0.08); }
body.day .site-foot .foot { color: #cfc4dc; }
body.day .site-foot .brand-link, body.day .site-foot a { color: #ff8aa0; }
body.day .site-foot a:focus-visible { outline-color: #ff8aa0; }
body.day .foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
@supports (animation-timeline: view()) { @media (prefers-reduced-motion: no-preference) { body.day:not(.night-page):not(.legal-page) .site-foot { background: transparent; } } }
/* (critique 2026-11-28: the legal pages have no moving sky, so their foot keeps its night ground: it measured 1.3-2.2:1 on the morning) */

/* ---------- the legal pages: a still morning (K2); Support in the bar as everywhere ---------- */
body.legal-page { background: linear-gradient(to bottom, var(--h-morning-t), var(--h-morning-b)) fixed; }
body.legal-page .legal { padding-top: 28px; }
body.legal-page .back a { color: #221a2e; font-weight: 800; } /* (on the morning sky: ink; dark: cream) */
@media (prefers-color-scheme: dark) { body.legal-page .back a { color: #fff7d6; } }
body.legal-page .lost { padding-top: 32px; }

/* ---------- /support: the same night (S-A) ---------- */
body.night-page { background: #140f22; }
.daysky.is-night { display: block; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, #140f22, #2e2f72); animation: none; }
.daysky.is-night .stars { opacity: 0.85; animation: none; }
.night-page .page-head .brand-link { color: #ff8aa0; }
.night-page .support h1 { color: #fff7d6; text-shadow: 0 2px 0 #221a2e; text-wrap: balance; }
.night-page .support .lantern { margin-top: 4px; }
.night-page .back a { color: #ff8aa0; }
