@font-face {
    font-family: 'FC Bayern Sans';
    src: url('../fonts/fc-bayern/FCBayernSans-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans';
    src: url('../fonts/fc-bayern/FCBayernSans-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans';
    src: url('../fonts/fc-bayern/FCBayernSans-RegularItalic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans';
    src: url('../fonts/fc-bayern/FCBayernSans-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans';
    src: url('../fonts/fc-bayern/FCBayernSans-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans';
    src: url('../fonts/fc-bayern/FCBayernSans-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans';
    src: url('../fonts/fc-bayern/FCBayernSans-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans Condensed';
    src: url('../fonts/fc-bayern/FCBayernSans-CondRegular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans Condensed';
    src: url('../fonts/fc-bayern/FCBayernSans-CondSemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans Condensed';
    src: url('../fonts/fc-bayern/FCBayernSans-CondBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans Condensed';
    src: url('../fonts/fc-bayern/FCBayernSans-CondExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans Compressed';
    src: url('../fonts/fc-bayern/FCBayernSans-CompExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans Poster';
    src: url('../fonts/fc-bayern/FCBayernSans-PosterExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans Poster';
    src: url('../fonts/fc-bayern/FCBayernSans-PosterExtraBoldItalic.woff2') format('woff2');
    font-weight: 800;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'FC Bayern Sans Poster';
    src: url('../fonts/fc-bayern/FCBayernSans-PosterBlack.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Official FC Bayern RGB palette supplied in FCBayern_Colors.scss. */
    --fcb-red: #ed0037;
    --fcb-blue: #286cfc;
    --fcb-white: #ffffff;
    --fcb-near-black: #050505;
    --fcb-off-black: #050505;
    --fcb-charcoal: #050505;
    --fcb-gold: #cfbf91;
    --fcb-athletic-azure: #6effa3;
    --fcb-royal-red: #461023;
    --fcb-bold-purple: #6c00d1;
    --fcb-electric-blue: #0000ff;
    --fcb-shadow-red: #de0034;
    --fcb-sprinter-yellow: #ffff87;
    --fcb-bright-grass: #00ff00;
    --fcb-flash-orange: #ffb900;
    --fcb-bavarian-sky: #00ffff;
    --fcb-aggressive-pink: #ff00b4;
    --fcb-royal-blue: #00006e;
    --fcb-grey: #e6e6e6;
    --fcb-black: #000000;

    /* Compatibility aliases used by the existing standalone pages. */
    --red: var(--fcb-red);
    --charcoal: var(--fcb-near-black);
    --white: var(--fcb-white);
    --cream: var(--fcb-grey);
    --fcb-cream: var(--fcb-grey);
    --fcb-deep-red: var(--fcb-royal-red);
    --fcb-dark-gray: #333333;
    --fcb-muted-gray: #666666;
    --font-main: 'FC Bayern Sans', Arial, Helvetica, sans-serif;
    --font-body: 'FC Bayern Sans', Arial, Helvetica, sans-serif;
    --body: 'FC Bayern Sans', Arial, Helvetica, sans-serif;
    --font-display: 'FC Bayern Sans Compressed', 'FC Bayern Sans Poster', Impact, sans-serif;
    --font-poster: 'FC Bayern Sans Compressed', 'FC Bayern Sans Poster', Impact, sans-serif;
    --display: 'FC Bayern Sans Compressed', 'FC Bayern Sans Poster', Impact, sans-serif;
}

.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: var(--fcb-royal-red);
    color: var(--fcb-white);
    font-family: 'FC Bayern Sans', Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 1.4px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
}

.announcement-bar:hover,
.announcement-bar:focus-visible {
    background: var(--fcb-red);
}

.announcement-arrow {
    display: inline-flex;
    margin-left: 10px;
    color: var(--fcb-white);
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

.announcement-bar:hover .announcement-arrow,
.announcement-bar:focus-visible .announcement-arrow {
    transform: translate(4px, -1px);
}

body {
    padding-top: 34px;
    font-family: 'FC Bayern Sans', Arial, Helvetica, sans-serif;
    background-color: #f8f9fa;
    background-image: url('../images/backgrounds/cloudy-white-texture.webp');
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
}

/* Keep hero, section, and card headlines consistent across every website page. */
h1,
h2,
h3 {
    text-transform: uppercase !important;
}

.contact-item svg,
.contact-row-item svg {
    flex-shrink: 0;
}

.contact-item a,
.contact-row-item a {
    overflow-wrap: anywhere;
}

/* Cloudy-white editorial surfaces inspired by the official Academy layout. */
:where(
    .editorial-section,
    .age-group-section,
    .alumni-section,
    .programs-section,
    .cta,
    .intro,
    .news-section,
    .scholarship-grid
) {
    background-color: rgba(248, 249, 250, 0.9) !important;
    background-image:
        linear-gradient(
            to bottom,
            var(--fcb-white) 0%,
            rgba(255, 255, 255, 0.96) 4%,
            rgba(255, 255, 255, 0.62) 11%,
            rgba(255, 255, 255, 0) 21%,
            rgba(255, 255, 255, 0) 79%,
            rgba(255, 255, 255, 0.62) 89%,
            rgba(255, 255, 255, 0.96) 96%,
            var(--fcb-white) 100%
        ),
        url('../images/backgrounds/cloudy-white-texture.webp') !important;
    background-position: center, center !important;
    background-size: 100% 100%, cover !important;
    background-repeat: no-repeat !important;
}

/* Alternate adjacent light sections with a clean white surface. */
:where(
    .manifesto,
    .section-solid-dark-block,
    .cta-section,
    .rhythm,
    .form-section,
    .legal-shell,
    .page-content-split,
    .pill-card-96
) {
    background-color: var(--fcb-white) !important;
    background-image: none !important;
}

/* Bayern Red is reserved for editorial headlines on light surfaces. */
:where(
    .editorial-section .section-header h2,
    .manifesto h2,
    .age-group-header h2,
    .split-dark-grid-layout h2,
    .alumni-heading h2,
    .cta-section h2,
    .programs-section .section-heading h2,
    .rhythm h2,
    .schedule-item h3,
    .cta h2,
    .intro h2,
    .form-intro h2,
    .success h2,
    .news-heading-row h1,
    .featured-copy h2,
    .story-copy h3,
    .legal-shell > h1,
    .legal-shell section h2,
    .page-content-split h2,
    .page-content-split h3,
    .scholarship-grid h2,
    .scholarship-grid h3,
    .pill-card-96 h3
) {
    color: var(--fcb-red) !important;
}

/* Preserve page hierarchy: section titles remain subordinate to hero headlines. */
main section:not(.hero) h2 {
    font-family: var(--font-display);
    font-size: clamp(36px, 5.6vw, 92px) !important;
    line-height: 0.9 !important;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.main-header,
.left-nav,
.topbar {
    top: 34px !important;
}

.announcement-bar,
.main-header,
.left-nav,
.topbar,
.apply-nav {
    transition: opacity 220ms ease, transform 280ms cubic-bezier(0.22, 1, 0.36, 1), visibility 280ms ease !important;
}

body.nav-hidden .announcement-bar,
body.nav-hidden .main-header,
body.nav-hidden .left-nav,
body.nav-hidden .topbar,
body.nav-hidden .apply-nav {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.nav-hidden .announcement-bar,
body.nav-hidden .main-header,
body.nav-hidden .topbar,
body.nav-hidden .apply-nav {
    transform: translateY(-24px) !important;
}

body.nav-hidden .left-nav {
    transform: none !important;
}

/* Shared three-column footer spacing, matched to the approved reference. */
.main-footer > .footer-grid,
.footer-container > .footer-grid {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    grid-template-columns: minmax(160px, 0.75fr) minmax(260px, 1.15fr) minmax(280px, 1fr);
    column-gap: clamp(64px, 9vw, 160px);
}

.footer-container {
    max-width: 1480px;
    padding-left: clamp(24px, 6vw, 96px);
    padding-right: clamp(24px, 6vw, 96px);
}

.footer-academy-locations {
    margin-top: 32px;
}

.footer-academy-locations h5 {
    margin: 0 0 32px;
    color: var(--fcb-white);
    font-family: var(--font-main);
    font-size: 24px;
    font-weight: 700;
    letter-spacing: normal;
    line-height: normal;
    text-transform: none;
}

.footer-academy-locations a {
    display: block;
    margin-bottom: 16px;
    color: var(--fcb-white);
    font-size: 16px;
    line-height: 1.5;
    text-decoration: none;
}

.footer-academy-locations a:hover {
    opacity: 0.72;
}

@media (max-width: 1024px) {
    .main-footer > .footer-grid,
    .footer-container > .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 64px;
    }
}

@media (max-width: 768px) {
    body:not(.apply-page) .left-nav .nav-logo-wrapper {
        top: 40px !important;
        padding: 8px 12px 0 !important;
    }

    body:not(.apply-page) .left-nav .nav-logo-box {
        width: 160px !important;
        height: 64px !important;
    }

    body:not(.apply-page) .left-nav .crest-icon {
        width: 150px !important;
        max-width: 150px !important;
    }

    body:not(.apply-page) .main-header .academy-nav-logo {
        width: 88px;
        height: 88px;
        border-radius: 0 0 44px 44px;
    }

    body:not(.apply-page) .main-header .academy-nav-logo .header-crest-img {
        width: 150px;
        max-width: none;
        transform: translateY(3px);
    }

    .main-footer > .footer-grid,
    .footer-container > .footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .announcement-bar {
        min-height: 40px;
        font-size: 10px;
        letter-spacing: 1px;
    }

    body {
        padding-top: 40px;
    }

    .main-header,
    .left-nav,
    .topbar {
        top: 40px !important;
    }
}

/* Registration announcement */
.registration-promo {
    position: fixed;
    right: clamp(16px, 2vw, 32px);
    bottom: clamp(16px, 2vw, 32px);
    z-index: 1900;
    width: min(380px, calc(100vw - 32px));
    background: transparent;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(24px) scale(0.98);
    transform-origin: bottom right;
    transition:
        opacity 220ms ease-out,
        transform 260ms cubic-bezier(0.23, 1, 0.32, 1),
        visibility 0s linear 260ms;
    isolation: isolate;
}

.registration-promo.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.registration-promo__close {
    position: absolute;
    top: -14px;
    right: -14px;
    z-index: 2;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    color: #fff;
    font: 300 30px/1 Arial, Helvetica, sans-serif;
    background: rgba(8, 9, 11, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(8px);
}

.registration-promo__poster-link {
    display: block;
    width: 100%;
    overflow: hidden;
    text-decoration: none;
    border-radius: 16px;
}

.registration-promo__poster {
    display: block;
    width: 100%;
    height: auto;
}

.registration-promo__close:focus-visible,
.registration-promo__poster-link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -5px;
}

@media (hover: hover) {
    .registration-promo__close:hover {
        background: rgba(220, 5, 45, 0.9);
    }

    .registration-promo__poster-link:hover .registration-promo__poster {
        filter: brightness(0.94);
    }
}

@media (max-width: 640px) {
    .registration-promo {
        top: 50%;
        right: auto;
        bottom: auto;
        left: 50%;
        width: min(88vw, 360px, calc(88dvh * 0.79296875));
        max-height: 88dvh;
        border-radius: 14px;
        transform: translate(-50%, calc(-50% + 20px)) scale(0.98);
        transform-origin: center;
    }

    .registration-promo__poster-link {
        border-radius: 14px;
    }

    .registration-promo.is-visible {
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .registration-promo {
        transition-duration: 0.01ms;
    }

    .registration-promo:not(.is-visible) {
        transform: none;
    }
}
