/* lower.bar — Surreal Opulent Descent */

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

:root {
    --deep-burgundy: #2d1420;
    --mid-burgundy: #3d1f2b;
    --copper: #d4956a;
    --muted-earth: #9a7b6e;
    --abyss: #1a0a12;
    --deep-rose: #7a2340;
    --gold: #c4a265;
    --parchment: #e8d5c4;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--abyss);
    color: var(--parchment);
    font-family: 'Crimson Pro', serif;
    font-weight: 300;
    overflow-x: hidden;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
}

/* Chamber Base */
.chamber {
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 1fr);
    position: relative;
    overflow: hidden;
    transition: opacity 0.8s ease;
}

/* Chamber Backgrounds — gradient descent */
.chamber-1 {
    background: linear-gradient(180deg, #2d1420 0%, #1a0a12 100%);
}

.chamber-2 {
    background: linear-gradient(180deg, #1a0a12 0%, #2d1420 40%, #1a0a12 100%);
}

.chamber-3 {
    background: linear-gradient(180deg, #1a0a12 0%, #3d1f2b 50%, #1a0a12 100%);
}

.chamber-4 {
    background: linear-gradient(180deg, #1a0a12 0%, #2d1420 60%, #0d0509 100%);
}

.chamber-5 {
    background: radial-gradient(ellipse at center, #2d1420 0%, #7a2340 30%, #1a0a12 50%, #000000 100%);
}

/* Modules */
.module {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.module.visible {
    opacity: 1;
    transform: translateY(0);
}

.module-center {
    align-items: center;
    text-align: center;
}

/* Typography */
.display-heading {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6.5rem);
    letter-spacing: 0.04em;
    line-height: 1.1;
    color: var(--parchment);
}

.display-heading .dot {
    color: var(--gold);
}

.subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted-earth);
    margin-top: 1.5rem;
}

.section-heading {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: 0.03em;
    line-height: 1.2;
    color: var(--parchment);
    margin-bottom: 1.5rem;
}

.body-text {
    font-family: 'Crimson Pro', serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    line-height: 1.8;
    color: var(--parchment);
    opacity: 0.85;
    max-width: 55ch;
}

/* Navigation Dots */
.chamber-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--gold);
    cursor: pointer;
    transition: all 0.4s ease;
}

.nav-dot.active {
    background: var(--gold);
    box-shadow: 0 0 10px var(--gold);
}

/* Depth Indicator */
.depth-indicator {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: var(--gold);
    opacity: 0.4;
}

/* SVG Nature Elements */
.vine, .nature-element {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease;
}

.module.visible .vine,
.module.visible .nature-element {
    opacity: 1;
}

.vine-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 3s ease;
}

.module.visible .vine-path {
    stroke-dashoffset: 0;
}

.spiral-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 4s ease;
}

.module.visible .spiral-path {
    stroke-dashoffset: 0;
}

/* Arch */
.arch-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.arch {
    width: 100%;
    height: auto;
}

/* Vertical Text */
.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted-earth);
    opacity: 0.5;
}

/* Final Mark */
.final-mark {
    margin-top: 3rem;
    width: 80px;
    height: 80px;
    animation: pulse 4s ease-in-out infinite;
}

.final-heading {
    color: var(--gold);
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Vine Border */
.vine-border {
    width: 100%;
    height: 100%;
}

/* Module accent background */
.module-accent {
    background: rgba(45, 20, 32, 0.3);
    border-left: 1px solid rgba(196, 162, 101, 0.15);
}

.module-text {
    padding: 3rem;
}

/* Parallax depth layers */
.chamber::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 70%, rgba(196, 162, 101, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.chamber::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 30%, rgba(212, 149, 106, 0.02) 0%, transparent 40%);
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .chamber {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: auto;
        gap: 1rem;
        padding: 2rem 1rem;
    }

    .module {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }

    .module-accent,
    .module-ornament,
    .module-glyph {
        display: none;
    }
}
