:root {
    --bg: #E8E8F0;
    --deep-night: #1C1C2E;
    --surface: #F4F4FC;
    --amber: #C8945A;
    --petal: #D4A0A0;
    --green: #6B8F71;
    --indigo: #3A3A5C;
    --warm-amber: #9B8A6E;
    --muted-text: #4A4A6A;
    --white: #FFFFFF;
    --shadow-raised: 12px 12px 24px rgba(0, 0, 0, 0.08), -12px -12px 24px rgba(255, 255, 255, 0.9);
    --shadow-inset: inset 6px 6px 12px rgba(0, 0, 0, 0.06), inset -6px -6px 12px rgba(255, 255, 255, 0.8);
    --shadow-sphere: 20px 20px 40px rgba(0, 0, 0, 0.1), -20px -20px 40px rgba(255, 255, 255, 0.95), 0 0 80px rgba(200, 148, 90, 0.08);
}

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

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

/* Dot Navigation */
#dot-nav {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--deep-night);
    opacity: 0.2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 8px;
    height: 8px;
    background: var(--amber);
    opacity: 1;
}

/* Chamber */
.chamber {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 48px;
}

/* Atmosphere */
.atmosphere {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.bokeh {
    position: absolute;
    border-radius: 50%;
    opacity: 0.04;
    filter: blur(60px);
}

.atmosphere-warm .bokeh {
    opacity: 0.07;
}

/* Panels */
.panel {
    background: var(--surface);
    border-radius: 32px;
    padding: 3rem;
    max-width: 800px;
    width: 100%;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(40px) scale(0.97);
}

.panel.visible {
    animation: bounceEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.neo-raised {
    box-shadow: var(--shadow-raised);
}

.neo-inset-panel {
    box-shadow: var(--shadow-inset);
}

.panel-wide {
    max-width: 900px;
}

.panel-compact {
    max-width: 500px;
    text-align: center;
}

/* Headlines */
.section-headline {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    letter-spacing: 0.05em;
    line-height: 1.15;
    color: var(--deep-night);
    margin-bottom: 1.2rem;
}

.body-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    max-width: 48ch;
    color: var(--muted-text);
    margin-bottom: 1.5rem;
}

/* Wordmark */
.wordmark {
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.wordmark.show {
    opacity: 1;
}

.wordmark-main {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(3.5rem, 8vw, 7rem);
    letter-spacing: 0.2em;
    color: var(--deep-night);
    text-transform: lowercase;
}

.wordmark-dev {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.2em;
    color: var(--amber);
}

.wordmark-closing {
    opacity: 1;
    margin-bottom: 1rem;
}

.wordmark-closing .wordmark-main {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.wordmark-closing .wordmark-dev {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
}

/* Simulation Sphere */
.chamber-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    z-index: 1;
    position: relative;
}

.simulation-sphere {
    width: clamp(200px, 40vw, 400px);
    height: clamp(200px, 40vw, 400px);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: var(--shadow-sphere);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sphereGlow 4s ease-in-out infinite;
}

@keyframes sphereGlow {
    0%, 100% { box-shadow: 20px 20px 40px rgba(0,0,0,0.1), -20px -20px 40px rgba(255,255,255,0.95), 0 0 80px rgba(200,148,90,0.06); }
    50% { box-shadow: 20px 20px 40px rgba(0,0,0,0.1), -20px -20px 40px rgba(255,255,255,0.95), 0 0 80px rgba(200,148,90,0.10); }
}

.bloom-svg {
    animation: bloomRotate 40s linear infinite;
}

.petal {
    transform-origin: 100px 100px;
    animation: petalBreath var(--dur) ease-in-out infinite;
}

@keyframes bloomRotate {
    to { transform: rotate(360deg); }
}

@keyframes petalBreath {
    0%, 100% { opacity: inherit; }
    50% { opacity: 0.8; }
}

/* Panel Split Layout */
.panel-split {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.panel-text {
    flex: 1;
}

.panel-visual {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Inset Displays */
.inset-display {
    border-radius: 20px;
    padding: 1.5rem;
}

.neo-inset {
    box-shadow: var(--shadow-inset);
    background: var(--bg);
    transition: box-shadow 0.4s ease;
}

.inset-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9B8A6E;
    display: block;
    margin-bottom: 1rem;
}

/* Param rows */
.param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.param-row:last-child {
    border-bottom: none;
}

.param-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--amber);
}

.param-value {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--deep-night);
}

/* Inset Pair */
.inset-pair {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.inset-pair .inset-display {
    flex: 1;
}

/* Cell Grid */
.cell-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 0.5rem 0;
}

.cell {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: background 1s ease;
}

/* Branch Paths */
.branch-path {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    transition: stroke-dashoffset 2s ease;
}

.branch-network.animate .branch-path {
    stroke-dashoffset: 0;
}

/* Leaf Tokens */
.leaf-token {
    width: 20px;
    height: 12px;
    display: inline-block;
}

.leaf-scatter {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.leaf-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Closing */
.closing-text {
    text-align: center;
    max-width: none;
}

/* Bounce Enter */
@keyframes bounceEnter {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chamber {
        padding: 24px;
    }

    .panel {
        border-radius: 24px;
        padding: 2rem;
    }

    .panel-split {
        flex-direction: column;
    }

    .inset-pair {
        flex-direction: column;
    }

    .dot {
        width: 5px;
        height: 5px;
    }

    .dot.active {
        width: 6px;
        height: 6px;
    }

    .simulation-sphere {
        width: 200px;
        height: 200px;
    }
}
