:root {
    --navy: #0f2744;
    --navy-2: #17385f;
    --blue: #2b65a4;
    --gold: #d7a83d;
    --ink: #172233;
    --muted: #687486;
    --surface: #ffffff;
    --soft: #f3f6f9;
    --line: #dde4eb;
    --shadow: 0 18px 50px rgba(15, 39, 68, 0.10);
    --shadow-hover: 0 20px 45px rgba(15, 39, 68, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--soft);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    font: inherit;
}

.container {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(221, 228, 235, 0.9);
    backdrop-filter: blur(16px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--navy);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 39, 68, 0.18);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 0.98rem;
    letter-spacing: 0.01em;
}

.brand small {
    color: var(--muted);
    font-size: 0.75rem;
    margin-top: -1px;
}

.header-label {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 600;
}

.hero {
    position: relative;
    min-height: 390px;
    display: flex;
    align-items: end;
    overflow: hidden;
    background: var(--navy);
}

.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-image {
    background: url('../afb/bg.png') center 53% / cover no-repeat;
    transform: scale(1.015);
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(9, 27, 48, 0.92) 0%, rgba(9, 27, 48, 0.72) 42%, rgba(9, 27, 48, 0.18) 75%),
        linear-gradient(0deg, rgba(9, 27, 48, 0.5) 0%, rgba(9, 27, 48, 0) 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-block: 78px 64px;
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--gold);
    border-radius: 99px;
}

.eyebrow.dark {
    color: var(--blue);
}

.hero h1 {
    margin: 13px 0 12px;
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.hero p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.favorites-section {
    padding: 72px 0 82px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 28px;
}

.section-heading h2 {
    margin: 8px 0 0;
    color: var(--navy);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.section-heading > p {
    max-width: 380px;
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.favorite-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.favorite-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    text-decoration: none;
    box-shadow: 0 6px 22px rgba(15, 39, 68, 0.04);
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.card-button {
    width: 100%;
    cursor: pointer;
}

.favorite-card:hover,
.favorite-card:focus-visible {
    transform: translateY(-4px);
    border-color: #c5d3e1;
    box-shadow: var(--shadow-hover);
    outline: none;
}

.favorite-card.featured {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
    border-color: transparent;
}

.favorite-card.featured .card-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.favorite-card.featured .card-copy small,
.favorite-card.featured .card-arrow {
    color: rgba(255, 255, 255, 0.7);
}

.card-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #edf3f8;
    color: var(--navy);
    font-size: 1.05rem;
    font-weight: 800;
}

.card-copy {
    min-width: 0;
}

.card-copy strong,
.card-copy small {
    display: block;
}

.card-copy strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.card-copy small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.8rem;
}

.card-arrow {
    color: #a2adba;
    font-size: 1.15rem;
    transition: transform 180ms ease, color 180ms ease;
}

.favorite-card:hover .card-arrow,
.favorite-card:focus-visible .card-arrow {
    transform: translate(2px, -2px);
    color: var(--blue);
}

.favorite-card.featured:hover .card-arrow,
.favorite-card.featured:focus-visible .card-arrow {
    color: #fff;
}

.site-footer {
    background: #0b1d33;
    color: rgba(255, 255, 255, 0.62);
}

.footer-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    font-size: 0.82rem;
}

.footer-inner p {
    margin: 0;
}

.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(7, 20, 36, 0.72);
    backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.popup {
    position: relative;
    width: min(100%, 470px);
    padding: 36px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
    text-align: left;
    transform: translateY(12px) scale(0.98);
    transition: transform 180ms ease;
}

.popup-overlay.visible .popup {
    transform: translateY(0) scale(1);
}

.popup-x {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #f1f4f7;
    color: var(--navy);
    cursor: pointer;
    font-size: 1.45rem;
    line-height: 1;
}

.popup-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 17px;
    background: var(--navy);
    color: #fff;
    font-size: 1.3rem;
}

.popup h2 {
    margin: 8px 0 8px;
    color: var(--navy);
    font-size: 1.8rem;
    letter-spacing: -0.03em;
}

.popup > p {
    margin: 0 0 24px;
    color: var(--muted);
}

.popup-actions {
    display: grid;
    gap: 10px;
}

.action {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 17px;
    border: 1px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 750;
    text-align: left;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.action:hover,
.action:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.action.primary {
    background: var(--navy);
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 39, 68, 0.18);
}

.action.secondary {
    border-color: var(--line);
    background: #f7f9fb;
    color: var(--navy);
}

.close-link {
    margin: 18px auto 0;
    display: block;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .favorite-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-overlay {
        background: linear-gradient(90deg, rgba(9, 27, 48, 0.91), rgba(9, 27, 48, 0.48));
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 28px, 1160px);
    }

    .header-inner {
        min-height: 68px;
    }

    .header-label {
        display: none;
    }

    .hero {
        min-height: 345px;
    }

    .hero-image {
        background-position: 46% center;
    }

    .hero-overlay {
        background: linear-gradient(90deg, rgba(9, 27, 48, 0.9), rgba(9, 27, 48, 0.62));
    }

    .hero-content {
        padding-block: 70px 46px;
    }

    .favorites-section {
        padding: 52px 0 60px;
    }

    .section-heading {
        display: block;
        margin-bottom: 22px;
    }

    .section-heading > p {
        margin-top: 12px;
    }

    .favorite-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .favorite-card {
        min-height: 96px;
        padding: 17px;
        border-radius: 18px;
    }

    .popup {
        padding: 30px 22px 24px;
        border-radius: 23px;
    }

    .footer-inner {
        min-height: 76px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
