/* Homepage hero: the night (js/hero-night.js).
   A dark sky with rain, wind and a dim distant train covers the top of the hero; the horizon sits just
   above the dashboard mock, and the mock's lower part overlaps the light page below. */
.hero--night { --night-cut: clamp(140px, 20vw, 280px); }
.hero--night .hero-bg-noise { background: var(--bg); }

.hero-night {
  position: absolute; inset: 0 0 var(--night-cut) 0; z-index: 1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(120% 55% at 50% 100%, rgba(22, 34, 52, 0.9), transparent 70%),
    linear-gradient(to bottom, #04060c, #0b101a 50%, #121b28);
}
.hero-night__grain { position: absolute; inset: 0; background-image: var(--night-grain, none); background-size: 160px 160px; opacity: 0.5; mix-blend-mode: soft-light; }
/* Before the land is drawn (or without JS): a plain dark band at the bottom */
.hero-night::after { content: ""; position: absolute; inset: auto 0 0; height: 28%; background: linear-gradient(to bottom, #111925, #070a11); }
.hero-night.has-land::after { display: none; }
.hero-night canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-night__sky { opacity: 0; transition: opacity 1600ms cubic-bezier(0.65, 0, 0.35, 1); }
.hero-night__sky.is-live { opacity: 1; }

/* Hero content, relit for the night */
.hero--night .eyebrow { color: #FF8A5B; }
.hero--night .display-headline { color: #F4F1EA; text-shadow: 0 1px 24px rgba(5, 8, 15, 0.6); }
.hero--night .display-headline .dim { color: rgba(222, 228, 240, 0.5); }
.hero--night .hero-sub { color: rgba(222, 228, 240, 0.74); }
.hero--night .hero-reassurance { color: rgba(222, 228, 240, 0.52); text-shadow: 0 1px 12px rgba(5, 8, 15, 0.8); }
/* Shield mode: clear room between the reassurance line and the mock for the Glasgow skyline */
.hero--night[data-night-mode="shield"] .hero-reassurance { margin-bottom: 128px; }
@media (max-width: 700px) { .hero--night[data-night-mode="shield"] .hero-reassurance { margin-bottom: 76px; } }
.hero--night .btn-dark { background: #F4F1EA; color: var(--ink); }
.hero--night .btn-dark .dot { background: var(--accent); box-shadow: 0 0 10px rgba(255, 107, 43, 0.8); }
.hero--night .btn-dark:hover { box-shadow: 0 12px 30px -10px rgba(255, 107, 43, 0.5); }
.hero--night .btn-ghost { background: rgba(255, 255, 255, 0.04); color: #F4F1EA; border-color: rgba(255, 255, 255, 0.16); }
.hero--night .btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }
.hero--night .btn:focus-visible { outline: 2px solid #FF8A5B; outline-offset: 3px; }
.hero--night .hero-showcase { border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6); }

/* Light theme: the same hero by day (js/hero-night.js draws the sun, clouds and daylit town) */
html:not([data-theme="dark"]) .hero-night {
  background:
    radial-gradient(80% 60% at 91% 10%, rgba(255, 236, 190, 0.55), transparent 60%),
    linear-gradient(to bottom, #9CCBF0, #BFDDF4 42%, #E3EFF7 72%, #F7EADB);
}
html:not([data-theme="dark"]) .hero-night__grain { opacity: 0.18; }
html:not([data-theme="dark"]) .hero-night::after { background: linear-gradient(to bottom, #DDE9E2, #F5F5F5); }
html:not([data-theme="dark"]) .hero--night .eyebrow { color: #9A3412; }
html:not([data-theme="dark"]) .hero--night .display-headline { color: #1A1A2E; text-shadow: 0 1px 24px rgba(255, 255, 255, 0.55); }
html:not([data-theme="dark"]) .hero--night .display-headline .dim { color: rgba(26, 26, 46, 0.5); }
html:not([data-theme="dark"]) .hero--night .hero-sub { color: rgba(26, 26, 46, 0.8); }
html:not([data-theme="dark"]) .hero--night .hero-reassurance { color: rgba(26, 26, 46, 0.66); text-shadow: 0 1px 12px rgba(255, 255, 255, 0.7); }
html:not([data-theme="dark"]) .hero--night .btn-dark { background: #1A1A2E; color: #fff; }
html:not([data-theme="dark"]) .hero--night .btn-dark:hover { box-shadow: 0 12px 30px -10px rgba(26, 26, 46, 0.45); }
html:not([data-theme="dark"]) .hero--night .btn-ghost { background: rgba(255, 255, 255, 0.55); color: #1A1A2E; border-color: rgba(26, 26, 46, 0.16); }
html:not([data-theme="dark"]) .hero--night .btn-ghost:hover { background: rgba(255, 255, 255, 0.8); }
html:not([data-theme="dark"]) .hero--night .btn:focus-visible { outline-color: #C2410C; }
html:not([data-theme="dark"]) .hero--night .hero-showcase { box-shadow: 0 40px 100px -30px rgba(26, 26, 46, 0.35); }
