:root {
    --hmg-navy: #173a63;
    --hmg-navy-dark: #102d4d;
    --hmg-blue: #295f96;
    --hmg-slate: #536572;
    --hmg-ink: #152331;
    --hmg-muted: #687784;
    --hmg-line: #dfe6eb;
    --hmg-surface: #f4f7f9;
    --hmg-white: #ffffff;
    --hmg-shadow: 0 18px 45px rgba(23, 58, 99, 0.1);
    --hmg-radius: 1.125rem;
    --hmg-ease: cubic-bezier(0.23, 1, 0.32, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 9% 44%, rgba(41, 95, 150, 0.035), transparent 24rem),
        var(--hmg-white);
    color: var(--hmg-ink);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
a {
    touch-action: manipulation;
}

.site-container {
    --bs-gutter-x: 2rem;
    max-width: 1280px;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: var(--hmg-navy-dark);
    color: var(--hmg-white);
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 180ms var(--hmg-ease);
}

.skip-link:focus {
    color: var(--hmg-white);
    transform: translateY(0);
}

.brand-link:focus-visible,
.network-card:focus-visible,
.station-action:focus-visible,
.navbar-toggler:focus-visible,
.site-nav .nav-link:focus-visible {
    outline: 3px solid rgba(41, 95, 150, 0.38);
    outline-offset: 4px;
}

.site-header {
    z-index: 1030;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(223, 230, 235, 0.78);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 24px rgba(23, 58, 99, 0.04);
    backdrop-filter: blur(18px);
}

.site-header .navbar {
    padding: 0;
}

.brand-link {
    margin: 0;
    padding: 0;
    border-radius: 0.5rem;
}

.brand-logo {
    width: min(300px, 36vw);
}

.site-nav .nav-link {
    position: relative;
    padding: 0.55rem 0.65rem !important;
    color: var(--hmg-slate);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
    transition: color 160ms var(--hmg-ease);
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus-visible {
    color: var(--hmg-blue);
}

.site-nav .nav-item:not(:last-child) .nav-link::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 0.8rem;
    background: var(--hmg-line);
    transform: translateY(-50%);
}

.navbar-toggler {
    width: 44px;
    height: 44px;
    padding: 0.6rem;
    border: 1px solid var(--hmg-line);
    border-radius: 0.7rem;
    color: var(--hmg-navy);
    box-shadow: none !important;
    transition:
        background-color 160ms var(--hmg-ease),
        border-color 160ms var(--hmg-ease),
        transform 160ms var(--hmg-ease);
}

.navbar-toggler:active {
    transform: scale(0.97);
}

.navbar-toggler-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.intro-section {
    padding: 1.25rem 0 0;
}

.intro-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 420px;
    padding: clamp(2.5rem, 7vw, 5rem);
    border-radius: clamp(1rem, 2vw, 1.75rem);
    background:
        radial-gradient(circle at 87% 18%, rgba(255, 255, 255, 0.12) 0 6rem, transparent 6.1rem),
        radial-gradient(circle at 90% 25%, transparent 0 10rem, rgba(255, 255, 255, 0.07) 10.1rem 10.25rem, transparent 10.35rem),
        linear-gradient(130deg, var(--hmg-navy-dark), var(--hmg-blue));
    box-shadow: var(--hmg-shadow);
    color: var(--hmg-white);
}

.intro-panel::after {
    content: "";
    position: absolute;
    right: -3rem;
    bottom: -7.25rem;
    z-index: -1;
    width: 20rem;
    height: 20rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
}

.signal-lines {
    position: absolute;
    right: -2rem;
    bottom: -4rem;
    z-index: -1;
    width: 21rem;
    height: 21rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.025),
        0 0 0 140px rgba(255, 255, 255, 0.018);
}

.eyebrow,
.section-kicker,
.network-kicker {
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

.eyebrow {
    color: rgba(255, 255, 255, 0.72);
}

.intro-panel h1 {
    max-width: 780px;
    margin: 0;
    color: var(--hmg-white);
    font-size: clamp(2.25rem, 6vw, 4.9rem);
    font-weight: 800;
    letter-spacing: -0.058em;
    line-height: 0.98;
}

.intro-copy {
    max-width: 680px;
    margin: 1.35rem 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.network-section {
    padding-top: clamp(2.25rem, 4vw, 3.5rem);
}

#news-coverage,
#stations {
    scroll-margin-top: 7rem;
}

.network-card {
    display: grid;
    grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr);
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--hmg-line);
    border-radius: var(--hmg-radius);
    background: var(--hmg-white);
    box-shadow: var(--hmg-shadow);
    color: var(--hmg-ink);
    text-decoration: none;
    transition:
        border-color 200ms var(--hmg-ease),
        box-shadow 200ms var(--hmg-ease),
        transform 200ms var(--hmg-ease);
}

.network-logo-wrap {
    display: grid;
    align-self: stretch;
    min-height: 220px;
    place-items: center;
    padding: clamp(2rem, 4vw, 3rem);
    background: #020f2b;
}

.network-logo-wrap img {
    width: min(360px, 100%);
}

.network-copy {
    padding: clamp(2rem, 6vw, 4rem);
}

.network-kicker,
.section-kicker {
    color: var(--hmg-blue);
}

.network-copy h2 {
    margin: 0;
    color: var(--hmg-ink);
    font-size: clamp(1.65rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.network-link-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.1rem;
    color: var(--hmg-navy);
    font-weight: 800;
}

.network-link-text i {
    font-size: 0.9rem;
    transition: transform 160ms var(--hmg-ease);
}

.stations-section {
    padding: clamp(2.25rem, 4vw, 3.5rem) 0 clamp(3.75rem, 8vw, 6.5rem);
}

.section-heading {
    gap: 2rem;
    margin-bottom: 2rem;
}

.section-heading h2 {
    margin: 0;
    color: var(--hmg-ink);
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.station-count {
    max-width: 22rem;
    margin: 0 0 0.3rem;
    color: var(--hmg-muted);
    font-size: 0.94rem;
    text-align: right;
}

.station-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    overflow: hidden;
    padding: 0.9rem;
    border: 1px solid var(--hmg-line);
    border-radius: var(--hmg-radius);
    background: var(--hmg-white);
    box-shadow: 0 8px 24px rgba(23, 58, 99, 0.06);
    transition:
        border-color 200ms var(--hmg-ease),
        box-shadow 200ms var(--hmg-ease),
        transform 200ms var(--hmg-ease);
}

.station-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
    height: 3px;
    border-radius: var(--hmg-radius) var(--hmg-radius) 0 0;
    background: linear-gradient(90deg, var(--hmg-navy), var(--hmg-blue));
    opacity: 0;
    transform: scaleX(0.35);
    transform-origin: left center;
    transition:
        opacity 180ms var(--hmg-ease),
        transform 220ms var(--hmg-ease);
}

.station-logo-wrap {
    position: relative;
    display: grid;
    min-height: 220px;
    place-items: center;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: calc(var(--hmg-radius) - 0.375rem);
    background: var(--hmg-white);
    transition: transform 220ms var(--hmg-ease);
}

.station-logo {
    width: auto;
    max-width: 92%;
    max-height: 165px;
    object-fit: contain;
    transition: transform 220ms var(--hmg-ease);
}

.station-number {
    position: absolute;
    top: 0.85rem;
    right: 1rem;
    z-index: 2;
    padding: 0.18rem 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: rgba(23, 58, 99, 0.55);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.station-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: auto;
}

.station-action {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color 160ms var(--hmg-ease),
        background-color 160ms var(--hmg-ease),
        border-color 160ms var(--hmg-ease),
        box-shadow 160ms var(--hmg-ease),
        transform 160ms var(--hmg-ease);
}

.station-action i {
    font-size: 0.9rem;
}

.station-action-wide {
    grid-column: 1 / -1;
}

.station-action:active {
    transform: scale(0.97);
}

.station-action-primary {
    border-color: var(--hmg-navy);
    background: var(--hmg-navy);
    color: var(--hmg-white);
}

.station-action-outline {
    border-color: #b8c7d4;
    background: transparent;
    color: var(--hmg-navy);
}

.station-action-quiet {
    border-color: var(--hmg-surface);
    background: var(--hmg-surface);
    color: var(--hmg-navy);
}

.site-footer {
    padding: 1.6rem 0;
    background: var(--hmg-navy-dark);
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 1.25rem;
}

.site-footer p {
    margin: 0;
    font-size: 0.85rem;
}

.technology-credit a {
    color: var(--hmg-white);
    font-weight: 700;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 0.2em;
    transition: text-decoration-color 160ms var(--hmg-ease);
}

.technology-credit a:hover,
.technology-credit a:focus-visible {
    color: var(--hmg-white);
    text-decoration-color: var(--hmg-white);
}

.toast {
    background: var(--hmg-white);
    box-shadow: 0 18px 45px rgba(23, 58, 99, 0.18);
    color: var(--hmg-ink);
}

@media (hover: hover) and (pointer: fine) {
    .station-card:hover {
        border-color: #c2d0da;
        box-shadow: 0 16px 38px rgba(23, 58, 99, 0.12);
        transform: translateY(-4px);
    }

    .station-card:hover::before,
    .station-card:focus-within::before {
        opacity: 1;
        transform: scaleX(1);
    }

    .station-card:hover .station-logo-wrap {
        transform: translateY(-1px);
    }

    .station-card:hover .station-logo {
        transform: scale(1.025);
    }

    .station-action-primary:hover {
        border-color: var(--hmg-navy-dark);
        background: var(--hmg-navy-dark);
        color: var(--hmg-white);
    }

    .station-action-outline:hover {
        border-color: var(--hmg-navy);
        background: var(--hmg-navy);
        color: var(--hmg-white);
    }

    .station-action-quiet:hover {
        border-color: #e4ebef;
        background: #e4ebef;
        color: var(--hmg-navy-dark);
    }

    .network-card:hover {
        border-color: #bacbd8;
        box-shadow: 0 22px 54px rgba(23, 58, 99, 0.16);
        color: var(--hmg-ink);
        transform: translateY(-4px);
    }

    .network-card:hover .network-link-text i {
        transform: translate(2px, -2px);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .intro-panel,
    .network-card,
    .section-heading,
    .station-card {
        animation: enter 600ms var(--hmg-ease) both;
    }

    .section-heading {
        animation-delay: 80ms;
    }

    .row > div:nth-child(2) .station-card,
    .row > div:nth-child(5) .station-card,
    .row > div:nth-child(8) .station-card {
        animation-delay: 60ms;
    }

    .row > div:nth-child(3) .station-card,
    .row > div:nth-child(6) .station-card,
    .row > div:nth-child(9) .station-card {
        animation-delay: 120ms;
    }

    @keyframes enter {
        from {
            opacity: 0;
            transform: translateY(14px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

@media (max-width: 991.98px) {
    .site-header {
        padding: 0.8rem 0;
    }

    .brand-logo {
        width: min(260px, 64vw);
    }

    .navbar-collapse {
        margin-top: 0.75rem;
        overflow: hidden;
        border: 1px solid var(--hmg-line);
        border-radius: 0.8rem;
        background: var(--hmg-white);
        box-shadow: 0 16px 32px rgba(23, 58, 99, 0.1);
    }

    .site-nav .nav-link {
        padding: 0.95rem 1rem !important;
        text-align: left;
    }

    .site-nav .nav-item + .nav-item {
        border-top: 1px solid var(--hmg-line);
    }

    .site-nav .nav-link::after {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .brand-logo {
        width: min(235px, 66vw);
    }

    .intro-section {
        padding: 0.85rem 0 0;
    }

    .intro-panel {
        min-height: 0;
        padding: 2.4rem 1.5rem;
    }

    .intro-panel h1 {
        font-size: clamp(2.25rem, 13vw, 3.5rem);
    }

    .network-section,
    .stations-section {
        padding-top: 1.5rem;
    }

    #news-coverage,
    #stations {
        scroll-margin-top: 5.5rem;
    }

    .network-card {
        grid-template-columns: 1fr;
    }

    .network-logo-wrap {
        min-height: 180px;
    }

    .network-copy {
        padding: 1.6rem 1.5rem;
    }

    .section-heading {
        display: block !important;
    }

    .station-count {
        margin-top: 0.75rem;
        text-align: left;
    }

    .station-logo-wrap {
        min-height: 190px;
    }
}

@media (max-width: 389.98px) {
    .station-actions {
        grid-template-columns: 1fr;
    }

    .station-action-wide {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
