/* Sky hero: Moregan's layered Illustrator artwork (assets/sky/vector/), day and night scenes stacked.
   Scrolling zooms out with parallax (sky-hero.js); switching themes zooms in, fades the sun into the moon and
   zooms back out. The hero is a tall scroll track with a sticky full-screen stage. Framing aspect 1600/918. */
.hero.hero--sky{display:block;overflow:visible;isolation:isolate;border-bottom:0;background:var(--sky-end);
  --sky-track:200vh; --sky-wash:240,244,248; --sky-end:#FFFFFF;
  --sky-title:var(--peak-navy); --sky-accent:var(--peak-blue); --sky-lead:var(--slate,#333F4F);
  --sky-btn-bg:var(--peak-navy); --sky-btn-fg:var(--peak-white)}
html[data-peak-theme="dark"] .hero.hero--sky{ --sky-wash:0,27,48; --sky-end:#121C25;
  --sky-title:var(--peak-white); --sky-accent:var(--peak-blue-light); --sky-lead:#D1DEE8;
  --sky-btn-bg:var(--peak-blue-light); --sky-btn-fg:var(--peak-navy-deep)}
.sky-track{position:relative;height:var(--sky-track)}
.sky-stage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;background:var(--sky-end)}
/* The hero fades into the page colour at the bottom (--sky-end: the body colour, white in light mode and #121C25 in dark), so there is no hard edge where the content starts */
.sky-stage::after{content:"";position:absolute;z-index:1;inset:auto 0 0;height:max(260px,38%);pointer-events:none;
  background:linear-gradient(180deg,color-mix(in srgb,var(--sky-end) 0%,transparent) 0%,color-mix(in srgb,var(--sky-end) 0%,transparent) 30%,
    color-mix(in srgb,var(--sky-end) 6%,transparent) 42%,color-mix(in srgb,var(--sky-end) 16%,transparent) 54%,color-mix(in srgb,var(--sky-end) 32%,transparent) 65%,
    color-mix(in srgb,var(--sky-end) 52%,transparent) 75%,color-mix(in srgb,var(--sky-end) 74%,transparent) 85%,color-mix(in srgb,var(--sky-end) 92%,transparent) 94%,var(--sky-end) 100%)}
.page-home .career-callout{border-top:0}
.sky-media{position:absolute;inset:0;overflow:hidden;isolation:isolate}
/* Both scenes stay fully drawn, one over the other; a switch fades out the top one (no decode or repaint mid-switch). */
.sky-scene{position:absolute;inset:0;will-change:opacity}
.sky-scene--day{z-index:2}.sky-scene--night{z-index:1}
/* Lazy art (2026-11-16): only the current theme's scene is drawn, so the other scene's lazy images don't download.
   sky-hero.js marks a scene .is-live when it is needed: on load for the current theme, and on hover, focus or touch
   of the theme button, or at the start of a switch, for the other one. */
html:not([data-peak-theme="dark"]) .sky-scene--night:not(.is-live),html[data-peak-theme="dark"] .sky-scene--day:not(.is-live){display:none}
html[data-peak-theme="dark"] .sky-scene--day{z-index:1}html[data-peak-theme="dark"] .sky-scene--night{z-index:2}
/* Each layer box is the size of its artwork in 1920 x 1080 art space; sky-hero.js positions and scales it. */
.sky-layer{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}
.sky-layer:not([style]){visibility:hidden}   /* until sky-hero.js sizes and places it */
.hero--sky .sky-layer img{position:absolute;left:0;top:0;width:100%;height:100%;display:block;max-width:none}
.sky-media::after{content:"";position:absolute;z-index:3;inset:auto 0 0;height:0;background:linear-gradient(180deg,rgba(var(--sky-wash),0),var(--sky-end))}
/* Two fixed legibility washes, cross-faded on a switch instead of repainting one */
.sky-shade{position:absolute;inset:0;pointer-events:none;will-change:opacity;
  background:linear-gradient(90deg,rgba(var(--w),var(--wash-l)) 0%,rgba(var(--w),var(--wash-m)) 38%,rgba(var(--w),0) 68%),
             linear-gradient(180deg,rgba(var(--w),var(--wash-t)) 0%,rgba(var(--w),0) 22%)}
.sky-shade--light{--w:240,244,248;--wash-l:.5;--wash-m:.18;--wash-t:.3;--pg:#FFFFFF}
.sky-shade--dark{--w:0,27,48;--wash-l:.85;--wash-m:.5;--wash-t:.6;--pg:#121C25;opacity:0}
html[data-peak-theme="dark"] .sky-shade--light{opacity:0}
html[data-peak-theme="dark"] .sky-shade--dark{opacity:1}
.hero--sky .hero-grid{position:relative;z-index:2;height:100%;min-height:0;display:flex;align-items:center}
.hero--sky .hero-copy{width:auto;max-width:100%;padding:88px 0 40px}
/* Soft glow behind the hero copy so it reads over the art. Light and dark versions cross-fade with the theme. */
.hero--sky .hero-copy{position:relative;isolation:isolate}
.hero--sky .hero-copy::before,.hero--sky .hero-copy::after{content:"";position:absolute;z-index:-1;inset:-18% -24% -22% -26%;pointer-events:none;transition:opacity .6s ease}
.hero--sky .hero-copy::before{background:radial-gradient(closest-side,rgba(240,244,248,.8) 0%,rgba(240,244,248,.6) 40%,rgba(240,244,248,0) 100%)}
.hero--sky .hero-copy::after{background:radial-gradient(closest-side,rgba(0,27,48,.7) 0%,rgba(0,27,48,.5) 40%,rgba(0,27,48,0) 100%);opacity:0}
html[data-peak-theme="dark"] .hero--sky .hero-copy::before{opacity:0}
html[data-peak-theme="dark"] .hero--sky .hero-copy::after{opacity:1}
.hero--sky .hero-copy h1{color:var(--sky-title);font-size:min(68px,5.6vw);line-height:1.08;margin:0}
.hero--sky h1 .line{display:block;white-space:nowrap;color:var(--sky-title)}
.hero--sky h1 .line.accent{color:var(--sky-accent)}
.hero--sky .lead{color:var(--sky-lead);font-size:clamp(15px,1.55vw,19px);white-space:nowrap;max-width:none;margin:22px 0 0}
.hero--sky .text-link,.hero--sky .text-link:visited{color:var(--sky-title)}
.hero--sky .button,.hero--sky .button:visited,html[data-peak-theme="dark"] .hero--sky .button{background:var(--sky-btn-bg);color:var(--sky-btn-fg);border-color:var(--sky-btn-bg)}
.hero--sky .hero-controls{z-index:3}
/* Larger theme toggle on the sky hero (V7 default is 10px text) */
.hero--sky .hero-controls{right:24px;bottom:20px;transition:transform .3s ease}
/* Make room for the "Climb to summit" button (summit.js sets peak-summit-shown) so it never covers this toggle */
html.peak-summit-shown .hero--sky .hero-controls{transform:translateY(-60px)}
.hero--sky .hero-controls .sky-theme-toggle{font-size:13px;padding:9px 16px;border-radius:4px;opacity:.9;letter-spacing:.01em}
html:not([data-peak-theme="dark"]) .hero--sky .hero-controls .sky-theme-toggle{color:var(--peak-navy);background:rgba(255,255,255,.7);border-color:rgba(0,59,94,.3)}
html:not([data-peak-theme="dark"]) .hero--sky .hero-controls .sky-theme-toggle:hover{color:var(--peak-navy);background:#fff;opacity:1}
@media (max-width:600px){ .hero--sky .hero-controls{right:16px;bottom:16px} .hero--sky .hero-controls .sky-theme-toggle{font-size:12px;padding:8px 14px} }
.sky-cue{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);z-index:2;font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--ui-muted);display:flex;flex-direction:column;align-items:center;gap:8px;transition:opacity .3s}
.sky-cue i{display:block;width:1px;height:34px;background:linear-gradient(var(--ui-muted),transparent)}
/* Shown only if an art file fails to load (review aid for the draft) */
.sky-missing{position:fixed;left:12px;bottom:12px;z-index:20;margin:0;padding:8px 12px;border-radius:3px;background:#FFF3CF;color:#333;font:600 12px/1.4 system-ui,sans-serif;max-width:90vw}
/* Light mode home header: blue wordmark and navy links over the bright sky */
html:not([data-peak-theme="dark"]) .page-home .site-header--overlay{background:linear-gradient(180deg,rgba(240,244,248,.55),transparent)}
html:not([data-peak-theme="dark"]) .page-home .site-header--overlay nav a,html:not([data-peak-theme="dark"]) .page-home .site-header--overlay nav a:visited{color:var(--peak-navy)}
html:not([data-peak-theme="dark"]) .page-home .site-header--overlay .brand .logo-white{display:none}
html:not([data-peak-theme="dark"]) .page-home .site-header--overlay .brand .logo-blue{display:block}
/* Homepage header stays at the top while scrolling. Once the sky animation finishes (sky-hero.js adds .is-solid),
   a solid bar in the page colour fades in behind it: light page in light mode, dark page in dark mode. */
html body.page-home .site-header.site-header--overlay{position:fixed}
html{scroll-padding-top:88px}
.page-home .site-header--overlay::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:var(--ui-page);border-bottom:1px solid var(--ui-border);box-shadow:0 2px 12px rgba(0,20,40,.08);opacity:0;transition:opacity .3s ease}
.page-home .site-header--overlay.is-solid::before{opacity:1}
.page-home .site-header--overlay .header-inner{transition:min-height .3s ease}
.page-home .site-header--overlay.is-solid .header-inner{min-height:72px}
.page-home .site-header--overlay.is-solid nav a,.page-home .site-header--overlay.is-solid .brand img{text-shadow:none}
html:not([data-peak-theme="dark"]) .page-home .site-header--overlay.is-solid nav a:hover{color:var(--peak-blue)}
@media (prefers-reduced-motion:reduce){ .page-home .site-header--overlay::before,.page-home .site-header--overlay .header-inner{transition:none} }
/* Viewport taller than the art: whole frame edge to edge at the top, copy below it */
@media (max-aspect-ratio:1600/918){
  /* At least 68% of the screen tall, so portrait phones and tablets get a real scene instead of a thin strip.
     sky-hero.js crops the sides and keeps the sun or moon in view. */
  .sky-media{inset:0 0 auto;height:max(calc(100vw * 918 / 1600),68svh)}
  .sky-media::after{height:28%}
  .sky-shade{background:linear-gradient(180deg,rgba(var(--w),var(--wash-t)) 0%,rgba(var(--w),0) 18%)}
  .hero--sky .hero-grid{align-items:flex-end;padding-bottom:96px}
}
@media (max-width:720px){ .hero--sky .lead{white-space:normal} }
@media (max-width:600px){
  .hero--sky .hero-copy h1{font-size:clamp(30px,9vw,40px)}
  .hero--sky h1 .line{white-space:normal}
  .sky-cue{display:none}
}
@media (prefers-reduced-motion:reduce){ .sky-track{height:100svh} .hero--sky .hero-controls{transition:none} }
