/* ====================================================
   DE OUDE 8 VAN LEDE — Modern Spectacular CSS
   ==================================================== */

/* ---------- Custom Properties ---------- */
:root {
    --clr-bg:        #080808;
    --clr-surface:   #101010;
    --clr-surface2:  #161616;
    --clr-border:    rgba(255,255,255,0.07);
    --clr-accent:    #F5C319;       /* racing yellow */
    --clr-accent-dk: #c99900;
    --clr-text:      #f0f0f0;
    --clr-muted:     rgba(240,240,240,0.45);
    --clr-card:      rgba(255,255,255,0.04);

    --font-display:  'Bebas Neue', sans-serif;
    --font-heading:  'Montserrat', sans-serif;
    --font-body:     'Inter', sans-serif;

    --nav-h:         72px;
    --radius:        16px;
    --radius-sm:     10px;
    --transition:    0.35s cubic-bezier(0.4,0,0.2,1);

    --max-w:         1200px;
    --section-pad:   120px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
    background: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--clr-bg); }
::-webkit-scrollbar-thumb { background: var(--clr-accent); border-radius: 3px; }

/* ====================================================
   NAVIGATION
   ==================================================== */
#nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline: 0;
    z-index: 1000;
    height: var(--nav-h);
    transition: background var(--transition), box-shadow var(--transition);
}
#nav.scrolled {
    background: rgba(8,8,8,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--clr-border);
}

.nav-container {
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.03em;
    line-height: 1;
}
.brand-number {
    color: var(--clr-accent);
    font-size: 2rem;
    line-height: 1;
}
.brand-text { color: var(--clr-text); }

/* Nav links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-menu a {
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--clr-muted);
    transition: color var(--transition), background var(--transition);
}
.nav-menu a:hover { color: var(--clr-text); background: rgba(255,255,255,0.05); }
.nav-menu a.nav-btn {
    background: var(--clr-accent);
    color: #000;
    font-weight: 700;
    padding: 0.45rem 1.1rem;
}
.nav-menu a.nav-btn:hover { background: #fff; }

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.burger span {
    display: block;
    height: 2px;
    background: var(--clr-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ====================================================
   HERO
   ==================================================== */
#hero {
    position: relative;
    height: 100svh;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
}
.hero-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}
.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(8,8,8,0.5) 0%, transparent 30%),
        linear-gradient(to top,    rgba(8,8,8,1)   0%, transparent 50%),
        linear-gradient(to right,  rgba(8,8,8,0.7) 0%, transparent 60%);
}

.hero-body {
    position: relative;
    z-index: 2;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: 2rem;
    padding-top: var(--nav-h);
}
.hero-tag {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.2s forwards;
}
.hero-headline {
    font-family: var(--font-display);
    line-height: 0.9;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.35s forwards;
}
.hero-headline .line-small {
    display: block;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    color: var(--clr-text);
    letter-spacing: 0.04em;
}
.hero-headline .line-big {
    display: block;
    font-size: clamp(5rem, 16vw, 12rem);
    letter-spacing: 0.01em;
    color: var(--clr-text);
}
.hero-headline em {
    font-style: normal;
    color: var(--clr-accent);
    text-shadow: 0 0 60px rgba(245,195,25,0.5);
}
.hero-date {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--clr-muted);
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.5s forwards;
}
.hero-date svg { width: 18px; height: 18px; flex-shrink: 0; }

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    opacity: 0;
    animation: fadeUp 0.8s 0.65s forwards;
}
.cta-primary {
    background: var(--clr-accent);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    letter-spacing: 0.03em;
    transition: transform var(--transition), box-shadow var(--transition);
}
.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(245,195,25,0.4);
}
.cta-ghost {
    color: var(--clr-text);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.9rem 1.5rem;
    border-radius: 50px;
    border: 1.5px solid rgba(255,255,255,0.25);
    transition: border-color var(--transition), background var(--transition);
}
.cta-ghost:hover {
    border-color: var(--clr-accent);
    color: var(--clr-accent);
}

/* Hero stats bar */
.hero-stats {
    position: absolute;
    bottom: 0;
    inset-inline: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--clr-border);
    padding: 1.25rem 2rem;
    animation: fadeIn 1s 0.9s both;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-inline: 2.5rem;
}
.stat-num {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--clr-accent);
    line-height: 1;
}
.stat-num small { font-size: 1rem; }
.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--clr-muted);
    margin-top: 0.2rem;
}
.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--clr-border);
    flex-shrink: 0;
}

/* Scroll hint */
.scroll-hint {
    position: absolute;
    bottom: 90px;
    right: 2.5rem;
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-muted);
    animation: bounce 2.5s ease-in-out infinite 1.5s;
    transition: border-color var(--transition), color var(--transition);
}
.scroll-hint:hover { border-color: var(--clr-accent); color: var(--clr-accent); }
.scroll-hint svg { width: 20px; height: 20px; }

/* ====================================================
   SECTIONS (shared)
   ==================================================== */
.section {
    padding-block: var(--section-pad);
}
.section-dark {
    background: var(--clr-surface);
}
.container {
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: 2rem;
}
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clr-accent);
    margin-bottom: 0.75rem;
}
.section-title {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.section-intro {
    font-size: 1.05rem;
    color: var(--clr-muted);
    max-width: 600px;
    margin-bottom: 3rem;
}
.text-link {
    color: var(--clr-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.text-link:hover { color: #fff; }

/* ====================================================
   RACE CARDS
   ==================================================== */
.races {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.race {
    position: relative;
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    background: var(--clr-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color var(--transition), transform var(--transition);
}
.race:hover {
    border-color: rgba(245,195,25,0.25);
    transform: translateY(-4px);
}

.race--hero {
    border-color: rgba(245,195,25,0.35);
    background: linear-gradient(160deg, rgba(245,195,25,0.08) 0%, transparent 60%);
}
.race-glow {
    position: absolute;
    top: -60px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(245,195,25,0.18) 0%, transparent 70%);
    pointer-events: none;
}

.race-header {
    padding: 2rem 2rem 1.5rem;
    border-bottom: 1px solid var(--clr-border);
}
.race-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--clr-accent);
    color: #000;
    border-radius: 50px;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.75rem;
}
.race-header h3 {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}
.race-header p {
    font-size: 0.82rem;
    color: var(--clr-muted);
    line-height: 1.4;
}

.race-body {
    padding: 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.race-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    font-size: 0.9rem;
}
.race-key { color: var(--clr-muted); flex-shrink: 0; }
.race-val { font-weight: 500; text-align: right; }
.race-val.accent { color: var(--clr-accent); font-weight: 700; font-size: 1rem; }
.race-val strong { color: var(--clr-accent); }

.race-track {
    height: 4px;
    background: var(--clr-border);
}
.track-fill {
    height: 100%;
    width: var(--pct, 50%);
    background: linear-gradient(90deg, var(--clr-accent-dk), var(--clr-accent));
    transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* After party banner */
.party-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(245,195,25,0.1), rgba(245,195,25,0.04));
    border: 1px solid rgba(245,195,25,0.2);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
}
.party-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px rgba(245,195,25,0.6));
}
.party-text {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.party-text strong {
    font-size: 1.05rem;
    font-weight: 700;
}
.party-text span {
    font-size: 0.9rem;
    color: var(--clr-muted);
}

/* ====================================================
   PARCOURS
   ==================================================== */
.parcours-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    border-radius: 50px;
    border: 1.5px solid rgba(255,255,255,0.2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--clr-text);
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.pill-btn:hover {
    border-color: var(--clr-accent);
    color: var(--clr-accent);
    background: rgba(245,195,25,0.06);
}
.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--clr-border);
    aspect-ratio: 16 / 7;
    background: var(--clr-surface2);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ====================================================
   SPONSORS
   ==================================================== */
.sponsor-wrap {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--clr-border);
    background: var(--clr-surface2);
    padding: 2rem;
}
.sponsor-wrap img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* ====================================================
   INSCHRIJVEN
   ==================================================== */
.form-shell {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--clr-border);
    background: #fff;
}
.form-shell iframe {
    width: 100%;
    height: 1200px;
    border: none;
}

/* ====================================================
   CONTACT
   ==================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 2rem;
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    transition: border-color var(--transition), transform var(--transition);
}
.contact-card:hover {
    border-color: rgba(245,195,25,0.3);
    transform: translateY(-3px);
}
.contact-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(245,195,25,0.1);
    border: 1px solid rgba(245,195,25,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    color: var(--clr-accent);
}
.contact-card-icon svg { width: 22px; height: 22px; }
.contact-card h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}
.contact-card p { font-size: 0.85rem; color: var(--clr-muted); }
.contact-link {
    margin-top: 0.5rem;
    color: var(--clr-accent);
    font-weight: 600;
    font-size: 0.9rem;
    word-break: break-all;
    transition: color var(--transition);
}
a.contact-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ====================================================
   FOOTER
   ==================================================== */
#footer {
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
    padding-block: 2.5rem;
}
.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.footer-nav a {
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    color: var(--clr-muted);
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}
.footer-nav a:hover { color: var(--clr-text); background: rgba(255,255,255,0.05); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--clr-muted);
    border-top: 1px solid var(--clr-border);
    padding-top: 1.5rem;
}
.footer-bottom a { color: var(--clr-accent); }
.footer-bottom a:hover { text-decoration: underline; }

/* ====================================================
   SCROLL REVEAL ANIMATIONS
   ==================================================== */
.reveal-up {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1),
                transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}
.races .reveal-up:nth-child(2) { transition-delay: 0.1s; }
.races .reveal-up:nth-child(3) { transition-delay: 0.2s; }
.contact-grid .reveal-up:nth-child(2) { transition-delay: 0.1s; }
.contact-grid .reveal-up:nth-child(3) { transition-delay: 0.2s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(7px); }
}

/* ====================================================
   RESPONSIVE
   ==================================================== */

/* --- Tablet landscape: 960px and below --- */
@media (max-width: 960px) {
    :root { --section-pad: 80px; }

    /* 2-col race cards on tablet */
    .races {
        grid-template-columns: repeat(2, 1fr);
        max-width: none;
    }
    /* Make the featured (middle) card span full width */
    .race--hero {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: stretch;
    }
    .race--hero .race-header {
        flex: 0 0 260px;
        border-bottom: none;
        border-right: 1px solid var(--clr-border);
    }
    .race--hero .race-body { flex: 1; }
    .race--hero .race-track {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
    }

    /* 2-col contact on tablet */
    .contact-grid { grid-template-columns: repeat(2, 1fr); }

    /* Slim down hero stats */
    .stat { padding-inline: 1.5rem; }
    .stat-num { font-size: 1.8rem; }
    .stat-label { font-size: 0.65rem; }
}

/* --- Tablet portrait: 768px and below --- */
@media (max-width: 768px) {
    :root { --section-pad: 70px; }

    /* Burger appears */
    .burger { display: flex; }

    .nav-menu {
        position: fixed;
        inset: var(--nav-h) 0 0;
        flex-direction: column;
        justify-content: flex-start;
        padding: 2rem 1.5rem;
        gap: 0.4rem;
        background: rgba(8,8,8,0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
        pointer-events: none;
        overflow-y: auto;
    }
    .nav-menu.open {
        transform: translateX(0);
        pointer-events: all;
    }
    .nav-menu a {
        font-size: 1.15rem;
        padding: 0.85rem 1.25rem;
        width: 100%;
        border-radius: 12px;
    }
    .nav-menu a.nav-btn {
        margin-top: 0.75rem;
        text-align: center;
        width: 100%;
        padding: 0.9rem;
    }

    /* Revert featured race card to single-column stacked */
    .race--hero {
        flex-direction: column;
        grid-column: auto;
    }
    .race--hero .race-header {
        flex: unset;
        border-right: none;
        border-bottom: 1px solid var(--clr-border);
    }
    .race--hero .race-track {
        position: static;
        width: 100%;
    }

    /* Single col races on portrait tablet */
    .races {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin-inline: auto;
    }

    /* Hero stats: wrap into 2×2 grid */
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        padding: 0;
    }
    .stat {
        padding: 1rem;
        border-right: 1px solid var(--clr-border);
        border-bottom: 1px solid var(--clr-border);
    }
    .stat:nth-child(4),
    .stat:nth-child(7) { border-right: none; }
    .stat:nth-child(5),
    .stat:nth-child(6),
    .stat:nth-child(7) { border-bottom: none; }
    .stat-divider { display: none; }
    .stat-num { font-size: 1.6rem; }

    .scroll-hint { display: none; }

    .map-container { aspect-ratio: 4 / 3; }

    .party-banner { gap: 1rem; }
    .party-text span { font-size: 0.82rem; }

    .footer-top { flex-direction: column; align-items: flex-start; }

    .form-shell iframe { height: 1000px; }
}

/* --- Phone: 480px and below --- */
@media (max-width: 480px) {
    :root {
        --section-pad: 56px;
        --nav-h: 60px;
    }

    .container { padding-inline: 1.25rem; }

    /* Nav */
    .brand { font-size: 1.3rem; }
    .brand-number { font-size: 1.6rem; }

    /* Hero */
    .hero-body { padding-inline: 1.25rem; }
    .hero-headline .line-small { font-size: clamp(2rem, 10vw, 3rem); }
    .hero-headline .line-big   { font-size: clamp(4.5rem, 22vw, 7rem); }
    .hero-date { font-size: 0.95rem; }
    .hero-ctas { flex-direction: column; }
    .cta-primary,
    .cta-ghost { text-align: center; width: 100%; }

    /* Hide hero stats entirely on phone */
    .hero-stats { display: none; }

    /* Race cards */
    .race-header { padding: 1.5rem 1.5rem 1.25rem; }
    .race-body   { padding: 1.25rem 1.5rem; }
    .race-header h3 { font-size: 1.25rem; }

    /* Party banner */
    .party-banner { flex-direction: column; text-align: center; padding: 1.25rem; }
    .party-text span { font-size: 0.78rem; }

    /* Contact: single column */
    .contact-grid { grid-template-columns: 1fr; }
    .contact-card { padding: 1.5rem; }

    /* Sponsor */
    .sponsor-wrap { padding: 1rem; }

    /* Map */
    .map-container { aspect-ratio: 1 / 1; }

    /* Form */
    .form-shell iframe { height: 900px; }

    /* Footer */
    .footer-top { gap: 1rem; }
    .footer-nav { gap: 0; }
    .footer-bottom { flex-direction: column; gap: 0.2rem; text-align: center; }

    /* Section text */
    .section-intro { font-size: 0.95rem; margin-bottom: 2rem; }
}

/* --- Small phone: 375px and below --- */
@media (max-width: 375px) {
    .hero-headline .line-big { font-size: 4rem; }
    .race-body { gap: 0.7rem; }
    .race-row  { font-size: 0.82rem; }
}
