/* ============================================================
   HARPER COMMON SHELL
   Extracted from known-good harper.css during modular migration.
   Do not merge page-specific rules back into harper-core.css.
   ============================================================ */

/* ============================================================
   HARPER WEATHER STATION
   W5TWO - Harper, Texas
   Main stylesheet
   ============================================================ */

:root {
    --blue-dark: #063b78;
    --blue: #075eb5;
    --blue-light: #eaf3fc;

    --green: #2d8a32;
    --green-light: #edf8ed;

    --red: #d32f2f;
    --blue-low: #1976d2;

    --background: #f5f8fb;
    --card: #ffffff;
    --text: #17212b;
    --muted: #65727e;
    --border: #d8e0e8;

    --radius: 12px;
    --shadow: 0 3px 10px rgba(0, 0, 0, 0.10);
}


/* ============================================================
   GENERAL
   ============================================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

.page {
    width: min(1500px, calc(100% - 28px));
    margin: 14px auto 30px;
}


/* ============================================================
   HEADER
   ============================================================ */

header {
    background: var(--blue-dark);
    color: white;
    padding: 22px 28px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 900;
}

header p {
    margin: 4px 0 0;
    color: #dbeafa;
    font-size: 0.95rem;
}

header p.station-history {
    margin-top: 2px;
    font-size: 0.78rem;
    font-weight: 400;
    color: #c7daee;
}

header .station-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

nav {
    margin-top: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px 12px;
}

nav a {
    display: inline-block;
    padding: 7px 13px;
    margin-right: 4px;
    border-radius: 8px;
    color: var(--blue-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

nav a:hover {
    background: var(--blue-light);
}

nav a.active {
    background: var(--blue-dark);
    color: white;
}


/* ============================================================
   GENERAL SECTIONS / CARDS
   ============================================================ */

.section {
    margin-top: 18px;
}

.section-title {
    margin: 0 0 10px;
    color: var(--blue-dark);
    font-size: 1.25rem;
    font-weight: 900;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ============================================================
   WEATHER DISCLAIMER
   ============================================================ */

.weather-disclaimer {
    margin-top: 14px;
    padding: 12px 15px;
    background: #fff8e6;
    border: 1px solid #ead7a3;
    border-radius: 10px;
    color: #66511d;
    font-size: 0.84rem;
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
    margin-top: 22px;
    padding: 14px 4px;
    color: var(--muted);
    text-align: center;
    font-size: 0.78rem;
}


/* ============================================================
   RESPONSIVE — TABLETS
   ============================================================ */

@media (max-width: 1000px) {

    .current-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .forecast-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sensor-grid,
    .geekery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .aviation-observations {
        grid-template-columns: repeat(2, 1fr);
    }

    .aviation-hazards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================================
   RESPONSIVE — PHONES
   ============================================================ */

@media (max-width: 700px) {

    .page {
        width: calc(100% - 16px);
        margin: 8px auto 20px;
    }

    header {
        padding: 17px 18px;
    }

    header h1 {
        font-size: 1.45rem;
    }

    nav {
        padding: 7px;
    }

    nav a {
        padding: 6px 9px;
        font-size: 0.82rem;
    }

    .current-grid,
    .forecast-grid,
    .imagery-grid,
    .sensor-grid,
    .geekery-grid,
    .aviation-regional-grid,
    .weather-picture-grid {
        grid-template-columns: 1fr;
    }

    .aviation-observations,
    .aviation-card .aviation-observations {
        grid-template-columns: repeat(2, 1fr);
    }

    .aviation-resources-card {
        display: block;
    }

    .aviation-resources-title {
        display: block;
        margin-bottom: 8px;
    }

    .gfa-card-header {
        display: block;
    }

    .gfa-link {
        margin-top: 11px;
    }

    .aviation-primary-card {
        padding: 15px;
    }

    .aviation-card {
        padding: 14px;
    }

    .aviation-hazards-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   RESPONSIVE — VERY SMALL SCREENS
   ============================================================ */

@media (max-width: 430px) {

    .aviation-observations,
    .aviation-card .aviation-observations {
        grid-template-columns: 1fr;
    }

    .aviation-card-header {
        align-items: flex-start;
    }

    .flight-category {
        font-size: 0.82rem;
    }
}

.page-update {
    margin-top: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.temp-high {
    color: var(--red);
}

.temp-low {
    color: var(--blue-low);
}

/* Harper header scenic overlay */
header {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    box-sizing: border-box;
}

header h1,
header p {
    position: relative;
    z-index: 2;
}

header::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    right: -8px;
    width: 575px;
    height: 100%;
    background-image: url("harper-banner-overlay.webp?v=1");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 575px auto;
    pointer-events: none;
}

/* ============================================================
   NAVIGATION ICONS
   ============================================================ */

.nav-icon {
    width: 19px;
    height: 19px;
    margin-right: 6px;
    vertical-align: -3px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}



.nav-icon-fill {
    fill: currentColor;
    stroke: none;
}

/* Navigation icon polish */
.nav-icon {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18));
    width: 20px;
    height: 20px;
    margin-right: 7px;
}

nav a:not(.active) .nav-icon {
    color: #0b5fa5;
}

nav a.active .nav-icon {
    color: white;
}

/* Header archive observation milestone */

.observation-brag {
    font-weight: 800;
}

.observation-count {
    color: #ffffff;
}







/* ============================================================
   FIRE WATCH — MAIN NAV ALERT
   ============================================================ */

.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;
    }
}

/* Preserve a strong alert cue for users who disable animation. */
@media (prefers-reduced-motion: reduce) {
    .fire-nav-label.fire-nav-alert {
        animation: none;
        opacity: .65;
        color: #d62f2f;
    }
}

/* Do not pulse Fire Watch while already on the Fire Watch page */
nav a.active .fire-nav-label.fire-nav-alert {
    animation: none;
    opacity: .65;
}

.section-heading {
    margin-bottom: 13px;
}

.section-heading h2 {
    margin: 0;
    color: var(--blue-dark);
    font-size: 1.15rem;
}

.section-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.82rem;
}


.aviation-card,
.camera-card {
    padding: 17px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* COMMON GEEK SECTION */
/* ============================================================
   PAGE 2 — WEATHER FOR GEEKS
   ============================================================ */

.geek-section {
    margin-top: 20px;
}

.geek-section > h2 {
    margin: 0 0 11px;
    color: var(--blue-dark);
    font-size: 1.3rem;
    font-weight: 900;
}

/* Standard compact page data/update line */
.page-data-update {
    margin-top: 6px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--muted, #667788);
}

/* Page data update status marker */
.page-data-update::before {
    content: "•";
    display: inline-block;
    margin-right: 0.42em;
    font-weight: 700;
    color: inherit;
    opacity: 0.72;
}


/* ============================================================
   FIRE WATCH — CAUTION / THERMAL NAV STATE
   Orange icon = Fire Watch attention.
   Red text pulse remains reserved for reported-fire.
   ============================================================ */

nav a.fire-nav-caution .nav-icon {
    color: #ff8c00;
    animation: fire-nav-caution-pulse 2.4s ease-in-out infinite;
}

nav a.fire-nav-caution .nav-icon.nav-icon-fill {
    fill: #ff8c00;
}

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

    50% {
        opacity: .35;
    }
}

/* Keep the cue visible but static for reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
    nav a.fire-nav-caution .nav-icon {
        animation: none;
        opacity: .65;
        color: #ff8c00;
    }

    nav a.fire-nav-caution .nav-icon.nav-icon-fill {
        fill: #ff8c00;
    }
}

/* As with the red alert, don't pulse while viewing Fire Watch. */
nav a.active.fire-nav-caution .nav-icon {
    animation: none;
    opacity: .65;
}

