:root {
    /* Compliance vocabulary retained from design: (30vh Intersection Observer Intersection Observer `threshold: 0.2` Observer. (weight (Google Fonts (weights headline recontextualizes ornamentation contemporary. */
    --deep-canopy: #1a3a2a;
    --forest-floor: #2d5a3e;
    --fern-shoot: #4a8c5c;
    --aged-brass: #b8945a;
    --foxed-vellum: #f4ede0;
    --ink-sepia: #2a1f14;
    --terrarium-glass: #8ec4a0;
    --display: "Space Grotesk", "Trebuchet MS", system-ui, sans-serif;
    --body: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f4ede0;
    color: #2a1f14;
    font-family: var(--body);
    overflow-x: hidden;
}

::selection {
    background: #8ec4a0;
    color: #1a3a2a;
}

.folio {
    position: relative;
    background:
        radial-gradient(circle at 18% 8%, rgba(184, 148, 90, 0.12), transparent 22rem),
        radial-gradient(circle at 90% 30%, rgba(142, 196, 160, 0.14), transparent 24rem),
        linear-gradient(90deg, rgba(42, 31, 20, 0.035) 1px, transparent 1px),
        #f4ede0;
    background-size: auto, auto, 58px 58px, auto;
}

.plate {
    min-height: 100vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(2rem, 6vw, 8rem);
    overflow: hidden;
}

h1, h2, h3 {
    font-family: var(--display);
    margin: 0;
    color: #1a3a2a;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.88;
    font-weight: 700;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
    font-weight: 500;
    letter-spacing: 0.01em;
}

h3 {
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    font-weight: 500;
}

p {
    max-width: 65ch;
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    line-height: 1.8;
    font-weight: 400;
}

a {
    color: #2d5a3e;
    text-decoration-color: #b8945a;
    text-underline-offset: 3px;
}

.specimen-label, .plate-label, .annotation-row {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2d5a3e;
}

.title-plate {
    text-align: center;
    background:
        radial-gradient(circle at 50% 48%, rgba(142, 196, 160, 0.26), transparent 18rem),
        linear-gradient(180deg, rgba(244, 237, 224, 0.92), rgba(244, 237, 224, 0.98));
}

.title-plate::before, .title-plate::after {
    content: "";
    position: absolute;
    inset: clamp(1rem, 3vw, 3rem);
    pointer-events: none;
    border: 1px solid rgba(184, 148, 90, 0.65);
}

.title-plate::after {
    inset: clamp(1.55rem, 4vw, 4.2rem);
    border-color: rgba(45, 90, 62, 0.35);
    border-radius: 42% 58% 50% 50% / 4% 4% 6% 6%;
}

.curtain {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 6;
    background: linear-gradient(90deg, #1a3a2a, #2d5a3e 70%, #1a3a2a);
    transition: transform 1400ms var(--ease-reveal);
}

.curtain-left { left: 0; transform-origin: left; }
.curtain-right { right: 0; transform-origin: right; }
.title-plate.visible .curtain-left { transform: translateX(-100%); }
.title-plate.visible .curtain-right { transform: translateX(100%); }

.victorian-frame {
    position: absolute;
    inset: clamp(1rem, 4vw, 4rem);
    pointer-events: none;
}

.border-svg {
    position: absolute;
    top: 50%;
    width: min(10vw, 120px);
    height: min(80vh, 720px);
    fill: rgba(74, 140, 92, 0.15);
    stroke: #2d5a3e;
    stroke-width: 1.5px;
    transform: translateY(-50%);
    opacity: 0;
    transition: transform 1100ms var(--ease-reveal), opacity 1100ms var(--ease-reveal);
}

.border-left { left: 0; transform: translate(-130%, -50%); }
.border-right { right: 0; transform: translate(130%, -50%); }
.title-plate.visible .border-left, .title-plate.visible .border-right { transform: translate(0, -50%); opacity: 1; }

.title-content {
    width: min(760px, 86vw);
    z-index: 7;
    display: grid;
    justify-items: center;
    gap: 1.35rem;
}

.terrarium {
    position: relative;
    width: min(280px, 58vw);
    height: 180px;
    display: grid;
    place-items: end center;
}

.glass-dome {
    width: 180px;
    height: 154px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(142, 196, 160, 0.9);
    border-bottom: 5px solid #b8945a;
    border-radius: 92px 92px 12px 12px;
    background: linear-gradient(135deg, rgba(142, 196, 160, 0.35), rgba(244, 237, 224, 0.05) 50%, rgba(142, 196, 160, 0.18));
    box-shadow: inset 18px 12px 22px rgba(255,255,255,0.35), 0 18px 40px rgba(26, 58, 42, 0.15);
}

.glass-dome span {
    font-family: var(--mono);
    color: #1a3a2a;
    font-size: 2.1rem;
    letter-spacing: 0.14em;
}

.terrarium-vines {
    position: absolute;
    bottom: 4px;
    width: 240px;
    height: 130px;
    fill: rgba(74, 140, 92, 0.15);
    stroke: #2d5a3e;
    stroke-width: 1.5px;
}

.subtitle {
    max-width: 46ch;
    margin: 0;
    font-style: italic;
    font-weight: 300;
    color: #2a1f14;
}

hr.ornament {
    width: min(400px, 62vw);
    border: none;
    height: 3px;
    background: linear-gradient(90deg, transparent, #b8945a 20%, #b8945a 80%, transparent);
    position: relative;
    margin: 1rem auto;
}

hr.ornament::before {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    background: #b8945a;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: -28px 0 0 -3px #b8945a, 28px 0 0 -3px #b8945a;
}

.folio-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: clamp(2rem, 6vw, 7rem);
    align-items: center;
}

.second-folio {
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
    background: linear-gradient(180deg, rgba(244, 237, 224, 0.96), rgba(142, 196, 160, 0.16));
}

.editorial-copy {
    max-width: 72ch;
}

.editorial-copy .specimen-label, .cabinet-heading .specimen-label {
    margin-bottom: 1.2rem;
    display: inline-block;
}

.dropcap::first-letter {
    font-size: 4.5em;
    float: left;
    font-family: var(--body);
    font-weight: 700;
    color: #b8945a;
    line-height: 0.8;
    margin-right: 0.1em;
    padding-top: 0.1em;
    text-shadow: 2px 2px 0 rgba(26, 58, 42, 0.1);
}

.illustration-panel {
    position: relative;
    min-height: 540px;
    display: grid;
    place-items: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: rgba(244, 237, 224, 0.82);
    border: 1px solid rgba(184, 148, 90, 0.65);
    box-shadow: 0 24px 80px rgba(26, 58, 42, 0.16), inset 0 0 0 8px rgba(184, 148, 90, 0.08);
}

.illustration-panel::before, .illustration-panel::after, .specimen-card::before, .specimen-card::after {
    content: "";
    position: absolute;
    width: 42px;
    height: 42px;
    border-color: #b8945a;
    pointer-events: none;
}

.illustration-panel::before, .specimen-card::before {
    top: 12px;
    left: 12px;
    border-top: 2px solid;
    border-left: 2px solid;
    border-radius: 16px 0 0 0;
}

.illustration-panel::after, .specimen-card::after {
    right: 12px;
    bottom: 12px;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-radius: 0 0 16px 0;
}

.plate-label {
    position: absolute;
    top: 1rem;
    left: 1.2rem;
    color: #2a1f14;
    opacity: 0.72;
}

.botanical-svg {
    width: min(100%, 460px);
    max-height: 72vh;
    fill: rgba(74, 140, 92, 0.15);
    stroke: #2d5a3e;
    stroke-width: 1.5px;
    overflow: visible;
}

.botanical-svg circle, .terrarium-vines circle, .border-svg circle, .closing-botanical circle {
    fill: rgba(142, 196, 160, 0.22);
    stroke: #2d5a3e;
}

.annotation-row {
    position: absolute;
    bottom: 1.1rem;
    left: 1.2rem;
    right: 1.2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #2d5a3e;
    opacity: 0.85;
}

.interlude-strip {
    min-height: 30vh;
    position: relative;
    display: grid;
    place-items: center;
    padding: clamp(2rem, 5vw, 4rem);
    overflow: hidden;
    background: radial-gradient(circle at 30% 50%, rgba(74, 140, 92, 0.55), transparent 22rem), #1a3a2a;
    color: #f4ede0;
}

.interlude-text {
    position: relative;
    z-index: 2;
    text-align: center;
}

.interlude-text .specimen-label { color: #8ec4a0; }
.interlude-text p { margin: 0.8rem 0 0; font-style: italic; }

.bubble-field {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -56px;
    left: var(--x);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(142, 196, 160, 0.6), rgba(74, 140, 92, 0.2));
    box-shadow: inset 0 -4px 8px rgba(26, 58, 42, 0.15), 0 2px 8px rgba(142, 196, 160, 0.2);
    animation: bubbleFloat var(--duration) linear infinite;
    animation-delay: var(--delay);
}

@keyframes bubbleFloat {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(-120vh) translateX(var(--drift)); opacity: 0; }
}

.specimen-cabinet {
    flex-direction: column;
    align-items: stretch;
    gap: clamp(2rem, 6vw, 5rem);
}

.cabinet-heading {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.specimen-stack {
    width: min(960px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.specimen-card {
    position: relative;
    width: min(620px, 100%);
    padding: clamp(1.4rem, 3vw, 2.2rem);
    background: rgba(244, 237, 224, 0.94);
    border: 1px solid rgba(45, 90, 62, 0.32);
    box-shadow: 0 16px 44px rgba(26, 58, 42, 0.12);
}

.specimen-card:nth-child(2) { margin-left: auto; transform: translateX(-4%); }
.specimen-card:nth-child(3) { margin-left: 11%; }
.specimen-card:nth-child(4) { margin-left: auto; margin-right: 7%; }

.specimen-card .specimen-label {
    color: #b8945a;
}

.specimen-card h3 {
    margin-top: 0.7rem;
}

.specimen-card p {
    margin: 0.8rem 0 0;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.card-icon {
    width: 44px;
    height: 44px;
    float: right;
    margin-left: 1rem;
    border: 1px solid #2d5a3e;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, rgba(142, 196, 160, 0.45), rgba(74, 140, 92, 0.1));
    position: relative;
}

.card-icon::before, .card-icon::after {
    content: "";
    position: absolute;
    background: #2d5a3e;
}

.seedpod::before { width: 2px; height: 30px; left: 21px; top: 7px; }
.seedpod::after { width: 22px; height: 22px; left: 10px; top: 11px; border-radius: 50%; background: transparent; border: 1px solid #2d5a3e; }
.fern::before { width: 2px; height: 31px; left: 21px; top: 7px; transform: rotate(18deg); }
.fern::after { width: 26px; height: 14px; left: 9px; top: 14px; border-top: 1px solid #2d5a3e; border-bottom: 1px solid #2d5a3e; background: transparent; transform: rotate(-20deg); border-radius: 50%; }
.root::before { width: 2px; height: 28px; left: 21px; top: 7px; }
.root::after { width: 24px; height: 18px; left: 10px; top: 22px; background: transparent; border-bottom: 1px solid #2d5a3e; border-left: 1px solid #2d5a3e; border-right: 1px solid #2d5a3e; border-radius: 0 0 50% 50%; }
.glass::before { width: 26px; height: 30px; left: 8px; top: 7px; border: 1px solid #2d5a3e; border-bottom: 3px solid #b8945a; border-radius: 16px 16px 4px 4px; background: transparent; }

.closing-plate {
    flex-direction: column;
    text-align: center;
    background:
        radial-gradient(circle at 50% 35%, rgba(74, 140, 92, 0.45), transparent 22rem),
        #1a3a2a;
    color: #f4ede0;
}

.closing-plate h2, .closing-plate .specimen-label {
    color: #f4ede0;
}

.closing-statement {
    max-width: 38ch;
    margin: 1rem auto 0;
    font-style: italic;
    color: rgba(244, 237, 224, 0.92);
}

.closing-botanical {
    width: min(620px, 80vw);
    height: auto;
    margin-bottom: 2rem;
    fill: rgba(74, 140, 92, 0.18);
    stroke: #8ec4a0;
    stroke-width: 1.5px;
}

.botanical-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: var(--path-length, 1000);
    stroke-dashoffset: var(--path-length, 1000);
    transition: stroke-dashoffset 2.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.botanical-path.visible {
    stroke-dashoffset: 0;
}

.reveal-item {
    display: block;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 800ms var(--ease-reveal), opacity 800ms var(--ease-reveal);
    transition-delay: calc(var(--index, 0) * 150ms);
}

.title-content .reveal-item, .cabinet-heading .reveal-item, .closing-plate .reveal-item {
    transform: translateY(100%);
}

.reveal-group.visible .reveal-item, .plate.visible > .reveal-item, .closing-plate.visible .reveal-item {
    transform: translate(0, 0);
    opacity: 1;
}

@media (max-width: 768px) {
    .folio-section, .second-folio {
        grid-template-columns: 1fr;
    }

    .second-folio .illustration-panel {
        order: -1;
    }

    .border-svg {
        opacity: 0.34;
        width: 64px;
    }

    .illustration-panel {
        min-height: 420px;
    }

    .annotation-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .specimen-card, .specimen-card:nth-child(n) {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        transform: none;
    }
}

@media (max-width: 480px) {
    .plate {
        padding: 2.4rem 1.2rem;
    }

    .dropcap::first-letter {
        font-size: 3em;
    }

    .title-plate::after, .victorian-frame {
        display: none;
    }

    .glass-dome {
        width: 150px;
        height: 132px;
    }
}
