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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
}

body {
    margin: 0;
    background: #0a0a12;
    color: #e8e6f0;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
    line-height: 1.75;
    letter-spacing: 0.02em;
}

/* === PROGRESS BAR === */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 0%;
    background: #8b5cf6;
    box-shadow: 0 0 10px #8b5cf6, 0 0 30px rgba(139, 92, 246, 0.4);
    z-index: 1000;
    transition: height 0.1s linear;
}

/* === SIGNAL LINE === */
.signal-line {
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100vh;
    z-index: 50;
    pointer-events: none;
}

.signal-line-inner {
    width: 100%;
    height: 100%;
    background: #8b5cf6;
    animation: signal-pulse 6s ease-in-out infinite;
}

@keyframes signal-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.signal-node {
    position: absolute;
    left: 50%;
    width: 8px;
    height: 8px;
    background: #8b5cf6;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 10px #8b5cf6;
}

/* === SECTIONS === */
.section {
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    scroll-snap-align: start;
    position: relative;
    transition: grid-template-columns 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#section2.visible { grid-template-columns: 2fr 1fr; }
#section4.visible { grid-template-columns: 1fr 2fr; }

/* === SIGNAL PANEL === */
.signal-panel {
    padding: clamp(2rem, 5vw, 6rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #0a0a12;
    position: relative;
    z-index: 2;
}

.signal-panel::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(155, 151, 176, 0.15), transparent);
}

/* === WAVE CHAMBER === */
.wave-chamber {
    position: relative;
    overflow: hidden;
    background: #0b0e2a;
    contain: layout paint;
}

.wave-chamber-dark {
    background: #0a0a12;
}

/* === TYPOGRAPHY === */
.section-label {
    font-family: 'Azeret Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(34, 211, 238, 0.6);
    margin-bottom: 2rem;
}

.title-stack {
    font-family: 'Poiret One', cursive;
    font-size: clamp(3rem, 8vw, 8rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    line-height: 0.85;
    color: #e8e6f0;
    text-shadow: 0 0 7px currentColor, 0 0 30px currentColor, 0 0 60px rgba(139, 92, 246, 0.3);
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.title-stack span {
    display: block;
}

.section-header {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #e8e6f0;
    text-shadow: 0 0 7px currentColor, 0 0 30px currentColor, 0 0 60px rgba(139, 92, 246, 0.3);
    margin-bottom: 1.5rem;
}

.resonance-statement {
    font-family: 'Poiret One', cursive;
    font-size: clamp(2rem, 5vw, 5rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    line-height: 1.1;
    color: #e8e6f0;
    text-shadow: 0 0 7px currentColor, 0 0 30px currentColor, 0 0 60px rgba(139, 92, 246, 0.3);
}

.body-text {
    font-family: 'Libre Franklin', sans-serif;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    font-weight: 300;
    line-height: 1.75;
    color: #e8e6f0;
    max-width: 540px;
}

.body-text.muted {
    color: #9b97b0;
}

/* === SERVICE BLOCKS === */
.service-block {
    margin-bottom: clamp(2rem, 4vh, 3rem);
}

.neon-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    box-shadow: 0 0 10px currentColor;
}

.neon-dot[style*="#8b5cf6"] { box-shadow: 0 0 10px #8b5cf6; }
.neon-dot[style*="#f43f8e"] { box-shadow: 0 0 10px #f43f8e; }
.neon-dot[style*="#22d3ee"] { box-shadow: 0 0 10px #22d3ee; }

/* === TIMELINE === */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.timeline-bar {
    height: 36px;
    background: linear-gradient(90deg, #8b5cf6, #22d3ee);
    opacity: 0.7;
    display: flex;
    align-items: center;
    padding-left: 1rem;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
    transition: opacity 0.3s;
}

.timeline-bar:hover {
    opacity: 1;
}

.timeline-label {
    font-family: 'Azeret Mono', monospace;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0a0a12;
    font-weight: 400;
    white-space: nowrap;
}

/* === CONTACT === */
.contact-email {
    font-family: 'Azeret Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #22d3ee;
    text-decoration: none;
    letter-spacing: 0.08em;
    text-shadow: 0 0 7px currentColor, 0 0 30px currentColor;
    transition: text-shadow 0.4s ease;
    display: inline-block;
    margin: 1.5rem 0;
}

.contact-email:hover {
    text-shadow: 0 0 10px currentColor, 0 0 40px currentColor, 0 0 80px rgba(34, 211, 238, 0.4);
}

/* === DECO ARCHES (Section 4) === */
.deco-arch {
    position: absolute;
    border: 1px solid rgba(155, 151, 176, 0.3);
    border-radius: 50% 50% 0 0;
}

.arch-1 {
    width: 60%;
    height: 50%;
    bottom: 10%;
    left: 20%;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
}

.arch-2 {
    width: 45%;
    height: 40%;
    bottom: 10%;
    left: 27.5%;
    box-shadow: 0 0 15px rgba(244, 63, 142, 0.15);
    border-color: rgba(244, 63, 142, 0.25);
}

.arch-3 {
    width: 30%;
    height: 30%;
    bottom: 10%;
    left: 35%;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.15);
    border-color: rgba(34, 211, 238, 0.25);
}

/* === NEON ORB === */
.neon-orb {
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.6) 0%, transparent 70%);
    box-shadow: 0 0 60px 20px rgba(139, 92, 246, 0.2);
}

.orb-1 {
    position: absolute;
    width: 120px;
    height: 120px;
    bottom: 25%;
    left: calc(50% - 60px);
    animation: orb-breathe 4s ease-in-out infinite;
}

@keyframes orb-breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.orb-float {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    animation: orb-drift 20s ease-in-out infinite;
}

@keyframes orb-drift {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    25% { transform: translate(-20px, -30px); opacity: 0.5; }
    50% { transform: translate(10px, -50px); opacity: 0.3; }
    75% { transform: translate(-15px, -20px); opacity: 0.5; }
}

/* === WAVE ELEMENTS === */
.wave-element {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    will-change: clip-path;
}

/* === FADE IN ANIMATION === */
.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* === SHAKE GLITCH === */
@keyframes shake-glitch {
    0% { transform: translateX(0); text-shadow: 0 0 10px #8b5cf6; }
    25% { transform: translateX(-3px); text-shadow: 0 0 20px #fbbf24; }
    50% { transform: translateX(3px); text-shadow: 0 0 20px #fbbf24; }
    75% { transform: translateX(-1px); text-shadow: 0 0 15px #fbbf24; }
    100% { transform: translateX(0); text-shadow: 0 0 10px #8b5cf6; }
}

.shake-trigger.shake-active {
    animation: shake-glitch 0.3s ease-out 1 both;
}

/* === SPECTRUM FRAGMENTS (Section 3 right) === */
.spectrum-fragment {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
    opacity: 0.3;
    animation: spectrum-scroll 12s linear infinite;
}

@keyframes spectrum-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-200px); }
}

/* === FLATLINE (Section 5 right) === */
.flatline {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 1px;
    background: #8b5cf6;
    opacity: 0;
    transition: opacity 2s ease;
    box-shadow: 0 0 10px #8b5cf6;
}

#section5.visible .flatline {
    opacity: 0.6;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .section {
        grid-template-columns: 1fr !important;
        height: auto;
        min-height: 100vh;
    }

    .wave-chamber {
        height: 30vh;
    }

    .signal-line {
        display: none;
    }

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

    .floating-orbs {
        display: none;
    }
}
