:root {
    --lime: #caff3d;
    --lime-soft: #eaff96;
    --lime-deep: #88a900;
    --ink: #050605;
    --ink-2: #10120d;
    --ink-3: #171a11;
    --paper: #fffef6;
    --muted: rgba(255, 255, 255, .66);
    --line: rgba(255, 255, 255, .13);
    --glass: rgba(255, 255, 255, .075);
    --shadow: rgba(0, 0, 0, .42);
    --wheel: min(54vw, 500px);
    --mx: 50%;
    --my: 50%;
}

body[data-theme="light"] {
    --ink: #f8f9ec;
    --ink-2: #ffffff;
    --ink-3: #eef3d3;
    --paper: #080907;
    --muted: rgba(0, 0, 0, .62);
    --line: rgba(0, 0, 0, .12);
    --glass: rgba(255, 255, 255, .72);
    --shadow: rgba(87, 106, 0, .16);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--ink);
    color: var(--paper);
    overflow-x: hidden;
}

a,
button {
    color: inherit;
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

.page {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(circle at var(--mx) var(--my), rgba(202, 255, 61, .17), transparent 25%),
        radial-gradient(circle at 15% 15%, rgba(202, 255, 61, .18), transparent 28%),
        radial-gradient(circle at 85% 80%, rgba(202, 255, 61, .13), transparent 30%),
        linear-gradient(145deg, var(--ink) 0%, var(--ink-2) 48%, var(--ink) 100%);
}

.page::before {
    content: "";
    position: absolute;
    inset: -40%;
    z-index: -3;
    background:
        conic-gradient(from 160deg, transparent 0deg, rgba(202, 255, 61, .18) 54deg, transparent 112deg, rgba(255, 255, 255, .08) 170deg, transparent 248deg, rgba(202, 255, 61, .16) 310deg, transparent 360deg);
    animation: slowSpin 34s linear infinite;
    opacity: .9;
}

body[data-theme="light"] .page::before {
    background:
        conic-gradient(from 160deg, transparent 0deg, rgba(136, 169, 0, .18) 54deg, transparent 112deg, rgba(0, 0, 0, .08) 170deg, transparent 248deg, rgba(136, 169, 0, .14) 310deg, transparent 360deg);
}

.page::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: radial-gradient(circle at center, black 0%, black 45%, transparent 82%);
    opacity: .42;
}

.noise {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 25% 35%, rgba(255, 255, 255, .08), transparent 18%),
        radial-gradient(circle at 75% 25%, rgba(202, 255, 61, .09), transparent 22%),
        radial-gradient(circle at 65% 75%, rgba(255, 255, 255, .06), transparent 20%);
    filter: blur(24px);
    opacity: .7;
}

body[data-theme="light"] .noise {
    background:
        radial-gradient(circle at 25% 35%, rgba(136, 169, 0, .11), transparent 18%),
        radial-gradient(circle at 75% 25%, rgba(202, 255, 61, .18), transparent 22%),
        radial-gradient(circle at 65% 75%, rgba(0, 0, 0, .06), transparent 20%);
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    height: 82px;
    padding: 0 clamp(20px, 5vw, 70px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 86%, transparent), color-mix(in srgb, var(--ink) 36%, transparent));
    backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transform: translateZ(0);
}

.brand img {
    width: 146px;
    height: auto;
    display: block;
    border-radius: 13px;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .28));
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.theme-btn,
.nav-cta {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 820;
    letter-spacing: -.02em;
    transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease, color .22s ease;
}

.theme-btn {
    padding: 9px 13px;
    color: var(--muted);
    background: transparent;
}

.theme-btn:hover,
.theme-btn.is-active {
    color: #111506;
    background: linear-gradient(135deg, var(--lime), var(--lime-soft));
}

.nav-cta {
    padding: 11px 18px;
    color: #111506;
    border: 1px solid rgba(202, 255, 61, .92);
    background: linear-gradient(135deg, var(--lime), var(--lime-soft));
    box-shadow: 0 16px 45px rgba(202, 255, 61, .18);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 58px rgba(202, 255, 61, .32);
}

.stage {
    min-height: 100vh;
    padding: 116px clamp(18px, 5vw, 70px) 36px;
    display: grid;
    place-items: center;
    position: relative;
}

.stage-inner {
    width: min(1180px, 100%);
    display: grid;
    grid-template-columns: minmax(430px, .95fr) minmax(480px, 1.05fr);
    gap: clamp(26px, 4vw, 64px);
    align-items: center;
}

.copy {
    position: relative;
    z-index: 6;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

h1 {
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    text-align: center;
    font-size: clamp(72px, 7.6vw, 136px);
    line-height: .92;
    letter-spacing: -.035em;
    font-weight: 920;
    animation: rise .76s ease .08s both;
    text-shadow: 0 24px 80px rgba(202, 255, 61, .14);
}

.wheel-zone {
    position: relative;
    width: var(--wheel);
    height: var(--wheel);
    justify-self: end;
    animation: rise .82s ease .12s both;
}

.wheel {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(202, 255, 61, .10) 0 20%, transparent 21%),
        radial-gradient(circle at center, transparent 0 37%, var(--line) 38%, transparent 39%),
        radial-gradient(circle at center, transparent 0 56%, rgba(202, 255, 61, .30) 57%, transparent 58%),
        radial-gradient(circle at center, transparent 0 72%, var(--line) 73%, transparent 74%);
    box-shadow:
        inset 0 0 70px rgba(202, 255, 61, .04),
        0 50px 140px var(--shadow);
}

.wheel::before,
.wheel::after {
    content: "";
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    border: 1px dashed rgba(202, 255, 61, .34);
    animation: slowSpin 26s linear infinite;
}

.wheel::after {
    inset: 17%;
    border-style: solid;
    border-color: var(--line);
    animation-duration: 42s;
    animation-direction: reverse;
}

.halo {
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg, transparent, rgba(202, 255, 61, .52), transparent 26%, transparent 52%, rgba(255, 255, 255, .18), transparent 70%, transparent);
    filter: blur(.4px);
    opacity: .54;
    animation: slowSpin 18s linear infinite;
    mask-image: radial-gradient(circle, transparent 0 61%, black 62% 68%, transparent 69%);
}

body[data-theme="light"] .halo {
    background:
        conic-gradient(from 0deg, transparent, rgba(136, 169, 0, .42), transparent 26%, transparent 52%, rgba(0, 0, 0, .12), transparent 70%, transparent);
}

.spoke {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 37%;
    height: 1px;
    transform-origin: left center;
    transform: rotate(var(--deg));
    background: linear-gradient(90deg, rgba(202, 255, 61, .02), rgba(202, 255, 61, .44), rgba(255, 255, 255, .04));
    opacity: .42;
    transition: opacity .2s ease, height .2s ease, box-shadow .2s ease;
}

.spoke.is-live {
    height: 2px;
    opacity: .9;
    box-shadow: 0 0 18px rgba(202, 255, 61, .45);
}

.core {
    position: absolute;
    inset: 50%;
    width: 176px;
    height: 176px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    text-decoration: none;
    color: #101506;
    background:
        radial-gradient(circle at 35% 25%, #ffffff, transparent 30%),
        linear-gradient(135deg, var(--lime-soft), var(--lime) 52%, #a6d718);
    border: 1px solid rgba(255, 255, 255, .52);
    box-shadow:
        0 0 0 14px rgba(202, 255, 61, .07),
        0 0 0 28px rgba(202, 255, 61, .035),
        0 34px 95px rgba(202, 255, 61, .28),
        inset 0 -18px 42px rgba(0, 0, 0, .12);
    overflow: hidden;
    z-index: 8;
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.core:hover {
    transform: translate(-50%, -50%) scale(1.035);
    box-shadow:
        0 0 0 16px rgba(202, 255, 61, .09),
        0 0 0 34px rgba(202, 255, 61, .045),
        0 38px 115px rgba(202, 255, 61, .40),
        inset 0 -18px 42px rgba(0, 0, 0, .12);
}

.core:active,
.core.is-pressed {
    transform: translate(-50%, -50%) scale(.965);
    filter: saturate(1.15);
}

.core b {
    display: block;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: -.035em;
    font-weight: 950;
}

.node {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transform: translate(-50%, -50%);
    z-index: 9;
    width: 124px;
    min-height: 66px;
    border-radius: 24px;
    padding: 13px 14px;
    display: grid;
    place-items: center;
    text-align: center;
    text-decoration: none;
    color: color-mix(in srgb, var(--paper) 82%, transparent);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .115), rgba(255, 255, 255, .045)),
        color-mix(in srgb, var(--ink) 62%, transparent);
    border: 1px solid var(--line);
    box-shadow: 0 22px 55px var(--shadow);
    backdrop-filter: blur(18px);
    overflow: hidden;
    transition:
        transform .22s ease,
        color .22s ease,
        border-color .22s ease,
        background .22s ease,
        box-shadow .22s ease;
}

.node::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(202, 255, 61, .60), transparent 36%, rgba(255, 255, 255, .16));
    opacity: 0;
    transition: opacity .22s ease;
}

.node::after {
    content: "";
    position: absolute;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(202, 255, 61, .24);
    filter: blur(18px);
    transform: scale(.35);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
}

.node:hover,
.node:focus-visible {
    color: var(--paper);
    transform: translate(-50%, -50%) translateY(-8px) scale(1.045);
    border-color: rgba(202, 255, 61, .70);
    background:
        linear-gradient(180deg, rgba(202, 255, 61, .13), rgba(255, 255, 255, .06)),
        color-mix(in srgb, var(--ink) 74%, transparent);
    box-shadow: 0 28px 78px var(--shadow), 0 0 42px rgba(202, 255, 61, .16);
    outline: none;
}

.node:hover::before,
.node:focus-visible::before {
    opacity: 1;
}

.node:hover::after,
.node:focus-visible::after {
    transform: scale(1);
    opacity: 1;
}

.node:active,
.node.is-pressed {
    transform: translate(-50%, -50%) scale(.95);
}

.node strong {
    position: relative;
    z-index: 2;
    display: block;
    font-size: 14px;
    line-height: 1.06;
    letter-spacing: -.035em;
    font-weight: 900;
}

.ripple {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    background: rgba(255, 255, 255, .72);
    transform: translate(-50%, -50%) scale(1);
    animation: ripple .46s ease-out forwards;
    z-index: 4;
}

.corner {
    position: fixed;
    right: clamp(18px, 3vw, 42px);
    bottom: 26px;
    z-index: 25;
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 740;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.corner a {
    text-decoration: none;
    color: var(--muted);
    transition: color .2s ease;
}

.corner a:hover {
    color: var(--lime-deep);
}

body[data-theme="dark"] .corner a:hover {
    color: var(--lime);
}

.dotline {
    width: 34px;
    height: 1px;
    background: rgba(202, 255, 61, .42);
}

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

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(22px) scale(.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes ripple {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(24);
    }
}

@media (max-width: 1040px) {
    :root {
        --wheel: min(78vw, 500px);
    }

    .stage {
        padding-top: 108px;
    }

    .stage-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .copy {
        justify-content: center;
    }

    .wheel-zone {
        justify-self: center;
    }
}

@media (max-width: 720px) {
    .nav {
        height: auto;
        min-height: 74px;
        padding: 12px 16px;
        gap: 12px;
    }

    .brand img {
        width: 112px;
    }

    .nav-actions {
        gap: 8px;
    }

    .theme-switch {
        padding: 3px;
    }

    .theme-btn {
        min-height: 36px;
        padding: 8px 10px;
        font-size: 12px;
    }

    .nav-cta {
        min-height: 38px;
        padding: 9px 12px;
        font-size: 12px;
    }

    .stage {
        padding: 108px 16px 78px;
    }

    .stage-inner {
        gap: 30px;
    }

    h1 {
        font-size: clamp(54px, 17vw, 88px);
        letter-spacing: -.035em;
    }

    .wheel-zone {
        width: min(100%, 390px);
        height: auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding-top: 132px;
    }

    .wheel,
    .halo,
    .spoke {
        display: none;
    }

    .core {
        top: 0;
        left: 50%;
        width: 126px;
        height: 126px;
        transform: translateX(-50%);
        inset: auto auto auto 50%;
    }

    .core:hover {
        transform: translateX(-50%) scale(1.03);
    }

    .core:active,
    .core.is-pressed {
        transform: translateX(-50%) scale(.95);
    }

    .core b {
        font-size: 17px;
    }

    .node {
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        width: auto;
        min-height: 70px;
        border-radius: 20px;
    }

    .node:hover,
    .node:focus-visible {
        transform: translateY(-5px);
    }

    .node:active,
    .node.is-pressed {
        transform: scale(.96);
    }

    .corner {
        left: 16px;
        right: 16px;
        bottom: 18px;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
    }
}

/* Header brand image hard constraint */
.nav .brand img {
    width: auto !important;
    height: auto !important;
    max-width: 146px !important;
    max-height: 52px !important;
    object-fit: contain !important;
}

@media (max-width: 720px) {
    .nav .brand img {
        max-width: 112px !important;
        max-height: 44px !important;
    }
}

/* Light Switch Dark control */
.theme-toggle {
    position: relative;
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 7px 8px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
}

.theme-toggle:focus-visible {
    outline: 3px solid rgba(202, 255, 61, .52);
    outline-offset: 3px;
}

.theme-label {
    position: relative;
    z-index: 2;
    min-width: 48px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    font-weight: 860;
    transition: color .2s ease, transform .2s ease;
}

.theme-toggle-knob {
    position: relative;
    z-index: 2;
    min-width: 78px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #111506;
    background: linear-gradient(135deg, var(--lime), var(--lime-soft));
    font-size: 13px;
    font-weight: 920;
    box-shadow: 0 12px 32px rgba(202, 255, 61, .22);
    transition: transform .24s ease, box-shadow .24s ease;
}

.theme-toggle:hover .theme-toggle-knob {
    transform: translateY(-1px);
    box-shadow: 0 16px 42px rgba(202, 255, 61, .32);
}

.theme-toggle.is-light .theme-label-light,
.theme-toggle.is-dark .theme-label-dark {
    color: var(--paper);
    transform: translateY(-1px);
}

body[data-theme="light"] .theme-toggle.is-light .theme-label-light {
    color: #111506;
}

body[data-theme="light"] .theme-toggle.is-dark .theme-label-dark {
    color: #111506;
}

/* Header profile CTA */
.nav-profile-cta {
    display: inline-grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 9px;
    padding-left: 9px;
}

.nav-profile-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.nav-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

@media (max-width: 620px) {
    .theme-toggle {
        gap: 5px;
        min-height: 48px;
        padding: 6px;
    }

    .theme-label {
        min-width: 38px;
        font-size: 12px;
    }

    .theme-toggle-knob {
        min-width: 62px;
        min-height: 34px;
        font-size: 12px;
        padding: 0 10px;
    }

    .nav-profile-cta span:last-child {
        display: none;
    }

    .nav-profile-cta {
        padding-right: 9px;
    }
}

/* Actual Light / Dark switch */
.theme-toggle {
    grid-template-columns: auto auto auto;
    gap: 10px;
    padding: 8px 12px;
}

.theme-toggle-track {
    position: relative;
    width: 72px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .30);
    border: 1px solid var(--line);
    box-shadow:
        inset 0 1px 8px rgba(0, 0, 0, .10),
        0 10px 28px rgba(202, 255, 61, .10);
    transition: background .24s ease, border-color .24s ease, box-shadow .24s ease;
}

.theme-toggle-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lime), var(--lime-soft));
    box-shadow: 0 8px 22px rgba(202, 255, 61, .30);
    transition: transform .24s ease, box-shadow .24s ease;
}

.theme-toggle.is-dark .theme-toggle-thumb {
    transform: translateX(36px);
}

.theme-toggle.is-dark .theme-toggle-track {
    background: rgba(0, 0, 0, .28);
    border-color: rgba(202, 255, 61, .34);
}

.theme-toggle:hover .theme-toggle-thumb {
    box-shadow: 0 10px 28px rgba(202, 255, 61, .42);
}

.theme-toggle-knob {
    display: none !important;
}

@media (max-width: 620px) {
    .theme-toggle {
        gap: 7px;
        padding: 7px 9px;
    }

    .theme-toggle-track {
        width: 62px;
        height: 32px;
    }

    .theme-toggle-thumb {
        width: 24px;
        height: 24px;
    }

    .theme-toggle.is-dark .theme-toggle-thumb {
        transform: translateX(30px);
    }
}
