/* Backdrop layer + scene — Ocean Sunrise
   Background package: Ocean Sunrise (scene id "sunrise"). Built
   2026-11-09 for glass mode (Theme Button One), first worn by the
   Hungry Muse promotional site.

   The scene: a photorealistic ocean at dawn (sunrise.webp), the
   horizon glowing where the sun is about to appear — and the sun
   itself as a CSS layer that slowly rises out of that glow. The
   sun lives in a "sky window" clipped at the horizon line, so it
   genuinely emerges from the sea instead of sliding over it. The
   rise takes 120 seconds to climb and eases back down the same
   way (the setting is --hm-sunrise-duration); a warm wash over
   the water breathes with it. The horizon line is the setting
   --hm-sun-horizon: 59.5% at phone widths, 70.5% on wide screens,
   matching where the painted horizon falls under cover-fit.

   Family contract (every package in ~/workspace/support/backgrounds):
   - The layer shows only in a glass mode: the host sets
     data-resolved="glass" (Hungry Muse site) or data-theme="glass"
     (Night Drop family) on <html>, and data-glass-scene="sunrise"
     when this scene is the visitor's choice. The choice is the
     host's to store; the site stores it under localStorage
     "wk-glass-backdrop" (default scene there is "ski").
   - Dawn runs bright in the middle: the scrim below is the
     readability tuning point.
   - Motion parks when the host sets data-motion-paused="1" on
     <html> (this package's engine does it on page hide), and is
     removed entirely for prefers-reduced-motion (the sun then
     rests at the horizon, half risen). */

.hm-backdrop--sunrise{position:fixed;inset:0;z-index:-1;display:none;overflow:hidden;pointer-events:none;background:#10182b}
:root[data-resolved="glass"][data-glass-scene="sunrise"] .hm-backdrop--sunrise,
:root[data-theme="glass"][data-glass-scene="sunrise"] .hm-backdrop--sunrise{display:block}
.hm-backdrop--sunrise .hm-backdrop-photo{position:absolute;inset:0;background:url("sunrise.webp") center/cover no-repeat}
.hm-backdrop--sunrise .hm-backdrop-sky{position:absolute;left:0;right:0;top:0;height:var(--hm-sun-horizon,59.5%);overflow:hidden}
@media (min-width:900px){
  .hm-backdrop--sunrise .hm-backdrop-sky{height:70.5%}
}
.hm-backdrop--sunrise .hm-backdrop-sun{position:absolute;left:50%;bottom:-17vmin;width:34vmin;height:34vmin;margin-left:-17vmin;border-radius:50%;background:radial-gradient(circle,rgba(255,250,228,.98) 0%,rgba(255,216,138,.95) 32%,rgba(255,170,74,.55) 55%,rgba(255,150,60,0) 72%);mix-blend-mode:screen;animation:hm-sun-rise var(--hm-sunrise-duration,120s) ease-in-out infinite alternate}
@keyframes hm-sun-rise{from{transform:translateY(9vmin)}to{transform:translateY(-25vmin)}}
.hm-backdrop--sunrise .hm-backdrop-wash{position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,170,80,0) 30%,rgba(255,170,80,.15) 62%,rgba(255,140,60,.06));animation:hm-sun-wash var(--hm-sunrise-duration,120s) ease-in-out infinite alternate}
@keyframes hm-sun-wash{from{opacity:.3}to{opacity:1}}
.hm-backdrop--sunrise .hm-backdrop-scrim{position:absolute;inset:0;background:linear-gradient(180deg,rgba(7,10,20,.46),rgba(7,10,20,.27) 46%,rgba(7,10,20,.52))}
:root[data-motion-paused="1"] .hm-backdrop--sunrise *{animation-play-state:paused!important}
@media (prefers-reduced-motion:reduce){
  .hm-backdrop--sunrise *{animation:none!important}
}
