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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Cormorant Garamond', serif;
    background: #0c0a1a;
    color: #e8e4f0;
}

/* ===== MARBLE BACKGROUND ===== */
#marble-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background:
        repeating-linear-gradient(
            37deg,
            transparent,
            transparent 80px,
            rgba(59, 7, 100, 0.15) 80px,
            rgba(59, 7, 100, 0.15) 80.5px
        ),
        repeating-linear-gradient(
            143deg,
            transparent,
            transparent 120px,
            rgba(59, 7, 100, 0.1) 120px,
            rgba(59, 7, 100, 0.1) 120.5px
        ),
        #0c0a1a;
}

.marble-pool {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: overlay;
    opacity: 0.4;
    animation: drift 20s ease-in-out infinite;
}

.marble-pool.p1 {
    width: 600px;
    height: 600px;
    top: -100px;
    right: -100px;
    background: radial-gradient(ellipse at center, rgba(6, 95, 70, 0.3), transparent 70%);
    animation-delay: 0s;
}

.marble-pool.p2 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    left: -50px;
    background: radial-gradient(ellipse at center, rgba(136, 19, 55, 0.2), transparent 70%);
    animation-delay: -7s;
}

.marble-pool.p3 {
    width: 500px;
    height: 500px;
    top: 40%;
    right: 20%;
    background: radial-gradient(ellipse at center, #1e3a5f, transparent 70%);
    opacity: 0.25;
    animation-delay: -14s;
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -15px) scale(1.05); }
    66% { transform: translate(-10px, 10px) scale(0.95); }
}

/* ===== BLOB LAYER ===== */
#blob-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
    animation: blobMorph 15s ease-in-out infinite;
}

.blob-1 {
    width: 300px;
    height: 300px;
    top: 20%;
    left: 10%;
    background: #881337;
    animation-delay: 0s;
}

.blob-2 {
    width: 250px;
    height: 250px;
    top: 50%;
    right: 15%;
    background: #065f46;
    animation-delay: -5s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    left: 40%;
    background: #3b0764;
    animation-delay: -10s;
}

@keyframes blobMorph {
    0%, 100% { transform: translate(0, 0) scale(1); border-radius: 50% 40% 60% 50%; }
    25% { transform: translate(30px, -20px) scale(1.1); border-radius: 40% 60% 50% 50%; }
    50% { transform: translate(-20px, 20px) scale(0.9); border-radius: 60% 50% 40% 60%; }
    75% { transform: translate(10px, 10px) scale(1.05); border-radius: 50% 50% 60% 40%; }
}

/* ===== HUD OVERLAY ===== */
#hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    padding: 24px;
}

.hud-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border-color: rgba(232, 228, 240, 0.3);
    border-style: solid;
}

.hud-corner.top-left {
    top: 24px;
    left: 24px;
    border-width: 1px 0 0 1px;
}

.hud-corner.top-right {
    top: 24px;
    right: 24px;
    border-width: 1px 1px 0 0;
}

.hud-corner.bottom-left {
    bottom: 24px;
    left: 24px;
    border-width: 0 0 1px 1px;
}

.hud-corner.bottom-right {
    bottom: 24px;
    right: 24px;
    border-width: 0 1px 1px 0;
}

.hud-panel {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hud-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    color: rgba(232, 228, 240, 0.4);
    text-transform: uppercase;
}

.hud-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(232, 228, 240, 0.7);
}

.panel-top-left {
    top: 72px;
    left: 32px;
}

.panel-top-right {
    top: 72px;
    right: 32px;
    text-align: right;
}

.panel-bottom-left {
    bottom: 72px;
    left: 32px;
}

.panel-bottom-right {
    bottom: 72px;
    right: 32px;
    text-align: right;
}

/* ===== CONTENT LAYER ===== */
#content-layer {
    position: relative;
    z-index: 5;
    min-height: 100vh;
}

.content-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.content-section.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== TITLE SECTION ===== */
.title-main {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 700;
    color: #e8e4f0;
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 0 60px rgba(136, 19, 55, 0.3);
}

.title-sub {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    color: rgba(232, 228, 240, 0.6);
    letter-spacing: 0.05em;
}

.scroll-indicator {
    position: absolute;
    bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.mono-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: rgba(232, 228, 240, 0.4);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(232, 228, 240, 0.4), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.6); }
}

/* ===== OBSERVATION WINDOWS ===== */
.observation-window {
    max-width: 600px;
    padding: 48px;
    border: 1px solid rgba(232, 228, 240, 0.1);
    background: rgba(12, 10, 26, 0.6);
    backdrop-filter: blur(10px);
    position: relative;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5.5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #e8e4f0;
}

.section-body {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 300;
    line-height: 1.8;
    color: rgba(232, 228, 240, 0.8);
}

.kintsugi-line {
    margin-top: 32px;
    height: 1px;
    width: 100%;
    background: linear-gradient(
        to right,
        transparent,
        #92400e 20%,
        #92400e 50%,
        transparent
    );
    opacity: 0.6;
}

/* ===== CLOSING SECTION ===== */
.closing {
    text-align: center;
    border: none;
    background: transparent;
    backdrop-filter: none;
}

.closing-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 300;
    font-style: italic;
    line-height: 2;
    color: rgba(232, 228, 240, 0.7);
    margin-bottom: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .observation-window {
        padding: 32px 24px;
        margin: 0 16px;
    }

    .hud-panel {
        display: none;
    }

    .hud-corner {
        width: 24px;
        height: 24px;
    }
}
