/* Mini Racer — miniracer.club
   Landing Page Stylesheet.
   100% In-Engine Project Assets. Zero External Dependencies.
   Pure Static HTML5 & CSS3. */

@font-face {
    font-family: "Outfit";
    src: url("fonts/outfit.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    src: url("fonts/jetbrainsmono.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --text: #ffffff;
    --text-dim: #8e9cb0;
    --muted: #64748b;
    --red: #ff3e3e;
    --red-hover: #ff5555;
    --red-glow: rgba(255, 62, 62, 0.45);
    --display: "Outfit", system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --max-w: 76rem;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-width: 320px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--display);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 4px;
}

/* Page Shell */

.shell {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: clip;
}

/* Full-Bleed Background Track & Atmosphere Veil */

.track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    transform: translateX(-7%);
}

.veil {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 60% at 50% 50%, rgba(2, 6, 23, 0.05) 0%, rgba(2, 6, 23, 0.35) 65%, rgba(2, 6, 23, 0.85) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.45) 0%, transparent 18%, transparent 82%, rgba(2, 6, 23, 0.75) 100%);
}

/* Header & Navbar */

.header {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(1.25rem, 3.2vh, 2.25rem) clamp(1.25rem, 4vw, 4rem);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
}

/* Wordmark */

.mark {
    display: inline-flex;
    align-items: baseline;
    font-size: clamp(1.6rem, 2.8vw, 2.3rem);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: -0.03em;
    user-select: none;
    flex-shrink: 0;
    order: 1;
}

.mark span:first-child {
    color: #ffffff;
}

.mark span:last-child {
    color: var(--red);
    text-shadow: 0 0 20px var(--red-glow);
    transition: color 150ms ease;
}

a.mark:hover span:last-child,
a.mark:focus-visible span:last-child {
    color: var(--red-hover);
}

/* Navigation Links */

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(1.25rem, 2.5vw, 3.2rem);
    order: 2;
}

.nav-links a {
    font-family: var(--mono);
    font-size: clamp(0.75rem, 1vw, 0.92rem);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 150ms ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* Top Right Play Button */

.btn-play-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.75rem;
    background: var(--red);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: 0 4px 20px var(--red-glow);
    transition: background-color 150ms ease, transform 120ms var(--ease-out);
    white-space: nowrap;
    flex-shrink: 0;
    order: 3;
}

.btn-play-top:hover,
.btn-play-top:focus-visible {
    background: var(--red-hover);
    box-shadow: 0 6px 26px rgba(255, 62, 62, 0.65);
    transform: translateY(-2px);
}

/* Main Hero Stage Overlay */

.hero-stage {
    position: relative;
    z-index: 10;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(1rem, 3vh, 3rem) clamp(1.25rem, 4vw, 4rem) clamp(2rem, 5vh, 4rem);
}

/* Hero Left Column — Stacked Typography */

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 34rem;
    flex-shrink: 0;
}

.stacked-title {
    margin: 0;
    display: flex;
    flex-direction: column;
    font-size: clamp(3.75rem, 7vw, 6.25rem);
    font-weight: 900;
    font-style: italic;
    line-height: 0.82;
    text-transform: uppercase;
    letter-spacing: -0.04em;
    user-select: none;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translate3d(-120px, 0, 0) skewX(-20deg);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) skewX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translate3d(120px, 0, 0) skewX(20deg);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) skewX(0);
    }
}

.stacked-title .white {
    color: #ffffff;
    font-size: clamp(2.7rem, 5vw, 4.25rem);
    letter-spacing: -0.02em;
    opacity: 0;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    animation: slideInLeft 0.5s var(--ease-out) both;
}

.stacked-title .red {
    color: var(--red);
    font-size: clamp(4.1rem, 7.5vw, 6.75rem);
    letter-spacing: -0.04em;
    opacity: 0;
    backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 32px var(--red-glow);
    animation: slideInRight 0.6s var(--ease-out) 0.1s both;
}

.hero-subhead {
    margin: clamp(1.15rem, 2.5vh, 1.85rem) 0 0;
    font-family: var(--mono);
    font-size: clamp(0.72rem, 1.2vw, 0.92rem);
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.play-action-wrap {
    margin-top: clamp(1.5rem, 3vh, 2.5rem);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
}

.btn-play-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.95rem 2.85rem;
    color: #ffffff;
    font-size: clamp(1.15rem, 1.8vw, 1.35rem);
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    background: var(--red);
    border-radius: 999px;
    box-shadow: 0 6px 30px var(--red-glow);
    transition: background-color 150ms ease, transform 120ms var(--ease-out), box-shadow 150ms ease;
    white-space: nowrap;
}

.btn-play-main:hover,
.btn-play-main:focus-visible {
    background: var(--red-hover);
    box-shadow: 0 8px 36px rgba(255, 62, 62, 0.7);
    transform: translateY(-2px);
}

.play-icon {
    font-size: 0.85em;
}

.hero-caption {
    margin: 0;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Spacer: Leaves Center Clear for Full-Bleed Background Track */

.hero-spacer {
    flex: 1 1 auto;
    min-width: 4rem;
}

/* Hero Right Column — Monospaced Callout Stack */

.hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-right: clamp(0rem, 2vw, 2rem);
    flex-shrink: 0;
}

.slash-accent {
    font-family: var(--display);
    font-size: 2.25rem;
    font-weight: 900;
    font-style: italic;
    color: var(--red);
    line-height: 1;
    margin-bottom: 1.25rem;
    text-shadow: 0 0 16px var(--red-glow);
}

.callout-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: var(--mono);
    font-size: clamp(0.85rem, 1.3vw, 1.05rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-dim);
    line-height: 1.85;
}

.callout-stack span {
    display: block;
}

/* Disabled state */

[aria-disabled="true"] {
    opacity: 0.35;
    pointer-events: none;
}

/* Desktop: nav overlays so the hero centers on the full page height */

@media (min-width: 768px) {
    .header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 20;
    }
}

/* Wrap helper: centered max-width container. */

.wrap {
    width: min(var(--max-w), 100%);
    margin: 0 auto;
    padding-inline: clamp(1.25rem, 4vw, 4rem);
}

/* Facts (About page) */

.facts {
    padding-block: clamp(1.5rem, 4vh, 2.5rem) clamp(2rem, 6vh, 3rem);
}

.hero-left .callout-stack {
    margin-top: clamp(1.25rem, 3vh, 2rem);
}

.hero-right .facts {
    padding: 0;
}

.hero-right .facts p {
    font-size: 1.05rem;
}

.facts p {
    max-width: 44ch;
    margin: 0 0 1rem;
    color: var(--text-dim);
    font-size: 1.1rem;
    line-height: 1.6;
}

.facts p:last-child {
    margin-bottom: 0;
}

.facts b {
    color: #ffffff;
    font-weight: 700;
}

/* Intermediate screens (tablets) */

@media (max-width: 1100px) and (min-width: 768px) {
    .stacked-title .white {
        font-size: clamp(2.2rem, 3.8vw, 3rem);
    }
    .stacked-title .red {
        font-size: clamp(3.3rem, 5.5vw, 4.5rem);
    }
    .hero-left {
        max-width: 24rem;
    }
    .callout-stack {
        font-size: 0.82rem;
    }
    .nav-links {
        gap: 1.25rem;
    }
}

/* Mobile Screens (< 768px) */

@media (max-width: 767px) {
    .shell {
        overflow-y: auto;
        overflow-x: clip;
        min-height: 100vh;
        min-height: 100dvh;
    }

    /* Mobile Header: single compact bar */
    .header {
        padding: 1.1rem 1rem 0.5rem;
    }

    .navbar {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    /* Row 1: Logo left, Play button right */
    .mark {
        font-size: 1.55rem;
        order: 1;
    }

    .btn-play-top {
        padding: 0.4rem 1rem;
        font-size: 0.78rem;
        letter-spacing: 0.03em;
        white-space: nowrap;
        order: 2;
        flex-shrink: 0;
    }

    /* Links span the full bar now the top button is gone */
    .nav-links {
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
        order: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0;
        border-bottom: none;
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        letter-spacing: 0.12em;
        white-space: nowrap;
        text-align: left;
        padding-block: 0.6rem;
    }

    /* Track on Mobile: large, top-anchored, clearly visible.
       Fixed so its scaled overflow never stretches the page. */
    .track {
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        object-fit: contain;
        object-position: 50% 0%;
        opacity: 1;
        transform: scale(2.2);
        transform-origin: 50% 0%;
    }

    .veil {
        background:
            radial-gradient(ellipse 90% 70% at 50% 25%, rgba(2, 6, 23, 0.85) 0%, rgba(2, 6, 23, 0.4) 55%, rgba(2, 6, 23, 0.9) 100%),
            linear-gradient(180deg, rgba(2, 6, 23, 0.85) 0%, transparent 22%, transparent 75%, rgba(2, 6, 23, 0.85) 100%);
    }

    /* Hero layout on mobile */
    .hero-stage {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        flex: 1 1 auto;
        padding: 1.25rem 1.25rem 2.5rem;
        min-height: auto;
        gap: 2.5rem;
    }

    .hero-left {
        display: contents;
    }

    .stacked-title {
        order: 1;
        width: 100%;
        line-height: 0.82;
        text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .stacked-title .white {
        font-size: clamp(2.1rem, 10vw, 3rem);
    }

    .stacked-title .red {
        font-size: clamp(3.1rem, 14.5vw, 4.5rem);
    }

    .hero-subhead {
        margin-top: 1.15rem;
        font-size: 0.75rem;
        letter-spacing: 0.16em;
        text-shadow: 0 2px 10px rgba(2, 6, 23, 0.95);
    }

    .play-action-wrap {
        margin-top: 0;
        width: auto;
        flex-shrink: 0;
    }

    .btn-play-main {
        width: auto;
        max-width: none;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        white-space: nowrap;
    }

    .hero-caption {
        font-size: 0.62rem;
        letter-spacing: 0.12em;
    }

    .hero-spacer {
        display: none;
    }

    .hero-right {
        order: 2;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 0;
    }

    .callout-stack {
        font-size: 0.85rem;
        line-height: 1.8;
    }

    .hero-left .callout-stack {
        order: 1;
    }

    .hero-right .facts {
        padding: 1.1rem 1.25rem;
        background: rgba(2, 6, 23, 0.66);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        border: 1px solid rgba(255, 255, 255, 0.09);
        border-radius: 1rem;
    }

    .hero-right .facts p {
        color: #e8edf4;
        text-shadow: 0 2px 10px rgba(2, 6, 23, 0.95);
    }

    .slash-accent {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    .stacked-title .white,
    .stacked-title .red {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Mobile bottom line: tagline left, RACE NOW right, same row. */

@media (max-width: 767px) {
    .hero-stage {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "title title"
            "facts facts"
            "tag button";
        gap: 1.5rem 1rem;
        align-content: end;
        align-items: center;
    }

    /* Neutralize every roster order so areas place deterministically,
       and every min-width so nothing can force the page wider. */
    .hero-stage .stacked-title,
    .hero-stage .callout-stack,
    .hero-stage .facts,
    .hero-stage .play-action-wrap {
        order: 0;
        min-width: 0;
    }

    .hero-left,
    .hero-right {
        display: contents;
    }

    .hero-left .stacked-title {
        grid-area: title;
    }

    .hero-right .facts {
        grid-area: facts;
    }

    .hero-left .callout-stack {
        grid-area: tag;
        min-width: 0;
        margin-top: 0;
    }

    .hero-right .play-action-wrap {
        grid-area: button;
        justify-self: end;
        margin-top: 0;
        flex-shrink: 0;
    }
}

