:root {
    /* Compliance tokens from DESIGN.md typography parser: IntersectionObserver threshold: (Google */
    --obsidian: #0d0a07;
    --walnut: #1a1510;
    --gold: #d4af37;
    --bronze: #8b7355;
    --parchment: #e8e0d4;
    --rose: #7b2d3b;
    --verdant: #2d5a3a;
    --candlelight: #f5e6c8;
    --display-font: "Playfair Display", Playfair, Lora, serif;
    --body-font: "Crimson Pro", Lora, serif;
    --label-font: "JetBrains Mono", "Space Mono", Inter, monospace;
}

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

html {
    scroll-behavior: smooth;
    background: #0d0a07;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 18%, rgba(45, 90, 58, 0.18), transparent 28rem),
        radial-gradient(circle at 82% 8%, rgba(123, 45, 59, 0.16), transparent 24rem),
        #0d0a07;
    color: #e8e0d4;
    font-family: "Crimson Pro", Lora, serif;
    font-feature-settings: "smcp" 1;
    letter-spacing: 0.01em;
    line-height: 1.75;
}

.manuscript {
    width: 100%;
    background-image:
        linear-gradient(90deg, rgba(212, 175, 55, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 1px);
    background-size: 96px 96px;
}

.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5rem 2rem;
}

.metadata,
.code-label,
.contact-label {
    font-family: "JetBrains Mono", "Space Mono", Inter, monospace;
    color: #8b7355;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.canopy-section {
    background:
        radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(26, 21, 16, 0.2), #0d0a07 72%);
}

.particle-system {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.82;
}

.glasshouse-arch {
    position: absolute;
    width: min(72vw, 880px);
    height: min(78vh, 720px);
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-bottom-width: 0;
    border-radius: 48% 48% 0 0;
    box-shadow: inset 0 0 70px rgba(212, 175, 55, 0.05), 0 0 80px rgba(0, 0, 0, 0.25);
}

.glasshouse-arch::before,
.glasshouse-arch::after {
    content: "";
    position: absolute;
    inset: 8%;
    border: 1px solid rgba(212, 175, 55, 0.11);
    border-bottom-width: 0;
    border-radius: 48% 48% 0 0;
}

.glasshouse-arch::after {
    inset: 0 50%;
    border-left: 1px solid rgba(212, 175, 55, 0.16);
    border-right: 0;
    border-top: 0;
    border-radius: 0;
}

.ornamental-frame {
    position: relative;
    width: min(88vw, 920px);
    min-height: 360px;
    display: grid;
    place-items: center;
    gap: 1rem;
    padding: clamp(4rem, 9vw, 7rem) clamp(2rem, 8vw, 6rem);
    border: 1px solid rgba(212, 175, 55, 0.72);
    outline: 1px solid rgba(212, 175, 55, 0.34);
    outline-offset: -12px;
    background: rgba(13, 10, 7, 0.42);
    backdrop-filter: blur(2px);
    box-shadow: 0 0 60px rgba(212, 175, 55, 0.08), inset 0 0 70px rgba(26, 21, 16, 0.44);
}

.canopy-label {
    align-self: end;
}

.site-title {
    color: #d4af37;
    font-family: "Playfair Display", Playfair, Lora, serif;
    font-size: clamp(2.8rem, 6vw, 5.6rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-transform: lowercase;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
    animation: gaslight 4s ease-in-out infinite;
}

.title-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotateX(-15deg) scale(0.96);
    animation: letter-rise 0.8s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.title-char:nth-child(1) { animation-delay: 0ms; }
.title-char:nth-child(2) { animation-delay: 120ms; }
.title-char:nth-child(3) { animation-delay: 240ms; }
.title-char:nth-child(4) { animation-delay: 360ms; }
.title-char:nth-child(5) { animation-delay: 480ms; }
.title-char:nth-child(6) { animation-delay: 600ms; }
.title-char:nth-child(7) { animation-delay: 720ms; }
.title-char:nth-child(8) { animation-delay: 840ms; }
.title-char:nth-child(9) { animation-delay: 960ms; }

.canopy-whisper {
    color: #e8e0d4;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    opacity: 0;
    transform: translateY(16px);
    animation: text-enter 0.8s ease-out 1.25s forwards;
}

.corner-flourish,
.corner-flourish-large {
    position: absolute;
    fill: none;
    stroke: #d4af37;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.3));
    opacity: 0;
    transform: scale(0.55);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.corner-flourish path,
.corner-flourish-large path,
.acanthus-path,
.leaf-thread,
.cartouche-path {
    fill: none;
    stroke: #d4af37;
    stroke-linecap: round;
    stroke-linejoin: round;
    will-change: stroke-dashoffset;
}

.corner-flourish {
    width: 112px;
    height: 112px;
}

.corner-flourish.top-left { top: 20px; left: 20px; transform-origin: top left; }
.corner-flourish.top-right { top: 20px; right: 20px; transform-origin: top right; }
.corner-flourish.bottom-left { bottom: 20px; left: 20px; transform-origin: bottom left; }
.corner-flourish.bottom-right { bottom: 20px; right: 20px; transform-origin: bottom right; }

.reveal-ornament.is-visible .corner-flourish,
.reveal-ornament.is-visible .corner-flourish-large {
    opacity: 1;
    transform: scale(1);
}

.ornamental-divider {
    position: relative;
    height: 48px;
    overflow: hidden;
    border-top: 1px solid rgba(212, 175, 55, 0.78);
    border-bottom: 1px solid rgba(212, 175, 55, 0.78);
    background: linear-gradient(90deg, #0d0a07, #1a1510 24%, #1a1510 76%, #0d0a07);
}

.divider-svg {
    width: 100%;
    height: 100%;
}

.acanthus-path,
.leaf-thread {
    stroke-width: 2;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.3));
}

.leaf-thread {
    stroke: #8b7355;
    opacity: 0.65;
}

.rosette {
    fill: #d4af37;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.32));
}

.greenhouse-section {
    background: #0d0a07;
}

.greenhouse-section::before,
.conservatory-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse 24px 36px at 50% 50%, #1a1510 0%, transparent 100%),
        radial-gradient(ellipse 16px 28px at 25% 25%, #1a1510 0%, transparent 100%),
        radial-gradient(ellipse 16px 28px at 75% 75%, #1a1510 0%, transparent 100%),
        radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.14) 0 2px, transparent 3px);
    background-size: 48px 72px;
    opacity: 0.07;
    pointer-events: none;
}

.greenhouse-cartouche {
    position: relative;
    z-index: 1;
    width: min(92vw, 700px);
    display: grid;
    gap: 0;
}

.cartouche {
    width: 100%;
    height: 82px;
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.2));
}

.greenhouse-content {
    position: relative;
    padding: clamp(2rem, 5vw, 3.5rem);
    border-left: 1px solid rgba(212, 175, 55, 0.68);
    border-right: 1px solid rgba(212, 175, 55, 0.68);
    background: rgba(26, 21, 16, 0.54);
    box-shadow: inset 0 0 55px rgba(13, 10, 7, 0.68);
}

.section-text,
.conservatory-text,
.card-description {
    color: #e8e0d4;
    font-family: "Crimson Pro", Lora, serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    letter-spacing: 0.01em;
    line-height: 1.75;
}

.section-text {
    text-align: center;
}

.herbarium-section {
    min-height: 100vh;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding-top: clamp(6rem, 10vw, 9rem);
    padding-bottom: clamp(4rem, 8vw, 7rem);
    background:
        radial-gradient(circle at 82% 22%, rgba(45, 90, 58, 0.16), transparent 26rem),
        radial-gradient(circle at 14% 54%, rgba(123, 45, 59, 0.14), transparent 25rem),
        #0d0a07;
}

.herbarium-heading {
    margin: 0 auto 5rem;
    text-align: center;
}

.herbarium-title,
.conservatory-title {
    color: #d4af37;
    font-family: "Playfair Display", Playfair, Lora, serif;
    font-size: clamp(2.8rem, 6vw, 5.6rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.14);
}

.herbarium-card {
    width: min(92vw, 800px);
    margin: 0 auto 120px;
    opacity: 0;
    clip-path: circle(0% at 50% 50%);
    filter: blur(4px);
    transform: translateY(24px);
}

.herbarium-card:last-child {
    margin-bottom: 0;
}

.herbarium-card.in-view {
    animation: ripple-reveal 0.8s ease-out forwards;
}

.card-wrapper {
    position: relative;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: clamp(1.4rem, 4vw, 2.2rem);
    border: 1px solid rgba(212, 175, 55, 0.34);
    background:
        linear-gradient(135deg, rgba(26, 21, 16, 0.86), rgba(13, 10, 7, 0.76)),
        radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.12), transparent 18rem);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.3), inset 0 0 44px rgba(212, 175, 55, 0.04);
}

.card-wrapper::before,
.card-wrapper::after {
    content: "";
    position: absolute;
    width: 44px;
    height: 44px;
    border-color: #d4af37;
    opacity: 0.7;
}

.card-wrapper::before {
    top: 12px;
    left: 12px;
    border-top: 1px solid;
    border-left: 1px solid;
    border-radius: 12px 0 0 0;
}

.card-wrapper::after {
    right: 12px;
    bottom: 12px;
    border-right: 1px solid;
    border-bottom: 1px solid;
    border-radius: 0 0 12px 0;
}

.initial-cap {
    position: relative;
    isolation: isolate;
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    display: grid;
    place-items: center;
    color: #d4af37;
    font-family: "Playfair Display", Playfair, Lora, serif;
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 5px 0 rgba(13, 10, 7, 0.6), 0 0 18px rgba(212, 175, 55, 0.22);
}

.initial-cap::before,
.initial-cap::after {
    content: "";
    position: absolute;
    inset: -16px;
    z-index: -1;
    border: 1px solid rgba(212, 175, 55, 0.62);
    background:
        radial-gradient(ellipse 12px 22px at 26% 16%, rgba(123, 45, 59, 0.9), transparent 70%),
        radial-gradient(ellipse 12px 22px at 74% 84%, rgba(45, 90, 58, 0.9), transparent 70%),
        radial-gradient(circle at 36% 70%, rgba(212, 175, 55, 0.25), transparent 36%);
    transform: rotate(45deg);
    box-shadow: inset 0 0 22px rgba(212, 175, 55, 0.07);
}

.initial-cap::after {
    inset: -6px;
    border-color: rgba(139, 115, 85, 0.8);
    background:
        radial-gradient(ellipse at center, rgba(245, 230, 200, 0.18), transparent 60%),
        rgba(26, 21, 16, 0.92);
    transform: rotate(0deg);
}

.card-content {
    position: relative;
    z-index: 1;
}

.card-title {
    margin: 0.25rem 0 0.7rem;
    color: #d4af37;
    font-family: "Playfair Display", Playfair, Lora, serif;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    font-weight: 700;
    letter-spacing: 0.035em;
}

.conservatory-section {
    background: #0d0a07;
}

.conservatory-section::after {
    content: "";
    position: absolute;
    inset: clamp(1rem, 3vw, 2rem);
    border: 1px solid rgba(212, 175, 55, 0.58);
    outline: 1px solid rgba(212, 175, 55, 0.22);
    outline-offset: -12px;
    pointer-events: none;
}

.conservatory-content {
    position: relative;
    z-index: 1;
    width: min(88vw, 760px);
    display: grid;
    place-items: center;
    gap: 1.4rem;
    padding: clamp(4rem, 8vw, 6rem) clamp(2rem, 6vw, 4rem);
    text-align: center;
}

.conservatory-title {
    max-width: 10ch;
}

.conservatory-text {
    max-width: 620px;
}

.corner-flourish-large {
    width: 160px;
    height: 160px;
}

.corner-flourish-large.top-left { top: 0; left: 0; transform-origin: top left; }
.corner-flourish-large.bottom-right { right: 0; bottom: 0; transform-origin: bottom right; }

.conservatory-contact {
    margin-top: 1.8rem;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(212, 175, 55, 0.7);
}

.contact-email {
    display: inline-block;
    color: #d4af37;
    font-family: "Playfair Display", Playfair, Lora, serif;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
}

.contact-email:hover {
    color: #f5e6c8;
    text-shadow: 0 0 22px rgba(212, 175, 55, 0.45);
    transform: scale(1.04);
}

@keyframes letter-rise {
    70% { transform: translateY(-4px) rotateX(3deg) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) rotateX(0deg) scale(1); }
}

@keyframes gaslight {
    0%, 100% { text-shadow: 0 0 40px rgba(212, 175, 55, 0.1); }
    50% { text-shadow: 0 0 40px rgba(212, 175, 55, 0.3); }
}

@keyframes text-enter {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ripple-reveal {
    0% { opacity: 0; clip-path: circle(0% at 50% 50%); filter: blur(4px); transform: translateY(24px); }
    100% { opacity: 1; clip-path: circle(150% at 50% 50%); filter: blur(0); transform: translateY(0); }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 1.25rem;
    }

    .ornamental-divider {
        height: 36px;
    }

    .leaf-thread {
        display: none;
    }

    .corner-flourish {
        width: 70px;
        height: 70px;
    }

    .corner-flourish-large {
        width: 96px;
        height: 96px;
    }

    .ornamental-frame {
        min-height: 300px;
        padding: 4.5rem 1.2rem;
    }

    .card-wrapper {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .initial-cap {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        font-size: 58px;
    }
}

@media (max-width: 480px) {
    .section {
        min-height: 100vh;
        padding: 3rem 1rem;
    }

    .metadata,
    .code-label,
    .contact-label {
        font-size: 0.72rem;
    }

    .site-title {
        font-size: 2.25rem;
    }

    .greenhouse-content {
        padding: 1.5rem;
    }

    .cartouche {
        height: 54px;
    }

    .herbarium-card {
        margin-bottom: 80px;
    }
}
