/* Home hero: a dark field at night. As the page scrolls a white sun rises from the left and climbs to noon at
   the top centre, and the hinged panels at the bottom swing to face it. Always dark, in both themes.
   Without JavaScript, or with reduced motion, it shows the noon scene and does not pin. */

.sunhero{--field-h:clamp(100px,18vh,170px);--sky-gap:84px;position:relative;background:#09081a;color:#fff}
.sunhero-pin{position:relative;display:flex;flex-direction:column;overflow:hidden;
  height:max(calc(100vh - var(--hh,90px)),520px);
  height:max(calc(100svh - var(--hh,90px)),520px);
  background:radial-gradient(130% 95% at 50% 100%,#15132f 0,#0a0919 58%,#06050f 100%)}
.sunhero.is-pinned{height:calc(max(calc(100vh - var(--hh,90px)),520px) + var(--travel,100vh))}
.sunhero.is-pinned{height:calc(max(calc(100svh - var(--hh,90px)),520px) + var(--travel,100vh))}
.sunhero.is-pinned .sunhero-pin{position:sticky;top:var(--hh,90px)}

/* sky: stars that fade at dawn, the glow around the sun, the sun */
.sunhero-sky{position:absolute;inset:0;z-index:0;--glow:.9;--night:.0;pointer-events:none}
.sunhero-sky .stars{position:absolute;inset:0;opacity:var(--night);
  background:
    radial-gradient(1.4px 1.4px at 8% 18%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 17% 52%,#cfd6ff 50%,transparent 51%),
    radial-gradient(1.6px 1.6px at 26% 12%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 34% 36%,#cfd6ff 50%,transparent 51%),
    radial-gradient(1.2px 1.2px at 43% 22%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 58% 15%,#cfd6ff 50%,transparent 51%),
    radial-gradient(1.5px 1.5px at 66% 40%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 74% 20%,#cfd6ff 50%,transparent 51%),
    radial-gradient(1.3px 1.3px at 83% 10%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 91% 46%,#cfd6ff 50%,transparent 51%),
    radial-gradient(1.2px 1.2px at 96% 24%,#fff 50%,transparent 51%),radial-gradient(1px 1px at 3% 60%,#cfd6ff 50%,transparent 51%)}
.sun{position:absolute;left:50%;top:40px;width:0;height:0}
.sun-halo{position:absolute;left:-560px;top:-560px;width:1120px;height:1120px;border-radius:50%;opacity:var(--glow);
  background:radial-gradient(circle,rgba(255,255,255,.26) 0,rgba(150,140,255,.15) 20%,rgba(57,42,130,.08) 42%,transparent 66%)}
.sun-disc{position:absolute;left:-28px;top:-28px;width:56px;height:56px;border-radius:50%;background:#fff;
  box-shadow:0 0 28px 12px rgba(255,255,255,.85),0 0 90px 42px rgba(255,255,255,.34)}

/* copy and facts sit above the field of panels */
.sunhero-copy{position:relative;z-index:3;flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding-top:var(--sky-gap)}
.sunhero-copy .eyebrow{color:#fff;opacity:.85;margin-bottom:12px}
.sunhero-copy h1{color:#fff;font-size:clamp(30px,min(3.7vw,6.4vh),46px);font-weight:800;line-height:1.1;max-width:22ch}
.sunhero-copy .sub{margin:12px auto 20px;max-width:58ch;color:#d4d3f2;font-size:clamp(15px,1.5vw,18px)}
.sunhero-copy .hero-actions{justify-content:center}
.sunhero-facts{position:relative;z-index:3;display:grid;grid-template-columns:repeat(4,1fr);margin-bottom:var(--field-h)}
.fact{padding:2px 14px;text-align:center;border-left:1px solid rgba(255,255,255,.14)}
.fact:first-child{border-left:0}
.fact b{display:block;white-space:nowrap;font-family:var(--head);font-size:clamp(24px,3vw,38px);line-height:1.1;color:#fff}
.fact b em{font-style:normal;color:#ff6a74}
.fact>span{display:block;margin-top:4px;font-size:13px;line-height:1.3;color:#b7b6d6}
.fact b span{display:inline;margin:0;font-size:inherit;color:inherit}

/* the field of hinged panels (built by hero.js; the static one is the no-JavaScript fallback) */
.sunhero-field{position:absolute;left:0;right:0;bottom:0;height:var(--field-h);z-index:2;pointer-events:none}
.sunhero-field svg{display:block;width:100%;height:100%}
.field-live{filter:drop-shadow(0 -3px 12px rgba(190,205,255,var(--glint,.3)))}
.field-live[hidden],.field-static[hidden]{display:none}

@media(max-height:700px){
  .sunhero{--sky-gap:66px;--field-h:100px}
  .sunhero-copy .eyebrow{display:none}
  .sunhero-copy h1{max-width:30ch}
  .sunhero-copy .sub{margin:10px auto 14px;font-size:15px}
  .fact b{font-size:clamp(22px,2.6vw,30px)}
  .fact>span{font-size:12px;margin-top:3px}
}
@media(max-width:700px){
  .sunhero{--sky-gap:76px;--field-h:clamp(84px,12vh,104px)}
  .sunhero-copy{padding-inline:20px}
  .sunhero-copy .eyebrow{margin-bottom:8px}
  .sunhero-copy h1{font-size:clamp(26px,7.4vw,32px);max-width:none}
  .sunhero-copy .sub{font-size:15px;margin:10px auto 16px}
  .sunhero-facts{grid-template-columns:repeat(2,1fr);row-gap:4px}
  .fact{padding:0 8px}
  .fact:nth-child(3){border-left:0}
  .fact b{font-size:clamp(21px,6.4vw,26px)}
  .fact>span{font-size:11px;margin-top:2px}
}
@media(prefers-reduced-motion:reduce){.sun-halo,.sun-disc{transition:none}}

/* small phones: a shorter screen leaves less room, so everything tightens */
@media(max-width:700px) and (max-height:700px){
  .sunhero{--sky-gap:58px;--field-h:80px}
  .sunhero-copy .eyebrow{display:none}
  .sunhero-copy h1{font-size:clamp(23px,6.6vw,28px)}
  .sunhero-copy .sub{font-size:13.5px;margin:8px auto 12px}
  .sunhero-copy .btn{padding:11px 18px;font-size:14px}
  .fact b{font-size:clamp(19px,5.6vw,23px)}
  .fact>span{font-size:10.5px}
}
/* landscape phones: no pinning, the hero just flows (hero.js shows the noon scene) */
@media(max-height:520px){
  .sunhero-pin{height:auto;min-height:0}
  .sunhero.is-pinned{height:auto}
  .sunhero.is-pinned .sunhero-pin{position:relative;top:auto}
  .sunhero{--sky-gap:60px;--field-h:84px}
  .sunhero-copy{padding-top:var(--sky-gap);padding-bottom:12px}
  .sunhero-copy .eyebrow{display:none}
  .sunhero-copy h1{font-size:clamp(24px,4.4vw,34px)}
  .sunhero-copy .sub{margin:8px auto 14px;font-size:14px}
}

/* the narrowest phones: both hero buttons stay on one row */
@media(max-width:360px){
  .sunhero-copy .hero-actions{gap:10px}
  .sunhero-copy .btn{padding:10px 14px;font-size:13px}
  .sunhero-copy h1{font-size:clamp(21px,6.4vw,24px)}
}
