/*-- Night Walk Page --*/

.walk-hero {
    padding-bottom: 28px;
}

.walk-hero .display {
    margin: 0;
}

.walk-section {
    padding-bottom: 96px;
}

.walk-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 78vh;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: #03060f;
    box-shadow: var(--shadow), 0 0 80px rgba(37, 99, 235, 0.15);
}

.walk-stage:fullscreen {
    max-height: none;
    border-radius: 0;
    border: none;
}

.walk-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    background: #05070c;
    touch-action: none;
    outline: none;
}

.walk-stage.is-failed .walk-spinner {
    display: none;
}

.walk-stage.is-failed .walk-loading {
    padding: 24px;
    text-align: center;
    text-transform: none;
    color: #ffb4b4;
}

/* resting backdrop: nothing renders on the GPU until the visitor launches the scene */
.walk-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(100deg, transparent 0 22px, rgba(180, 210, 255, 0.05) 22px 23px),
        radial-gradient(60% 45% at 50% 32%, rgba(16, 185, 129, 0.16), transparent 70%),
        radial-gradient(40% 30% at 26% 78%, rgba(239, 68, 68, 0.12), transparent 70%),
        radial-gradient(45% 35% at 78% 72%, rgba(251, 146, 60, 0.12), transparent 70%),
        linear-gradient(180deg, #050914 0%, #03060f 100%);
    background-size: 240px 240px, auto, auto, auto, auto;
    animation: walk-rain 900ms linear infinite;
}

@keyframes walk-rain {
    to { background-position: -40px 240px, 0 0, 0 0, 0 0, 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .walk-stage::before { animation: none; }
}

/*-- Loading --*/
.walk-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    background: #05070c;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 500ms var(--ease-out), visibility 0s linear 500ms;
}

.walk-stage.is-loading .walk-loading {
    opacity: 1;
    visibility: visible;
    transition: none;
}

.walk-spinner {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(120, 170, 255, 0.2);
    border-top-color: var(--accent);
    animation: walk-spin 800ms linear infinite;
}

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

/*-- Start Overlay --*/
.walk-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(ellipse at center, rgba(5, 10, 24, 0.35), rgba(5, 10, 24, 0.8));
    transition: opacity 350ms var(--ease-out), visibility 0s linear 350ms;
}

.walk-stage.is-active .walk-overlay {
    opacity: 0;
    visibility: hidden;
}

.walk-stage:not(.is-active) .walk-overlay {
    transition: opacity 350ms var(--ease-out), visibility 0s;
}

.walk-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: min(380px, 100%);
    padding: 28px;
    text-align: center;
    border-radius: var(--radius-lg);
    background: rgba(8, 18, 42, 0.82);
    border: 1px solid var(--border-strong);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    animation: walk-card-in 600ms var(--ease-out) both;
}

@keyframes walk-card-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
}

.walk-card h2 {
    font-size: 26px;
}

.walk-keys {
    display: grid;
    gap: 8px;
    width: 100%;
    list-style: none;
}

.walk-keys li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--muted);
}

.walk-keys span {
    margin-left: auto;
}

kbd {
    min-width: 30px;
    padding: 3px 8px;
    border-radius: 7px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: #e0ecff;
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.3);
    border-bottom-width: 2px;
}

.walk-keys--touch {
    display: none;
}

@media (pointer: coarse) {
    .walk-keys--desktop { display: none; }
    .walk-keys--touch { display: grid; }
}

/*-- HUD --*/
.walk-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.walk-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
    opacity: 0;
    transition: opacity 300ms ease-out;
}

.walk-stage.is-active.is-fpv:not(.is-loading) .walk-crosshair {
    opacity: 1;
}

.walk-prompt,
.walk-toast {
    position: absolute;
    left: 50%;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    background: rgba(8, 18, 42, 0.85);
    border: 1px solid var(--border-strong);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity 250ms var(--ease-out), transform 300ms var(--ease-out);
}

.walk-prompt {
    top: calc(50% + 40px);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.walk-prompt kbd {
    min-width: 0;
}

.walk-prompt.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* on touch the prompt is the interact button; with a mouse it must not steal the click that locks the pointer */
.walk-stage.is-touch .walk-prompt.show {
    pointer-events: auto;
    cursor: pointer;
}

.walk-toast {
    bottom: 22px;
    max-width: calc(100% - 32px);
    white-space: normal;
    text-align: center;
    border-color: rgba(96, 165, 250, 0.6);
}

.walk-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/*-- Wallet + Bag --*/
.walk-wallet {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: #fff;
    background: rgba(8, 18, 42, 0.7);
    border: 1px solid var(--border-strong);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: auto;
    transition: opacity 300ms var(--ease-out), visibility 0s linear 300ms, border-color 200ms ease-out;
}

.walk-wallet span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.walk-wallet i {
    font-size: 16px;
    color: var(--accent);
}

.walk-wallet:hover {
    border-color: rgba(96, 165, 250, 0.6);
}

.walk-wallet.bump b {
    animation: walk-bump 450ms var(--spring);
}

@keyframes walk-bump {
    40% { color: var(--accent); }
}

.walk-stage.is-active.is-fpv:not(.is-loading) .walk-wallet {
    opacity: 1;
    visibility: visible;
    transition: opacity 300ms var(--ease-out), visibility 0s, border-color 200ms ease-out;
}

.walk-bag {
    position: absolute;
    top: 58px;
    left: 14px;
    width: min(260px, calc(100% - 28px));
    max-height: calc(100% - 140px);
    overflow-y: auto;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 13px;
    background: rgba(8, 18, 42, 0.88);
    border: 1px solid var(--border-strong);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    pointer-events: auto;
}

.walk-bag h3 {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 6px;
}

.walk-bag h3 + ul + h3 {
    margin-top: 12px;
}

.walk-bag small {
    font-weight: 400;
    color: var(--dim);
}

.walk-bag ul {
    display: grid;
    gap: 4px;
    list-style: none;
}

.walk-bag li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
}

.walk-bag li b {
    font-family: var(--font-mono);
    font-weight: 400;
    color: var(--text);
}

.walk-bag li.empty {
    color: var(--dim);
    font-style: italic;
}

/*-- Tools --*/
.walk-tools {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 300ms var(--ease-out), visibility 0s linear 300ms;
}

.walk-stage.is-active:not(.is-loading) .walk-tools {
    opacity: 1;
    visibility: visible;
    transition: opacity 300ms var(--ease-out), visibility 0s;
}

.walk-prompt {
    cursor: default;
}

.walk-tool {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 20px;
    color: #fff;
    background: rgba(8, 18, 42, 0.7);
    border: 1px solid var(--border-strong);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 200ms var(--ease-out), border-color 200ms ease-out;
}

.walk-tool:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.6);
}

.walk-tool[aria-pressed="true"] {
    background: rgba(37, 99, 235, 0.45);
}

#walk-stop:hover {
    border-color: rgba(248, 113, 113, 0.7);
}

/*-- GPU Notice --*/
.gpu-modal {
    position: fixed;
    inset: 0;
    z-index: 2900;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(2, 6, 18, 0.66);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.gpu-modal[hidden] {
    display: none;
}

.gpu-modal.is-open {
    opacity: 1;
    transition: opacity 250ms var(--ease-out);
}

.gpu-panel {
    width: min(480px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 30px 28px 24px;
    border-radius: 20px;
    background: rgba(9, 20, 44, 0.97);
    border: 1px solid var(--border-strong);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    transform: translateY(12px) scale(0.97);
    transition: transform 200ms ease-in;
}

.gpu-modal.is-open .gpu-panel {
    transform: none;
    transition: transform 400ms var(--spring);
}

.gpu-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border-radius: 14px;
    font-size: 28px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.35);
}

.gpu-panel h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.gpu-panel > p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

.gpu-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    padding: 16px;
    list-style: none;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid var(--border);
}

.gpu-list li {
    display: flex;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}

.gpu-list i {
    flex: none;
    margin-top: 2px;
    font-size: 18px;
    color: var(--accent);
}

.gpu-skip {
    display: flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    padding: 6px 12px 6px 6px;
    margin-left: -6px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
    transition: background-color 200ms ease-out, color 200ms ease-out;
}

.gpu-skip:hover {
    color: var(--text);
    background: rgba(59, 130, 246, 0.08);
}

/* custom tick box: a rounded tile in the site's blue that fills with the gradient and draws its tick */
.gpu-skip input {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin: 0;
    border-radius: 7px;
    background: rgba(8, 18, 42, 0.9);
    border: 1.5px solid var(--border-strong);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background 220ms var(--ease-out), border-color 220ms ease-out, box-shadow 220ms ease-out, transform 300ms var(--spring);
}

.gpu-skip:hover input {
    border-color: rgba(96, 165, 250, 0.6);
}

.gpu-skip input::after {
    content: "";
    width: 6px;
    height: 11px;
    margin-top: -2px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    border-radius: 1px;
    transform: rotate(45deg) scale(0);
    transition: transform 320ms var(--spring);
}

.gpu-skip input:checked {
    background: var(--gradient);
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18), 0 6px 16px rgba(37, 99, 235, 0.45);
}

.gpu-skip input:checked::after {
    transform: rotate(45deg) scale(1);
}

.gpu-skip input:active {
    transform: scale(0.9);
}

.gpu-skip input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.gpu-skip:has(input:checked) {
    color: var(--text);
}

.gpu-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

@media (max-width: 480px) {
    .gpu-actions {
        flex-direction: column-reverse;
    }

    .gpu-actions .btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}

/*-- Notes --*/
.walk-notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 32px;
}

.walk-note {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 24px 26px;
}

/* keep the icon square: as a flex item it was being squeezed into a pill when the text wrapped */
.walk-note .icon-tile {
    flex: none;
    width: 48px;
    height: 48px;
    font-size: 24px;
}

.walk-note h3 {
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 600;
}

.walk-note p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
}

@media (max-width: 1080px) and (min-width: 761px) {
    .walk-notes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    .walk-stage {
        aspect-ratio: 3 / 4;
        max-height: 72vh;
    }

    .walk-notes {
        grid-template-columns: 1fr;
    }

    .walk-tools {
        top: 10px;
        right: 10px;
        gap: 6px;
    }

    .walk-tool {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 17px;
    }

    .walk-wallet {
        top: 10px;
        left: 10px;
        gap: 8px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .walk-bag {
        top: 50px;
        left: 10px;
    }
}
