/* bada.city - Cyberpunk Port City */
/* Palette: #0a0e17, #141824, #ff2d7b, #00f5ff, #ffab00, #ffd54f, #ffffff, #1a2035 */
/* Fonts: Russo One, Exo 2, Share Tech Mono */

:root {
    --night: #0a0e17;
    --street: #141824;
    --neon-pink: #ff2d7b;
    --neon-cyan: #00f5ff;
    --neon-amber: #ffab00;
    --window: rgba(255, 213, 79, 0.8);
    --window-dim: rgba(255, 213, 79, 0.25);
    --rain: rgba(255, 255, 255, 0.15);
    --fog: rgba(26, 32, 53, 0.6);
    --fog-solid: #1a2035;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--night);
    color: #e0e0e8;
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* ============================================ */
/* RAIN LAYER                                   */
/* ============================================ */

.rain-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.raindrop {
    position: absolute;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--rain), transparent);
    top: -80px;
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    0% { transform: translateY(-10vh); }
    100% { transform: translateY(110vh); }
}

/* ============================================ */
/* PERSPECTIVE GRID                             */
/* ============================================ */

.perspective-grid {
    position: fixed;
    top: 0;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 0;
    transform-origin: center 0%;
    transform: perspective(600px) rotateX(45deg);
    opacity: 0.4;
    transition: transform 0.1s linear;
}

/* ============================================ */
/* SECTIONS (SHARED)                            */
/* ============================================ */

.city-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem;
    gap: 3rem;
    z-index: 1;
}

/* ============================================ */
/* SECTION 1: SKYLINE                           */
/* ============================================ */

.skyline {
    overflow: hidden;
    min-height: 100vh;
}

.cityscape {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 1200px;
    height: 65%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.cityscape.risen {
    transform: translateX(-50%) translateY(0);
}

.building {
    background: var(--street);
    border: 1px solid rgba(26, 32, 53, 0.9);
    position: relative;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.building.visible {
    opacity: 1;
}

/* 15 buildings with varying sizes */
.b1  { width: 50px;  height: 160px; }
.b2  { width: 70px;  height: 300px; }
.b3  { width: 45px;  height: 220px; }
.b4  { width: 100px; height: 380px; }
.b5  { width: 55px;  height: 190px; }
.b6  { width: 80px;  height: 340px; }
.b7  { width: 40px;  height: 140px; }
.b8  { width: 90px;  height: 290px; }
.b9  { width: 60px;  height: 250px; }
.b10 { width: 75px;  height: 320px; }
.b11 { width: 45px;  height: 170px; }
.b12 { width: 65px;  height: 240px; }
.b13 { width: 85px;  height: 350px; }
.b14 { width: 50px;  height: 200px; }
.b15 { width: 55px;  height: 150px; }

/* Window grid pattern */
.windows {
    position: absolute;
    top: 10px;
    left: 4px;
    right: 4px;
    bottom: 10px;
    background:
        radial-gradient(circle 1.5px, var(--window-dim) 60%, transparent 60%) 0 0 / 10px 14px;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.windows.lit {
    opacity: 0.6;
}

/* Neon signs on buildings */
.neon-sign {
    position: absolute;
    font-family: 'Russo One', sans-serif;
    font-size: 0.55rem;
    z-index: 3;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: 0.05em;
}

.neon-sign.flickered-on {
    opacity: 1;
}

.ns-pink {
    color: var(--neon-pink);
    text-shadow: 0 0 4px var(--neon-pink), 0 0 10px var(--neon-pink);
    animation: flicker 5s ease-in-out infinite;
}

.ns-cyan {
    color: var(--neon-cyan);
    text-shadow: 0 0 4px var(--neon-cyan), 0 0 10px var(--neon-cyan);
    animation: flicker 6s ease-in-out infinite;
}

.ns-amber {
    color: var(--neon-amber);
    text-shadow: 0 0 4px var(--neon-amber), 0 0 10px var(--neon-amber);
    animation: flicker 7s ease-in-out infinite;
}

.ns-hangul {
    font-size: 0.5rem;
}

.ns-open {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.15; }
    94% { opacity: 1; }
    96% { opacity: 0.25; }
    97% { opacity: 1; }
}

/* Hero Neon Title */
.hero-neon {
    position: relative;
    z-index: 5;
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1.2s ease 0.8s, transform 1.2s ease 0.8s;
}

.hero-neon.active {
    opacity: 1;
    transform: scale(1);
}

.neon-title {
    font-family: 'Russo One', sans-serif;
    font-size: clamp(3rem, 10vw, 7rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.neon-glow-pink {
    color: var(--neon-pink);
    text-shadow:
        0 0 7px var(--neon-pink),
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink),
        0 0 80px var(--neon-pink);
    animation: flicker 4s ease-in-out infinite;
}

.neon-sub {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: rgba(0, 245, 255, 0.55);
    letter-spacing: 0.2em;
    margin-top: 0.75rem;
    text-transform: lowercase;
}

/* Fog at base of skyline */
.fog-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    background: linear-gradient(180deg, transparent 0%, var(--fog) 60%, var(--night) 100%);
    pointer-events: none;
    z-index: 4;
}

/* ============================================ */
/* SECTION 2: DESCENT                           */
/* ============================================ */

.descent {
    padding: 8rem 2rem;
    gap: 6rem;
}

/* Neon Headings */
.neon-heading {
    font-family: 'Russo One', sans-serif;
    font-size: 1.4rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    letter-spacing: 0.08em;
}

.neon-glow-cyan {
    color: var(--neon-cyan);
    text-shadow:
        0 0 7px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-cyan);
}

.neon-glow-amber {
    color: var(--neon-amber);
    text-shadow:
        0 0 7px var(--neon-amber),
        0 0 20px var(--neon-amber),
        0 0 40px var(--neon-amber);
}

/* Tower Panels - skyscraper-like content blocks */
.tower-panel {
    max-width: 480px;
    width: 100%;
    padding: 2.5rem;
    background: rgba(20, 24, 36, 0.85);
    border: 1px solid rgba(0, 245, 255, 0.08);
    position: relative;
    overflow: visible;
}

.tower-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    opacity: 0.3;
}

.tp-left {
    transform: skewY(-2.5deg);
    align-self: flex-start;
    margin-left: 8%;
}

.tp-right {
    transform: skewY(2.5deg);
    align-self: flex-end;
    margin-right: 8%;
}

.panel-body {
    font-family: 'Exo 2', sans-serif;
    font-size: 0.9rem;
    color: rgba(224, 224, 232, 0.55);
    line-height: 1.7;
}

.panel-reflection {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    height: 40px;
    background: linear-gradient(180deg, rgba(0, 245, 255, 0.04), transparent);
    pointer-events: none;
}

/* Wet pavement reflection of headings */
.panel-wet-reflection {
    position: absolute;
    bottom: -50px;
    left: 2.5rem;
    width: calc(100% - 5rem);
    height: 40px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.12;
}

.wet-mirror {
    font-family: 'Russo One', sans-serif;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--neon-cyan);
    transform: scaleY(-1);
    filter: blur(2px);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent);
}

.wet-amber {
    color: var(--neon-amber);
}

.wet-pink {
    color: var(--neon-pink);
}

/* ============================================ */
/* SECTION 3: STREET LEVEL                      */
/* ============================================ */

.street {
    background: linear-gradient(180deg, var(--night) 0%, rgba(20, 24, 36, 0.95) 50%, var(--night) 100%);
    padding: 8rem 2rem;
    gap: 4rem;
}

/* Steam wisps */
.steam-wisp {
    position: absolute;
    width: 100px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(26, 32, 53, 0.5), transparent 70%);
    pointer-events: none;
    animation: steamFloat 8s ease-in-out infinite;
}

.sw-1 { bottom: 15%; left: 10%; }
.sw-2 { bottom: 8%; right: 15%; animation-delay: 3s; animation-duration: 10s; }
.sw-3 { bottom: 20%; left: 40%; animation-delay: 5s; animation-duration: 7s; }
.sw-4 { bottom: 5%; right: 35%; animation-delay: 1.5s; animation-duration: 9s; }

@keyframes steamFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-50px) scale(1.3); opacity: 0.08; }
}

.street-panel {
    max-width: 600px;
    width: 100%;
    padding: 2.5rem;
    background: rgba(20, 24, 36, 0.75);
    border: 1px solid rgba(255, 45, 123, 0.08);
    position: relative;
}

.street-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
    opacity: 0.3;
}

.data-readout {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 245, 255, 0.06);
}

.dr-item {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.72rem;
    color: rgba(0, 245, 255, 0.45);
    letter-spacing: 0.08em;
}

.dr-label {
    color: rgba(255, 171, 0, 0.5);
    margin-right: 0.3rem;
}

.dr-value {
    color: rgba(0, 245, 255, 0.45);
}

/* Puddle reflections */
.street-wet-surface {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
}

.puddle-reflection {
    width: 80px;
    height: 8px;
    border-radius: 50%;
    animation: puddleShimmer 3s ease-in-out infinite;
}

.pr-1 {
    background: radial-gradient(ellipse, rgba(255, 45, 123, 0.2), transparent);
    animation-delay: 0s;
}

.pr-2 {
    background: radial-gradient(ellipse, rgba(0, 245, 255, 0.2), transparent);
    animation-delay: 1s;
}

.pr-3 {
    background: radial-gradient(ellipse, rgba(255, 171, 0, 0.2), transparent);
    animation-delay: 2s;
}

@keyframes puddleShimmer {
    0%, 100% { transform: scaleX(1); opacity: 0.6; }
    50% { transform: scaleX(1.3); opacity: 0.3; }
}

/* Korean street signs */
.street-signs {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.street-sign-korean {
    padding: 0;
}

.ss-border {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    font-family: 'Russo One', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.neon-border-pink {
    border: 1px solid rgba(255, 45, 123, 0.3);
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
    box-shadow: 0 0 8px rgba(255, 45, 123, 0.1), inset 0 0 8px rgba(255, 45, 123, 0.05);
}

.neon-border-cyan {
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 245, 255, 0.1), inset 0 0 8px rgba(0, 245, 255, 0.05);
}

/* ============================================ */
/* SECTION 4: THE HARBOR                        */
/* ============================================ */

.harbor {
    min-height: 70vh;
    background: linear-gradient(180deg, var(--night) 0%, #060a14 40%, #030610 100%);
    padding-bottom: 6rem;
}

.harbor-neon {
    text-align: center;
}

.harbor-sign {
    font-family: 'Russo One', sans-serif;
    font-size: clamp(3.5rem, 9vw, 6rem);
}

/* Water surface with reflection */
.water-surface {
    width: 100%;
    max-width: 500px;
    height: 80px;
    overflow: hidden;
    position: relative;
}

.water-reflection-container {
    filter: url(#ripple);
}

.water-reflection {
    font-family: 'Russo One', sans-serif;
    font-size: clamp(3.5rem, 9vw, 6rem);
    color: var(--neon-pink);
    text-align: center;
    transform: scaleY(-1);
    opacity: 0.15;
    filter: blur(2px);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.35), transparent);
}

.water-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 45, 123, 0.03) 20%,
        rgba(0, 245, 255, 0.03) 40%,
        transparent 60%,
        rgba(255, 171, 0, 0.03) 80%,
        transparent 100%
    );
    animation: shimmerSlide 8s linear infinite;
    pointer-events: none;
}

@keyframes shimmerSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Ocean gradient at very bottom */
.ocean-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(180deg, transparent, rgba(0, 245, 255, 0.02), rgba(255, 45, 123, 0.02), rgba(0, 6, 16, 1));
    pointer-events: none;
}

.harbor-closing {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: rgba(0, 245, 255, 0.25);
    margin-top: 3rem;
    letter-spacing: 0.15em;
    text-align: center;
}

.harbor-data {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

.hd-item {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: rgba(0, 245, 255, 0.2);
    letter-spacing: 0.15em;
}

.hd-divider {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: rgba(255, 171, 0, 0.15);
}

/* ============================================ */
/* FADE-IN ANIMATION                            */
/* ============================================ */

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Restore skew on tower panels when visible */
.tp-left.fade-in.visible {
    transform: translateY(0) skewY(-2.5deg);
}

.tp-right.fade-in.visible {
    transform: translateY(0) skewY(2.5deg);
}

/* ============================================ */
/* SCROLLBAR STYLING                            */
/* ============================================ */

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--night);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 255, 0.15);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 245, 255, 0.3);
}

/* ============================================ */
/* RESPONSIVE                                   */
/* ============================================ */

@media (max-width: 768px) {
    .tp-left,
    .tp-right {
        transform: skewY(0);
        margin-left: 0;
        margin-right: 0;
        align-self: center;
    }

    .tp-left.fade-in.visible,
    .tp-right.fade-in.visible {
        transform: translateY(0) skewY(0);
    }

    .cityscape {
        gap: 1px;
    }

    .building {
        transform: scale(0.6);
        transform-origin: bottom center;
    }

    .descent {
        gap: 4rem;
        padding: 6rem 1.5rem;
    }

    .street-signs {
        gap: 1.5rem;
    }

    .data-readout {
        gap: 0.8rem;
    }

    .harbor-data {
        gap: 0.6rem;
    }
}

@media (max-width: 480px) {
    .city-section {
        padding: 4rem 1rem;
    }

    .tower-panel,
    .street-panel {
        padding: 1.5rem;
    }

    .building {
        transform: scale(0.45);
        transform-origin: bottom center;
    }

    .neon-title {
        font-size: clamp(2rem, 12vw, 4rem);
    }
}
