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

:root {
    --bg-primary: #0D0A0E;
    --bg-secondary: #1A1520;
    --accent-primary: #FF6B35;
    --accent-secondary: #FFB347;
    --accent-tertiary: #E8445A;
    --text-primary: #F5EDE3;
    --text-secondary: #A89B8C;
    --depth-accent: #3D2B5A;
    --bg-cool: #0E0D14;
    --bg-hue-shift: 0;
    --cursor-x: 50%;
    --cursor-y: 50%;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    line-height: 1.75;
    overflow-x: hidden;
}

/* === PROGRESS SPINE === */
#progress-spine {
    position: fixed;
    top: 0;
    left: 0;
    width: 2px;
    height: 100vh;
    z-index: 1000;
    background: rgba(255, 107, 53, 0.1);
}

#progress-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FF6B35 0%, #FFB347 40%, #E8445A 100%);
    transform-origin: top;
    transform: scaleY(0);
    will-change: transform;
}

#progress-dot {
    position: absolute;
    left: -3px;
    top: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.4);
    animation: progressPulse 2s ease-in-out infinite;
    will-change: transform;
}

@keyframes progressPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(255, 107, 53, 0.4); }
    50% { transform: scale(1.5); box-shadow: 0 0 20px rgba(255, 107, 53, 0.2); }
}

/* === HERO SECTION === */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-primary);
}

.hero-title {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0 5vw;
    pointer-events: none;
}

.hero-line-1 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(6rem, 18vw, 14rem);
    letter-spacing: 0.02em;
    line-height: 0.9;
    color: var(--accent-primary);
    text-transform: uppercase;
}

.hero-line-2 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 9vw, 7rem);
    letter-spacing: 0.02em;
    line-height: 0.9;
    color: var(--accent-secondary);
    text-transform: uppercase;
    align-self: flex-end;
}

/* === ORGANIC BLOBS === */
.blob {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    background: radial-gradient(ellipse at 30% 40%, #FF6B35 0%, #FFB347 50%, transparent 70%);
    box-shadow: 0 0 60px rgba(255, 107, 53, 0.3);
    animation: blobMorph var(--morph-dur, 10s) ease-in-out infinite,
               blobDrift var(--drift-dur, 20s) ease-in-out infinite;
    animation-delay: var(--morph-delay, 0s), var(--drift-delay, 0s);
    opacity: 0.7;
    will-change: border-radius, transform;
    z-index: 2;
}

.blob-1 {
    width: 500px; height: 500px;
    top: 10%; left: 20%;
    --morph-dur: 8s; --drift-dur: 18s;
    --morph-delay: -3s; --drift-delay: 0s;
    --drift-x: 40px; --drift-y: -30px;
    opacity: 0.5;
}
.blob-2 {
    width: 350px; height: 350px;
    top: 30%; left: 55%;
    --morph-dur: 11s; --drift-dur: 22s;
    --morph-delay: -7s; --drift-delay: -4s;
    --drift-x: -30px; --drift-y: 25px;
    opacity: 0.6;
}
.blob-3 {
    width: 250px; height: 250px;
    top: 55%; left: 35%;
    --morph-dur: 14s; --drift-dur: 25s;
    --morph-delay: -1s; --drift-delay: -8s;
    --drift-x: 25px; --drift-y: 20px;
    opacity: 0.5;
}
.blob-4 {
    width: 200px; height: 200px;
    top: 15%; left: 65%;
    --morph-dur: 9s; --drift-dur: 16s;
    --morph-delay: -5s; --drift-delay: -2s;
    --drift-x: -20px; --drift-y: -35px;
    opacity: 0.4;
}
.blob-5 {
    width: 400px; height: 400px;
    top: 45%; left: 10%;
    --morph-dur: 12s; --drift-dur: 20s;
    --morph-delay: -9s; --drift-delay: -6s;
    --drift-x: 35px; --drift-y: -15px;
    opacity: 0.35;
}
.blob-6 {
    width: 300px; height: 300px;
    top: 60%; left: 60%;
    --morph-dur: 10s; --drift-dur: 24s;
    --morph-delay: -4s; --drift-delay: -10s;
    --drift-x: -25px; --drift-y: 30px;
    opacity: 0.45;
}

@keyframes blobMorph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 56% 44% / 62% 28% 72% 38%; }
    50% { border-radius: 42% 58% 36% 64% / 48% 52% 48% 52%; }
    75% { border-radius: 70% 30% 50% 50% / 38% 62% 38% 62%; }
}

@keyframes blobDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(var(--drift-x, 30px), var(--drift-y, -20px)); }
}

/* === BLOB LABELS === */
.blob-label {
    position: absolute;
    z-index: 5;
    pointer-events: none;
}
.mono-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 179, 71, 0.6);
}
.label-1 { top: 25%; left: 42%; }
.label-2 { top: 50%; left: 58%; }
.label-3 { top: 65%; left: 22%; }

/* === VIEWPORT SECTION === */
.viewport-section {
    min-height: 100vh;
    position: relative;
}

/* === DOPAMINE PUNCTUATION === */
.dopamine-punctuation {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: filter 0.6s ease;
}

.dopamine-punctuation[data-color="#E8445A"] {
    background: linear-gradient(135deg, #E8445A 0%, #FF6B35 100%);
}
.dopamine-punctuation[data-color="#FF6B35"] {
    background: linear-gradient(135deg, #FF6B35 0%, #FFB347 100%);
}
.dopamine-punctuation[data-color="#FFB347"] {
    background: linear-gradient(135deg, #FFB347 0%, #E8445A 100%);
}

.dopamine-punctuation.surge {
    animation: dopamineSurge 0.6s ease-out;
}

@keyframes dopamineSurge {
    0% { filter: brightness(1.2) saturate(1.3); }
    100% { filter: brightness(1) saturate(1); }
}

.dopamine-word {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(8rem, 20vw, 16rem);
    color: rgba(13, 10, 14, 0.25);
    letter-spacing: 0.04em;
    z-index: 2;
    position: relative;
    mix-blend-mode: multiply;
}

.dopamine-blob {
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
    background: radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    animation: blobMorph 12s ease-in-out infinite;
    z-index: 1;
}

/* === CORNER BRACKETS === */
.corner-bracket {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 3;
}
.corner-bracket.top-left {
    top: 30px; left: 30px;
    border-top: 1px solid rgba(255, 179, 71, 0.3);
    border-left: 1px solid rgba(255, 179, 71, 0.3);
}
.corner-bracket.top-right {
    top: 30px; right: 30px;
    border-top: 1px solid rgba(255, 179, 71, 0.3);
    border-right: 1px solid rgba(255, 179, 71, 0.3);
}
.corner-bracket.bottom-left {
    bottom: 30px; left: 30px;
    border-bottom: 1px solid rgba(255, 179, 71, 0.3);
    border-left: 1px solid rgba(255, 179, 71, 0.3);
}
.corner-bracket.bottom-right {
    bottom: 30px; right: 30px;
    border-bottom: 1px solid rgba(255, 179, 71, 0.3);
    border-right: 1px solid rgba(255, 179, 71, 0.3);
}

/* === EDITORIAL SECTIONS === */
.editorial-section {
    padding: 10vh 0;
    position: relative;
}

.editorial-grid {
    display: grid;
    grid-template-columns: 15vw 1fr 30vw;
    min-height: 60vh;
}

.editorial-margin-left {
    position: relative;
}

.editorial-content {
    max-width: 55vw;
    padding: 0 2rem;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    color: var(--accent-primary);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.body-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.4vw, 1.35rem);
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.editorial-margin-right {
    position: relative;
    padding: 0 1.5rem;
}

/* === HUD PANELS === */
.hud-panel {
    position: sticky;
    top: 30vh;
    border: 1px solid rgba(255, 179, 71, 0.1);
    padding: 1rem;
    margin-top: 2rem;
    background: rgba(26, 21, 32, 0.6);
    backdrop-filter: blur(4px);
    transition: border-color 0.3s ease-out, opacity 0.3s ease-out;
    transform: translateX(20px);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out, border-color 0.2s ease-out;
}

.hud-panel.active {
    border-color: rgba(255, 179, 71, 0.4);
    transform: translateX(0);
    opacity: 1;
}

.hud-panel-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 179, 71, 0.6);
    margin-bottom: 0.5rem;
}

.hud-panel-rule {
    height: 1px;
    background: linear-gradient(to right, #FFB347 0%, transparent 100%);
    margin: 0.5rem 0;
    width: 0%;
    transition: width 0.4s ease-out;
}

.hud-panel.active .hud-panel-rule {
    width: 100%;
}

.hud-panel-line {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: rgba(255, 179, 71, 0.6);
    line-height: 1.8;
    white-space: nowrap;
    overflow: hidden;
}

.hud-cursor {
    display: inline;
    animation: blink 1s step-end infinite;
    color: rgba(255, 179, 71, 0.6);
}

@keyframes blink {
    50% { opacity: 0; }
}

/* === REVEAL TEXT ANIMATION === */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === SYNTHESIS GRID === */
#synthesis {
    padding: 10vh 5vw;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 2rem;
    min-height: 100vh;
    align-content: center;
}

.synthesis-panel {
    background: rgba(26, 21, 32, 0.7);
    border: 1px solid rgba(61, 43, 90, 0.4);
    padding: 2.5rem 2rem;
    position: relative;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    backdrop-filter: blur(4px);
}

.synthesis-panel:hover {
    transform: translate(5px, -5px);
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.1);
}

.synthesis-panel h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    color: var(--accent-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.synthesis-panel p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.panel-1 { transform: rotate(-0.5deg); }
.panel-2 { transform: rotate(0.3deg); z-index: 2; margin-top: -1rem; }
.panel-3 { transform: rotate(-0.2deg); margin-top: 1rem; }
.panel-4 { transform: rotate(0.4deg); margin-top: -0.5rem; }
.panel-5 { transform: rotate(-0.3deg); z-index: 2; }
.panel-6 { transform: rotate(0.2deg); margin-top: 0.5rem; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .editorial-grid {
        grid-template-columns: 1fr;
    }
    .editorial-content {
        max-width: 100%;
        padding: 0 1.5rem;
    }
    .editorial-margin-left {
        display: none;
    }
    .editorial-margin-right {
        padding: 2rem 1.5rem 0;
    }
    .hud-panel {
        position: relative;
        top: auto;
    }
    #synthesis {
        grid-template-columns: 1fr;
    }
    .synthesis-panel {
        transform: none !important;
        margin-top: 0 !important;
    }
}
