/* ==========================================================================
   DAWN: the day/night switch (the sun/moon button, top right). Night is the default.
   js/daynight.js sets  <html data-time="dawn">  and remembers it. Only the hero scene changes:
   a cold blue-pink morning, a low sun behind the skyline, the searchlight off, a thin drizzle, no lightning.
   ========================================================================== */
.dawn-sky, .sun { position: absolute; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.dawn-sky { inset: 0; background: linear-gradient(180deg, #1f3159 0%, #3d5588 30%, #7a78a6 52%, #d98f8a 74%, #f4a869 90%, #fbd58c 100%); }
.sun { right: 30%; bottom: 26%; width: clamp(110px, 13vw, 190px); aspect-ratio: 1; border-radius: 50%; translate: 0 calc(var(--p, 0) * 40px);
  background: radial-gradient(circle, #fffbe6 0 30%, #ffe19a 42%, rgba(255,190,110,.55) 58%, rgba(255,150,100,.18) 74%, transparent 78%); filter: blur(.4px); }
.sun::after { content: ""; position: absolute; inset: -90%; border-radius: 50%; background: radial-gradient(circle, rgba(255,200,130,.35), transparent 62%); }
html[data-time="dawn"] .dawn-sky { opacity: 1; }
html[data-time="dawn"] .sun { opacity: 1; transition-delay: .3s; }

/* night things go to sleep */
.moon, .cloud, .signal-svg, .bat, .lowfog, .siren, .rain { transition: opacity 1.2s ease, filter 1.2s ease; }
html[data-time="dawn"] .moon { opacity: 0; }
html[data-time="dawn"] .signal-svg, html[data-time="dawn"] .siren { opacity: 0; }
html[data-time="dawn"] .bat { display: none; }
html[data-time="dawn"] .rain { opacity: .16; }
html[data-time="dawn"] .cloud { background: #e6a9a4; opacity: .5; }
html[data-time="dawn"] .lowfog { filter: blur(18px) sepia(.6) saturate(1.6) brightness(1.2); opacity: .85; }
html[data-time="dawn"] .vignette { opacity: .45; }
/* the skyline: same drawing, hazy and lighter, with the warm light behind it */
.layer { transition: filter 1.2s ease; }
html[data-time="dawn"] .layer-far { filter: brightness(2.6) saturate(.55) sepia(.35) hue-rotate(-8deg); }
html[data-time="dawn"] .layer-mid { filter: brightness(2.1) saturate(.6) sepia(.3) hue-rotate(-6deg); }
html[data-time="dawn"] .layer-near { filter: brightness(1.5) saturate(.7) sepia(.2); }
html[data-time="dawn"] .roof { filter: brightness(1.35); }
html[data-time="dawn"] .hero-dim { background: #2a1a2a; }
html[data-time="dawn"] .hero-title h1 { text-shadow: 0 2px 0 rgba(20,24,60,.75), 0 0 28px rgba(20,24,60,.6); }

/* the switch itself */
.time-btn { width: 44px; padding: 0; font-size: 22px; line-height: 1; }
.time-btn .ic-sun { display: none; }
html[data-time="dawn"] .time-btn .ic-sun { display: inline; }
html[data-time="dawn"] .time-btn .ic-moon { display: none; }
@media (prefers-reduced-motion: reduce) { .dawn-sky, .sun, .moon, .cloud, .layer, .rain { transition: none; } }
