:root {
    --topsoil: #5a6a58;
    --filial-clay: #a08a6a;
    --platonic-slate: #8a9aaa;
    --romantic-terracotta: #9a6a5a;
    --devotional-amethyst: #6a5a7a;
    --self-amber: #c4a080;
    --communal-bedrock: #4a5a4a;
    --grief-obsidian: #2a2028;
    --core-void: #1a1818;
    --text-dark: #2a2420;
    --text-light: #e8e0d8;
    --boundary-line: #8a7a5a;
    --drill-color: rgba(245, 237, 224, 0.3);
    --dim-warm: #a89888;
    --column-offset: 55%;
}

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

body {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    color: var(--text-dark);
    overflow-x: hidden;
    min-height: 1040vh;
    background: linear-gradient(
        to bottom,
        var(--topsoil) 0%,
        var(--topsoil) 7.2%,
        var(--filial-clay) 8%,
        var(--filial-clay) 20.7%,
        var(--platonic-slate) 21.5%,
        var(--platonic-slate) 34.2%,
        var(--romantic-terracotta) 35%,
        var(--romantic-terracotta) 49.5%,
        var(--devotional-amethyst) 50.3%,
        var(--devotional-amethyst) 61.2%,
        var(--self-amber) 62%,
        var(--self-amber) 70.7%,
        var(--communal-bedrock) 71.5%,
        var(--communal-bedrock) 82.2%,
        var(--grief-obsidian) 83%,
        var(--grief-obsidian) 93.8%,
        var(--core-void) 94.6%,
        var(--core-void) 100%
    );
}

/* Mineral textures via pseudo-elements */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(138, 122, 90, 0.02) 0px,
            transparent 1px,
            transparent 3px
        );
    z-index: 0;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            45deg,
            rgba(138, 138, 138, 0.015) 0px,
            transparent 1px,
            transparent 6px
        );
    z-index: 0;
}

/* Drill line */
.drill-line {
    position: absolute;
    top: 0;
    left: var(--column-offset);
    width: 1px;
    height: 100%;
    background-color: var(--drill-color);
    z-index: 1;
    transform: translateX(-40%);
    margin-left: -20%;
}

/* Stratum boundary SVGs */
.boundary {
    position: absolute;
    left: 0;
    width: 100%;
    height: 10px;
    z-index: 2;
}

.boundary-topsoil-filial { top: calc(1040vh * 0.077); }
.boundary-filial-platonic { top: calc(1040vh * 0.212); }
.boundary-platonic-romantic { top: calc(1040vh * 0.346); }
.boundary-romantic-devotional { top: calc(1040vh * 0.500); }
.boundary-devotional-self { top: calc(1040vh * 0.615); }
.boundary-self-communal { top: calc(1040vh * 0.712); }
.boundary-communal-grief { top: calc(1040vh * 0.826); }
.boundary-grief-core { top: calc(1040vh * 0.942); }

/* Core column */
.core-column {
    position: relative;
    width: 40%;
    margin-left: var(--column-offset);
    transform: translateX(-50%);
    min-height: 1040vh;
    z-index: 3;
}

/* Strata */
.stratum {
    position: relative;
    padding: 40px 20px 60px 30px;
}

.stratum-surface {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stratum-filial { min-height: 140vh; }
.stratum-platonic { min-height: 140vh; }
.stratum-romantic { min-height: 160vh; }
.stratum-devotional { min-height: 120vh; }
.stratum-self { min-height: 100vh; }
.stratum-communal { min-height: 120vh; }
.stratum-grief { min-height: 120vh; }
.stratum-core { min-height: 60vh; }

/* Text color states */
.stratum-surface { color: var(--text-light); }
.stratum-filial { color: var(--text-dark); }
.stratum-platonic { color: var(--text-dark); }
.stratum-romantic { color: var(--text-light); }
.stratum-devotional { color: var(--text-light); }
.stratum-self { color: var(--text-dark); }
.stratum-communal { color: var(--text-light); }
.stratum-grief { color: var(--dim-warm); }
.stratum-core { color: var(--dim-warm); }

/* Depth markers */
.depth-marker {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    margin-left: -30px;
}

.depth-tick {
    display: inline-block;
    width: 20px;
    height: 0.5px;
    background-color: var(--boundary-line);
    margin-right: 8px;
}

.depth-number {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    color: var(--boundary-line);
}

/* Domain name */
.domain-name {
    font-family: 'Merriweather', Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.85;
}

/* Stratum labels */
.stratum-label {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 24px;
    color: inherit;
}

/* Body text */
.stratum-text {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.85;
    margin-bottom: 20px;
    max-width: 55ch;
    color: inherit;
}

/* Fossil marks */
.fossil-mark {
    width: 50px;
    height: 40px;
    margin-top: 20px;
}

/* Core section */
.core-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    color: var(--dim-warm);
    margin-top: 40px;
}

.core-taper {
    width: 100%;
    height: 120px;
    background-color: transparent;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    margin-top: 40px;
    border-left: 1px solid rgba(168, 152, 136, 0.2);
    border-right: 1px solid rgba(168, 152, 136, 0.2);
}

/* Mobile */
@media (max-width: 768px) {
    .core-column {
        width: 85%;
        margin-left: auto;
        margin-right: auto;
        transform: none;
    }

    .drill-line {
        left: 7.5%;
    }

    .boundary {
        display: none;
    }
}
