:root {
    --vermillion: #e63b2e;
    --obsidian: #2e2e32;
    --glacier: #f2f0ed;
    --warm-gray: #e8e4df;
    --deep-black: #1c1c1e;
    --moss: #2d6a4f;
    --amber: #d4a017;
    --mid-gray: #6b6b70;
    --hex-gap: 8px;
}

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

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    background-color: var(--glacier);
    color: var(--obsidian);
    font-family: 'Cormorant Garamond', serif;
    overflow-x: hidden;
}

/* Altitude Indicator */
#altitude-indicator {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#altitude-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--mid-gray);
    letter-spacing: 0.05em;
}

#altitude-bar {
    width: 2px;
    height: 120px;
    background: var(--warm-gray);
    position: relative;
}

#altitude-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--vermillion);
    transform-origin: top;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Altitude Bands */
.altitude-band {
    min-height: 100vh;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4rem 2rem;
    overflow: hidden;
}

#summit {
    background-color: var(--glacier);
}

#treeline {
    background-color: var(--warm-gray);
}

#meadow {
    background-color: var(--glacier);
}

#valley {
    background-color: var(--deep-black);
}

#foundation {
    background-color: var(--glacier);
}

/* Hexagonal Grid */
.hex-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--hex-gap);
    max-width: 1000px;
    width: 100%;
}

.hex-grid-dense {
    gap: 4px;
}

/* Hexagonal Cells */
.hex-cell {
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    background: var(--warm-gray);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.hex-cell:hover {
    transform: scale(1.03);
}

.hex-large {
    width: 450px;
    height: 390px;
}

.hex-medium {
    width: 340px;
    height: 295px;
}

.hex-small {
    width: 220px;
    height: 190px;
}

.hex-dark {
    background: var(--obsidian);
}

.hex-red {
    background: var(--vermillion);
}

.hex-red-bg {
    background: var(--vermillion);
}

.hex-accent {
    background: var(--moss);
    color: var(--glacier);
}

.hex-botanical {
    background: transparent;
}

/* Typography */
.display-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3.5rem, 10vw, 9rem);
    letter-spacing: 0.08em;
    line-height: 0.95;
    color: var(--obsidian);
    text-transform: uppercase;
}

.display-light {
    color: var(--glacier);
}

.dot {
    color: var(--vermillion);
}

.dot-light {
    color: var(--glacier);
}

.prose {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 300;
    line-height: 1.7;
    color: var(--obsidian);
    max-width: 40ch;
}

.prose-light {
    color: var(--glacier);
}

.mono-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 300;
    letter-spacing: 0.03em;
    color: var(--mid-gray);
}

.mono-light {
    color: var(--glacier);
}

/* Botanical SVGs */
.botanical-svg {
    width: 100%;
    height: 100%;
    max-width: 160px;
    max-height: 160px;
}

/* Fracture Lines */
.fracture-line {
    position: absolute;
    background: var(--vermillion);
    opacity: 0.6;
}

.fracture-line:not(.fracture-diagonal):not(.fracture-vertical) {
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
}

.fracture-diagonal {
    bottom: 20%;
    left: -5%;
    width: 40%;
    height: 1px;
    transform: rotate(-12deg);
}

.fracture-vertical {
    top: 10%;
    right: 15%;
    width: 1px;
    height: 60%;
}

/* Scroll animations */
.hex-cell {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hex-cell.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.hex-cell.visible:hover {
    transform: scale(1.03);
}

/* Responsive */
@media (max-width: 768px) {
    .hex-large {
        width: 320px;
        height: 277px;
    }

    .hex-medium {
        width: 260px;
        height: 225px;
    }

    .hex-small {
        width: 180px;
        height: 156px;
    }

    .display-text {
        font-size: clamp(2.5rem, 8vw, 5rem);
    }

    #altitude-indicator {
        right: 1rem;
    }

    .hex-cell {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hex-large {
        width: 280px;
        height: 243px;
    }

    .hex-medium {
        width: 240px;
        height: 208px;
    }

    .hex-small {
        width: 160px;
        height: 139px;
    }
}
