:root {
    --section1-bg: #e8e0f0;
    --section2-bg: #d6eaf8;
    --section3-bg: #d5f5e3;
    --section4-bg: #fdebd0;
    --section5-bg: #f5cec7;
    --text-primary: #4a4063;
    --text-body: #5c5470;
    --accent-violet: #a78bfa;
    --accent-cyan: #67e8f9;
    --accent-pink: #fda4af;
    --ghost-white: #faf5ff;
    --midnight-grape: #2d2640;
    --anim-speed: 1;
    --blur-amount: 0px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-body);
    overflow-x: hidden;
    background: var(--section1-bg);
}

/* Frequency Indicator */
.freq-indicator {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    background: rgba(250, 245, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    border-radius: 2rem;
    transition: opacity 0.8s ease;
}

.freq-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-violet);
}

.freq-number {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    line-height: 1;
}

/* Sections */
.section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.section-1 { background: var(--section1-bg); }
.section-2 { background: var(--section2-bg); }
.section-3 { background: var(--section3-bg); }
.section-4 { background: var(--section4-bg); }
.section-5 {
    background: linear-gradient(to bottom, var(--section5-bg) 0%, var(--midnight-grape) 100%);
}

/* Bokeh Layer */
.bokeh-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.section-1 .bokeh-layer {
    background:
        radial-gradient(circle 250px at 20% 30%, rgba(167,139,250,0.08) 0%, transparent 100%),
        radial-gradient(circle 300px at 80% 70%, rgba(103,232,249,0.06) 0%, transparent 100%);
    filter: blur(40px);
    animation: bokeh-drift-1 30s ease-in-out infinite alternate;
}

.section-2 .bokeh-layer {
    background:
        radial-gradient(circle 350px at 30% 50%, rgba(167,139,250,0.10) 0%, transparent 100%),
        radial-gradient(circle 400px at 70% 40%, rgba(103,232,249,0.08) 0%, transparent 100%);
    filter: blur(40px);
    animation: bokeh-drift-2 35s ease-in-out infinite alternate;
}

.section-3 .bokeh-layer {
    background:
        radial-gradient(circle 400px at 40% 60%, rgba(167,139,250,0.12) 0%, transparent 100%),
        radial-gradient(circle 350px at 65% 30%, rgba(253,164,175,0.08) 0%, transparent 100%),
        radial-gradient(circle 300px at 20% 80%, rgba(103,232,249,0.06) 0%, transparent 100%);
    filter: blur(40px);
    animation: bokeh-drift-3 40s ease-in-out infinite alternate;
}

.section-4 .bokeh-layer {
    background:
        radial-gradient(circle 450px at 50% 50%, rgba(167,139,250,0.14) 0%, transparent 100%),
        radial-gradient(circle 400px at 25% 30%, rgba(253,164,175,0.10) 0%, transparent 100%),
        radial-gradient(circle 350px at 75% 70%, rgba(103,232,249,0.08) 0%, transparent 100%),
        radial-gradient(circle 300px at 60% 20%, rgba(167,139,250,0.06) 0%, transparent 100%);
    filter: blur(40px);
    animation: bokeh-drift-1 25s ease-in-out infinite alternate;
}

.section-5 .bokeh-layer {
    background:
        radial-gradient(circle 500px at 50% 50%, rgba(167,139,250,0.15) 0%, transparent 100%),
        radial-gradient(circle 450px at 30% 60%, rgba(253,164,175,0.12) 0%, transparent 100%),
        radial-gradient(circle 400px at 70% 40%, rgba(103,232,249,0.10) 0%, transparent 100%),
        radial-gradient(circle 350px at 40% 80%, rgba(167,139,250,0.08) 0%, transparent 100%),
        radial-gradient(circle 300px at 80% 20%, rgba(253,164,175,0.06) 0%, transparent 100%);
    filter: blur(50px);
    animation: bokeh-drift-2 38s ease-in-out infinite alternate;
}

@keyframes bokeh-drift-1 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, -15px); }
}

@keyframes bokeh-drift-2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-15px, 20px); }
}

@keyframes bokeh-drift-3 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(10px, 25px); }
}

/* Memphis Shapes */
.memphis-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    left: var(--x);
    top: var(--y);
    transition: transform 0.8s ease-out, filter 1.2s ease, opacity 0.8s ease;
    animation: shape-jitter calc(1s * var(--anim-speed)) ease-in-out infinite alternate;
    animation-delay: var(--delay, 0s);
}

.shape.triangle {
    width: var(--size, 50px);
    height: var(--size, 50px);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    background: rgba(167, 139, 250, 0.12);
}

.shape.dot {
    width: var(--size, 12px);
    height: var(--size, 12px);
    border-radius: 50%;
    background: rgba(103, 232, 249, 0.25);
}

.shape.zigzag {
    width: 60px;
    height: 20px;
    background: repeating-linear-gradient(
        135deg,
        rgba(167, 139, 250, 0.15) 0px,
        rgba(167, 139, 250, 0.15) 4px,
        transparent 4px,
        transparent 8px
    );
}

.shape.circle-concentric {
    width: var(--size, 200px);
    height: var(--size, 200px);
    border-radius: 50%;
    border: 2px solid rgba(167, 139, 250, 0.20);
    box-shadow:
        inset 0 0 0 20px rgba(167, 139, 250, 0.10),
        inset 0 0 0 40px rgba(167, 139, 250, 0.05),
        0 0 0 20px rgba(167, 139, 250, 0.08),
        0 0 0 40px rgba(167, 139, 250, 0.04);
    transform: translate(-50%, -50%);
}

.shape.mega-bokeh {
    left: var(--x);
    top: var(--y);
    width: 80vw;
    height: 80vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, rgba(253, 164, 175, 0.08) 50%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: mega-pulse 12s ease-in-out infinite alternate;
}

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

@keyframes shape-jitter {
    0% { transform: translate(0, 0); }
    100% { transform: translate(3px, -4px); }
}

/* Section 1 slower jitter for higher freq feel */
.section-1 .shape {
    animation-duration: calc(0.6s * var(--anim-speed));
}

.section-2 .shape {
    animation-duration: calc(2s * var(--anim-speed));
}

.section-3 .shape {
    animation-duration: calc(5s * var(--anim-speed));
}

.section-4 .shape {
    animation-duration: calc(15s * var(--anim-speed));
}

.section-5 .shape {
    animation-duration: 12s;
}

/* Focus effect */
.shape.blurred {
    filter: blur(2px);
    opacity: 0.6;
}

.shape.focused {
    transform: scale(1.15);
}

/* Frequency Spectrum */
.freq-spectrum {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 60px;
    z-index: 2;
}

.freq-spectrum .bar {
    width: 3px;
    background: var(--accent-violet);
    border-radius: 2px;
    opacity: 0.6;
    transition: height 0.3s ease;
    animation: bar-pulse 1s ease-in-out infinite alternate;
}

.freq-spectrum .bar:nth-child(1) { height: 55px; animation-delay: 0s; }
.freq-spectrum .bar:nth-child(2) { height: 48px; animation-delay: 0.05s; }
.freq-spectrum .bar:nth-child(3) { height: 52px; animation-delay: 0.1s; }
.freq-spectrum .bar:nth-child(4) { height: 45px; animation-delay: 0.15s; }
.freq-spectrum .bar:nth-child(5) { height: 50px; animation-delay: 0.2s; }
.freq-spectrum .bar:nth-child(6) { height: 42px; animation-delay: 0.25s; }
.freq-spectrum .bar:nth-child(7) { height: 46px; animation-delay: 0.3s; }
.freq-spectrum .bar:nth-child(8) { height: 38px; animation-delay: 0.35s; }
.freq-spectrum .bar:nth-child(9) { height: 40px; animation-delay: 0.4s; }
.freq-spectrum .bar:nth-child(10) { height: 35px; animation-delay: 0.45s; }
.freq-spectrum .bar:nth-child(11) { height: 32px; animation-delay: 0.5s; }
.freq-spectrum .bar:nth-child(12) { height: 28px; animation-delay: 0.55s; }
.freq-spectrum .bar:nth-child(13) { height: 30px; animation-delay: 0.6s; }
.freq-spectrum .bar:nth-child(14) { height: 25px; animation-delay: 0.65s; }
.freq-spectrum .bar:nth-child(15) { height: 22px; animation-delay: 0.7s; }
.freq-spectrum .bar:nth-child(16) { height: 20px; animation-delay: 0.75s; }
.freq-spectrum .bar:nth-child(17) { height: 18px; animation-delay: 0.8s; }
.freq-spectrum .bar:nth-child(18) { height: 16px; animation-delay: 0.85s; }
.freq-spectrum .bar:nth-child(19) { height: 15px; animation-delay: 0.9s; }
.freq-spectrum .bar:nth-child(20) { height: 14px; animation-delay: 0.95s; }
.freq-spectrum .bar:nth-child(21) { height: 12px; animation-delay: 1s; }
.freq-spectrum .bar:nth-child(22) { height: 11px; animation-delay: 1.05s; }
.freq-spectrum .bar:nth-child(23) { height: 10px; animation-delay: 1.1s; }
.freq-spectrum .bar:nth-child(24) { height: 10px; animation-delay: 1.15s; }

@keyframes bar-pulse {
    0% { transform: scaleY(1); }
    100% { transform: scaleY(0.7); }
}

/* Section Content */
.section-content {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 2rem;
}

.main-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1rem;
}

.subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-body);
    opacity: 0.85;
    line-height: 1.75;
}

.section-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-violet);
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--text-body);
    opacity: 0.85;
    max-width: 650px;
    margin: 0 auto;
}

.body-text.sparse {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--text-primary);
    opacity: 1;
}

.quiet-word {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 7rem);
    color: var(--ghost-white);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

/* Sine Waves */
.sine-wave {
    position: absolute;
    bottom: 10%;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1;
    overflow: visible;
}

.sine-path {
    fill: none;
    stroke: var(--accent-violet);
    stroke-width: 1.5;
    opacity: 0.25;
}

.sine-fast {
    animation: sine-oscillate 2s ease-in-out infinite alternate;
}

.sine-slow {
    animation: sine-oscillate 8s ease-in-out infinite alternate;
}

@keyframes sine-oscillate {
    0% { transform: translateY(0); }
    100% { transform: translateY(5px); }
}

/* Zigzag Dividers */
.zigzag-divider {
    position: absolute;
    left: 0;
    width: 100%;
    height: 24px;
    background: repeating-linear-gradient(
        135deg,
        rgba(167, 139, 250, 0.15) 0px,
        rgba(167, 139, 250, 0.15) 4px,
        transparent 4px,
        transparent 8px
    );
    z-index: 10;
    pointer-events: none;
    transition: opacity 1s ease;
}

.zd-1 { top: 100vh; }
.zd-2 { top: 200vh; }
.zd-3 { top: 300vh; }
.zd-4 { top: 400vh; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .memphis-shapes .shape:nth-child(n+8) {
        display: none;
    }

    .freq-spectrum .bar:nth-child(n+13) {
        display: none;
    }

    .freq-indicator {
        top: 1rem;
        right: 1rem;
    }

    .main-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
}
