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

:root {
    color-scheme: dark;
    font-family: Outfit, "Avenir Next", system-ui, sans-serif;
    color: #fbf8ff;
    background: #110e1c;
    --accent: #8232d8;
    --accent-hover: #8c39dc;
    --accent-shadow: #48146f;
    --accent-light: #d3a7ff;
    --muted: #c1b9d1;
    --border: #352b49;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body, h1, h2, h3, p, ul {
    margin: 0;
}

img {
    display: block;
    width: 100%;
    height: auto;
}

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

a:focus-visible, button:focus-visible {
    outline: 2px solid #f6efff;
    outline-offset: 6px;
}

.shell {
    width: min(100% - 5rem, 74rem);
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid var(--border);
    background: #110e1c;
}

.header-inner {
    min-height: 4.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wordmark {
    display: inline-flex;
    align-items: center;
    font-size: 1.7rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.04em;
}

.brand-icon {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    margin-right: .55rem;
    background: var(--accent);
    border-radius: .5rem;
    transform: rotate(-8deg);
}

.brand-icon span, .brand-icon span::after {
    width: .925rem;
    height: .33rem;
    border-radius: .09rem;
    background: #fff;
}

.brand-icon span::after {
    content: "";
    display: block;
    transform: rotate(90deg);
}

.wordmark-dot {
    color: var(--accent-light);
}

.nav-link {
    color: var(--muted);
    font-size: .95rem;
    font-weight: 550;
    text-underline-offset: .3em;
}

.nav-link:hover {
    color: #fff;
    text-decoration: underline;
}

.hero {
    overflow: hidden;
    background:
        radial-gradient(ellipse at 83% 49%, #34174e 0%, transparent 65%),
        #130c1e;
}

.hero-inner {
    position: relative;
    min-height: 26rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-block: 3rem;
}

.hero-copy {
    position: relative;
    z-index: 1;
    width: 47%;
}

.hero h1 {
    font-size: clamp(4rem, 8.3vw, 7.5rem);
    color: var(--accent-light);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.055em;
}

.hero-tagline {
    margin-block: 1.1rem 1.45rem;
    color: #e9d8f6;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    font-weight: 500;
    line-height: 1.5;
}

.play-button {
    display: inline-flex;
    min-height: 3.45rem;
    align-items: center;
    justify-content: center;
    gap: .72rem;
    padding: .8rem 1.45rem;
    border: 0;
    border-radius: .63rem;
    background: var(--accent);
    box-shadow: 0 .25rem 0 var(--accent-shadow);
    color: #fff;
    font-family: Outfit, "Avenir Next", system-ui, sans-serif;
    font-size: 1.08rem;
    font-weight: 750;
    line-height: 1.15;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.play-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 .375rem 0 var(--accent-shadow);
}

.play-button:active {
    transform: translateY(2px);
    box-shadow: 0 .125rem 0 var(--accent-shadow);
}

.play-icon {
    width: 1.23rem;
    height: 1.23rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #f5eaff;
}

.play-icon::before {
    content: "";
    margin-left: 2px;
    border-block: .23rem solid transparent;
    border-left: .36rem solid var(--accent);
}

.hero-art {
    position: absolute;
    inset-block: 0;
    left: max(-8rem, (100% - 100vw) / 2);
    width: calc(53% + min(8rem, (100vw - 100%) / 2));
    mask-image: linear-gradient(to right, #000 80%, transparent 100%);
}

.hero-art img {
    height: 100%;
    object-fit: cover;
    object-position: center 6%;
}

.hero-art::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, #130c1e 0%, transparent 24%);
    pointer-events: none;
}

.arcade {
    scroll-margin-top: 1rem;
    border-top: 1px solid var(--border);
    padding-block: 2rem 3rem;
    background: #161122;
}

.arcade-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem 1rem;
    margin-bottom: 1.05rem;
}

.arcade-heading h2 {
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    font-weight: 740;
    line-height: 1.06;
    letter-spacing: -.04em;
}

.arcade-heading p, .runner-help, .runner-status, #spin-rule {
    color: var(--muted);
    line-height: 1.45;
}

.arcade-frame {
    border: 1px solid #4c365f;
    border-radius: 1rem;
    overflow: hidden;
    background: #20172e;
    box-shadow: 0 .7rem 2rem #0a061333;
}

.arcade-hud {
    display: grid;
    grid-template-columns: clamp(5.25rem, 17%, 11rem) 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.1rem;
    border-bottom: 1px solid #4c365f;
}

.arcade-metric {
    display: grid;
    gap: .15rem;
    color: var(--muted);
    font-size: .9rem;
}

.metric-value {
    color: #f8edff;
    font-size: clamp(1.5rem, 3.2vw, 2rem);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    line-height: 1.02;
}

.spin-control {
    display: grid;
    gap: .23rem;
    text-align: center;
}

#spin-rule {
    font-size: .8rem;
}

.spin-button, .jump-button {
    min-height: 2.75rem;
    padding: .46rem 1rem;
    border: 1px solid #9d6dc8;
    border-radius: .56rem;
    background: #392250;
    color: #fff;
    font: 650 1rem Outfit, system-ui, sans-serif;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.spin-button {
    color: #16101d;
    background: #d6a9ff;
    border-color: #e6caff;
}

.spin-button:hover:not(:disabled) {
    background: #ecd8ff;
}

.spin-button:disabled {
    color: #cbb8dc;
    background: #322341;
    border-color: #654a7b;
    cursor: default;
}

.spin-button.is-boosted:disabled {
    color: #b8ffdf;
    background: #263a39;
    border-color: #578d7b;
}

.jump-button:hover {
    background: #543075;
}

.runner-stage {
    position: relative;
    isolation: isolate;
    height: clamp(15rem, 34vw, 23rem);
    background: #20102e;
}

.runner-stage:focus-visible {
    outline: 2px solid #e5bbff;
    outline-offset: -3px;
    z-index: 1;
}

#runner-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    touch-action: manipulation;
}

.runner-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: #100b1b65;
    pointer-events: none;
}

.runner-overlay[hidden] {
    display: none;
}

.runner-prompt {
    max-width: min(100%, 22rem);
    padding: 1.15rem 1.4rem 1.35rem;
    border: 1px solid #b484ed6b;
    border-radius: .9rem;
    background: #231732f5;
    box-shadow: 0 .7rem 1.5rem #0a071779;
    text-align: center;
}

.runner-prompt h3 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 750;
    line-height: 1.04;
    letter-spacing: -.035em;
}

.runner-prompt p {
    margin-block: .55rem .8rem;
    color: #ded0ee;
    line-height: 1.35;
}

.runner-prompt .play-button {
    min-height: 2.85rem;
    padding-block: .62rem;
    pointer-events: auto;
}

.arcade-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1.1rem;
    border-top: 1px solid #4c365f;
}

.runner-status {
    margin-top: .28rem;
    min-height: 1.45em;
    color: #e7cfff;
    font-size: .875rem;
}

kbd {
    font: inherit;
    padding: 0 .33em;
    border: 1px solid #584569;
    border-radius: .26rem;
    background: #2b1e3b;
    color: #f7ecff;
    white-space: nowrap;
}

.spin-dialog {
    width: min(calc(100% - 2rem), 26rem);
    max-height: calc(100% - 2rem);
    padding: 1.3rem clamp(.9rem, 4vw, 1.5rem) 1.45rem;
    border: 1px solid #9868c5;
    border-radius: 1.25rem;
    background: radial-gradient(ellipse at 50% 28%, #412056, transparent 71%), #21142e;
    box-shadow: 0 1.25rem 4rem #08050dbd;
    color: #fbf8ff;
    text-align: center;
    overscroll-behavior: contain;
}

.spin-dialog::backdrop {
    background: #0b0718bd;
    backdrop-filter: blur(4px);
}

.spin-dialog h2 {
    font-size: clamp(1.85rem, 5vw, 2.35rem);
    font-weight: 780;
    line-height: 1.08;
    letter-spacing: -.04em;
}

#spin-disclosure {
    margin-top: .35rem;
    color: #e5cff8;
    line-height: 1.35;
}

.wheel-stage {
    position: relative;
    width: min(100%, clamp(12rem, 48svh, 17.1rem));
    aspect-ratio: 1;
    margin: 1.1rem auto .95rem;
}

.spin-wheel {
    --wheel-rotation: 0deg;
    position: absolute;
    inset: 0;
    border: .4rem solid #271239;
    border-radius: 50%;
    background: conic-gradient(from -30deg,
        #7135a9 0deg 59deg, #d9b6f5 59deg 60deg,
        #49237b 60deg 119deg, #d9b6f5 119deg 120deg,
        #8232d8 120deg 179deg, #d9b6f5 179deg 180deg,
        #49237b 180deg 239deg, #d9b6f5 239deg 240deg,
        #a6edda 240deg 299deg, #d9b6f5 299deg 300deg,
        #8232d8 300deg 359deg, #d9b6f5 359deg 360deg);
    box-shadow: 0 0 0 1px #b57fe8, 0 0 0 .28rem #69428b, 0 0 1.55rem #9b54de74,
        inset 0 0 0 1px #e4ccfb99;
    transform: rotate(var(--wheel-rotation));
}

.spin-wheel.is-spinning, .spin-wheel.is-spinning .spin-wedge {
    transition: transform 2800ms cubic-bezier(.12, .68, .13, 1);
}

.spin-wedge {
    position: absolute;
    top: var(--wedge-y);
    left: var(--wedge-x);
    transform: translate(-50%, -50%) rotate(calc(-1 * var(--wheel-rotation)));
    color: #fff;
    font-size: clamp(.86rem, 3.8vw, 1.15rem);
    font-weight: 750;
    line-height: 1;
    white-space: nowrap;
}

.spin-wedge:nth-child(1) { --wedge-x: 50%; --wedge-y: 18%; }
.spin-wedge:nth-child(2) { --wedge-x: 78%; --wedge-y: 34%; }
.spin-wedge:nth-child(3) { --wedge-x: 78%; --wedge-y: 66%; }
.spin-wedge:nth-child(4) { --wedge-x: 50%; --wedge-y: 82%; }
.spin-wedge:nth-child(5) { --wedge-x: 22%; --wedge-y: 66%; }
.spin-wedge:nth-child(6) { --wedge-x: 22%; --wedge-y: 34%; }

.winning-wedge {
    color: #182f2a;
    font-weight: 850;
}

.wheel-pointer {
    position: absolute;
    z-index: 1;
    top: -.54rem;
    left: 50%;
    width: 1.65rem;
    height: 1.8rem;
    transform: translateX(-50%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    background: #f3dfff;
}

.wheel-hub {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 22%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid #c29ae5;
    border-radius: 50%;
    background: #2e1746;
    box-shadow: 0 0 0 .24rem #21132a86;
    color: #ebd4ff;
    font-size: clamp(1.1rem, 5vw, 1.48rem);
    font-weight: 800;
}

.spin-result {
    min-height: 2.8em;
    color: #e9d9f6;
    font-size: 1rem;
    line-height: 1.4;
}

.spin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    margin-top: .65rem;
}

.spin-actions .play-button, .spin-actions .jump-button {
    min-height: 2.85rem;
}

.spin-actions button:disabled {
    opacity: .66;
    cursor: default;
}

@media (max-width: 62rem) {
    .shell {
        width: calc(100% - 3.5rem);
    }

    .hero-inner {
        min-height: 23rem;
    }
}

@media (max-width: 44rem) {
    .shell {
        width: calc(100% - 2.5rem);
    }

    .header-inner {
        min-height: 4rem;
    }

    .hero {
        background: radial-gradient(ellipse at 50% 52%, #34174e 0%, transparent 72%), #130c1e;
    }

    .hero-inner {
        min-height: auto;
        flex-direction: column;
        padding: 0;
        text-align: center;
    }

    .hero-copy {
        width: 100%;
        padding-block: 1.45rem 1rem;
    }

    .hero h1 {
        font-size: clamp(3.5rem, 13vw, 5.5rem);
    }

    .hero-tagline {
        margin-block: .55rem .9rem;
    }

    .hero-art {
        position: relative;
        inset: auto;
        width: min(100vw, 32rem);
        height: clamp(13.75rem, 64vw, 20rem);
        mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
    }

    .hero-art img {
        object-position: center 6%;
    }

    .arcade {
        padding-block: 1.45rem 2rem;
    }

    .arcade-hud, .arcade-controls {
        padding-inline: .7rem;
    }

    .runner-help {
        font-size: .875rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .play-button, .spin-button, .jump-button,
    .spin-wheel.is-spinning, .spin-wheel.is-spinning .spin-wedge {
        transition: none;
    }
}
