:root {
    --ground-bg: #e8e4e0;
    --b1-bg: #d0ccc4;
    --b2-bg: #a8a098;
    --b3-bg: #787068;
    --b4-bg: #4a4440;
    --b5-bg: #2a2622;
    --text-dark: #2a2622;
    --text-light: #e0dcd4;
    --text-b4: #d0c8c0;
    --text-b5: #a89888;
    --floor-line-light: #c4c0b8;
    --floor-line-dark: #6a6460;
    --pipe-color: #5a5450;
    --bar-counter: #8a7a68;
    --depth-line: #8a8480;
    --depth-highlight: #f0e8e0;
}

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

body {
    overflow-x: hidden;
    color: var(--text-dark);
}

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

/* Building scroll container */
.building {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    height: 100vh;
}

/* Floors */
.floor {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start;
}

/* Ground Floor */
.floor-ground {
    background-color: var(--ground-bg);
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    color: var(--text-dark);
}

.floor-grid-ground {
    display: grid;
    grid-template-columns: 20% 55% 20%;
    gap: 0 2.5%;
    height: 100%;
    padding: 0 clamp(20px, 3vw, 40px);
    align-items: center;
}

.domain-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    font-size: clamp(2rem, 3.5vw, 3rem);
    text-align: center;
    letter-spacing: 0.02em;
    color: var(--text-dark);
    margin: 20px 0;
}

.ornamental-rule {
    border: none;
    height: 1px;
    background-color: var(--text-dark);
    opacity: 0.3;
    margin: 16px 0;
}

.floor-note {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dark);
    opacity: 0.5;
    padding-top: 40px;
}

.floor-note-right {
    text-align: right;
}

/* B1 */
.floor-b1 {
    background-color: var(--b1-bg);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.75;
    color: var(--text-dark);
}

.floor-grid-b1 {
    display: grid;
    grid-template-columns: 20% 55%;
    gap: 0 2.5%;
    height: 100%;
    padding: 0 clamp(20px, 3vw, 40px);
    align-items: center;
}

/* B2 */
.floor-b2 {
    background-color: var(--b2-bg);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    line-height: 1.75;
    color: var(--text-dark);
}

.floor-grid-b2 {
    display: grid;
    grid-template-columns: 35% 60%;
    gap: 0 5%;
    height: 100%;
    padding: 0 clamp(20px, 3vw, 40px);
    align-items: center;
}

/* B3 */
.floor-b3 {
    background-color: var(--b3-bg);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1vw, 0.95rem);
    line-height: 1.75;
    color: var(--text-light);
}

.floor-grid-b3 {
    height: 100%;
    padding: 0 clamp(20px, 3vw, 40px);
    display: flex;
    align-items: center;
}

.grid-col-single-b3 {
    width: 65%;
}

/* B4 */
.floor-b4 {
    background-color: var(--b4-bg);
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.85rem, 0.95vw, 0.9rem);
    line-height: 1.75;
    color: var(--text-b4);
}

.floor-grid-b4 {
    height: 100%;
    padding: 0 clamp(20px, 3vw, 40px);
    display: flex;
    align-items: center;
}

.grid-col-single-b4 {
    width: 55%;
}

/* B5 */
.floor-b5 {
    background-color: var(--b5-bg);
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.8rem, 0.9vw, 0.85rem);
    line-height: 1.75;
    color: var(--text-b5);
    height: 120vh;
}

.floor-grid-b5 {
    padding: 40px clamp(20px, 3vw, 40px);
    display: flex;
    align-items: flex-start;
}

.grid-col-single-b5 {
    width: 45%;
    margin-left: 10%;
}

/* Floor text */
.floor-text {
    margin-bottom: 20px;
    max-width: 60ch;
}

.floor-text-final {
    margin-top: 40px;
    opacity: 0.7;
}

/* Floor lines */
.floor-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}

.floor-line-ground {
    height: 1px;
    background-color: var(--floor-line-light);
}

.floor-line-b1 {
    height: 2px;
    background-color: #b8b4ac;
}

.floor-line-b2 {
    height: 3px;
    background-color: var(--floor-line-dark);
}

.floor-line-b3 {
    height: 4px;
    background-color: var(--pipe-color);
}

.floor-line-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 8px;
}

/* Concrete texture */
.concrete-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#concrete);
    opacity: 0.03;
    pointer-events: none;
}

.texture-b3 { opacity: 0.05; }
.texture-b4 { opacity: 0.07; }
.texture-b5 { opacity: 0.08; }

/* Pipes */
.pipe {
    position: absolute;
    width: 3px;
    height: 100%;
    top: 0;
    background-color: var(--pipe-color);
    z-index: 2;
}

.pipe-right { right: 8%; }
.pipe-left { left: 5%; }

.pipe::before,
.pipe::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 4px;
    background-color: var(--pipe-color);
    left: -2.5px;
}

.pipe::before { top: 0; }
.pipe::after { bottom: 0; }

/* Bar counter */
.bar-counter {
    width: 80%;
    height: 3px;
    background-color: var(--bar-counter);
    margin-left: 10%;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* Depth indicator */
.depth-indicator {
    position: fixed;
    left: 20px;
    top: 0;
    height: 100vh;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 40px 0;
}

.depth-line {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 100%;
    background-color: var(--depth-line);
}

.depth-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    color: var(--depth-line);
    padding-left: 12px;
    position: relative;
    transition: color 0.1s ease, font-weight 0.1s ease;
}

.depth-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 6px;
    height: 1px;
    background-color: var(--depth-line);
}

.depth-label.active {
    font-weight: 700;
    color: var(--text-dark);
}

.depth-label.active-light {
    font-weight: 700;
    color: var(--depth-highlight);
}

/* Mobile */
@media (max-width: 768px) {
    .floor-grid-ground,
    .floor-grid-b1,
    .floor-grid-b2 {
        grid-template-columns: 1fr;
        padding: 40px 20px;
    }

    .grid-col-left,
    .grid-col-right,
    .grid-col-left-b2 {
        display: none;
    }

    .grid-col-single-b3,
    .grid-col-single-b4,
    .grid-col-single-b5 {
        width: 90%;
        margin-left: 5%;
    }

    .depth-indicator {
        display: none;
    }

    .pipe {
        display: none;
    }
}
