/* ============================================================
   HOMEPAGE BACKGROUND: "Dawn" (D1 · Soft rise, 1 Dec 2026)
   ------------------------------------------------------------
   Background only. Nothing here sizes or moves page content:
   - .dashboard-main gets a lifted navy gradient in place of the
     near-black one (dashboard-v1.css stays untouched; this file
     loads after it, so its rule wins on order).
   - The old dot texture and corner glow (::before / ::after in
     dashboard-v1.css) are switched off; fine noise replaces them.
   - home-dawn.js inserts .hp-dawn as the first child of
     .dashboard-main: an absolutely positioned layer at z-index 0,
     under the content blocks (.v1-layout, .v1-bottom: z-index 1).
     It holds the moving light (the same Dawn light as the
     headers and the footer), grain, a headline shade and noise.
   ============================================================ */

.dashboard-main {
    background: linear-gradient(to bottom,
        #06142f 0%, #071833 14%, #081c3b 28%, #0a2145 42%,
        #0c2751 56%, #0f2f5f 70%, #14396f 84%, #1b4583 100%);
}

.dashboard-main::before,
.dashboard-main::after {
    display: none;
}

.hp-dawn {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    animation: hp-dawn-in 1.2s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
@keyframes hp-dawn-in { to { opacity: 1; } }

/* Holds the light below the page until it appears, then rises */
.hp-dawn-lift {
    position: absolute;
    inset: 0;
    transform: translateY(calc((1 - var(--rise, 0)) * 40%));
    transition: transform 1800ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hp-dawn-lift i {
    position: absolute;
    display: block;
    border-radius: 50%;
    will-change: transform, opacity;
}

/* Wide glows centred low, so the light reads as one band along the floor */
.hp-l1 { width: 150%; height: 72%; left: -25%; top: 70%;
    background: radial-gradient(closest-side, rgba(156, 200, 255, 0.70), rgba(74, 144, 217, 0.38) 45%, rgba(44, 92, 222, 0)); }
.hp-l2 { width: 80%; height: 40%; left: 10%; top: 84%;
    background: radial-gradient(closest-side, rgba(205, 230, 255, 0.30), rgba(156, 200, 255, 0.08) 55%, rgba(156, 200, 255, 0)); }
.hp-l3 { width: 80%; height: 60%; left: -15%; top: 74%;
    background: radial-gradient(closest-side, rgba(44, 92, 222, 0.65), rgba(44, 92, 222, 0)); }
.hp-l5 { width: 75%; height: 50%; left: 25%; top: 78%;
    background: radial-gradient(closest-side, rgba(120, 178, 245, 0.50), rgba(120, 178, 245, 0)); }
.hp-l6 { width: 70%; height: 55%; left: 50%; top: 75%;
    background: radial-gradient(closest-side, rgba(84, 156, 232, 0.55), rgba(84, 156, 232, 0)); }

/* Grain (the header's 128px tile) plus a shade on the headline side */
.hp-dawn-grain {
    position: absolute;
    inset: 0;
    background: url("/assets/images/banner-grain.webp") repeat 0 0 / 128px 128px,
                linear-gradient(90deg, rgba(0, 10, 31, 0.55), rgba(0, 10, 31, 0) 40%);
}

/* Fine noise: keeps the long gradient free of banding and adds texture */
.hp-dawn-noise {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    mix-blend-mode: overlay;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") repeat 0 0 / 180px 180px;
}

/* Below 900px the homepage scrolls and .dashboard-main grows tall.
   Keep the light the size of one screen, anchored to the bottom. */
@media (max-width: 900px) {
    .hp-dawn { height: min(100%, 900px); }
    .hp-dawn-grain {
        background: url("/assets/images/banner-grain.webp") repeat 0 0 / 128px 128px;
    }
}

/* ── Readable text on the brighter background (1 Dec 2026, option "C5") ──
   The new gradient and light are brighter behind the bottom strip than
   the old near-black, so its dim text lost contrast. Colours only:
   nothing here changes size or position. Measured against the light:
   stat labels and city names ~8.7:1, the blue line ~5.6:1. */
.hero-stat-label,
.clock-city { color: rgba(255, 255, 255, 0.78); }
.v1-tagline-accent { color: #8fcbff; }
.v1-bottom { text-shadow: 0 1px 14px rgba(0, 10, 31, 0.55); }

/* Clocks: the ring (was 8% white) and ticks show again; the second hand
   takes the same bright blue (the site blue vanished on the new blue) */
.clock-ring,
.clock-ticks { stroke: rgba(255, 255, 255, 0.32); }
.clock-ticks-cardinal { stroke: rgba(255, 255, 255, 0.6); }
.clock-hand-second { stroke: #8fcbff; }
.clock-center-dot { fill: #8fcbff; }

@media (prefers-reduced-motion: reduce) {
    .hp-dawn { animation: none; opacity: 1; }
    .hp-dawn-lift { transition: none; }
}
