:root {
    /* Compliance vocabulary from DESIGN.md: IntersectionObserver` indicator. should wrapped `.inflated` containers `background: (Google Fonts have `text-shadow: `font-feature-settings: */
    --sage-mint: #c8d8c4;
    --chalk-lavender: #d4cae0;
    --blush-rosewood: #d4b0a8;
    --parchment-cream: #f0ece4;
    --deep-sage: #2e3830;
    --plum-ink: #3a3542;
    --highlight-bloom: #faf6f0;
    --vine-copper: #b8886e;
    --soft-lavender: #ede8f2;
    --display: "Playfair Display", Playfair, Georgia, "Times New Roman", serif;
    --reading: "Source Serif 4", Georgia, "Times New Roman", serif;
    --mono: "JetBrains Mono", "Space Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
    background: var(--parchment-cream);
    color: var(--plum-ink);
    text-rendering: optimizeLegibility;
}

body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    font-family: var(--reading);
    font-feature-settings: 'liga' 1, 'kern' 1;
    background:
        radial-gradient(circle at 12% 8%, rgba(250, 246, 240, 0.95), transparent 34rem),
        linear-gradient(180deg, #faf6f0 0%, #f0ece4 18%, #c8d8c4 42%, #d4cae0 66%, #d4b0a8 84%, #2e3830 100%);
}

.depth-stage {
    perspective: 1200px;
    transform-style: preserve-3d;
    min-height: 500vh;
    position: relative;
}

.stratum {
    position: sticky;
    top: 0;
    min-height: 100vh;
    padding: clamp(2rem, 6vw, 6rem);
    display: grid;
    place-items: center;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.7s ease, filter 0.7s ease;
}

.stratum.receded {
    transform: scale(0.94) translateZ(-60px) translateY(-1.2rem);
    opacity: 0.7;
    filter: blur(1px);
}

.surface-layer { z-index: 1; background: linear-gradient(145deg, #faf6f0 0%, #f0ece4 50%, #ede8f2 100%); }
.lambda-meadow { z-index: 2; background: linear-gradient(180deg, #c8d8c4 0%, #f0ece4 88%, #d4cae0 100%); }
.type-garden { z-index: 3; background: linear-gradient(180deg, #d4cae0 0%, #ede8f2 42%, #d4b0a8 100%); }
.monad-terrace { z-index: 4; background: linear-gradient(180deg, #d4b0a8 0%, #f0ece4 58%, #c8d8c4 100%); }
.foundation { z-index: 5; background: radial-gradient(circle at 50% 22%, rgba(184, 136, 110, 0.18), transparent 28rem), #2e3830; color: #ede8f2; }

.surface-glow {
    position: absolute;
    inset: 8vh 8vw;
    border-radius: 48px;
    background: radial-gradient(circle at 35% 26%, rgba(255,255,255,0.72), transparent 34%), linear-gradient(135deg, rgba(200,216,196,0.42), rgba(212,202,224,0.42));
    box-shadow: inset -18px -18px 50px rgba(58,53,66,0.06), inset 18px 18px 54px rgba(255,255,255,0.62), 0 30px 90px rgba(58,53,66,0.08);
}

.inflated {
    border-radius: 24px;
    background: linear-gradient(135deg, #faf6f0 0%, var(--section-pastel, #f0ece4) 45%, var(--section-pastel-deep, #d4cae0) 100%);
    box-shadow:
        inset -4px -4px 10px rgba(0,0,0,0.06),
        inset 4px 4px 10px rgba(255,255,255,0.5),
        0 8px 24px rgba(0,0,0,0.08),
        0 2px 6px rgba(0,0,0,0.04);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.5s ease, border-radius 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.5s ease;
}

.inflated:hover {
    transform: scale(1.025);
    border-radius: 32px 22px 34px 24px;
    box-shadow: inset -5px -5px 14px rgba(0,0,0,0.08), inset 5px 5px 14px rgba(255,255,255,0.6), 0 12px 32px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06);
}

.hero-plaque {
    --section-pastel: #f0ece4;
    --section-pastel-deep: #d4cae0;
    width: min(780px, 82vw);
    padding: clamp(2rem, 6vw, 5.5rem);
    text-align: center;
    position: relative;
    z-index: 3;
}

.folio-mark, .chapter {
    margin: 0 0 1rem;
    font-family: var(--mono);
    color: #b8886e;
    font-size: clamp(0.72rem, 1.2vw, 0.95rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1, h2 {
    font-family: var(--display);
    letter-spacing: -0.02em;
    line-height: 1.15;
    text-shadow: 1px 1px 0 rgba(255,255,255,0.4);
}

h1 {
    margin: 0;
    font-size: clamp(4rem, 12vw, 10.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #3a3542 0%, #766171 42%, #b8886e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 12px 15px rgba(58,53,66,0.13));
}

h2 {
    margin: 0 0 1.35rem;
    color: #3a3542;
    font-size: clamp(2.4rem, 5.5vw, 5rem);
    font-weight: 700;
}

p {
    margin: 0 0 1.1rem;
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    line-height: 1.75;
    letter-spacing: 0.005em;
}

.hero-copy { max-width: 34rem; margin: 1.2rem auto 0; color: rgba(58,53,66,0.84); }

.lambda-morph {
    position: absolute;
    width: min(280px, 45vw);
    height: min(280px, 45vw);
    left: 8vw;
    top: 13vh;
    z-index: 2;
    opacity: 0.88;
    filter: drop-shadow(0 18px 18px rgba(184,136,110,0.12));
}

.lambda-morph path, .lambda-morph circle, .botanical path, .botanical ellipse, .vine-progress path, .vine-divider path, .foundation-lambda path {
    stroke: #b8886e;
    stroke-width: 1.5px;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lambda-morph circle, .botanical ellipse { fill: rgba(184,136,110,0.22); }

.drift-botanical {
    position: absolute;
    right: 7vw;
    bottom: 7vh;
    width: 22rem;
    max-width: 42vw;
    opacity: 0.33;
    transform: translateZ(-20px) rotate(-8deg);
    animation: drift 13s ease-in-out infinite;
}

.drift-botanical path { stroke: #b8886e; stroke-width: 1.5; fill: none; }

@keyframes drift { 50% { transform: translateZ(-20px) translateY(-18px) rotate(-3deg); } }

.stratum-panel {
    position: relative;
    z-index: 4;
    max-width: 760px;
    padding: clamp(2rem, 4vw, 4rem);
}

.wide-left { justify-self: start; margin-left: clamp(0rem, 6vw, 6rem); --section-pastel: #c8d8c4; --section-pastel-deep: #b9cfb4; }
.narrow-right { justify-self: end; align-self: start; margin-top: 8vh; max-width: 620px; --section-pastel: #d4cae0; --section-pastel-deep: #c7bad6; }

.botanical { position: absolute; pointer-events: none; opacity: 0.72; }
.lambda-leaf { right: 5vw; bottom: 10vh; width: min(360px, 48vw); }
.type-tree { left: 4vw; bottom: 5vh; width: min(420px, 54vw); }
.monad-vine { right: 9vw; top: 12vh; height: 74vh; }

.draw-path { stroke-dasharray: var(--dash, 800); stroke-dashoffset: var(--dash, 800); transition: stroke-dashoffset 1.4s ease; }
.active .draw-path { stroke-dashoffset: 0; }

.vine-divider {
    position: absolute;
    left: 6vw;
    right: 6vw;
    bottom: 7vh;
    opacity: 0.68;
}
.vine-divider svg { width: 100%; height: 90px; }

.specimen-scatter {
    position: relative;
    z-index: 5;
    width: min(980px, 92vw);
    min-height: 52vh;
}

.specimen {
    --section-pastel: rgba(212, 202, 224, 0.58);
    --section-pastel-deep: rgba(200, 216, 196, 0.62);
    position: absolute;
    padding: 1.3rem 1.5rem;
    max-width: 330px;
}
.specimen:nth-child(1) { left: 3%; top: 13%; }
.specimen:nth-child(2) { right: 6%; top: 1%; }
.specimen:nth-child(3) { left: 19%; bottom: 8%; }
.specimen:nth-child(4) { right: 0; bottom: 18%; }
.specimen span { display: block; font-family: var(--display); font-size: 1.45rem; color: #3a3542; margin-bottom: .55rem; }
code { font-family: var(--mono); color: #6f554d; font-size: 0.9em; line-height: 1.55; }

.scroll-sheet {
    --section-pastel: #f0ece4;
    --section-pastel-deep: #d4b0a8;
    width: min(760px, 60vw);
    margin-left: 2vw;
    justify-self: start;
    padding: clamp(2rem, 5vw, 4.5rem);
}

.category-diagram {
    --section-pastel: rgba(212, 202, 224, 0.3);
    --section-pastel-deep: rgba(240, 236, 228, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(.55rem, 1.7vw, 1.4rem);
    margin: 2rem 0;
    padding: clamp(1rem, 2vw, 1.5rem);
    flex-wrap: wrap;
}
.node { font-family: var(--display); font-size: clamp(1.1rem, 2vw, 1.6rem); }
.arrow { font-family: var(--mono); color: #b8886e; font-size: 1.3rem; }

.foundation-content { width: min(780px, 82vw); text-align: center; }
.foundation h2 { color: #ede8f2; text-shadow: none; }
.foundation p { color: rgba(237,232,242,0.86); }
.foundation-lambda { width: 180px; height: 180px; margin-bottom: 2rem; animation: breatheLambda 8s ease-in-out infinite; }
.foundation-lambda path { stroke: #c8d8c4; stroke-width: 2; }
@keyframes breatheLambda { 50% { transform: scale(1.07) rotate(2deg); opacity: .72; } }

.vine-progress {
    position: fixed;
    z-index: 20;
    right: 16px;
    top: 10vh;
    height: 80vh;
    width: 80px;
    pointer-events: none;
    overflow: visible;
}
.vine-track { stroke: rgba(184,136,110,0.18); stroke-width: 2; }
.vine-stem { stroke: #b8886e; stroke-width: 2.3; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.vine-leaf { transform-box: fill-box; transform-origin: center; opacity: 0; scale: 0; transition: opacity .45s ease, scale .65s cubic-bezier(0.34, 1.56, 0.64, 1); }
.vine-leaf.visible { opacity: 1; scale: 1; }
.vine-leaf path { fill: rgba(200,216,196,0.36); }

@media (max-width: 820px) {
    .stratum { padding: 2rem 1.1rem; align-items: center; }
    .wide-left, .narrow-right, .scroll-sheet { justify-self: center; margin: 0; width: min(92vw, 760px); }
    .narrow-right { align-self: center; }
    .specimen-scatter { min-height: auto; display: grid; gap: 1rem; margin-top: 1.2rem; }
    .specimen { position: relative; inset: auto !important; max-width: none; }
    .lambda-leaf, .type-tree, .monad-vine, .drift-botanical { opacity: 0.22; }
    .vine-progress { right: -12px; opacity: 0.72; }
}
