/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

body {
    font-family: 'Inter', sans-serif;
    background: #f4f1ec;
    color: #2c2c28;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

/* === Scroll Container === */
.scroll-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    height: 100vh;
    width: 100vw;
    -webkit-overflow-scrolling: touch;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* === Panel Base === */
.panel {
    min-width: 100vw;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    flex-shrink: 0;
}

/* === Bubble Base === */
.bubble-base,
.void-bubble,
.field-bubble,
.breath-bubble {
    border-radius: 50%;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(180, 190, 185, 0.08);
    border: 1px solid rgba(127, 181, 162, 0.25);
}

/* === Interactive Bubble Hover === */
.interactive-bubble {
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.interactive-bubble:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 32px rgba(44, 44, 40, 0.04);
    border-color: #7fb5a2;
}

.interactive-bubble:not(:hover) {
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
                box-shadow 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
                border-color 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* === Breathing Animations === */
@keyframes breathe-slow {
    0%, 100% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
}

@keyframes breathe-deep {
    0%, 100% { transform: scale(0.98) translate(-50%, -50%); }
    50% { transform: scale(1.02) translate(-50%, -50%); }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(3px, -5px); }
    50% { transform: translate(-2px, 3px); }
    75% { transform: translate(5px, 2px); }
}

.bubble-breathing-slow {
    animation: breathe-slow 6s ease-in-out infinite;
}

.bubble-breathing-deep {
    animation: breathe-deep 8s ease-in-out infinite;
}

/* === Panel 1: The Void === */
.panel-void {
    background: #f4f1ec;
}

.void-bubble {
    position: absolute;
    width: 40vh;
    height: 40vh;
    top: 15%;
    right: 15%;
}

.void-title {
    position: absolute;
    bottom: 6vh;
    left: 4vw;
    font-weight: 100;
    font-size: clamp(1rem, 2vw, 1.5rem);
    letter-spacing: 0.04em;
    color: #2c2c28;
}

/* === Panel 2: The Stack === */
.panel-stack {
    background: #e8e4dd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10vw;
    padding: 0 8vw;
}

.stack-text {
    max-width: 35vw;
}

.stack-description {
    font-weight: 200;
    font-size: clamp(0.875rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: #2c2c28;
}

.stack-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.stack-layer {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    background: rgba(180, 190, 185, 0.08);
    border: 1px solid rgba(127, 181, 162, 0.25);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stack-l1 {
    width: 240px;
    height: 100px;
}

.stack-l2 {
    width: 200px;
    height: 80px;
    margin-left: 20px;
}

.stack-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9a9a8e;
}

.stack-bridge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
}

.bridge-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #9a9a8e;
    animation: bridge-flow 2s ease-in-out infinite;
}

.bridge-dot:nth-child(1) { animation-delay: 0s; }
.bridge-dot:nth-child(2) { animation-delay: 0.3s; }
.bridge-dot:nth-child(3) { animation-delay: 0.6s; }
.bridge-dot:nth-child(4) { animation-delay: 0.9s; }
.bridge-dot:nth-child(5) { animation-delay: 1.2s; }

@keyframes bridge-flow {
    0%, 100% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-4px); }
}

/* === Panel 3: The Bubble Field === */
.panel-bubbles {
    background: #f4f1ec;
}

.bubble-field {
    position: relative;
    width: 100%;
    height: 100%;
}

.field-bubble {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float var(--float-dur, 7s) ease-in-out infinite;
}

.field-bubble:nth-child(1) { --float-dur: 6s; }
.field-bubble:nth-child(2) { --float-dur: 8s; }
.field-bubble:nth-child(3) { --float-dur: 5s; }
.field-bubble:nth-child(4) { --float-dur: 9s; }
.field-bubble:nth-child(5) { --float-dur: 7s; }
.field-bubble:nth-child(6) { --float-dur: 10s; }
.field-bubble:nth-child(7) { --float-dur: 6.5s; }
.field-bubble:nth-child(8) { --float-dur: 4s; }
.field-bubble:nth-child(9) { --float-dur: 8.5s; }
.field-bubble:nth-child(10) { --float-dur: 5.5s; }
.field-bubble:nth-child(11) { --float-dur: 7.5s; }
.field-bubble:nth-child(12) { --float-dur: 9.5s; }
.field-bubble:nth-child(13) { --float-dur: 4.5s; }
.field-bubble:nth-child(14) { --float-dur: 6.2s; }
.field-bubble:nth-child(15) { --float-dur: 8.3s; }

.field-bubble span {
    font-weight: 450;
    font-size: clamp(0.7rem, 1vw, 0.95rem);
    letter-spacing: 0.02em;
    color: #2c2c28;
    user-select: none;
}

/* === Panel 4: The River === */
.panel-river {
    background: #e8e4dd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.river-band {
    display: flex;
    align-items: center;
    gap: 3vw;
    height: 30vh;
    padding: 0 6vw;
    overflow: visible;
}

.river-svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.river-code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9a9a8e;
    white-space: nowrap;
    flex-shrink: 0;
}

.river-large {
    font-size: clamp(1rem, 1.8vw, 1.6rem);
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: -0.02em;
    color: #2c2c28;
}

.river-rotated {
    transform: rotate(3deg) scale(1.5);
}

.river-rotated-neg {
    transform: rotate(-2deg) scale(1.3);
}

.river-micro-photo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.4;
}

.annotation-line {
    opacity: 0.5;
}

/* === Panel 5: The Breath === */
.panel-breath {
    background: #f4f1ec;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.breath-bubble {
    width: 60vh;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.breath-text {
    font-weight: 100;
    font-size: clamp(1rem, 2.5vw, 2rem);
    letter-spacing: 0.04em;
    color: #2c2c28;
}

.breath-line {
    position: absolute;
    bottom: 45%;
    left: calc(50% + 30vh);
    right: 4vw;
    height: 2px;
}

/* === Progress Bar === */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 3px;
    background: rgba(154, 154, 142, 0.15);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #7fb5a2;
    transition: width 0.1s linear;
}

.progress-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7fb5a2;
    top: 50%;
    transform: translate(-50%, -50%);
    left: 0%;
    animation: dot-pulse 3s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
}
