:root {
    --bg: #070b14;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f3f5f9;
    --muted: #9aa3b5;
    --accent: #f5a623;
    --accent-soft: rgba(245, 166, 35, 0.16);
    --danger: #ff8b8b;
    --success: #3ee0b7;
    --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    --display: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
    --header-h: 72px;
    --focus: 0 0 0 3px var(--bg), 0 0 0 6px var(--accent);
}

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

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--accent);
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus);
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -40px;
    z-index: 100;
    background: var(--accent);
    color: #16120a;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
}

.skip-link:focus {
    top: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container {
    width: min(820px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(16px);
    background: rgba(7, 11, 20, 0.72);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text);
}

.brand-mark img {
    display: block;
    border-radius: 10px;
}

.header-status {
    margin: 0;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero {
    position: relative;
    min-height: calc(100svh - var(--header-h) - 88px);
    display: grid;
    align-items: center;
    padding: 40px 0 112px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.glow {
    position: absolute;
    width: 55vw;
    height: 55vw;
    max-width: 640px;
    max-height: 640px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
}

.glow-left {
    left: -18%;
    top: 18%;
    background: radial-gradient(circle, rgba(245, 166, 35, 0.35), transparent 68%);
}

.glow-right {
    right: -8%;
    top: 28%;
    background: radial-gradient(circle, rgba(62, 224, 183, 0.16), transparent 68%);
    animation: pulse-glow 7s ease-in-out infinite;
}

.road {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 160%;
    height: 42%;
    transform: translateX(-50%);
    background:
        linear-gradient(180deg, transparent, rgba(7, 11, 20, 0.2) 20%, rgba(12, 18, 32, 0.92)),
        repeating-linear-gradient(
            90deg,
            transparent 0 46px,
            rgba(245, 166, 35, 0.08) 46px 48px
        );
    mask-image: linear-gradient(180deg, transparent, black 36%);
}

.road::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 18%;
    width: min(72%, 720px);
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(245, 166, 35, 0.0) 8%, rgba(255, 232, 170, 0.85) 50%, rgba(245, 166, 35, 0) 92%, transparent);
    filter: blur(0.4px);
    animation: trail 3.8s linear infinite;
}

.bike-visual {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    left: 50%;
    bottom: -4%;
    width: min(520px, 92vw);
    transform: translateX(-50%);
    opacity: 0.32;
}

.bike-svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 28px rgba(245, 166, 35, 0.18));
}

.bike-underglow {
    opacity: 0.22;
}

.hero-copy {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 22px;
    padding: 6px 12px;
    border: 1px solid rgba(245, 166, 35, 0.35);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s ease-out infinite;
}

h1 {
    margin: 0 0 18px;
    font-family: var(--display);
    font-size: clamp(2rem, 6.4vw, 4.1rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
    max-width: 28ch;
}

.lede {
    margin: 0 0 40px;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 42ch;
}

.signup {
    width: min(520px, 100%);
}

.signup-title {
    margin: 0 0 6px;
    font-family: var(--display);
    font-size: 1.2rem;
}

.signup-copy {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.95rem;
}

.signup-form {
    display: grid;
    gap: 10px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row input {
    width: 100%;
    appearance: none;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
    min-height: 52px;
}

.form-row input::placeholder {
    color: #7d8798;
}

.form-row input:focus-visible {
    border-color: var(--accent);
    background: rgba(245, 166, 35, 0.06);
}

.form-row button {
    appearance: none;
    border: 0;
    border-radius: 14px;
    min-height: 52px;
    padding: 0 22px;
    background: linear-gradient(180deg, #ffc45c, var(--accent));
    color: #1a1408;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.form-row button:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.form-row button:disabled {
    opacity: 0.7;
    cursor: wait;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(26, 20, 8, 0.25);
    border-top-color: #1a1408;
    border-radius: 50%;
    display: none;
}

.form-row button.is-loading .btn-spinner {
    display: inline-block;
    animation: spin 0.7s linear infinite;
}

.form-status {
    min-height: 1.4em;
    margin: 0;
    font-size: 0.92rem;
}

.form-status.is-error {
    color: var(--danger);
}

.form-status.is-success {
    color: var(--success);
}

.signup-success {
    padding: 18px;
    border: 1px solid rgba(62, 224, 183, 0.28);
    background: rgba(62, 224, 183, 0.08);
    border-radius: 16px;
}

.success-kicker {
    margin: 0 0 6px;
    font-family: var(--display);
    font-size: 1.3rem;
    color: var(--success);
}

.signup-success p:last-child {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 22px 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

.powered-by {
    color: var(--text);
    opacity: 0.78;
}

.powered-by a {
    color: var(--accent);
    font-weight: 600;
}

.powered-by a:hover {
    text-decoration: underline;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(245, 166, 35, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 166, 35, 0); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.06); }
}

@keyframes trail {
    from { opacity: 0.35; transform: translateX(-50%) scaleX(0.86); }
    50% { opacity: 1; transform: translateX(-50%) scaleX(1); }
    to { opacity: 0.35; transform: translateX(-50%) scaleX(0.86); }
}

@keyframes bike-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@media (min-width: 640px) {
    .form-row {
        flex-direction: row;
        align-items: stretch;
    }

    .form-row input {
        flex: 1;
    }

    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (min-width: 960px) {
    .container {
        width: min(1120px, calc(100% - 48px));
    }

    .hero {
        min-height: calc(100svh - var(--header-h) - 72px);
        padding: 56px 0 72px;
    }

    .hero-copy {
        align-items: flex-start;
        text-align: left;
        width: min(560px, 52%);
        margin-right: auto;
    }

    .bike-visual {
        left: auto;
        right: -4%;
        bottom: 4%;
        width: min(680px, 54vw);
        transform: none;
        opacity: 0.9;
        animation: bike-idle 6s ease-in-out infinite;
    }
}

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

    .badge-dot,
    .glow-right,
    .road::before,
    .bike-visual,
    .form-row button,
    .form-row button.is-loading .btn-spinner {
        animation: none;
        transition: none;
    }
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f4f1ea;
        --border: rgba(20, 24, 36, 0.1);
        --text: #161b27;
        --muted: #5d6678;
    }

    .site-header {
        background: rgba(244, 241, 234, 0.78);
    }

    .form-row input {
        background: #fff;
        color: var(--text);
    }

    .glow-left {
        background: radial-gradient(circle, rgba(245, 166, 35, 0.28), transparent 68%);
    }

    .road {
        background:
            linear-gradient(180deg, transparent, rgba(244, 241, 234, 0.35) 24%, rgba(232, 226, 214, 0.95)),
            repeating-linear-gradient(90deg, transparent 0 46px, rgba(245, 166, 35, 0.12) 46px 48px);
    }
}
