:root {
    color-scheme: dark;
    --carbon: #0b0c0f;
    --surface-1: #14161b;
    --surface-2: #1b1e25;
    --surface-3: #242833;
    --outline: #2c313c;
    --outline-soft: #20242c;
    --text-high: #f2f4f8;
    --text-med: #adb3c0;
    --text-low: #6e7585;
    --amber: #ff7a1a;
    --amber-dim: #3a2410;
    --lime: #9be600;
    --red: #e2231a;
    --blue: #2563eb;
    --purple: #7c3aed;
    --green: #16a34a;
    --cyan: #6fe3f0;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

main section[id] {
    scroll-margin-top: 110px;
}

body {
    margin: 0;
    min-width: 320px;
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.36), var(--carbon) 720px),
        var(--carbon);
    color: var(--text-high);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

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

img,
svg {
    display: block;
}

.site-header {
    position: sticky;
    z-index: 20;
    top: 14px;
    width: min(calc(100% - 32px), var(--max));
    min-height: 64px;
    margin: 14px auto 0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(20, 22, 27, 0.78);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--amber);
    color: var(--carbon);
}

.brand-mark svg {
    width: 21px;
    height: 21px;
}

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

.nav-links a {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-med);
    font-size: 14px;
    font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--text-high);
    background: var(--surface-3);
    outline: none;
}

.hero-section {
    position: relative;
    min-height: 720px;
    margin-top: -78px;
    padding: 150px 24px 58px;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 26%, rgba(155, 230, 0, 0.16), transparent 28%),
        radial-gradient(circle at 72% 74%, rgba(255, 122, 26, 0.18), transparent 32%),
        linear-gradient(90deg, rgba(11, 12, 15, 0.98), rgba(11, 12, 15, 0.76) 48%, rgba(11, 12, 15, 0.98)),
        repeating-linear-gradient(115deg, transparent 0 86px, rgba(255, 122, 26, 0.08) 86px 88px, transparent 88px 132px);
}

.hero-grid,
.feature-section,
.download-section {
    position: relative;
    z-index: 1;
    width: min(100%, var(--max));
    margin: 0 auto;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(360px, 1.06fr);
    gap: 54px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 16px;
    color: var(--amber);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    letter-spacing: 0;
}

h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(42px, 6vw, 78px);
    line-height: 0.98;
    font-weight: 950;
}

h2 {
    margin: 0;
    font-size: clamp(32px, 4vw, 58px);
    line-height: 1;
    font-weight: 950;
}

h3 {
    margin: 0;
}

.hero-lede,
.section-copy p,
.download-section p {
    max-width: 640px;
    color: var(--text-med);
    font-size: 18px;
    line-height: 1.65;
}

.store-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.store-button {
    min-width: 184px;
    min-height: 62px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: #050607;
    color: var(--text-high);
    font-weight: 950;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.store-button svg {
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
}

.store-button span {
    display: grid;
    line-height: 1.08;
}

.store-button small {
    color: var(--text-med);
    font-size: 11px;
    font-weight: 800;
}

.store-button-muted {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #050607;
    color: var(--text-high);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.store-button:hover,
.store-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 122, 26, 0.62);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.46);
    outline: none;
}

.telemetry-card,
.profile-panel,
.race-card {
    border: 1px solid var(--outline);
    background: rgba(20, 22, 27, 0.86);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.32);
}

.hero-visual {
    position: relative;
    min-height: 520px;
}

.hero-preview-board {
    position: relative;
    min-height: 430px;
}

.hero-race-preview {
    position: absolute;
    z-index: 2;
    top: 28px;
    right: 40px;
    width: min(420px, 80%);
    min-height: 245px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 122, 26, 0.35);
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(255, 122, 26, 0.16), rgba(11, 12, 15, 0) 52%),
        rgba(20, 22, 27, 0.9);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(14px);
}

.hero-preview-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-race-preview h3 {
    margin-top: 58px;
    font-size: 34px;
    line-height: 1;
}

.hero-race-preview p {
    margin: 8px 0 0;
    color: var(--text-med);
}

.hero-track-preview {
    position: absolute;
    left: 8px;
    bottom: 34px;
    width: min(410px, 72%);
    height: 220px;
    overflow: hidden;
    border: 1px solid var(--outline);
    border-radius: 22px;
    background: var(--surface-2);
    box-shadow: 0 34px 100px rgba(0, 0, 0, 0.48);
}

.telemetry-card {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(360px, 68%);
    padding: 18px;
    border-radius: 20px;
    backdrop-filter: blur(14px);
}

.telemetry-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-med);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.telemetry-head strong {
    color: var(--lime);
}

.telemetry-card svg {
    width: 100%;
    height: auto;
    margin-top: 12px;
}

.grid-line {
    stroke: rgba(173, 179, 192, 0.14);
    stroke-width: 1;
}

.chart-fill {
    fill: url("#none");
    fill: rgba(255, 77, 94, 0.16);
}

.chart-line {
    fill: none;
    stroke: #ff4d5e;
    stroke-linecap: round;
    stroke-width: 5;
}

.feature-section {
    padding: 116px 0 0;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 44px;
    align-items: center;
}

.feature-section-flip {
    grid-template-columns: 1.1fr 0.9fr;
}

.section-copy {
    padding: 0 8px;
}

.race-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.live-data-section {
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 116px 0 0;
}

.section-copy-wide {
    max-width: 860px;
}

.data-head {
    margin-top: 34px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-low);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.data-head strong {
    color: var(--lime);
}

.data-head-track {
    margin-top: 36px;
}

.ssr-schedule-grid,
.track-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ssr-race-card,
.track-card {
    overflow: hidden;
    border: 1px solid var(--outline);
    border-radius: 22px;
    background: var(--surface-1);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
}

.ssr-race-card {
    min-height: 300px;
    padding: 0;
    background: var(--surface-1);
}

.ssr-race-preview {
    position: relative;
    min-height: 300px;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 20%, rgba(255, 122, 26, 0.18), transparent 34%),
        var(--surface-2);
}

.ssr-race-preview > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ssr-race-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.64), rgba(11, 12, 15, 0.08) 30%, rgba(11, 12, 15, 0.88) 100%),
        linear-gradient(90deg, rgba(11, 12, 15, 0.58), rgba(11, 12, 15, 0.26), rgba(11, 12, 15, 0.18));
}

.ssr-race-top {
    position: relative;
    z-index: 2;
    min-height: 30px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
}

.badge-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.skill-badge,
.class-chip {
    height: 28px;
    border-radius: 7px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    font-weight: 950;
}

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 2px 0 0;
    background: transparent;
    color: var(--text-med);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.68);
}

.skill-badge i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--amber);
}

.class-chip {
    color: white;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
}

.class-chip-hypercar {
    background: var(--red);
}

.class-chip-lmp2 {
    background: var(--blue);
}

.class-chip-lmp3 {
    background: var(--purple);
}

.class-chip-gt3 {
    background: var(--green);
}

.class-chip-mixed {
    background: #c792ea;
}

.race-track-logo {
    flex: 0 1 auto;
    width: auto;
    max-width: 86px;
    height: 26px;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.68));
}

.ssr-race-title {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    bottom: 64px;
}

.ssr-race-title h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.ssr-race-title p {
    margin: 8px 0 0;
    color: var(--text-med);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.ssr-race-meta {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ssr-race-meta span,
.ssr-race-meta strong {
    border-radius: 8px;
    padding: 7px 9px;
    background: rgba(27, 30, 37, 0.86);
    color: var(--text-med);
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

.ssr-race-meta strong {
    border: 1px solid rgba(255, 122, 26, 0.44);
    background: rgba(255, 122, 26, 0.14);
    color: var(--amber);
}

.track-card {
    min-height: 330px;
}

.track-preview {
    position: relative;
    height: 170px;
    overflow: hidden;
    background: var(--surface-2);
}

.track-preview-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-preview-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.track-preview-map {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    object-fit: contain;
    filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.58));
}

.track-preview-logo {
    position: absolute;
    top: 12px;
    left: 12px;
    width: auto;
    max-width: 122px;
    height: 30px;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.62));
}

.track-preview-flag {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.track-card-body {
    padding: 16px;
}

.track-card h3 {
    font-size: 22px;
    line-height: 1.1;
}

.track-card p {
    margin: 8px 0 14px;
    color: var(--text-med);
}

.track-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.track-facts span {
    border: 1px solid var(--outline);
    border-radius: 8px;
    padding: 6px 8px;
    background: var(--surface-2);
    color: var(--text-med);
    font-size: 12px;
    font-weight: 850;
}

.race-card {
    min-height: 360px;
    padding: 18px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.18), rgba(11, 12, 15, 0.88)),
        radial-gradient(circle at 80% 0%, rgba(22, 163, 74, 0.28), transparent 46%),
        var(--surface-1);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.race-card-next {
    border-color: rgba(22, 163, 74, 0.66);
}

.race-card-blue {
    border-color: rgba(37, 99, 235, 0.66);
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.18), rgba(11, 12, 15, 0.88)),
        radial-gradient(circle at 84% 0%, rgba(37, 99, 235, 0.32), transparent 46%),
        var(--surface-1);
}

.race-card-lime {
    border-color: rgba(155, 230, 0, 0.62);
    background:
        linear-gradient(180deg, rgba(11, 12, 15, 0.18), rgba(11, 12, 15, 0.88)),
        radial-gradient(circle at 84% 0%, rgba(155, 230, 0, 0.22), transparent 46%),
        var(--surface-1);
}

.race-card-top {
    margin-bottom: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.race-card-top span,
.race-meta span,
.race-meta strong,
.status-chip {
    border-radius: 8px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 950;
}

.race-card-top span:first-child {
    background: var(--amber);
    color: var(--carbon);
}

.race-card-top span:last-child {
    background: var(--green);
    color: white;
}

.race-card-blue .race-card-top span {
    background: var(--blue);
    color: white;
}

.race-card-blue .race-card-top span:last-child {
    background: var(--purple);
}

.race-card-lime .race-card-top span {
    background: var(--lime);
    color: var(--carbon);
}

.race-card h3 {
    margin-top: 64px;
    font-size: 24px;
    line-height: 1.08;
}

.race-card p {
    margin: 7px 0 16px;
    color: var(--text-med);
}

.race-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.race-meta span {
    background: var(--surface-3);
    color: var(--text-high);
}

.race-meta strong {
    background: rgba(255, 122, 26, 0.16);
    color: var(--amber);
    border: 1px solid rgba(255, 122, 26, 0.44);
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--outline-soft);
    color: var(--text-low);
    font-variant-numeric: tabular-nums;
}

.time-grid b {
    color: var(--text-high);
}

.profile-panel {
    padding: 22px;
    border-radius: 28px;
}

.profile-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
}

.avatar {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid #8f9499;
    background: linear-gradient(#006edb 0 50%, #ffd33d 50%);
    color: rgba(255, 255, 255, 0.94);
    font-weight: 950;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.36);
}

.profile-head p {
    margin: 0 0 4px;
    color: var(--text-low);
    font-weight: 850;
    text-transform: uppercase;
}

.profile-head h3 {
    font-size: 28px;
}

.status-chip {
    background: rgba(22, 163, 74, 0.16);
    color: #57c77a;
    border: 1px solid rgba(22, 163, 74, 0.36);
    white-space: nowrap;
}

.rating-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.rating-grid div,
.career-grid div {
    border: 1px solid var(--outline);
    border-radius: 18px;
    background: var(--surface-2);
}

.rating-grid div {
    padding: 18px;
}

.rating-grid span,
.career-grid span {
    display: block;
    color: var(--text-low);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.rating-grid strong {
    display: block;
    margin: 12px 0 12px;
    font-size: 34px;
    color: var(--amber);
}

.rating-grid div:last-child strong {
    color: var(--text-high);
}

.rating-grid i {
    display: block;
    height: 9px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--amber) var(--value), var(--surface-3) var(--value));
}

.rating-grid div:last-child i {
    background: linear-gradient(90deg, var(--text-high) var(--value), var(--surface-3) var(--value));
}

.career-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.career-grid div {
    min-height: 118px;
    padding: 20px 10px;
    text-align: center;
}

.career-grid strong {
    display: block;
    margin-bottom: 8px;
    color: var(--lime);
    font-size: 32px;
}

.career-grid div:nth-child(2) strong {
    color: #e6c04a;
}

.career-grid div:nth-child(3) strong {
    color: #57c77a;
}

.career-grid div:nth-child(4) strong {
    color: var(--cyan);
}

.download-section {
    margin-top: 118px;
    margin-bottom: 40px;
    padding: 44px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    border: 1px solid rgba(255, 122, 26, 0.36);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(255, 122, 26, 0.16), rgba(155, 230, 0, 0.08)),
        var(--surface-1);
}

.download-section p {
    margin-bottom: 0;
}

.store-row-download {
    margin-top: 0;
    justify-content: flex-end;
}

@media (max-width: 1040px) {
    .hero-grid,
    .feature-section,
    .feature-section-flip,
    .download-section {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        max-width: 780px;
    }

    .hero-visual {
        min-height: 470px;
    }

    .download-section,
    .store-row-download {
        justify-content: flex-start;
    }
}

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

    .hero-section {
        min-height: auto;
        padding: 118px 18px 58px;
    }

    .hero-grid {
        gap: 34px;
    }

    .race-board,
    .ssr-schedule-grid,
    .track-grid,
    .career-grid {
        grid-template-columns: 1fr;
    }

    .feature-section {
        padding: 78px 18px 0;
    }

    .live-data-section {
        padding: 78px 18px 0;
    }

    .data-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-visual {
        min-height: 430px;
    }

    .telemetry-card {
        right: 0;
        bottom: 0;
        width: min(360px, 92vw);
    }

    .profile-head,
    .rating-grid {
        grid-template-columns: 1fr;
    }

    .download-section {
        margin: 80px 14px 30px;
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .site-header {
        width: calc(100% - 20px);
        min-height: 58px;
        margin-top: 10px;
    }

    .brand {
        font-size: 15px;
    }

    h1 {
        font-size: 42px;
    }

    .hero-lede,
    .section-copy p,
    .download-section p {
        font-size: 16px;
    }

    .hero-grid {
        display: grid;
    }

    .hero-copy {
        position: relative;
        z-index: 2;
    }

    .hero-visual {
        min-height: 390px;
    }

    .store-row,
    .store-button {
        width: 100%;
    }

    .hero-race-preview,
    .hero-track-preview,
    .telemetry-card {
        position: relative;
        inset: auto;
        width: 100%;
        transform: none;
    }

    .hero-preview-board {
        display: grid;
        gap: 12px;
        min-height: 0;
    }

    .hero-track-preview {
        height: 190px;
    }

    .telemetry-card {
        display: block;
    }

    .download-section {
        width: auto;
    }

}
