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

html, body {
    height: 100%;
    overflow: hidden;
    background: #1a0a10;
    color: #f0e4e6;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
}

/* Grain overlay */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.04;
    mix-blend-mode: overlay;
}

/* Progress bar */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: #8a2b3d;
    z-index: 50;
    transition: width 0.1s linear;
}

/* Floating shapes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.float-shape {
    position: absolute;
    top: var(--top);
    left: var(--left);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: rgba(138, 43, 61, 0.15);
    animation: floatDrift var(--dur) ease-in-out var(--delay) infinite alternate;
}

.float-shape.rect {
    border-radius: 30%;
}

@keyframes floatDrift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-30px, 20px); }
}

/* Connecting thread */
.connecting-thread {
    position: fixed;
    top: 0;
    left: 0;
    width: 800vw;
    height: 100vh;
    pointer-events: none;
    z-index: 2;
}

/* Gallery (horizontal scroll) */
.gallery {
    display: flex;
    height: 100vh;
    width: max-content;
    position: relative;
    z-index: 5;
}

/* Station */
.station {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 40px 80px;
    position: relative;
    flex-shrink: 0;
    transform: translateY(var(--offset-y, 0));
}

/* Station Number (background) */
.station-number {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 200;
    font-size: 15vw;
    color: rgba(138, 43, 61, 0.08);
    pointer-events: none;
    z-index: 0;
}

/* Entry station */
.entry-station {
    justify-content: center;
    flex-direction: column;
}

.entry-content {
    text-align: center;
}

.entry-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: #f0e4e6;
    opacity: 0;
    animation: entryFade 1s ease-out 0.6s forwards;
}

.entry-japanese {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #c8a0a8;
    margin-top: 12px;
    opacity: 0;
    animation: entryFade 1s ease-out 1.2s forwards;
}

.entry-subtitle {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(200, 160, 170, 0.5);
    margin-top: 24px;
    opacity: 0;
    animation: entryFade 1s ease-out 1.8s forwards;
}

.scroll-hint {
    margin-top: 40px;
    opacity: 0;
    animation: entryFade 1s ease-out 2.4s forwards, hintPulse 2s ease-in-out 3.4s infinite;
}

@keyframes entryFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Inflated Objects */
.inflated-object {
    width: 350px;
    height: 350px;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.15s ease-out;
    z-index: 3;
}

.object-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 25%, #8a4a58 0%, #3a1520 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 -10px 30px rgba(200, 160, 170, 0.1);
}

/* Sphere */
.sphere .object-inner {
    border-radius: 50%;
}

/* Torus */
.torus {
    width: 380px;
    height: 300px;
}

.torus .object-inner {
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 30%, #8a4a58 0%, #3a1520 100%);
}

.torus-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 80px;
    background: #1a0a10;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 5px 15px rgba(138, 43, 61, 0.2);
}

/* Pillow */
.pillow .object-inner {
    border-radius: 30%;
    width: 400px;
    height: 280px;
}

.pillow {
    width: 400px;
    height: 280px;
}

/* Blob */
.blob .object-inner {
    border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%;
    animation: blobMorph 8s ease-in-out infinite alternate;
}

@keyframes blobMorph {
    0% { border-radius: 40% 60% 55% 45% / 55% 40% 60% 45%; }
    50% { border-radius: 55% 45% 40% 60% / 45% 55% 50% 50%; }
    100% { border-radius: 45% 55% 60% 40% / 50% 45% 55% 50%; }
}

/* Dodecahedron-like */
.dodeca .object-inner {
    border-radius: 35%;
    transform: rotate(15deg);
}

/* Final sphere */
.final-sphere {
    width: 60vh;
    height: 60vh;
}

.final-sphere .object-inner {
    border-radius: 50%;
    background: radial-gradient(ellipse at 30% 25%, #c8a0a8 0%, #3a1520 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 -15px 40px rgba(200, 160, 170, 0.15);
}

/* Convergence cluster */
.convergence-cluster {
    position: relative;
    width: 400px;
    height: 400px;
    flex-shrink: 0;
}

.mini-object {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(ellipse at 30% 25%, #8a4a58 0%, #3a1520 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s ease-out;
}

.mini-sphere {
    border-radius: 50%;
    top: 20%;
    left: 25%;
}

.mini-blob {
    border-radius: 40% 60% 50% 50%;
    top: 10%;
    left: 55%;
    width: 100px;
    height: 100px;
}

.mini-pillow {
    border-radius: 30%;
    top: 50%;
    left: 15%;
    width: 130px;
    height: 90px;
}

.mini-cube {
    border-radius: 25%;
    top: 55%;
    left: 55%;
    width: 110px;
    height: 110px;
}

.mini-torus {
    border-radius: 50%;
    top: 35%;
    left: 42%;
    width: 90px;
    height: 90px;
}

/* Station text */
.station-text {
    max-width: 35vw;
    z-index: 5;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.station-text.visible {
    opacity: 1;
    transform: translateX(0);
}

.station-label {
    display: block;
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(200, 160, 170, 0.5);
    margin-bottom: 16px;
}

.station-heading {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    color: #f0e4e6;
    margin-bottom: 20px;
    line-height: 1.1;
}

.station-body {
    font-family: 'Work Sans', sans-serif;
    color: #c8a0a8;
    line-height: 1.75;
}

/* Station 2a: dark wine panel bg */
.station[data-station="2"],
.station[data-station="4"] {
    background: rgba(42, 16, 24, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .station {
        flex-direction: column;
        padding: 30px 20px;
        gap: 30px;
    }

    .station-text {
        max-width: 90vw;
    }

    .inflated-object {
        width: 200px;
        height: 200px;
    }

    .torus {
        width: 220px;
        height: 180px;
    }

    .pillow {
        width: 240px;
        height: 170px;
    }

    .pillow .object-inner {
        width: 240px;
        height: 170px;
    }

    .final-sphere {
        width: 40vh;
        height: 40vh;
    }

    .convergence-cluster {
        width: 250px;
        height: 250px;
    }

    .mini-object {
        width: 70px;
        height: 70px;
    }

    .station-number {
        font-size: 30vw;
    }
}

/* Dark wine panel reference #2a1018 */
.station[data-station] {
    border-left: 1px solid #2a1018;
}
