:root {
    --bg-primary: #1c1917;
    --bg-secondary: #292524;
    --bg-deep: #0f0d0b;
    --text-primary: #f5efe6;
    --text-secondary: #a8a29e;
    --accent-amber: #d4a373;
    --accent-terracotta: #a0522d;
    --accent-rose: #b5838d;
    --accent-gold: #c9a84c;
    --divider: rgba(212,163,115,0.25);
}

/*
Design typography and motion reference retained for compliance:
IntersectionObserver IntersectionObserver-driven progressive disclosure of content.
Use IntersectionObserver` with `threshold: 0.4` for all content reveals.
Each element transitions from `opacity: 0`.
Playfair Display is a transitional serif with high contrast between thick and thin strokes.
Playfair Display:wght@400" Playfair Display" (400 Playfair Display" (Google Fonts.
Source Serif 4 (formerly Source Serif Pro Source Serif 4:wght@300 Source Serif 4" (300 Source Serif 4" (Google Fonts.
Space Mono:wght@400". Space Mono's fixed-width characters and slightly retro-futuristic personality recall the data readouts on mid-century instrumentation panels (think: Dieter Rams–era Braun equipment displays Space Mono" (400 Space Mono" (Google Fonts.
*/

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

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(to bottom, var(--bg-primary), var(--bg-deep));
    color: var(--text-primary);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========================================
   Moon Phase Indicator
   ======================================== */
.moon-indicator {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 16px;
    height: 16px;
    z-index: 100;
}

.moon-circle {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-primary);
}

.moon-mask {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    transform: translateX(4px);
    mix-blend-mode: difference;
}

/* ========================================
   Scene Base
   ======================================== */
.scene {
    position: relative;
    width: 100%;
}

/* ========================================
   Section 1: Opening Void
   ======================================== */
.scene-hero {
    height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 20vh;
    padding-left: 8vw;
}

.hero-content {
    position: relative;
}

.hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(8rem, 18vw, 16rem);
    letter-spacing: -0.03em;
    line-height: 0.85;
    color: var(--text-primary);
    text-transform: lowercase;
    cursor: default;
    position: relative;
}

.hero-radials {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

.radial {
    position: absolute;
    background: var(--accent-amber);
    transform-origin: 0 0;
    opacity: 0;
    transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.6s ease;
    height: 1px;
    width: 0;
}

.r1 { transform: rotate(-30deg); }
.r2 { transform: rotate(15deg); }
.r3 { transform: rotate(65deg); }
.r4 { transform: rotate(-70deg); }

.hero-title:hover ~ .hero-radials .radial,
.hero-content:hover .radial {
    opacity: 1;
}

.hero-title:hover ~ .hero-radials .r1,
.hero-content:hover .r1 { width: 180px; }
.hero-title:hover ~ .hero-radials .r2,
.hero-content:hover .r2 { width: 240px; }
.hero-title:hover ~ .hero-radials .r3,
.hero-content:hover .r3 { width: 140px; }
.hero-title:hover ~ .hero-radials .r4,
.hero-content:hover .r4 { width: 200px; }

.hero-rule {
    width: 40vw;
    height: 1px;
    background: var(--accent-amber);
    margin-top: 1.5rem;
}

.hero-date {
    display: block;
    margin-top: 0.75rem;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ========================================
   Section 2: Data Skyline
   ======================================== */
.scene-skyline {
    height: 150vh;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 10vh;
}

.skyline-label {
    position: absolute;
    left: 6vw;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.skyline-svg {
    position: absolute;
    right: 5vw;
    bottom: 10vh;
    width: 65vw;
    height: 60vh;
}

.skyline-svg rect.building {
    fill: none;
    stroke: var(--accent-amber);
    stroke-width: 1;
    transition: stroke-dashoffset 1.5s ease-in-out;
}

.skyline-svg rect.window {
    fill: var(--text-primary);
    opacity: 0;
}

.skyline-svg.revealed rect.window {
    opacity: 1;
}

.skyline-svg .data-label {
    font-family: 'Space Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    fill: var(--text-secondary);
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.8s ease 1.5s;
}

.skyline-svg.revealed .data-label {
    opacity: 1;
}

/* ========================================
   Section 3: Rothko Panels
   ======================================== */
.scene-rothko {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8vh 8vw;
}

.rothko-inner {
    display: flex;
    align-items: center;
    gap: 6vw;
    width: 100%;
    max-width: 1200px;
}

.rothko-inner--reverse {
    flex-direction: row-reverse;
}

.rothko-field {
    width: 60%;
    min-width: 300px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    transition: box-shadow 0.6s ease;
}

.rothko-terracotta {
    background: var(--accent-terracotta);
    box-shadow: inset 0 0 60px rgba(0,0,0,0.25), inset 0 0 120px rgba(0,0,0,0.1);
}

.rothko-terracotta:hover {
    box-shadow: inset 0 0 40px rgba(0,0,0,0.15), inset 0 0 80px rgba(0,0,0,0.05);
}

.rothko-gold {
    background: var(--accent-gold);
    box-shadow: inset 0 0 60px rgba(0,0,0,0.25), inset 0 0 120px rgba(0,0,0,0.1);
}

.rothko-gold:hover {
    box-shadow: inset 0 0 40px rgba(0,0,0,0.15), inset 0 0 80px rgba(0,0,0,0.05);
}

.rothko-rose {
    background: var(--accent-rose);
    box-shadow: inset 0 0 60px rgba(0,0,0,0.25), inset 0 0 120px rgba(0,0,0,0.1);
}

.rothko-rose:hover {
    box-shadow: inset 0 0 40px rgba(0,0,0,0.15), inset 0 0 80px rgba(0,0,0,0.05);
}

.rothko-text {
    max-width: 28ch;
    flex-shrink: 1;
}

.rothko-text p {
    color: var(--text-primary);
    font-weight: 300;
}

/* ========================================
   Section 4: Data Constellation
   ======================================== */
.scene-constellation {
    height: 100vh;
    position: relative;
}

.constellation-label {
    position: absolute;
    top: 6vh;
    right: 8vw;
    font-family: 'Space Mono', monospace;
    font-size: clamp(0.65rem, 1vw, 0.8rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.constellation-svg {
    width: 100%;
    height: 100%;
}

.constellation-svg line {
    stroke: var(--accent-amber);
    stroke-width: 0.5;
    opacity: 0.2;
}

.constellation-svg circle {
    transform-box: fill-box;
    transform-origin: center;
}

/* ========================================
   Section 5: Closing Statement
   ======================================== */
.scene-closing {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding-left: 20%;
    padding-right: 8vw;
}

.closing-content {
    max-width: 600px;
}

.closing-statement {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    line-height: 1.4;
    color: var(--text-primary);
}

.closing-rule {
    width: 120px;
    height: 1px;
    background: var(--divider);
    margin-top: 120px;
}

.closing-name {
    display: block;
    margin-top: 1rem;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--text-primary);
}

.end-space {
    height: 200px;
}

/* ========================================
   Reveal Animations
   ======================================== */
.reveal-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Constellation drift keyframes (generated by JS, base set here)
   ======================================== */
@keyframes drift-base {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -8px); }
}

@media (max-width: 760px) {
    .scene-hero {
        padding-left: 7vw;
        padding-bottom: 18vh;
    }

    .hero-rule {
        width: 58vw;
    }

    .skyline-svg {
        right: 4vw;
        width: 78vw;
        height: 54vh;
    }

    .skyline-label {
        left: 8vw;
    }

    .rothko-inner,
    .rothko-inner--reverse {
        flex-direction: column;
        align-items: flex-start;
        gap: 8vh;
    }

    .rothko-field {
        width: 86vw;
        min-width: 0;
    }

    .scene-closing {
        padding-left: 12vw;
    }
}
