/*
 * Harper Area Weather — canonical masthead v2
 *
 * Loaded AFTER all page-specific styles.
 * Sole owner of .site-masthead presentation and navigation state.
 * Legacy masthead overrides have been retired from page/core CSS.
 *
 * Artwork: harper-masthead-scene.webp
 * Text/nav: live HTML from harper-masthead.inc
 */

body header.site-masthead {
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;

    width: 100% !important;
    height: 158px !important;
    min-height: 158px !important;

    margin: 0 !important;
    padding: 0 !important;

    background: #07345d !important;
    border: 0 !important;
    border-radius: 15px !important;
    box-shadow: none !important;
}


/* Scenic artwork only. */
body header.site-masthead::after {
    content: "" !important;

    position: absolute !important;
    z-index: 1 !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background-image:
        var(
            --harper-masthead-scene,
            url("harper-masthead-scene.webp?v=20261104-v3")
        ) !important;

    /* HARPER THANKSGIVING MASTHEAD SWITCH 2026
       JS may override --harper-masthead-scene during the holiday window. */

    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 100% 100% !important;

    pointer-events: none !important;
}


/* ----------------------------------------------------------
   LIVE TITLE
   ---------------------------------------------------------- */

body header.site-masthead > h1 {
    position: absolute !important;
    z-index: 5 !important;

    top: 11px !important;
    left: 96px !important;

    display: block !important;

    width: auto !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;

    visibility: visible !important;
    opacity: 1 !important;

    color: #fff !important;

    font-family:
        Georgia,
        "Times New Roman",
        serif !important;

    font-size:
        clamp(30px, 4vw, 42px) !important;

    line-height: .96 !important;

    font-style: italic !important;
    font-weight: 700 !important;

    letter-spacing: -.025em !important;

    white-space: nowrap !important;

    text-shadow:
        0 2px 2px rgba(0,0,0,.78),
        0 4px 8px rgba(0,0,0,.36) !important;
}


/* Red swoosh underline */
body header.site-masthead > h1::after {
    content: "" !important;

    display: block !important;

    width: 100% !important;
    height: 4px !important;

    margin-top: 4px !important;

    border-radius:
        100% 15% 100% 20% !important;

    background:
        linear-gradient(
            90deg,
            #e52d2d 0%,
            #f04739 76%,
            rgba(240,71,57,0) 100%
        ) !important;

    transform:
        skewX(-18deg)
        rotate(-.45deg) !important;

    transform-origin:
        left center !important;
}


/* ----------------------------------------------------------
   LIVE DESCRIPTIVE COPY
   ---------------------------------------------------------- */

body header.site-masthead > p {
    position: absolute !important;
    z-index: 5 !important;

    left: 34px !important;

    display: block !important;

    width: auto !important;
    height: auto !important;
    max-width: calc(100% - 265px) !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;

    visibility: visible !important;
    opacity: 1 !important;

    color: #fff !important;

    font-family:
        Arial,
        Helvetica,
        sans-serif !important;

    font-size:
        clamp(11px, 1.42vw, 14px) !important;

    line-height: 1.15 !important;

    font-weight: 400 !important;

    white-space: nowrap !important;

    text-shadow:
        0 1px 2px rgba(0,0,0,.95),
        0 2px 5px rgba(0,0,0,.55) !important;
}


/* First descriptive line */
body header.site-masthead > p:not(.station-history) {
    top: 65px !important;
}


/* History/statistics line */
body header.site-masthead > p.station-history {
    top: 86px !important;
}


body header.site-masthead .observation-count {
    font-weight: 800 !important;
}


/* ----------------------------------------------------------
   LIVE NAVIGATION — ONE ROW, SIX EQUAL BUTTONS
   ---------------------------------------------------------- */

body header.site-masthead .header-nav-wrap {
    position: absolute !important;
    z-index: 10 !important;

    left: 14px !important;
    right: 14px !important;
    bottom: 8px !important;

    display: block !important;

    width: auto !important;
    height: 35px !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    visibility: visible !important;
    opacity: 1 !important;
}


body header.site-masthead .header-nav-wrap > nav {
    position: static !important;
    z-index: 9 !important;

    display: grid !important;
    align-items: center !important;

    grid-template-columns:
        repeat(6, minmax(0, 1fr)) !important;

    grid-auto-flow: row !important;
    grid-template-rows: 35px !important;

    gap: 6px !important;

    width: 100% !important;
    height: 35px !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: visible !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    transform: none !important;
}


body header.site-masthead .header-nav-wrap > nav > a {
    position: relative !important;
    z-index: 10 !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    gap: 6px !important;

    box-sizing: border-box !important;

    min-width: 0 !important;
    width: auto !important;

    min-height: 35px !important;
    height: 35px !important;

    margin: 0 !important;

    padding: 6px 7px !important;

    overflow: hidden !important;

    border:
        1px solid rgba(93,193,230,.86) !important;

    border-radius:
        9px !important;

    background:
        rgba(5, 54, 94, 0.48) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.17),
        0 2px 4px rgba(0,0,0,.42) !important;

    color: #fff !important;

    font-family:
        Arial,
        Helvetica,
        sans-serif !important;

    font-size:
        clamp(10px, 1.22vw, 13px) !important;

    line-height: 1 !important;

    font-weight: 700 !important;

    text-align: center !important;
    text-decoration: none !important;

    white-space: nowrap !important;

    text-shadow:
        0 1px 2px rgba(0,20,40,0.42) !important;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;

    visibility: visible !important;
    opacity: 1 !important;

    transform: none !important;
}


body header.site-masthead .header-nav-wrap > nav > a:hover {
    background:
        rgba(8, 67, 112, 0.76) !important;

    border-color:
        rgba(255,255,255,0.16) !important;
}


/* ----------------------------------------------------------
   NAVIGATION STATE — OWNED HERE
   ---------------------------------------------------------- */

/* Explicit .active class, retained for compatibility. */
body header.site-masthead
.header-nav-wrap > nav > a.active {
    background:
        rgba(8, 69, 120, 0.96) !important;

    border-color:
        rgba(255,255,255,0.18) !important;

    color:
        #ffffff !important;

    box-shadow:
        0 2px 5px rgba(0,25,50,0.18) !important;
}


/*
 * Normal icons are cyan.  Because the shared include itself is
 * stateless, the body-class active page does not add .active.
 */
.site-masthead
.header-nav-wrap > nav > a:not(.active) .nav-icon {
    color:
        #68c7ee !important;

    stroke:
        currentColor !important;

    opacity:
        1 !important;

    filter:
        drop-shadow(
            0 1px 1px rgba(0, 25, 50, 0.22)
        );
}


.site-masthead
.header-nav-wrap > nav > a:not(.active) .nav-icon-fill {
    color:
        #68c7ee !important;

    fill:
        currentColor !important;

    stroke:
        currentColor !important;
}


.site-masthead
.header-nav-wrap > nav > a.active .nav-icon {
    color:
        #ffffff !important;

    stroke:
        currentColor !important;

    opacity:
        1 !important;
}


.site-masthead
.header-nav-wrap > nav > a.active .nav-icon-fill {
    color:
        #ffffff !important;

    fill:
        currentColor !important;

    stroke:
        currentColor !important;
}


.site-masthead
.header-nav-wrap > nav > a:not(.active):hover .nav-icon {
    color:
        #9bdcf6 !important;
}


/* Body identity selects the current page button. */
.harper-page-current
header.site-masthead a[data-nav="current"],

.harper-page-forecast
header.site-masthead a[data-nav="forecast"],

.harper-page-fire
header.site-masthead a[data-nav="fire"],

.harper-page-aviation
header.site-masthead a[data-nav="aviation"],

.harper-page-deepdive
header.site-masthead a[data-nav="deepdive"],

.harper-page-camera
header.site-masthead a[data-nav="camera"] {
    background:
        rgba(8, 69, 120, 0.96) !important;

    border-color:
        rgba(255,255,255,0.18) !important;

    color:
        #ffffff !important;

    box-shadow:
        0 2px 5px rgba(0,25,50,0.18) !important;
}


/* Preserve the homepage's approved subtle nav backdrop blur. */
.harper-page-current
header.site-masthead .header-nav-wrap {
    backdrop-filter:
        blur(2px);
}


/* Icons */
body header.site-masthead .header-nav-wrap > nav > a .nav-icon,
body header.site-masthead .header-nav-wrap > nav > a > svg {
    display: block !important;

    flex: 0 0 18px !important;

    width: 18px !important;
    height: 18px !important;

    margin: 0 !important;

    visibility: visible !important;
    opacity: 1 !important;

    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;

    transform: none !important;
}


body header.site-masthead
.header-nav-wrap > nav > a .nav-icon-fill {
    fill: currentColor !important;
    stroke: none !important;
}


/* ----------------------------------------------------------
   RESPONSIVE — SAME ARTWORK, SAME COMPONENT
   ---------------------------------------------------------- */

@media (max-width: 720px) {

    body header.site-masthead {
        height: 166px !important;
        min-height: 166px !important;
    }

    body header.site-masthead > h1 {
        left: 82px !important;

        font-size:
            clamp(27px, 5vw, 34px) !important;
    }

    body header.site-masthead > p {
        left: 24px !important;

        max-width:
            calc(100% - 175px) !important;

        font-size:
            11px !important;
    }

    body header.site-masthead .header-nav-wrap {
        left: 9px !important;
        right: 9px !important;
    }

    body header.site-masthead .header-nav-wrap > nav {
        gap: 4px !important;
    }

    body header.site-masthead
    .header-nav-wrap > nav > a {
        gap: 4px !important;
        padding: 5px 4px !important;

        font-size:
            10px !important;
    }

    body header.site-masthead
    .header-nav-wrap > nav > a .nav-icon,
    body header.site-masthead
    .header-nav-wrap > nav > a > svg {
        flex-basis: 15px !important;

        width: 15px !important;
        height: 15px !important;
    }
}


@media (max-width: 560px) {

    body header.site-masthead {
        height: 207px !important;
        min-height: 207px !important;
    }

    body header.site-masthead > h1 {
        left: 66px !important;

        font-size:
            27px !important;
    }

    body header.site-masthead > p {
        left: 18px !important;

        max-width:
            calc(100% - 100px) !important;

        white-space: normal !important;
    }

    body header.site-masthead > p:not(.station-history) {
        top: 63px !important;
    }

    body header.site-masthead > p.station-history {
        top: 91px !important;
    }

    body header.site-masthead .header-nav-wrap {
        height: 76px !important;
    }

    body header.site-masthead .header-nav-wrap > nav {
        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        grid-template-rows:
            repeat(2, 35px) !important;

        height: 76px !important;
    }
}


/* ----------------------------------------------------------
   FIRE WATCH NAV ALERT / CAUTION ANIMATION
   ---------------------------------------------------------- */

body header.site-masthead
.fire-nav-label.fire-nav-alert {
    color:
        #d62f2f;

    font-weight:
        900;

    animation:
        fire-nav-pulse 2.4s ease-in-out infinite;
}


@keyframes fire-nav-pulse {
    0%, 100% {
        opacity: .65;
    }

    50% {
        opacity: .35;
    }
}


body header.site-masthead
.header-nav-wrap a.fire-nav-caution .nav-icon {
    color:
        #ff8c00;

    animation:
        fire-nav-caution-pulse 2.4s ease-in-out infinite;
}


body header.site-masthead
.header-nav-wrap a.fire-nav-caution .nav-icon.nav-icon-fill {
    fill:
        #ff8c00;
}


@keyframes fire-nav-caution-pulse {
    0%, 100% {
        opacity: .65;
    }

    50% {
        opacity: .35;
    }
}


@media (prefers-reduced-motion: reduce) {

    body header.site-masthead
    .fire-nav-label.fire-nav-alert {
        animation:
            none;

        opacity:
            .65;

        color:
            #d62f2f;
    }


    body header.site-masthead
    a.fire-nav-caution .nav-icon {
        animation:
            none;

        opacity:
            .65;

        color:
            #ff8c00;
    }


    body header.site-masthead
    a.fire-nav-caution .nav-icon.nav-icon-fill {
        fill:
            #ff8c00;
    }
}


/* If an explicit .active class is present, keep alert cues static. */
body header.site-masthead
a.active .fire-nav-label.fire-nav-alert {
    animation:
        none;

    opacity:
        .65;
}


body header.site-masthead
a.active.fire-nav-caution .nav-icon {
    animation:
        none;

    opacity:
        .65;
}


/* Fire Watch page: do not pulse a reported-fire label merely as current page. */
.harper-page-fire
header.site-masthead
.fire-nav-label.fire-nav-alert {
    animation:
        none !important;
}


/* === FIRE NAV STATUS START === */

body header.site-masthead
.header-nav-wrap a[data-nav="fire"].fire-nav-caution {
    border-color:
        rgba(255,157,43,.96) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.17),
        0 0 0 1px rgba(255,140,0,.42),
        0 2px 5px rgba(0,0,0,.45) !important;
}

body header.site-masthead
.header-nav-wrap a[data-nav="fire"].fire-nav-caution .nav-icon {
    color:
        #ff8c00 !important;

    filter:
        drop-shadow(0 0 3px rgba(255,140,0,.55)) !important;
}

body header.site-masthead
.header-nav-wrap a[data-nav="fire"].fire-nav-caution .fire-nav-label {
    color:
        #ffffff !important;
}

/* === FIRE NAV STATUS END === */


/* === REPORTED FIRE BUTTON STATUS START === */

body header.site-masthead
.header-nav-wrap a[data-nav="fire"].fire-nav-reported {
    border-color:
        rgba(235,64,64,.98) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.17),
        0 0 0 1px rgba(214,47,47,.50),
        0 2px 5px rgba(0,0,0,.45) !important;
}

body header.site-masthead
.header-nav-wrap a[data-nav="fire"].fire-nav-reported .nav-icon {
    color:
        #e53935 !important;

    filter:
        drop-shadow(0 0 3px rgba(229,57,53,.60)) !important;
}

/*
 * Existing .fire-nav-alert styling in harper-core.css continues
 * to control the red Fire Watch label/pulse behavior.
 */

/* === REPORTED FIRE BUTTON STATUS END === */
