/* ============================================================
   NABME — thenabme.org
   National Advisory Board for Motorsports Education
   ============================================================ */

/* 01. CUSTOM PROPERTIES
   ============================================================ */
:root {
    /* Brand */
    --nabme-blue: #5B6FA5;
    --nabme-blue-dark: #2D3A5C;
    --nabme-blue-deeper: #1E2840;
    --nabme-blue-light: #EEF1F8;
    --nabme-red: #C41230;
    --nabme-red-dark: #9E0E26;

    /* Neutrals */
    --white: #FFFFFF;
    --bg: #F5F6FA;
    --border: #E2E5EC;
    --text: #1A1E2E;
    --text-muted: #5A6175;
    --text-light: #8A90A2;

    /* Type */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Manrope', var(--font);

    /* Layout */
    --max-w: 1140px;
    --radius: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 02. RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--nabme-blue);
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

a:hover {
    color: var(--nabme-red);
}

ul {
    list-style: none;
}

/* 03. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 24px;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* 04. LAYOUT
   ============================================================ */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 96px 0;
}

.section-light {
    background: var(--white);
}

.section-alt {
    background: var(--bg);
}

.section-dark {
    background: var(--nabme-blue-dark);
    color: var(--white);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
    color: var(--white);
}

.section-label {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--nabme-red);
    margin-bottom: 12px;
}

.section-label-light {
    color: rgba(255,255,255,0.7);
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 720px;
    margin-bottom: 48px;
}

.section-dark .section-intro {
    color: rgba(255,255,255,0.75);
}

/* 05. BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s var(--ease);
    text-decoration: none;
    gap: 8px;
}

.btn-primary {
    background: var(--nabme-red);
    color: var(--white);
    border-color: var(--nabme-red);
}

.btn-primary:hover {
    background: var(--nabme-red-dark);
    border-color: var(--nabme-red-dark);
    color: var(--white);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
    color: var(--white);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

/* 06. NAV
   ============================================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    transition: box-shadow 0.3s var(--ease);
}

.site-nav.scrolled {
    box-shadow: var(--shadow);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo img {
    height: 44px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: color 0.2s var(--ease);
}

.nav-links a:hover {
    color: var(--nabme-red);
}

.nav-links .btn {
    color: var(--white);
}

.nav-links .btn:hover {
    color: var(--white);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 999;
    padding: 32px 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}

.mobile-nav.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-nav-links a {
    display: block;
    padding: 16px 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.mobile-nav-links a:hover {
    color: var(--nabme-red);
}

/* 07. HERO
   ============================================================ */
.section-hero {
    background: url('images/hero-bg.jpg') center center / cover no-repeat;
    padding: 180px 0 140px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(30,40,64,0.92) 0%,
        rgba(45,58,92,0.85) 40%,
        rgba(91,111,165,0.75) 100%
    );
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    margin: 0 auto 32px;
    height: 64px;
    width: auto;
}

.section-hero h1 {
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.hero-tagline {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.85);
    max-width: 640px;
    margin: 0 auto 28px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.2);
}

.hero-accent {
    width: 72px;
    height: 4px;
    background: var(--nabme-red);
    margin: 0 auto 40px;
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(196,18,48,0.4);
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 08. MISSION
   ============================================================ */
.mission-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 64px;
    align-items: start;
    margin-top: 8px;
}

.mission-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.mission-text p:first-child {
    color: var(--text);
    font-size: 1.05rem;
}

.mission-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--nabme-blue);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-disciplines {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 10px;
    list-style: none;
}

.stat-disciplines li {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--nabme-blue);
    background: var(--white);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* 09. PRINCIPLES GRID
   ============================================================ */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.principle-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    border: 1px solid var(--border);
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.principle-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.principle-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: var(--nabme-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--nabme-blue);
}

.principle-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.principle-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 10. PARTNERS
   ============================================================ */
.partners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.partner-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    border: 1px solid var(--border);
}

.partner-logo-area {
    margin-bottom: 20px;
}

.partner-logo-img {
    max-height: 64px;
    width: auto;
    object-fit: contain;
}

.partner-name-display {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--nabme-blue-dark);
    letter-spacing: 0.02em;
}

.partner-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--text);
}

.partner-card h3 a {
    color: var(--text);
}

.partner-card h3 a:hover {
    color: var(--nabme-red);
}

.partner-card p a {
    color: var(--nabme-blue);
    font-weight: 500;
}

.partner-card p a:hover {
    color: var(--nabme-red);
}

.partner-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.65;
}

.partner-signatory {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.partner-signatory strong {
    font-size: 0.95rem;
    color: var(--text);
}

.partner-signatory span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 11. BOARD / TEAM
   ============================================================ */
.board-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.board-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 20px 24px;
    text-align: center;
    border: 1px solid var(--border);
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.board-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.board-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    border: 3px solid var(--nabme-blue-light);
}

.board-card h4 {
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.board-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* 11b. COMMITTEE
   ============================================================ */
.committee-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.committee-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 20px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 140px;
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.committee-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.committee-logo {
    max-height: 52px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.committee-logos-dual {
    display: flex;
    align-items: center;
    gap: 12px;
}

.committee-logos-dual .committee-logo {
    max-height: 40px;
    max-width: 80px;
}

.committee-name {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* 12. CONTACT / CTA
   ============================================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 64px;
    align-items: center;
}

.contact-text h2 {
    margin-bottom: 16px;
}

.contact-text p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-list li {
    padding-left: 24px;
    position: relative;
    color: rgba(255,255,255,0.75);
    font-size: 0.95rem;
}

.contact-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nabme-red);
}

.contact-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    text-align: center;
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.contact-card p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.contact-card .btn {
    width: 100%;
    margin-bottom: 16px;
}

.contact-email {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

/* 13. FOOTER
   ============================================================ */
.site-footer {
    background: var(--nabme-blue-deeper);
    color: rgba(255,255,255,0.6);
    padding: 28px 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom a {
    color: rgba(255,255,255,0.6);
}

.footer-bottom a:hover {
    color: var(--white);
}

.footer-bottom p {
    font-size: 0.8rem;
}

.footer-llms {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    transition: color 0.2s var(--ease);
}

.footer-llms:hover {
    color: rgba(255,255,255,0.6);
}

/* 14. RESPONSIVE
   ============================================================ */
@media (max-width: 968px) {
    .mission-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .mission-stats {
        flex-direction: row;
    }

    .stat-card {
        flex: 1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 768px) {
    .section {
        padding: 64px 0;
    }

    .section-hero {
        padding: 140px 0 80px;
        min-height: 440px;
    }

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .mission-stats {
        flex-direction: column;
    }

    .principles-grid {
        grid-template-columns: 1fr;
    }

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

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

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    h1 {
        font-size: 1.85rem;
    }

    h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .board-grid {
        grid-template-columns: 1fr;
    }

    .committee-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* 15. UTILITIES
   ============================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
