/* economic.wiki - Brutalist Terracotta Archive */
/* Palette: Terracotta Warm */
/* Fired Earth: #2D1810 | Kiln Cream: #F5E6D0 | Terracotta Blaze: #C4704A */
/* Dark Terracotta: #5C3D2E | Dried Clay: #8B6B5A | Sandstone Light: #E8D5C0 */
/* Scorched Umber: #1A0E08 | Fern Intrusion: #4A6741 */

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

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

body {
    font-family: 'Commissioner', sans-serif;
    background: #2D1810;
    color: #2D1810;
    overflow-x: hidden;
}

/* ======================== */
/* NAVIGATION               */
/* ======================== */

.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #2D1810;
    border-bottom: 4px solid #C4704A;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
}

.nav-title {
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #F5E6D0;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 400;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #E8D5C0;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 3px solid transparent;
}

.nav-links a:hover {
    border-bottom: 3px solid #C4704A;
}

/* ======================== */
/* SCROLL CONTAINER          */
/* ======================== */

.scroll-container {
    padding-top: 68px; /* nav height + border */
}

/* ======================== */
/* SLAB DIVIDERS             */
/* ======================== */

.slab-divider {
    height: 4px;
    background: #5C3D2E;
    width: 100%;
}

/* ======================== */
/* SLABS - BASE              */
/* ======================== */

.slab {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* ======================== */
/* MONUMENT SLABS            */
/* ======================== */

.monument-slab {
    background: #1A0E08;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
}

.monument-slab--dark {
    background: #2D1810;
}

/* Duotone container */
.duotone-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Concrete texture overlay */
.concrete-texture {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    opacity: 0.4;
    z-index: 1;
    pointer-events: none;
}

/* Botanical watermark on monument slabs */
.botanical-watermark {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    opacity: 0.05;
    z-index: 1;
    pointer-events: none;
}

.botanical-watermark .botanical-path {
    stroke: #F5E6D0;
}

/* Monument content positioning */
.monument-content {
    position: relative;
    z-index: 2;
    padding: 24px;
}

.monument-content h1 {
    font-weight: 900;
    font-size: clamp(72px, 12vw, 120px);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 0.92;
    color: #F5E6D0;
}

.monument-content .subheading {
    font-weight: 600;
    font-size: clamp(20px, 3vw, 32px);
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #C4704A;
    margin-top: 24px;
}

/* Bleed left - title bleeds off left edge */
.monument-content--bleed-left {
    position: absolute;
    left: -5%;
    bottom: 24px;
    max-width: 80%;
}

/* Bottom right - crowded against bottom right */
.monument-content--bottom-right {
    position: absolute;
    right: 48px;
    bottom: 24px;
    text-align: right;
    max-width: 70%;
}

/* Center bleed */
.monument-content--center-bleed {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
}

/* Bleed left bottom */
.monument-content--bleed-left-bottom {
    position: absolute;
    left: -3%;
    bottom: 48px;
    max-width: 75%;
}

/* Center bottom */
.monument-content--center-bottom {
    position: absolute;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    text-align: center;
    width: 85%;
}

/* ======================== */
/* ARCHIVE SLABS             */
/* ======================== */

.archive-slab {
    background: #F5E6D0;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    position: relative;
}

.archive-slab--dark {
    background: #2D1810;
}

/* Archive grid - gap-as-border technique */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    background: #5C3D2E;
    width: 100%;
    padding: 4px;
}

.archive-grid--dark {
    background: #5C3D2E;
}

/* Grid cells */
.grid-cell {
    background: #F5E6D0;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.grid-cell--dark {
    background: #2D1810;
}

/* Column spans */
.span-4 {
    grid-column: span 4;
}

.span-6 {
    grid-column: span 6;
}

.span-8 {
    grid-column: span 8;
}

/* ======================== */
/* TYPOGRAPHY                */
/* ======================== */

.subheading {
    font-weight: 600;
    font-size: clamp(22px, 2.5vw, 32px);
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: #C4704A;
    margin-bottom: 16px;
}

.body-text {
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    color: #2D1810;
    max-width: 640px;
    margin-bottom: 16px;
}

.body-text:last-child {
    margin-bottom: 0;
}

.body-text--light {
    color: #E8D5C0;
}

.caption {
    font-weight: 300;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8B6B5A;
    display: block;
    margin-bottom: 12px;
}

.caption--light {
    color: #8B6B5A;
}

/* ======================== */
/* COUNTER BLOCKS            */
/* ======================== */

.counter-block {
    margin-bottom: 32px;
}

.counter-block:last-child {
    margin-bottom: 0;
}

.counter-number {
    display: block;
    font-weight: 900;
    font-size: clamp(72px, 10vw, 144px);
    line-height: 1;
    color: #4A6741;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

/* ======================== */
/* BOTANICAL ELEMENTS        */
/* ======================== */

/* Margin botanical illustrations */
.botanical-margin {
    position: absolute;
    width: 60px;
    height: 400px;
    z-index: 5;
    pointer-events: none;
}

.botanical-margin--right {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.botanical-margin--left {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.botanical-margin .botanical-path {
    stroke: #4A6741;
    fill: none;
    stroke-width: 1;
}

/* Fern divider */
.fern-divider {
    width: 100%;
    height: 20px;
    position: absolute;
    bottom: 32px;
    left: 0;
    z-index: 5;
    pointer-events: none;
}

.fern-divider .botanical-path {
    stroke: #4A6741;
    fill: none;
    stroke-width: 1;
}

/* SVG path draw animation state */
.botanical-path {
    stroke-dasharray: var(--path-length, 1000);
    stroke-dashoffset: var(--path-length, 1000);
    transition: none;
}

.botanical-path.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 3000ms ease-out;
}

/* ======================== */
/* SLAB REVEAL ANIMATION     */
/* ======================== */

.archive-slab .archive-grid {
    opacity: 0;
    transition: opacity 400ms ease-out;
}

.archive-slab.slab-visible .archive-grid {
    opacity: 1;
}

/* ======================== */
/* RESPONSIVE                */
/* ======================== */

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .archive-grid {
        grid-template-columns: repeat(12, 1fr);
    }

    .span-4,
    .span-6,
    .span-8 {
        grid-column: span 12;
    }

    .monument-content--bleed-left,
    .monument-content--bleed-left-bottom {
        left: 0;
        padding: 24px;
        max-width: 100%;
    }

    .monument-content--bottom-right {
        right: 24px;
        max-width: 90%;
    }

    .monument-content--center-bottom {
        width: 95%;
    }

    .botanical-margin {
        display: none;
    }

    .counter-number {
        font-size: clamp(48px, 15vw, 96px);
    }
}

@media (max-width: 600px) {
    .monument-content h1 {
        font-size: clamp(48px, 14vw, 80px);
    }

    .monument-content .subheading {
        font-size: 18px;
    }

    .grid-cell {
        padding: 20px;
    }

    .body-text {
        font-size: 15px;
    }
}
