/*
 * Global design system for St. George United.
 *
 * Bright, energetic sports-academy palette (temporary — every important
 * value is a custom property so the official brand palette can be
 * substituted later without touching component code). The footer keeps a
 * deliberate dark-navy surface as a contrast anchor; it uses its own
 * dedicated tokens (--surface-footer*, --footer-text*) rather than the
 * light-theme text/surface tokens, so it stays legible after the palette
 * flip below.
 */

:root {
    /* Brand palette */
    --brand-primary: #d9233f;
    --brand-primary-hover: #b91832;
    --brand-blue: #246bce;
    --brand-blue-hover: #1b5aa8;
    --brand-sky: #dff1ff;
    --brand-energy: #ffb52e;
    --brand-green: #3a9b67;

    /* Surfaces — bright theme (header, hero, body, cards) */
    --surface-main: #ffffff;
    --surface-soft: #f3f8fd;
    --surface-warm: #fff7e8;

    /* Surfaces — footer only (intentional dark-navy contrast anchor) */
    --surface-footer: #102344;
    --surface-footer-alt: #16305c;

    /* Text — light theme */
    --text-primary: #10243e;
    --text-secondary: #53657a;
    --text-on-brand: #ffffff;

    /* Text — footer only */
    --footer-text: rgba(255, 255, 255, 0.85);
    --footer-text-muted: rgba(255, 255, 255, 0.62);

    /* Borders */
    --border-soft: rgba(16, 36, 62, 0.12);

    /* Layout */
    --container-width: 1200px;
    --header-height: 76px;
    --section-spacing: clamp(3rem, 6vw, 7rem);
    --border-radius: 10px;

    /* Motion */
    --transition-standard: 220ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Type */
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-display: var(--font-body);
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--surface-soft);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Prevents background scroll while the mobile menu is open (JS toggles this). */
body.nav-open {
    overflow: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

p {
    color: var(--text-secondary);
}

/* Visible keyboard focus everywhere; never remove without replacing. */
:focus-visible {
    outline: 3px solid var(--brand-energy);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 1000;
    background: var(--surface-main);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(16, 36, 62, 0.18);
    transition: top var(--transition-standard);
}

.skip-link:focus {
    top: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.6rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: transform var(--transition-standard), background-color var(--transition-standard), border-color var(--transition-standard), color var(--transition-standard);
    min-height: 44px;
    min-width: 44px;
}

.btn--primary {
    background-color: var(--brand-primary);
    color: var(--text-on-brand);
}

.btn--primary:hover {
    background-color: var(--brand-primary-hover);
    transform: translateY(-1px);
}

.btn--secondary {
    background-color: var(--surface-main);
    color: var(--text-primary);
    border: 1.5px solid var(--border-soft);
}

.btn--secondary:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    transform: translateY(-1px);
}

.btn--secondary .btn__icon {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-standard);
}

.btn--secondary:hover .btn__icon {
    transform: translateX(2px);
}

.btn--compact {
    padding: 0.65rem 1.25rem;
    font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
    .btn:hover {
        transform: none;
    }

    .btn--secondary:hover .btn__icon {
        transform: none;
    }
}

/* ==========================================================================
   Site header
   ========================================================================== */

.site-header {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(16, 36, 62, 0.06);
    transition: background-color var(--transition-standard), box-shadow var(--transition-standard);
}

.site-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 24px rgba(16, 36, 62, 0.10);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: 100%;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.site-header__brand picture {
    display: block;
}

.site-header__logo {
    display: block;
    width: auto;
    height: 34px;
}

@media (min-width: 480px) {
    .site-header__logo {
        height: 41px;
    }
}

@media (min-width: 900px) {
    .site-header__logo {
        height: 48px;
    }
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
}

.site-nav__link {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0.78;
    padding-block: 0.25rem;
    border-bottom: 2px solid transparent;
    transition: opacity var(--transition-standard), border-color var(--transition-standard);
}

.site-nav__link:hover {
    opacity: 1;
    border-color: var(--brand-blue);
}

.site-nav__link[aria-current="page"] {
    opacity: 1;
    border-color: var(--brand-primary);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-header__cta {
    white-space: nowrap;
}

/* Nav toggle (hamburger) — hidden on desktop */
.nav-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border-radius: var(--border-radius);
    color: var(--text-primary);
}

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
}

.nav-toggle--close {
    font-size: 1.75rem;
    line-height: 1;
}

@media (max-width: 900px) {
    .site-nav {
        display: none;
    }

    .site-header__cta {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }
}

/* ==========================================================================
   Mobile navigation panel
   ========================================================================== */

.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 200;
    /* Translucent dark scrim behind the panel — the panel itself (below)
       is a bright, light surface as required; this is just a backdrop. */
    background-color: rgba(16, 36, 62, 0.45);
    display: flex;
    justify-content: flex-end;
}

.mobile-nav[hidden] {
    display: none;
}

.mobile-nav__panel {
    width: 100%;
    max-width: 420px;
    height: 100%;
    margin-inline-start: auto;
    background-color: var(--surface-main);
    box-shadow: -12px 0 32px rgba(16, 36, 62, 0.18);
    padding: 1.25rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
}

.mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav__brand {
    display: block;
}

.mobile-nav__brand picture {
    display: block;
}

.mobile-nav__logo {
    display: block;
    width: auto;
    height: 30px;
}

.mobile-nav__list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav__link {
    display: block;
    padding: 1rem 0.25rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-soft);
    min-height: 44px;
}

.mobile-nav__cta {
    width: 100%;
}

/* ==========================================================================
   Footer shell
   ========================================================================== */

.site-footer {
    background-color: var(--surface-footer);
    color: var(--footer-text);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer p {
    color: var(--footer-text-muted);
}

.site-footer__inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    padding-block: clamp(2.5rem, 5vw, 4rem);
}

.site-footer__brand-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--footer-text);
}

.site-footer__tagline {
    margin-top: 0.5rem;
    max-width: 32ch;
}

.site-footer__nav ul,
.site-footer__legal {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.site-footer__nav a,
.site-footer__contact a,
.site-footer__legal a {
    color: var(--footer-text-muted);
    transition: color var(--transition-standard);
}

.site-footer__nav a:hover,
.site-footer__contact a:hover,
.site-footer__legal a:hover {
    color: var(--footer-text);
}

.site-footer__placeholder {
    font-style: italic;
}

.site-footer__bottom {
    padding-block: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.85rem;
    color: var(--footer-text-muted);
}
