/* ============================================================
   shared/sky/page-sky.css: the page-wide sky's layers and the light-mode grounds of its five concepts.
   Load AFTER the page's own stylesheet (concepts/orbit-path/style.css or its copy, the kit, the version's own).
   page-sky.js sets html[data-page-sky="1".."5"] and the measured --ps-* positions (page px):
     --ps-hero  bottom of the hero / page head      --ps-s1   top of the second section
     --ps-mid   halfway from the hero to the footer  --ps-foot top of the footer      --ps-doc  page height
   Every color is a brand hex from current/assets/css/main.css. Stars are drawn by page-sky.js on its own canvas; nothing
   here draws a star. The dark theme's grounds stay the page's own near-black (#010210): only concept 2 tints its top.
   ============================================================ */

/* ---------- the layers ---------- */
.ps-ground { position: absolute; left: 0; top: 0; width: 100%; z-index: 0; pointer-events: none; overflow: hidden; }
.ps-art { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.ps-bands { position: absolute; inset: 0; }
.ps-stars { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.ps-cover { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* the page's own grounds step aside so the sky shows (the light .voyage gradient, the light body ice) */
html[data-page-sky] .voyage,
html[data-page-sky][data-theme="light"][data-sky] .voyage { background: none; }

/* ---------- the footer sits on the sky ----------
   Dark, every concept: the footer's own plate turns translucent so the quiet far stars carry on under it; page-sky.js
   holds every star under its text to a tenth of its strength, so the words keep their contrast. */
html[data-page-sky]:not([data-theme="light"]) .site-footer { background: rgba(3, 9, 33, 0.72); border-top-color: rgba(0, 127, 235, 0.22); }

/* Light, concepts whose ground is night or deep blue at the bottom (1, 2, 4, 5): the footer is transparent on that
   ground and wears the dark theme's light text; its lockup is the icy one (the page script swaps it). */
html[data-page-sky="1"][data-theme="light"] .site-footer,
html[data-page-sky="2"][data-theme="light"] .site-footer,
html[data-page-sky="4"][data-theme="light"] .site-footer,
html[data-page-sky="5"][data-theme="light"] .site-footer {
  background: transparent; border-top-color: rgba(217, 246, 246, 0.24);
  --text: #ffffff; --text-dim: #d9f6f6; --label: #7fffff; --line: rgba(217, 246, 246, 0.24); --line-strong: rgba(217, 246, 246, 0.6);
  --grad-cta: linear-gradient(100deg, #36e0c9 0%, #7fffff 100%);
}
/* concept 1, light: its ground stays bright blue to the bottom, so the footer carries a thin indigo veil (the stars and the
   blue still show through it) and its fine print keeps a margin over 4.5:1 rather than sitting on the line */
html[data-page-sky="1"][data-theme="light"] .site-footer { background: rgba(10, 16, 64, 0.32); }
/* concept 3, light: the river ends at the last station; the footer stays the page's pale reading surface */

/* ---------- the star and its trail can only add light (light) ----------
   The concept pages draw the comet with its dark recipe in both themes. That recipe adds light on its own canvas, but the
   canvas still lands on the page as ordinary paint, so where the resting star sits on the logo's white halo its cyan
   glow came out a little DARKER than the white behind it (151 px, a luminance drop of 0.078, run r1 concept 4). Screen
   blending makes the canvas add light to whatever is behind it, so it can never darken anything; on the blue and night
   grounds it looks the same as before. Light theme only: the dark theme is untouched. */
html[data-page-sky][data-theme="light"] .comet-canvas { mix-blend-mode: screen; }

/* ---------- station nodes on a blue or night ground (light) ----------
   The page draws them deep teal on pale; on these grounds a node is a light ring, lit mint with a white edge. */
html[data-page-sky][data-theme="light"] .orbit-node { fill: rgba(255, 255, 255, 0.14); stroke: #d9f6f6; }
html[data-page-sky][data-theme="light"] .orbit-node.lit { fill: #36e0c9; stroke: #ffffff; }

/* ---------- panels below the hero cast a deeper, indigo shadow on a blue ground (light) ----------
   Only below the hero: the hero clips its plate's shadow at its own bottom edge, so a darker shadow there would draw a
   hard line across the sky. */
html[data-page-sky="1"][data-theme="light"] :is(.station-copy, .screen, .leader-plate, .closing-plate, .sl-copy),
html[data-page-sky="2"][data-theme="light"] :is(.station-copy, .screen, .leader-plate, .closing-plate, .sl-copy) { box-shadow: 0 24px 60px rgba(10, 16, 64, 0.3); }

/* ============================================================ the light grounds ============================================================ */

/* 1 · Fading Deep Field: below the hero the ground stays the hero's bright brand-blue sky, deepening slightly with depth
   (to #1a53f0 behind the footer, where its light text needs it). White stars fade on it the way they do in the dark. */
html[data-page-sky="1"][data-theme="light"] .ps-ground {
  background: linear-gradient(to bottom,
    #20b4c4 0, #20b4c4 calc(var(--ps-hero) - 240px),
    #007feb calc(var(--ps-hero) + 160px),
    #007feb var(--ps-mid),
    #1a53f0 calc(var(--ps-foot) - 160px), #1a53f0 100%);
}

/* 2 · Day to Night: bright day at the hero, deeper blue mid-page, deep indigo night at the footer */
html[data-page-sky="2"][data-theme="light"] .ps-ground {
  background: linear-gradient(to bottom,
    #20b4c4 0, #20b4c4 calc(var(--ps-hero) - 220px),
    #007feb calc(var(--ps-hero) + 140px),
    #1a53f0 calc(var(--ps-s1) + 260px),
    #0a1040 calc(var(--ps-mid) + 500px), #0a1040 100%);
}
/* dark: the night deepens too, from the hero's indigo-tinted navy to the page's near-black */
html[data-page-sky="2"]:not([data-theme="light"]) .ps-ground {
  background: linear-gradient(to bottom, #030921 0, #030921 var(--ps-hero), #010210 var(--ps-mid), #010210 100%);
}

/* 3 · Milky Way River: the reading ground stays pale; the river of night is painted by page-sky.js along the path */
html[data-page-sky="3"][data-theme="light"] .ps-ground { background: linear-gradient(to bottom, #e1f6f8 0, #e1f6f8 var(--ps-mid), #d3f0f3 100%); }

/* 4 · Night Bands: pale reading sections; between them, deep-blue night bands where the stars live. The bands are placed
   by page-sky.js; the pale zones over them (.ps-zone, in the page's own stacking context above the comet) feather into
   each band's brand-blue edge so the night opens softly. */
html[data-page-sky="4"][data-theme="light"] .ps-ground { background: #e1f6f8; }
/* A band is a flat night with short edges: the first round ramped brand blue to indigo and back across the whole band,
   and on a 150 px gap that symmetric ramp read as a glossy blue tube, not as sky. Now the night is flat (its texture is
   the nebula wisps page-sky.js paints inside it) and the edges are short, so a band reads as a window onto the night. */
.ps-band {
  position: absolute; left: 0; width: 100%;
  background: linear-gradient(to bottom, #1a53f0 0, #0a1040 38px, #0a1040 calc(100% - 38px), #1a53f0 100%);
}
.ps-band:last-child { background: linear-gradient(to bottom, #1a53f0 0, #0a1040 48px, #0a1040 100%); }
/* 28 px feather = ZONE_FEATHER in page-sky.js */
.ps-zone {
  position: absolute; left: 0; width: 100%;
  background: linear-gradient(to bottom, rgba(225, 246, 248, 0) 0, #e1f6f8 28px, #e1f6f8 calc(100% - 28px), rgba(225, 246, 248, 0) 100%);
}

/* 5 · Twilight Glow: the whole ground is a twilight in her colors: bright blue, the teal mix swept across it (painted by
   page-sky.js), deep indigo lower down; white panels glow softly at their edges, like lit windows at dusk */
html[data-page-sky="5"][data-theme="light"] .ps-ground {
  background: linear-gradient(to bottom,
    #20b4c4 0, #20b4c4 calc(var(--ps-hero) - 240px),
    #007feb calc(var(--ps-hero) + 160px),
    #0aaaaf calc(var(--ps-mid) - 300px),
    #1a53f0 calc(var(--ps-mid) + 450px),
    #0a1040 calc(var(--ps-foot) - 60px), #0a1040 100%);
}
html[data-page-sky="5"][data-theme="light"] :is(.station-copy, .screen, .screen-cap, .leader-plate, .closing-plate, .sl-copy) {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 34px 4px rgba(255, 255, 255, 0.34), 0 0 110px 16px rgba(54, 224, 201, 0.3), 0 26px 60px rgba(10, 16, 64, 0.3);
}
