:root {
    --asphalt: #17181b;
    --asphalt-2: #202226;
    --asphalt-3: #2b2d33;
    --paint: #fc0;
    --paint-dark: #b38f00;
    --chalk: #f2f1ec;
    --muted: #a3a6ad;
    --sign: #0e6b3d;
    --miss: #e04b3c;
    --hit: #2fa765;
    --condensed: "Barlow Condensed", "Arial Narrow", sans-serif;
    --road-x: 64px;
    --gutter: 132px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--asphalt);
    color: var(--chalk);
    font:
        18px/1.6 Barlow,
        system-ui,
        sans-serif;
    overflow-x: hidden;
}

a {
    color: var(--paint);
}

h1,
h2 {
    margin: 0;
    font-family: var(--condensed);
    font-weight: 800;
    line-height: 0.95;
}

h2 {
    font-size: clamp(38px, 5.5vw, 64px);
    text-transform: uppercase;
}

.lead {
    max-width: 34ch;
    color: #d6d5cf;
    font-size: 21px;
}

.fine,
.note {
    color: var(--muted);
    font-size: 15px;
}

.note {
    max-width: 62ch;
    margin-top: 28px;
}

/* ticker */

.ticker {
    position: relative;
    z-index: 2;
    overflow: hidden;
    background: var(--paint);
    color: #111;
    font-family: var(--condensed);
    font-size: 19px;
    font-weight: 700;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 38s linear infinite;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker span {
    display: flex;
    align-items: center;
    padding: 9px 0;
    white-space: nowrap;
}

.ticker span::after {
    content: "";
    width: 34px;
    height: 14px;
    margin: 0 22px;
    background: repeating-linear-gradient(-45deg, #111 0 5px, transparent 5px 10px);
}

@keyframes ticker {
    to {
        transform: translateX(-50%);
    }
}

/* road spine */

.road {
    position: fixed;
    top: 0;
    bottom: 0;
    left: var(--road-x);
    z-index: 0;
    width: 6px;
    background: repeating-linear-gradient(to bottom, var(--paint) 0 46px, transparent 46px 92px);
    opacity: 0.85;
    animation: drive 1.6s linear infinite;
}

@keyframes drive {
    to {
        background-position: 0 92px;
    }
}

header,
main,
footer {
    position: relative;
    z-index: 1;
}

/* hero */

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
    min-height: calc(100vh - 44px);
    padding: 48px 6vw 64px var(--gutter);
}

.hero h1 {
    font-size: clamp(60px, 9.5vw, 136px);
    text-transform: uppercase;
}

.hero h1 span {
    color: var(--paint);
    background: linear-gradient(var(--paint), var(--paint)) left bottom / 0 8px no-repeat;
    animation: underline 1s 0.6s cubic-bezier(0.7, 0, 0.2, 1) forwards;
}

@keyframes underline {
    to {
        background-size: 100% 8px;
    }
}

.hero .lead {
    margin: 28px 0 32px;
}

.cta {
    display: inline-flex;
    align-items: stretch;
    border-radius: 6px;
    background: var(--paint);
    box-shadow: 0 6px 0 var(--paint-dark);
    color: #111;
    font-family: var(--condensed);
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        transform 0.15s,
        box-shadow 0.15s;
}

.cta span,
.cta b {
    display: flex;
    align-items: center;
    padding: 16px 22px;
}

.cta b {
    border-left: 2px solid rgb(0 0 0 / 25%);
}

.cta span::after {
    content: "→";
    margin-left: 12px;
    transition: transform 0.2s;
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 var(--paint-dark);
}

.cta:hover span::after {
    transform: translateX(6px);
}

.cta:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--paint-dark);
}

.hero .fine {
    margin-top: 18px;
}

/* hero card stack */

.stack {
    position: relative;
    height: 380px;
    perspective: 1400px;
}

.flash {
    position: absolute;
    inset: 0 0 40px;
    padding: 0;
    border: 0;
    background: none;
    color: #111;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transform-style: preserve-3d;
    transition:
        transform 0.7s cubic-bezier(0.3, 0.7, 0.2, 1),
        opacity 0.5s;
}

.flash:nth-of-type(1) {
    z-index: 3;
}

.flash:nth-of-type(2) {
    z-index: 2;
    transform: translate(18px, 16px) rotate(3deg);
}

.flash:nth-of-type(3) {
    z-index: 1;
    transform: translate(34px, 30px) rotate(6deg);
}

.flash.flipped {
    transform: rotateY(180deg);
}

.flash.leaving {
    opacity: 0;
    transform: translate(-60px, -40px) rotate(-12deg);
}

.face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px;
    border-left: 12px solid var(--paint);
    border-radius: 10px;
    background: var(--chalk);
    box-shadow: 0 24px 40px rgb(0 0 0 / 35%);
    font-family: var(--condensed);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
    backface-visibility: hidden;
}

.face.back {
    background: #fff8d6;
    font-family: Barlow, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.35;
    transform: rotateY(180deg);
}

.face small {
    margin-top: 18px;
    color: #5d5f66;
    font-size: 15px;
    font-weight: 500;
}

.stack-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}

/* km sections */

.km {
    display: grid;
    grid-template-columns: calc(var(--gutter) - 24px) 1fr;
    gap: 24px;
    padding: 96px 6vw 96px 0;
}

.km-mark {
    position: sticky;
    top: 28px;
    place-self: start center;
    width: 76px;
    margin-left: calc(var(--road-x) * 2 - var(--gutter) + 24px);
    padding: 8px 0 10px;
    border: 3px solid #111;
    border-radius: 6px;
    background: var(--chalk);
    box-shadow: 0 0 0 4px var(--asphalt);
    color: #111;
    font-family: var(--condensed);
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
}

.km-mark b {
    display: block;
    font-size: 16px;
}

.km-body {
    max-width: 980px;
}

[data-reveal] .km-body > * {
    opacity: 0;
    transform: translateY(36px);
    transition:
        opacity 0.7s,
        transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-reveal].in .km-body > * {
    opacity: 1;
    transform: none;
}

[data-reveal].in .km-body > *:nth-child(2) {
    transition-delay: 0.12s;
}

[data-reveal].in .km-body > *:nth-child(3) {
    transition-delay: 0.24s;
}

[data-reveal].in .km-body > *:nth-child(4) {
    transition-delay: 0.36s;
}

/* timeline */

.timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
    margin: 48px 0 0;
    padding: 34px 0 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    right: 0;
    left: 0;
    height: 4px;
    background: var(--paint);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.4s cubic-bezier(0.6, 0, 0.2, 1) 0.3s;
}

.in .timeline::before {
    transform: scaleX(1);
}

.timeline li {
    position: relative;
    color: #d6d5cf;
    font-size: 16px;
}

.timeline li::before {
    content: "";
    position: absolute;
    top: -34px;
    left: 0;
    width: 20px;
    height: 20px;
    border: 4px solid var(--paint);
    border-radius: 50%;
    background: var(--asphalt);
}

.timeline b {
    display: block;
    color: var(--chalk);
    font-family: var(--condensed);
    font-size: 30px;
}

.timeline .open b {
    color: var(--paint);
}

.timeline .open::before {
    border-style: dashed;
    animation: spin 6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* highway signs */

.signs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 40px 0;
    padding: 0;
    list-style: none;
}

.signs li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: 8px;
    background: var(--sign);
    box-shadow:
        inset 0 0 0 3px var(--sign),
        inset 0 0 0 6px #fff;
    font-family: var(--condensed);
    font-size: 26px;
    font-weight: 700;
    opacity: 0;
    transform: translateX(60px);
    transition:
        opacity 0.6s,
        transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 80ms);
}

.in .signs li {
    opacity: 1;
    transform: none;
}

.signs em {
    font-style: normal;
}

.signs em::after {
    content: " cards";
    font-size: 18px;
}

.route {
    border-left: 6px dashed var(--paint);
    padding-left: 26px;
}

.route p {
    margin: 0 0 18px;
    font-size: 20px;
}

/* demo */

.demo {
    margin-top: 36px;
}

.demo-card {
    min-height: 220px;
    padding: 32px;
    border-left: 12px solid var(--paint);
    border-radius: 10px;
    background: var(--chalk);
    color: #111;
    transition: transform 0.35s;
}

.demo-card.swap {
    transform: translateX(-24px) rotate(-2deg);
}

.demo-q {
    margin: 0;
    font-family: var(--condensed);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.demo-a {
    margin: 18px 0 0;
    padding-top: 18px;
    border-top: 2px dashed #c9c7bd;
    font-size: 20px;
}

.demo-actions {
    display: flex;
    gap: 12px;
    margin: 18px 0;
}

.demo-actions button {
    flex: 1;
    padding: 16px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    font-family: var(--condensed);
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.demo-actions .ghost {
    border: 2px solid var(--paint);
    background: transparent;
    color: var(--paint);
}

.demo-actions .miss {
    background: var(--miss);
}

.demo-actions .hit {
    background: var(--hit);
}

.lanes {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    margin: 0;
    padding: 0;
    border-radius: 8px;
    background: var(--asphalt-3);
    list-style: none;
    overflow: hidden;
}

.lanes li {
    position: relative;
    padding: 34px 6px 12px;
    border-right: 3px dashed #4a4d55;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
    transition:
        background 0.4s,
        color 0.4s;
}

.lanes li:last-child {
    border-right: 0;
}

.lanes li::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: transparent;
    transform: translateX(-50%) scale(0.4);
    transition:
        transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1),
        background 0.3s;
}

.lanes li.active {
    background: #3a3410;
    color: var(--chalk);
}

.lanes li.active::before {
    background: var(--paint);
    transform: translateX(-50%) scale(1);
}

.demo-status {
    min-height: 3.2em;
    color: #d6d5cf;
}

/* offer */

.price {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
    margin-top: 28px;
}

.price-value {
    color: var(--paint);
    font-family: var(--condensed);
    font-size: clamp(80px, 12vw, 150px);
    font-weight: 800;
    line-height: 0.9;
}

/* faq */

.faq details {
    border-bottom: 2px solid var(--asphalt-3);
}

.faq details:first-of-type {
    margin-top: 28px;
}

.faq summary {
    position: relative;
    padding: 22px 48px 22px 0;
    font-family: var(--condensed);
    font-size: 28px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

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

.faq summary::before,
.faq summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 8px;
    width: 22px;
    height: 4px;
    background: var(--paint);
    transition: transform 0.3s;
}

.faq summary::after {
    transform: rotate(90deg);
}

.faq details[open] summary::after {
    transform: rotate(0deg);
}

.faq details p {
    max-width: 62ch;
    margin: 0 0 24px;
    color: #d6d5cf;
}

/* footer */

footer {
    padding: 48px 6vw 56px var(--gutter);
    border-top: 2px solid var(--asphalt-3);
    background: var(--asphalt-2);
    color: var(--muted);
    font-size: 15px;
}

/* legal pages */

.doc section {
    max-width: 760px;
    padding: 64px 6vw 64px var(--gutter);
}

.doc h1 {
    font-size: 64px;
    text-transform: uppercase;
}

.doc h2 {
    margin-top: 32px;
    font-size: 30px;
}

/* responsive */

@media (width <= 860px) {
    :root {
        --road-x: 18px;
        --gutter: 44px;
    }

    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 36px 20px 56px var(--gutter);
    }

    .stack {
        height: 320px;
    }

    .flash {
        inset: 0 36px 40px 0;
    }

    .face {
        padding: 26px;
        font-size: 28px;
    }

    .km {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 64px 20px 64px var(--gutter);
    }

    .km-mark {
        position: static;
        justify-self: start;
        margin-left: 0;
    }

    .timeline {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 0 0 0 34px;
    }

    .timeline::before {
        top: 0;
        bottom: 0;
        left: 8px;
        width: 4px;
        height: auto;
        transform: scaleY(0);
        transform-origin: top;
    }

    .in .timeline::before {
        transform: scaleY(1);
    }

    .timeline li::before {
        top: 6px;
        left: -34px;
    }

    .signs {
        grid-template-columns: 1fr;
    }

    .cta {
        font-size: 21px;
    }

    .cta span,
    .cta b {
        padding: 14px 16px;
    }

    footer {
        padding: 40px 20px 48px var(--gutter);
    }
}

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

    [data-reveal] .km-body > *,
    .signs li {
        opacity: 1;
        transform: none;
    }

    .timeline::before {
        transform: none;
    }

    .hero h1 span {
        background-size: 100% 8px;
    }
}
