/* heisei.boo — Chrome-metallic goblincore / Heisei-era urban decay */

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

:root {
    --bg-paper: #e8e0d4;
    --bg-concrete: #d1ccc4;
    --chrome-primary: #b8b8b8;
    --chrome-highlight: #d4d4d4;
    --text-primary: #3a3a3a;
    --text-secondary: #8a8a8a;
    --accent-warm: #c4956a;
    --accent-warm-light: #d4b88a;
    --accent-cool: #7a9e8a;
    --deep-ground: #2a2a2e;
    --ghost-white: #f5f2ec;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--bg-paper);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--bg-paper);
    filter: url(#paper-noise);
    z-index: -1;
    pointer-events: none;
}

/* Ghost Index — left edge */
.ghost-index {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.ghost-index-line {
    width: 1px;
    height: 120px;
    background: var(--text-secondary);
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: 50%;
}

.ghost-index-tick {
    width: 8px;
    height: 8px;
    border: 1px solid var(--text-secondary);
    opacity: 0.3;
    transition: opacity 600ms ease-out, background 600ms ease-out;
    position: relative;
    z-index: 1;
}

.ghost-index-tick.active {
    opacity: 0.8;
    background: var(--accent-warm);
    border-color: var(--accent-warm);
}

/* Typography */
.site-title {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--chrome-primary);
    text-align: left;
    padding-left: 10vw;
}

.site-title .char {
    opacity: 0;
    display: inline-block;
    transition: opacity 400ms ease-out;
}

.site-title .char.visible {
    opacity: 1;
}

/* Ghost Stamps */
.ghost-stamp {
    display: inline-block;
    border: 1px solid var(--accent-warm);
    padding: 6px 14px;
    transform: rotate(-2.5deg);
    transition: transform 400ms ease-out, border-color 400ms ease-out;
    margin: 12px 0;
}

.ghost-stamp:hover {
    transform: rotate(0deg);
    border-color: var(--accent-warm-light);
}

.stamp-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.85rem;
    color: var(--accent-warm);
    white-space: nowrap;
}

.ghost-stamp-hero {
    margin-top: 24px;
    padding-left: 10vw;
}

.title-line {
    position: absolute;
    top: 55%;
    left: 50%;
    right: 0;
    height: 1px;
    background: var(--text-secondary);
    opacity: 0.3;
}

/* Zones */
.zone {
    position: relative;
    min-height: 100vh;
    padding: 80px 60px 80px 80px;
}

/* The Approach */
.zone-approach {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: radial-gradient(ellipse at center, var(--ghost-white), var(--bg-paper) 70%);
}

.fog-gate-opening {
    position: relative;
}

.approach-text {
    padding-left: 10vw;
    padding-top: 60px;
    max-width: 650px;
}

.approach-text p {
    margin-bottom: 28px;
    color: var(--text-primary);
    font-weight: 300;
    font-size: 1rem;
    line-height: 2;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* The Arcade */
.zone-arcade {
    background: linear-gradient(to bottom, var(--bg-paper), var(--bg-concrete));
    padding-top: 120px;
    min-height: 200vh;
}

.arcade-cluster {
    max-width: 580px;
    margin-bottom: 80px;
    position: relative;
}

.arcade-cluster-left {
    margin-left: 10vw;
}

.arcade-cluster-right {
    margin-left: 30vw;
}

.arcade-cluster-center {
    margin-left: 20vw;
}

.arcade-cluster p {
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-primary);
}

/* Crosswalk Divider */
.crosswalk-divider {
    height: 48px;
    margin: 40px 0;
    background: repeating-linear-gradient(
        to bottom,
        var(--chrome-primary) 0px,
        var(--chrome-primary) 8px,
        var(--bg-paper) 8px,
        var(--bg-paper) 16px
    );
    opacity: 0.4;
}

/* Utility Poles */
.utility-pole {
    position: absolute;
    right: 8vw;
    width: 2px;
    height: 300px;
    background: var(--text-secondary);
    opacity: 0.4;
}

.utility-pole::before,
.utility-pole::after {
    content: '';
    position: absolute;
    left: -10px;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
}

.utility-pole::before {
    top: 60px;
}

.utility-pole::after {
    top: 140px;
}

.utility-pole-1 {
    top: 200px;
}

.utility-pole-2 {
    top: 700px;
    right: 12vw;
}

/* Vending Machine Glow */
.vending-glow {
    position: absolute;
    width: 60px;
    height: 120px;
    background: var(--accent-cool);
    opacity: 0.15;
    border-radius: 2px;
    animation: vending-pulse 8s ease-in-out infinite;
    transition: opacity 600ms ease-out;
}

.vending-glow-1 {
    right: 5vw;
    top: 400px;
}

.vending-glow-2 {
    right: 15vw;
    top: 800px;
}

@keyframes vending-pulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

/* The Pause */
.zone-pause {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-paper);
    background-image: radial-gradient(ellipse at center, var(--ghost-white), var(--bg-concrete) 80%);
}

.fog-gate-mid {
    text-align: center;
}

.ghost-stamp-center {
    display: inline-block;
}

.drifting-text {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 40px;
    animation: drift-up 60s linear infinite;
}

@keyframes drift-up {
    0% { transform: translateY(20px); opacity: 0.6; }
    50% { transform: translateY(-20px); opacity: 0.4; }
    100% { transform: translateY(20px); opacity: 0.6; }
}

/* The Interior */
.zone-interior {
    background: linear-gradient(to bottom, var(--bg-concrete), var(--chrome-primary) 30%, var(--bg-concrete));
    min-height: 200vh;
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

.interior-cluster {
    max-width: 560px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.interior-cluster p {
    font-weight: 300;
    font-size: 0.95rem;
    line-height: 2;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.annotation {
    font-family: 'Noto Serif JP', serif;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 12px;
    font-style: italic;
}

/* Shutter Background */
.shutter-bg {
    background: repeating-linear-gradient(
        to bottom,
        var(--chrome-primary) 0px,
        var(--chrome-primary) 2px,
        #c0c0c0 2px,
        #c0c0c0 4px
    );
    padding: 24px 28px;
    opacity: 0.9;
}

.shutter-bg p {
    background: var(--bg-paper);
    padding: 16px 20px;
}

/* Icon Scroll */
.icon-scroll {
    position: absolute;
    top: 50%;
    left: 0;
    width: 200%;
    display: flex;
    gap: 120px;
    opacity: 0.15;
    animation: icon-drift 40s linear infinite;
    pointer-events: none;
}

@keyframes icon-drift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.city-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--text-secondary);
    flex-shrink: 0;
}

.icon-traffic {
    border-radius: 2px;
    position: relative;
}

.icon-traffic::before {
    content: '●●●';
    font-size: 5px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    writing-mode: vertical-lr;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.icon-building {
    position: relative;
}

.icon-building::before {
    content: '▪▪\A▪▪\A▪▪';
    white-space: pre;
    font-size: 4px;
    position: absolute;
    top: 3px;
    left: 5px;
    color: var(--text-secondary);
}

.icon-crossing {
    border-radius: 50%;
    position: relative;
}

.icon-crossing::before {
    content: '✕';
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
}

.icon-pin {
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

/* The Departure */
.zone-departure {
    background: linear-gradient(to bottom, var(--bg-concrete), var(--deep-ground));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 120px 10vw;
}

.departure-content p {
    color: var(--ghost-white);
    font-weight: 300;
    font-size: 1rem;
    line-height: 2.2;
    margin-bottom: 32px;
}

.departure-final {
    margin-top: 40px;
    font-size: 1.1rem;
    max-width: 500px;
}

.ghost-stamp-final {
    margin-top: 80px;
    align-self: center;
    opacity: 0.5;
    border-color: var(--accent-warm);
}

.ghost-stamp-final .stamp-text {
    color: var(--ghost-white);
    font-size: 1rem;
}

/* Links */
a {
    color: var(--text-primary);
    text-decoration: none;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-warm);
    transition: width 300ms ease-out;
}

a:hover::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .zone {
        padding: 60px 24px 60px 48px;
    }

    .site-title {
        padding-left: 5vw;
    }

    .ghost-stamp-hero {
        padding-left: 5vw;
    }

    .approach-text {
        padding-left: 5vw;
    }

    .arcade-cluster-left {
        margin-left: 5vw;
    }

    .arcade-cluster-right {
        margin-left: 10vw;
    }

    .arcade-cluster-center {
        margin-left: 5vw;
    }

    .ghost-index {
        display: none;
    }

    .utility-pole {
        display: none;
    }
}
