@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Schibsted+Grotesk:wght@400;500;600;700;900&display=swap');

/* Grain sits above the page and never blocks clicks */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none;
    opacity: 0.18;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

body {
    background: var(--surface-0);
    letter-spacing: -0.01em;
}

.navbar {
    background: rgba(7, 7, 7, 0.92);
    border-bottom: 1px solid var(--stroke);
    padding: 0;
}

.nav-container {
    min-height: 64px;
    align-items: center;
}

.nav-logo a {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 1;
    text-transform: none;
    color: var(--text-primary);
}

.nav-logo a::after {
    display: none;
}

.nav-menu {
    gap: 0.25rem;
}

.nav-link,
.shop-toggle {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: none;
    border: 0;
    cursor: pointer;
    min-height: 44px;
    padding: 0 0.75rem;
}

.shop-toggle {
    display: inline-flex;
    align-items: center;
}

.nav-link:hover,
.nav-link.active,
.shop-toggle:hover,
.nav-shop.is-open .shop-toggle {
    color: var(--text-primary);
}

.nav-link::before {
    display: none;
}

.nav-buy {
    color: var(--accent) !important;
}

.shop-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #070707;
    border-bottom: 1px solid var(--stroke);
    padding: 1.25rem 4vw 1.5rem;
    max-height: calc(100vh - 64px);
    overflow: auto;
    text-align: left;
}

.nav-shop {
    position: static;
}

.nav-shop.is-open .shop-panel {
    display: block;
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
    gap: 2rem;
}

.shop-lines {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: start;
}

.shop-line-block {
    display: contents;
}

.shop-line {
    grid-column: 1;
    appearance: none;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--stroke);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-align: left;
    text-decoration: none;
    min-height: 44px;
    padding: 0.65rem 0;
    cursor: pointer;
    width: 100%;
}

.shop-line.is-active,
.shop-line:hover {
    color: var(--text-primary);
}

.shop-line-panel {
    display: none;
    grid-column: 2;
    grid-row: 1 / span 12;
}

.shop-line-panel.is-active {
    display: flex;
    flex-direction: column;
}

.shop-line-panel a,
.shop-game-links a,
.game-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2vw, 1.6rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--stroke);
}

.shop-line-panel a:hover,
.shop-game-links a:hover,
.game-links a:hover,
.index-row:hover .index-mark {
    color: var(--accent);
}

.shop-kicker,
.kicker {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.shop-game {
    border-bottom: 1px solid var(--stroke);
}

.shop-game summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 1rem;
    list-style: none;
}

.shop-game summary::-webkit-details-marker {
    display: none;
}

.shop-game-links a {
    font-size: 0.95rem;
    padding-left: 0.25rem;
}

#shop-by-game .game-card {
    border-bottom: 1px solid var(--stroke);
}

#shop-by-game .game-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
    padding: 0.35rem 0;
    cursor: pointer;
    list-style: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3.2vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.045em;
}

#shop-by-game .game-card summary::-webkit-details-marker {
    display: none;
}

#shop-by-game .game-card summary::after {
    content: "";
    flex-shrink: 0;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

#shop-by-game .game-card[open] summary::after {
    transform: rotate(225deg);
    margin-top: 0.35rem;
}

#shop-by-game .game-card .game-links {
    padding-bottom: 0.5rem;
}

.shop-purchase {
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    min-height: 44px;
    padding: 0 1rem;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-stage {
    position: relative;
    height: auto;
}

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 6.5rem 4vw 3.25rem;
    background: #070707;
    overflow: hidden;
}

.hero-plate,
.boot-plate {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-plate video,
.boot video.plate,
.eye-plate video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(7, 7, 7, 0.15) 0%, rgba(7, 7, 7, 0.05) 38%, rgba(7, 7, 7, 0.88) 100%),
        linear-gradient(90deg, rgba(7, 7, 7, 0.78) 0%, rgba(7, 7, 7, 0.18) 58%, rgba(7, 7, 7, 0.4) 100%);
}

.boot-scrim {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(7, 7, 7, 0.2) 0%, rgba(7, 7, 7, 0.72) 78%);
}

.hero-background,
.hero::before,
.scroll-indicator,
.particles {
    display: none !important;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1400px, 100%);
    text-align: center;
}

.hero-title,
.product-title,
.section-title {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 0.86;
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    color: var(--text-primary);
    text-transform: none;
}

.hero-title {
    font-size: min(9.5rem, calc((100vw - 2.5rem) / 6.6));
    margin: 0;
    white-space: nowrap;
}

.hero-subtitle,
.product-subtitle,
.section-subtitle {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    max-width: 38rem;
    margin-top: 1.25rem;
}

.hero-buttons {
    justify-content: center;
    margin-top: 1.75rem;
}

.btn {
    border-radius: 0;
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.72rem;
    min-height: 44px;
    box-shadow: none;
}

.btn::before {
    display: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-pressed);
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--stroke);
}

.marquee {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
    padding: 0.85rem 0;
    background: #070707;
}

.plate-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    mix-blend-mode: screen;
    z-index: 0;
}

.marquee-track {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 2.5rem;
    width: max-content;
    max-width: none;
    animation: ol-marquee 42s linear infinite;
    will-change: transform;
}

.marquee-track.is-driven {
    animation: none;
}

.marquee-track span {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-secondary);
    max-width: none;
}

.index-list {
    display: flex;
    flex-direction: column;
}

.index-row {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1.1fr) minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 72px;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--stroke);
    color: var(--text-primary);
    text-decoration: none;
}

.index-num,
.index-go {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.index-mark {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 3rem);
    letter-spacing: -0.05em;
    font-weight: 500;
}

.index-name {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.store-section {
    position: relative;
    padding: 4.5rem 0;
}

#products .container,
#shop-by-game .container {
    position: relative;
    z-index: 1;
}

.plate-mesh,
.plate-hole {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    z-index: 0;
    pointer-events: none;
}

.eye-plate {
    position: relative;
    width: min(1100px, calc(100% - 8vw));
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--stroke);
    background: #070707;
}

.eye-plate video {
    display: block;
}

.store-section .container {
    width: min(1400px, calc(100% - 8vw));
}

#shop-by-game {
    scroll-margin-top: 8rem;
}

.game-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
    column-gap: 2.5rem;
    align-items: start;
    border-top: 1px solid var(--stroke);
}

.game-row {
    display: contents;
}

.game-pick {
    grid-column: 1;
    appearance: none;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--stroke);
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.2vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.045em;
    text-align: left;
    min-height: 64px;
    padding: 0.35rem 0;
    cursor: pointer;
    width: 100%;
}

.game-pick:hover,
.game-pick:focus-visible {
    color: var(--text-primary);
}

.game-row.is-active .game-pick {
    color: var(--accent);
}

.game-pick:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 2px;
}

.game-detail {
    display: none;
    height: max-content;
    padding-top: 0.35rem;
}

.game-row.is-active .game-detail {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: calc(55% - 1.25rem);
    z-index: 2;
    animation: game-in 0.35s ease;
}

.game-count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 0.35rem;
}

@keyframes game-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.product-header {
    padding: 8rem 0 2rem;
    background: var(--surface-0);
}

.product-header .container {
    width: min(1400px, calc(100% - 8vw));
}

.setup-steps {
    list-style: none;
    margin: 0 0 2.5rem;
    padding: 0;
    border-top: 1px solid var(--stroke);
}

.setup-steps li {
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 1rem;
    align-items: center;
    min-height: 64px;
    border-bottom: 1px solid var(--stroke);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: -0.03em;
}

.setup-steps span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.features-grid .feature-card,
.product-card,
.script-card,
.contact-card {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--stroke);
    border-radius: 0;
    box-shadow: none;
}

.feature-title,
.features-grid h3,
.card-title {
    color: var(--text-primary);
}

.script-card {
    border: 1px solid var(--stroke);
}

.script-card:hover,
.product-card:hover {
    transform: none;
    border-color: var(--stroke-hover);
}

.card-glow,
.script-card::before {
    display: none;
}

.footer {
    border-top: 1px solid var(--stroke);
    background: #070707;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.crumb a {
    color: var(--text-secondary);
    text-decoration: none;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.buy-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 56px;
    padding: 0.75rem 4vw;
    background: #070707;
    color: #fff;
    text-decoration: none;
    border-top: 1px solid var(--stroke);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.buy-bar strong {
    color: var(--accent);
    font-weight: 500;
}

body.has-buy-bar {
    padding-bottom: 64px;
}

.redirect-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 8rem 4vw 4rem;
}

.redirect-main h1 {
    font-size: clamp(2.4rem, 8vw, 5.5rem);
    letter-spacing: -0.06em;
    line-height: 0.9;
    font-weight: 500;
    max-width: 16ch;
    margin: 0.5rem 0 1rem;
}

@keyframes ol-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .shop-layout,
    .shop-lines {
        display: block;
    }

    .nav-menu.active {
        align-items: stretch;
        text-align: left;
    }

    .nav-menu .nav-link,
    .nav-menu .shop-toggle {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    .shop-line-block {
        display: block;
    }

    .shop-line-panel,
    .shop-line-panel.is-active {
        display: none;
        grid-column: auto;
        grid-row: auto;
    }

    .shop-line-block.is-open .shop-line-panel {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .shop-panel {
        position: static;
        max-height: none;
        padding: 0 0 1rem;
        border: 0;
    }

    .nav-menu.active {
        background: #070707;
        padding: 0.5rem 16px 2rem;
    }

    .nav-menu > li {
        border-bottom: 1px solid var(--stroke);
    }

    .index-row {
        grid-template-columns: 2.5rem 1fr;
        min-height: 64px;
    }

    .index-name,
    .index-go {
        display: none;
    }

    .hero {
        padding-top: 6.5rem;
    }

    .hero-title {
        white-space: nowrap;
    }

    .boot-side {
        display: none;
    }

    .game-stage {
        display: block;
    }

    .game-row {
        display: block;
        border-bottom: 1px solid var(--stroke);
    }

    .game-pick {
        font-size: 1.55rem;
    }

    .game-detail,
    .game-row.is-active .game-detail {
        display: none;
        grid-column: auto;
        grid-row: auto;
        position: static;
        top: auto;
        height: auto;
        padding: 0 0 0.5rem;
        animation: none;
    }

    .game-row.is-active .game-detail {
        display: block;
        position: static;
        top: auto;
        right: auto;
        width: auto;
        visibility: visible;
    }

    .plate-mesh,
    .plate-hole,
    .plate-lines {
        display: none;
    }
}

#products .index-mark {
    display: inline-block;
    transform-origin: left center;
    transition: transform 0.35s ease;
}

#products .index-row {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

html.js #products .index-row {
    opacity: 0;
    transform: translateY(24px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.55s ease, transform 0.55s ease;
}

html.js #products .index-row.is-in {
    opacity: 1;
    transform: none;
}

#products .index-row:hover,
#products .index-row:focus-visible {
    border-bottom-color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
}

#products .index-row:hover .index-mark,
#products .index-row:focus-visible .index-mark {
    transform: scale(1.08);
}

#products .index-go {
    position: relative;
}

#products .index-row:hover .index-go,
#products .index-row:focus-visible .index-go {
    color: transparent;
}

#products .index-row:hover .index-go::after,
#products .index-row:focus-visible .index-go::after {
    content: ">>";
    color: var(--accent);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.boot {
    position: fixed;
    inset: 0;
    z-index: 1800;
    background: #070707;
    color: var(--accent);
    pointer-events: auto;
    overflow: hidden;
}

.boot.is-done {
    animation: boot-wipe 0.65s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    pointer-events: none;
}

.boot-video {
    z-index: 0;
}

.boot-scan,
.boot-tick,
.boot-mark,
.boot-side,
.boot-count {
    z-index: 2;
}

.boot-scan {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent);
    top: 0;
    animation: boot-scan 1.6s ease-in-out forwards;
}

.boot-tick {
    position: absolute;
    width: 7px;
    height: 7px;
    background: var(--accent);
    transform: scale(0);
    animation: boot-tick-in 0.4s ease forwards;
}

.boot-tick-tl { top: 1.25rem; left: 1.25rem; }
.boot-tick-tr { top: 1.25rem; right: 1.25rem; animation-delay: 0.08s; }
.boot-tick-bl { bottom: 1.25rem; left: 1.25rem; animation-delay: 0.16s; }
.boot-tick-br { bottom: 1.25rem; right: 1.25rem; animation-delay: 0.24s; }

.boot-mark,
.boot-side,
.boot-count {
    margin: 0;
    color: var(--accent);
}

.boot-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 0.9;
}

.boot-letters {
    display: inline-flex;
    overflow: hidden;
}

.boot-letters span {
    display: block;
    transform: translateY(120%);
    animation: boot-letter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.boot-letters span:nth-child(1) { animation-delay: 0.12s; }
.boot-letters span:nth-child(2) { animation-delay: 0.17s; }
.boot-letters span:nth-child(3) { animation-delay: 0.22s; }
.boot-letters span:nth-child(4) { animation-delay: 0.27s; }
.boot-letters span:nth-child(5) { animation-delay: 0.32s; }
.boot-letters span:nth-child(6) { animation-delay: 0.37s; }
.boot-letters span:nth-child(7) { animation-delay: 0.42s; }
.boot-letters span:nth-child(8) { animation-delay: 0.47s; }

.boot-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0;
    animation: boot-fade 0.55s ease 0.5s forwards;
}

.boot-side-left { left: 4vw; }
.boot-side-right { right: 4vw; }

.boot-count {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    opacity: 0;
    animation: boot-fade 0.45s ease 0.35s forwards;
}

@keyframes boot-letter {
    to { transform: translateY(0); }
}

@keyframes boot-tick-in {
    to { transform: scale(1); }
}

@keyframes boot-fade {
    to { opacity: 1; }
}

@keyframes boot-scan {
    from { top: 0; }
    to { top: 100%; }
}

@keyframes boot-wipe {
    to { transform: translateY(-105%); }
}

html.js:not(.is-live) .hero-content {
    opacity: 0;
    transform: translateY(18px);
}

html.js.is-live .hero-content {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease 0.05s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation: none;
    }

    .hero-stage {
        height: auto;
    }

    .hero {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: auto;
    }

    .boot {
        display: none;
    }

    html.js #products .index-row {
        opacity: 1;
        transform: none;
    }

    html.js:not(.is-live) .hero-content,
    html.js.is-live .hero-content {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .boot-letters span,
    .boot-tick,
    .boot-side,
    .boot-count,
    .boot-scan {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .game-row.is-active .game-detail {
        animation: none;
    }
}
