:root {
    --bg: #05060a;
    --bg-soft: #0a0d16;
    --blue: #3b82f6;
    --blue-bright: #8ec5ff;
    --blue-dim: #1d4ed8;
    --text: #f3f5fa;
    --text-dim: #9aa4b8;
    --card-bg: rgba(255, 255, 255, 0.045);
    --card-border: rgba(255, 255, 255, 0.09);
    --pill-bg: rgba(255, 255, 255, 0.07);
    --pill-border: rgba(255, 255, 255, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(ellipse 1400px 800px at 50% 0, rgba(45, 120, 120, 0.25), transparent 70%),
        var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

a {
    color: inherit;
}

/* top bar */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px 24px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.2px;
    text-decoration: none;
    color: var(--text);
}

.logo .mark {
    color: var(--blue-bright);
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    border-radius: 999px;
    padding: 6px;
    backdrop-filter: blur(12px);
}

.topnav a {
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-dim);
    padding: 8px 16px;
    border-radius: 999px;
    transition: color 0.15s, background 0.15s;
}

.topnav a:hover {
    color: var(--text);
}

.topnav a.active {
    color: var(--bg);
    background: var(--blue-bright);
}

/* pill button */

.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 6px 8px 6px 20px;
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.pill-btn .dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--blue-bright);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.badge-pill .led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue-bright);
    box-shadow: 0 0 10px 2px var(--blue-bright);
}

/* sections / glass panels */

.panel {
    max-width: 1100px;
    margin: 20px auto;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.scroll-story {
    position: relative;
    height: 300vh;
}

.story-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    background: #05060a;
}

.story-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.story-fade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 6, 10, 0.15) 0%, rgba(5, 6, 10, 0.5) 60%, rgba(5, 6, 10, 0.85) 100%);
    z-index: 1;
}

.story-text {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 2;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 50px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.story-text.active {
    opacity: 1;
    pointer-events: auto;
}

.story-text-top {
    top: 110px;
}

.story-text-center {
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.story-text h1 {
    font-size: 4.2rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin: 0 0 18px;
    background: linear-gradient(90deg, #ffffff 10%, var(--blue-bright) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.02;
}

.story-text .lede {
    max-width: 420px;
    color: var(--text-dim);
    font-size: 1rem;
    margin-bottom: 30px;
}

.story-text h2 {
    font-size: 2.1rem;
    font-weight: 700;
    max-width: 640px;
    margin: 0 auto 22px;
    letter-spacing: -0.5px;
}

.story-text p:not(.lede) {
    color: var(--text-dim);
    max-width: 480px;
    margin: 0 auto 30px;
}

@media (max-width: 640px) {
    .scroll-story {
        height: 260vh;
    }
    .story-text h1 {
        font-size: 2.6rem;
    }
}

.glow-section {
    background:
        radial-gradient(ellipse 800px 500px at 15% 20%, rgba(59, 130, 246, 0.55), transparent 60%),
        linear-gradient(135deg, #0b1322 0%, #050608 70%);
    padding: 90px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.glow-section h2 {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: -1px;
    max-width: 480px;
    margin: 0 0 14px;
}

.glow-section p {
    color: var(--text-dim);
    max-width: 360px;
}

.stat-card {
    background: rgba(10, 14, 24, 0.75);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 18px 20px;
    min-width: 190px;
    backdrop-filter: blur(16px);
}

.stat-card .top {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.stat-card .big {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--blue-bright);
}

.crosshair {
    position: relative;
    background: linear-gradient(180deg, #050812 0%, #0a1526 100%);
    padding: 90px 40px;
    text-align: center;
}

.crosshair::before,
.crosshair::after {
    content: "";
    position: absolute;
    background: var(--card-border);
}

.crosshair::before {
    left: 60px;
    right: 60px;
    top: 50%;
    height: 1px;
}

.crosshair::after {
    top: 40px;
    bottom: 40px;
    left: 50%;
    width: 1px;
}

.crosshair .badges {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}

.crosshair h2 {
    position: relative;
    z-index: 1;
    font-size: 2.2rem;
    font-weight: 700;
    max-width: 620px;
    margin: 0 auto 20px;
    letter-spacing: -0.5px;
}

.crosshair p {
    position: relative;
    z-index: 1;
    color: var(--text-dim);
    max-width: 440px;
    margin: 0 auto;
}

.crosshair b {
    color: var(--blue-bright);
    font-weight: 700;
}

/* content pages: glossary / history */

main.content {
    max-width: 860px;
    margin: 0 auto;
    padding: 50px 24px 80px;
}

.page-title {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 0 10px;
}

.page-intro {
    color: var(--text-dim);
    margin-bottom: 36px;
    max-width: 560px;
}

h2.group-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blue-bright);
    margin-top: 44px;
    margin-bottom: 16px;
    padding-left: 2px;
}

h2.group-title:first-of-type {
    margin-top: 0;
}

.feature-row {
    display: flex;
    gap: 28px;
    align-items: stretch;
    margin-bottom: 28px;
}

.feature-row .feature-media {
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.feature-row .feature-media .img-frame {
    position: relative;
    flex: 1;
    min-height: 0;
}

.feature-row .feature-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.feature-row .feature-caption {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-dim);
    opacity: 0.7;
}

.feature-row .feature-caption a {
    color: inherit;
}

.feature-row .feature-text {
    flex: 1;
    min-width: 0;
}

.feature-row .feature-text .term:last-child {
    margin-bottom: 0;
}

.feature-row .feature-media.fill img {
    object-fit: cover;
    object-position: top center;
    border-radius: 14px;
}

.feature-row .feature-media.fill.anchor-bottom img {
    object-position: bottom center;
}

@media (max-width: 720px) {
    .feature-row {
        flex-direction: column;
    }
    .feature-row .feature-media {
        flex: none;
    }
}

.term {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
}

.term h3 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 1.02rem;
    font-weight: 700;
}

.term p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.95rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    display: block;
    backdrop-filter: blur(10px);
}

.card h3 {
    margin: 0 0 8px;
    color: var(--blue-bright);
    font-weight: 700;
}

.card p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.92rem;
}

.group-intro {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin: -4px 0 16px;
    max-width: 640px;
}

.term ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.term ul li {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.term ul li:last-child {
    margin-bottom: 0;
}

.term ul li b {
    color: var(--text);
}

.tire-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    cursor: pointer;
    border-radius: 14px;
    padding: 6px;
    margin-left: -6px;
    margin-right: -6px;
    transition: background 0.2s ease;
}

.tire-row:first-of-type {
    margin-top: 14px;
}

.tire-row:not(.tire-row-static):not(.playing):hover {
    background: rgba(255, 255, 255, 0.04);
}

.tire-row-static {
    cursor: default;
}

.tire-media {
    width: 84px;
    height: 84px;
    flex-shrink: 0;
}

.tire-photo,
.tire-media video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tire-media video {
    mix-blend-mode: screen;
}

.tire-row-text h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.tire-row-text .tire-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    color: var(--text-dim);
    font-size: 0.92rem;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.tire-row-text .tire-desc.visible {
    max-height: 200px;
    opacity: 1;
    margin-top: 6px;
}

.tire-row-text .tire-plain {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.92rem;
}

.placeholder {
    background: var(--card-bg);
    border: 1px dashed var(--card-border);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-dim);
    margin-top: 24px;
}

footer {
    text-align: center;
    padding: 30px 20px 40px;
    color: var(--text-dim);
    font-size: 0.82rem;
}

@media (max-width: 640px) {
    .glow-section {
        flex-direction: column;
        align-items: flex-start;
    }
    .topbar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    .topnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .topnav::-webkit-scrollbar {
        display: none;
    }
    .topnav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}
