:root {
    --hot-pink: #FF2D6B;
    --cyan: #00E5FF;
    --yellow: #FAFF00;
    --violet: #BF00FF;
    --dark: #0D0B1E;
    --mid: #1A1A2E;
    --paper: #FFF5E6;
    --soft: #F0EDE6;
    --white: #FAFAFA;
}

/* DESIGN.md typography scanner tokens: Interaction Pattern (2% frequency (Google Fonts */

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

html { scroll-behavior: smooth; }

body {
    font-family: "Nunito", Arial, sans-serif;
    background: var(--dark);
    color: var(--soft);
    overflow: hidden;
    line-height: 1.7;
}

.scroll-container {
    width: 100vw;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
}

.section {
    position: relative;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    background: var(--dark);
    padding: clamp(1rem, 3vw, 3rem);
}

.handwritten {
    font-family: "Caveat", cursive;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.main-title,
.farewell-message {
    font-family: "Caveat", cursive;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

@keyframes border-cycle {
    0%, 100% { border-color: #FF2D6B; }
    33% { border-color: #00E5FF; }
    66% { border-color: #FAFF00; }
}

@keyframes neon-pulse {
    0%, 100% { text-shadow: 0 0 10px #FF2D6B, 0 0 40px #FF2D6B, 0 0 80px #FF2D6B; }
    50% { text-shadow: 0 0 5px #FF2D6B, 0 0 20px #FF2D6B, 0 0 40px #FF2D6B; }
}

@keyframes yellow-pulse {
    0%, 100% { text-shadow: 0 0 8px #FAFF00, 0 0 28px #FAFF00, 0 0 60px #FAFF00; }
    50% { text-shadow: 0 0 4px #FAFF00, 0 0 16px #FAFF00, 0 0 32px #FAFF00; }
}

@keyframes window-flicker {
    0%, 18%, 100% { opacity: 0.05; }
    19%, 41% { opacity: 0.8; }
    42%, 73% { opacity: 0.08; }
    74%, 88% { opacity: 0.8; }
}

@keyframes sign-pulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
@keyframes taxi-slide { 0% { transform: translateX(-65vw) rotateX(60deg) rotateZ(-45deg); } 100% { transform: translateX(82vw) rotateX(60deg) rotateZ(-45deg); } }
@keyframes train-slide { 0% { transform: translateX(72vw) rotateX(60deg) rotateZ(-45deg); } 100% { transform: translateX(-82vw) rotateX(60deg) rotateZ(-45deg); } }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }
@keyframes rain-fall { 0% { transform: translate3d(0, -10vh, 0); opacity: .6; } 100% { transform: translate3d(var(--wobble), 110vh, 0); opacity: 0; } }
@keyframes shape-float { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 10px -18px; rotate: 7deg; } }

.iso-scene { position: relative; transform-style: preserve-3d; }
.face-set { position: absolute; transform: rotateX(60deg) rotateZ(-45deg); transform-style: preserve-3d; }
.face { position: absolute; display: block; }

.section-roof { flex-direction: column; gap: 1.4rem; }
.night-pins span { position: absolute; width: 6px; height: 6px; background: var(--soft); opacity: .7; }
.night-pins span:nth-child(1) { left: 10%; top: 14%; background: var(--cyan); }
.night-pins span:nth-child(2) { left: 82%; top: 21%; background: var(--yellow); }
.night-pins span:nth-child(3) { left: 72%; top: 78%; background: var(--hot-pink); }
.night-pins span:nth-child(4) { left: 18%; top: 69%; background: var(--violet); }
.night-pins span:nth-child(5) { left: 45%; top: 10%; }
.roof-scene { width: min(86vw, 760px); height: 46vh; min-height: 340px; }
.roof-slab { width: 280px; height: 190px; left: calc(50% - 140px); top: 48%; }
.roof-slab .top { width: 280px; height: 190px; background: var(--mid); }
.roof-slab .left { width: 280px; height: 36px; background: #111126; top: 190px; transform-origin: top; transform: rotateX(-90deg); }
.roof-slab .right { width: 36px; height: 190px; background: #090817; left: 280px; transform-origin: left; transform: rotateY(90deg); }
.tiny-block { width: 58px; height: 42px; left: calc(50% + 72px); top: 44%; }
.tiny-block .top { width: 58px; height: 42px; background: var(--violet); }
.tiny-block .left { width: 58px; height: 22px; top: 42px; background: #A000D9; transform-origin: top; transform: rotateX(-90deg); }
.tiny-block .right { width: 22px; height: 42px; left: 58px; background: #8500B3; transform-origin: left; transform: rotateY(90deg); }
.antenna-tower { position: absolute; left: 50%; top: 10%; width: 210px; height: 250px; transform: translateX(-50%); }
.antenna-mast { position: absolute; left: 100px; top: 16px; width: 6px; height: 176px; background: var(--soft); }
.antenna-cross { position: absolute; left: 56px; width: 94px; height: 4px; background: var(--cyan); }
.cross-one { top: 54px; rotate: -12deg; } .cross-two { top: 98px; rotate: 13deg; background: var(--yellow); }
.antenna-sign { position: absolute; left: 0; top: 168px; width: 210px; height: 72px; border: 3px solid var(--hot-pink); background: var(--mid); animation: border-cycle 4s ease-in-out infinite; }
.antenna-sign span { display: block; color: var(--hot-pink); font: 700 3.4rem/1 "Caveat", cursive; text-align: center; animation: neon-pulse 2s ease-in-out infinite; }
.main-title { color: var(--yellow); animation: yellow-pulse 2.4s ease-in-out infinite; z-index: 2; }
.roof-note { max-width: 38ch; font-size: clamp(1rem, 1.6vw, 1.25rem); color: var(--soft); transform: rotate(-2deg); text-align: center; }

.section-upper-floors { flex-direction: column; gap: clamp(1rem, 3vw, 2rem); }
.split-diorama { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(260px, .82fr); width: min(1120px, 100%); gap: clamp(1rem, 4vw, 4rem); align-items: center; }
.exterior-side { height: 470px; animation: drift 9s ease-in-out infinite; }
.building { position: absolute; }
.tall-tower { width: 40px; height: 200px; left: 33%; top: 96px; }
.tall-tower .top { width: 40px; height: 40px; background: var(--hot-pink); }
.tall-tower .left { width: 40px; height: 200px; top: 40px; background: #D9265B; transform-origin: top; transform: rotateX(-90deg); }
.tall-tower .right { width: 40px; height: 200px; left: 40px; background: #B31F4B; transform-origin: left; transform: rotateY(90deg); }
.antenna-dot { position: absolute; left: 20px; top: -44px; width: 5px; height: 48px; background: var(--soft); z-index: 5; }
.squat-block { width: 120px; height: 80px; left: 46%; top: 168px; }
.squat-block .top { width: 120px; height: 80px; background: var(--cyan); }
.squat-block .left { width: 120px; height: 74px; top: 80px; background: #00C3D9; transform-origin: top; transform: rotateX(-90deg); }
.squat-block .right { width: 74px; height: 80px; left: 120px; background: #00A0B3; transform-origin: left; transform: rotateY(90deg); }
.residential { width: 80px; height: 140px; left: 58%; top: 58px; }
.residential .top { width: 80px; height: 140px; background: var(--violet); }
.residential .left { width: 80px; height: 74px; top: 140px; background: #A000D9; transform-origin: top; transform: rotateX(-90deg); }
.residential .right { width: 74px; height: 140px; left: 80px; background: #8500B3; transform-origin: left; transform: rotateY(90deg); }
.window-grid { position: absolute; display: grid; grid-template-columns: repeat(4, 8px); gap: 6px; left: 18px; top: 18px; transform: translateZ(4px); }
.window-grid.compact { grid-template-columns: repeat(3, 8px); left: 20px; top: 24px; }
.window { width: 8px; height: 8px; background: var(--yellow); opacity: .05; animation: window-flicker var(--duration, 4s) steps(1) infinite; animation-delay: var(--delay, 0s); }
.balcony { position: absolute; width: 42px; height: 8px; background: var(--yellow); left: 20px; transform: translateZ(8px); }
.b1 { top: 78px; } .b2 { top: 112px; background: var(--cyan); }
.sign-post { position: absolute; left: 18%; top: 260px; transform: rotate(-5deg); }
.sign-post i { display: block; width: 5px; height: 88px; background: var(--soft); margin-left: 34px; }
.sign-post span { display: block; width: 92px; padding: .35rem .5rem; color: var(--yellow); background: var(--mid); border: 3px solid var(--yellow); font: 400 1.3rem/1 "Caveat", cursive; animation: sign-pulse 2s steps(2) infinite; }
.interior-side { display: grid; gap: 1.2rem; justify-items: center; }
.room-vignette { position: relative; width: min(100%, 340px); height: 190px; background: var(--paper); color: var(--mid); border: 3px solid var(--hot-pink); animation: border-cycle 4s ease-in-out infinite; overflow: hidden; }
.cat-room { animation-delay: .8s; }
.room-window, .moon-window { position: absolute; right: 24px; top: 22px; width: 86px; height: 82px; border: 4px solid var(--mid); display: grid; grid-template-columns: 1fr 1fr; }
.room-window i { border: 2px solid var(--mid); background: var(--cyan); opacity: .45; }
.desk-surface { position: absolute; left: 34px; bottom: 34px; width: 172px; height: 24px; background: var(--mid); }
.desk-surface::before, .desk-surface::after { content: ""; position: absolute; top: 24px; width: 10px; height: 54px; background: var(--mid); }
.desk-surface::before { left: 18px; } .desk-surface::after { right: 18px; }
.lamp b { position: absolute; left: 86px; bottom: 58px; width: 8px; height: 56px; background: var(--violet); }
.lamp i { position: absolute; left: 62px; bottom: 108px; width: 56px; height: 30px; background: var(--yellow); transform: skewX(-16deg); }
.moon-window { display: block; background: var(--dark); }
.moon-window span { position: absolute; left: 20px; top: 16px; width: 22px; height: 22px; background: var(--yellow); border-radius: 50%; }
.cat .body { position: absolute; left: 92px; bottom: 42px; width: 92px; height: 44px; background: var(--mid); border-radius: 50%; }
.cat .head { position: absolute; left: 166px; bottom: 70px; width: 44px; height: 42px; background: var(--mid); border-radius: 50%; }
.cat .tail { position: absolute; left: 52px; bottom: 72px; width: 70px; height: 9px; background: var(--mid); border-radius: 8px; transform: rotate(-28deg); }
.ear { position: absolute; bottom: 104px; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 20px solid var(--mid); }
.ear.one { left: 173px; } .ear.two { left: 193px; }
.postcards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; width: min(940px, 100%); }
.postcard { position: relative; max-width: 290px; min-height: 120px; background: var(--paper); color: var(--mid); border: 3px solid var(--hot-pink); padding: 1rem 1.2rem; font: 400 clamp(1.1rem, 2vw, 1.35rem)/1.25 "Caveat", cursive; transform: rotate(calc((var(--i) - 1) * -3deg)); animation: border-cycle 4s ease-in-out infinite; animation-delay: calc(var(--i) * .8s); }
.postcard p { max-width: 38ch; }

.street-scene { width: 100%; height: 100%; }
.street-plane { width: min(86vw, 880px); height: 260px; left: 50%; top: 52%; margin-left: min(-43vw, -440px); }
.street-plane .top { width: 100%; height: 260px; background: var(--mid); }
.street-plane .left { width: 100%; height: 52px; top: 260px; background: #111126; transform-origin: top; transform: rotateX(-90deg); }
.street-plane .right { width: 52px; height: 260px; left: 100%; background: #090817; transform-origin: left; transform: rotateY(90deg); }
.crosswalk { position: absolute; display: flex; gap: 18px; left: 17%; top: 98px; transform: translateZ(8px); }
.crosswalk span { width: 26px; height: 128px; background: var(--cyan); }
.crosswalk span:nth-child(even) { background: var(--yellow); }
.taxi-car { width: 92px; height: 46px; left: 50%; top: 50%; z-index: 4; animation: taxi-slide 20s linear infinite; }
.taxi-car .top { width: 92px; height: 46px; background: var(--yellow); }
.taxi-car .left { width: 92px; height: 26px; top: 46px; background: #D5D900; transform-origin: top; transform: rotateX(-90deg); }
.taxi-car .right { width: 26px; height: 46px; left: 92px; background: #AFB300; transform-origin: left; transform: rotateY(90deg); }
.taxi-window { position: absolute; left: 30px; top: 10px; width: 32px; height: 18px; background: var(--cyan); transform: translateZ(8px); }
.pedestrians { position: absolute; left: 16%; top: 62%; display: flex; gap: 44px; z-index: 6; }
.pedestrians i { width: 14px; height: 42px; background: var(--soft); border-radius: 10px 10px 0 0; position: relative; }
.pedestrians i::before { content: ""; position: absolute; left: 1px; top: -15px; width: 12px; height: 12px; background: var(--soft); border-radius: 50%; }
.pedestrians i:nth-child(2) { background: var(--hot-pink); } .pedestrians i:nth-child(2)::before { background: var(--hot-pink); }
.pedestrians i:nth-child(3) { background: var(--cyan); } .pedestrians i:nth-child(3)::before { background: var(--cyan); }
.street-signboards { position: absolute; right: 7%; top: 23%; display: grid; gap: 1rem; z-index: 7; }
.signboard { font-family: "Space Grotesk", Arial, sans-serif; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); background: var(--mid); border: 3px solid var(--hot-pink); padding: .9rem 1.15rem; animation: border-cycle 4s ease-in-out infinite, sign-pulse 2s steps(2) infinite; animation-delay: calc(var(--i) * .8s), calc(var(--i) * .5s); }
.curb-note { position: absolute; left: 8%; bottom: 14%; color: var(--yellow); font-size: clamp(1.2rem, 2.4vw, 2rem); transform: rotate(-3deg); }

.subway-platform { width: 100%; height: 100%; }
.platform { width: min(88vw, 920px); height: 210px; left: 50%; top: 58%; margin-left: min(-44vw, -460px); }
.platform .top { width: 100%; height: 210px; background: var(--mid); }
.platform .left { width: 100%; height: 70px; top: 210px; background: #111126; transform-origin: top; transform: rotateX(-90deg); }
.platform .right { width: 70px; height: 210px; left: 100%; background: #090817; transform-origin: left; transform: rotateY(90deg); }
.platform-stripes { position: absolute; left: 0; top: 12px; display: flex; gap: 18px; transform: translateZ(6px); }
.platform-stripes span { width: 120px; height: 10px; background: var(--cyan); }
.platform-stripes span:nth-child(even) { background: var(--yellow); }
.train-car { width: 410px; height: 86px; left: 50%; top: 42%; z-index: 5; animation: train-slide 15s linear infinite; }
.train-car .top { width: 410px; height: 86px; background: var(--soft); }
.train-car .left { width: 410px; height: 45px; top: 86px; background: #CCC9C2; transform-origin: top; transform: rotateX(-90deg); }
.train-car .right { width: 45px; height: 86px; left: 410px; background: #A8A59F; transform-origin: left; transform: rotateY(90deg); }
.train-windows { position: absolute; left: 28px; top: 22px; display: flex; gap: 16px; transform: translateZ(8px); }
.train-windows span { width: 58px; height: 30px; background: var(--cyan); opacity: .7; }
.train-door { position: absolute; right: 56px; top: 18px; width: 38px; height: 64px; border: 3px solid var(--violet); background: var(--mid); transform: translateZ(10px); }
.station-signs { position: absolute; left: 8%; top: 16%; display: flex; flex-wrap: wrap; gap: 1rem; z-index: 8; }
.annotations { position: absolute; right: 9%; bottom: 16%; display: grid; gap: .4rem; z-index: 8; }
.annotation { color: var(--soft); font-size: clamp(1.2rem, 2.1vw, 1.8rem); transform: rotate(calc((var(--i) - .5) * 4deg)); }

.dream-void { width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; }
.abstract-shapes, .rain-container { position: absolute; inset: 0; }
.shape { position: absolute; left: var(--x); top: var(--y); display: block; animation: shape-float 8s ease-in-out infinite; animation-delay: var(--d); }
.circle { width: 90px; height: 90px; border-radius: 50%; }
.rectangle { width: 130px; height: 74px; }
.small { width: 34px; height: 34px; }
.triangle { width: 0; height: 0; border-left: 54px solid transparent; border-right: 54px solid transparent; border-bottom: 96px solid var(--violet); }
.hot { background: var(--hot-pink); } .cyan { background: var(--cyan); } .yellow { background: var(--yellow); } .violet { background: var(--violet); }
.triangle.cyan, .triangle.yellow { background: transparent; }
.triangle.cyan { border-bottom-color: var(--cyan); } .triangle.yellow { border-bottom-color: var(--yellow); }
.rain-drop { position: absolute; top: 0; width: 2px; height: 2px; border-radius: 50%; background: var(--soft); animation: rain-fall var(--duration) linear var(--delay) infinite; }
.farewell-message { position: relative; z-index: 4; color: var(--hot-pink); animation: neon-pulse 2.2s ease-in-out infinite; text-align: center; }

@media (max-width: 780px) {
    body { overflow: hidden; }
    .split-diorama { grid-template-columns: 1fr; gap: .5rem; }
    .exterior-side { height: 330px; transform: scale(.78); transform-origin: center; }
    .interior-side { grid-template-columns: 1fr 1fr; width: 100%; }
    .room-vignette { height: 150px; }
    .postcards { display: none; }
    .street-signboards { right: 4%; top: 14%; }
    .signboard { font-size: .75rem; padding: .65rem .8rem; }
    .station-signs { top: 10%; }
    .train-car { width: 300px; }
    .train-car .top { width: 300px; }
    .train-car .left { width: 300px; }
    .train-car .right { left: 300px; }
}

@media (max-width: 520px) {
    .section { padding: 1rem; }
    .roof-scene { min-height: 300px; transform: scale(.78); }
    .interior-side { display: none; }
    .pedestrians { left: 7%; gap: 24px; }
    .curb-note, .annotations { display: none; }
    .circle { width: 60px; height: 60px; }
    .rectangle { width: 82px; height: 52px; }
}
