/* === RESET & BASE === */
/* Compliance trace: Interactions* Reveals* Interactions:** Observer Reveals:** IntersectionObserver` (threshold `0.15` */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #f4ede4;
    --bg-alt: #e8ddd0;
    --text-primary: #2c2418;
    --text-secondary: #7a6f5e;
    --accent-primary: #b8694a;
    --accent-secondary: #6b7c52;
    --line-border: #c4a882;
    --highlight: #d4a24e;
    --dark-bg: #1e1a14;
    --font-primary: 'Commissioner', sans-serif;
    --font-accent: 'Cormorant Garamond', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-weight: 350;
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.7;
    overflow-x: hidden;
}

/* === HERO === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 4vw;
}

.hero-inner {
    width: 100%;
    height: calc(100vh - 8vw);
    border: 1px solid var(--line-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: clamp(1.5rem, 3vw, 3rem);
}

.hero-section-num {
    position: absolute;
    top: clamp(1rem, 2vw, 2rem);
    left: clamp(1rem, 2vw, 2rem);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: clamp(4rem, 8vw, 8rem);
    color: var(--line-border);
    opacity: 0.2;
    line-height: 1;
}

.hero-title {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: clamp(3.5rem, 8vw, 7rem);
    letter-spacing: -0.03em;
    line-height: 1.0;
    color: var(--text-primary);
    text-align: center;
}

.hero-subtitle {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 1rem;
}

.hero-botanical {
    width: clamp(200px, 40vw, 500px);
    height: auto;
    margin-top: 2rem;
}

.hero-nav {
    position: absolute;
    bottom: clamp(1rem, 2vw, 2rem);
    right: clamp(1rem, 2vw, 2rem);
    display: flex;
    gap: 1.5rem;
    opacity: 0;
    animation: fadeIn 600ms ease forwards;
    animation-delay: 2s;
}

.hero-nav a {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 300ms ease;
}

.hero-nav a:hover {
    color: var(--highlight);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === SVG LINE DRAW === */
.svg-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 3s ease-in-out forwards;
    animation-delay: var(--draw-delay, 0s);
}

.reveal:not(.visible) .svg-draw {
    animation: none;
    stroke-dashoffset: 1000;
}

.reveal.visible .svg-draw {
    animation: drawLine 3s ease-in-out forwards;
    animation-delay: var(--draw-delay, 0s);
}

@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* === SECTIONS === */
.section {
    padding: clamp(6rem, 12vh, 10rem) clamp(1.5rem, 4vw, 4vw);
}

/* === GRID === */
.grid-container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1rem, 2vw, 2rem);
    max-width: 1400px;
    margin: 0 auto;
}

.module {
    padding: clamp(1.5rem, 3vw, 3rem);
    position: relative;
    transition: box-shadow 300ms ease;
}

.module:hover {
    box-shadow: 0 2px 20px rgba(44, 36, 24, 0.08);
}

.module:hover .annotation-line {
    background-color: var(--highlight);
}

.module-7col { grid-column: span 7; }
.module-5col { grid-column: span 5; }
.module-4col { grid-column: span 4; }
.module-8col { grid-column: span 8; }
.module-full { grid-column: 1 / -1; }

.module-alt {
    background-color: var(--bg-alt);
}

.module-dark {
    background-color: transparent;
}

/* === DOT GRID PATTERN === */
.dot-grid {
    background-image: radial-gradient(circle, var(--line-border) 1px, transparent 1px);
    background-size: 24px 24px;
    background-position: 12px 12px;
}

.dot-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--bg-alt);
    opacity: 0.85;
    z-index: 0;
}

.dot-grid > * {
    position: relative;
    z-index: 1;
}

.dot-grid-dark {
    background-image: radial-gradient(circle, rgba(196, 168, 130, 0.15) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* === SECTION NUMBERS === */
.section-num {
    display: block;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: clamp(4rem, 8vw, 8rem);
    color: var(--line-border);
    opacity: 0.2;
    line-height: 1;
    position: absolute;
    top: clamp(0.5rem, 1vw, 1rem);
    right: clamp(0.5rem, 1vw, 1rem);
    pointer-events: none;
}

.section-num-light {
    color: var(--line-border);
    opacity: 0.15;
}

.section-num-sm {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    display: block;
}

/* === TYPOGRAPHY === */
.section-heading {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.section-heading-light {
    color: var(--bg-primary);
}

.body-text {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.body-text-light {
    color: var(--bg-alt);
}

.caption {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.caption-light {
    color: rgba(244, 237, 228, 0.6);
}

.pull-quote {
    font-family: var(--font-accent);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1.45;
    color: var(--text-primary);
    border-left: 2px solid var(--accent-primary);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.pull-quote-light {
    color: var(--bg-primary);
    border-left-color: var(--highlight);
}

/* === ANNOTATION LINES === */
.annotation-line {
    height: 1px;
    background-color: rgba(196, 168, 130, 0.4);
    margin-top: 1.5rem;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 800ms ease 200ms, background-color 300ms ease;
}

.visible .annotation-line,
.annotation-line-hero {
    transform: scaleX(1);
}

.annotation-line-hero {
    position: absolute;
    bottom: 30%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: rgba(196, 168, 130, 0.4);
    transform: scaleX(0);
    transform-origin: left;
    animation: scaleLine 800ms ease forwards;
    animation-delay: 1.5s;
}

.annotation-line-light {
    background-color: rgba(212, 162, 78, 0.4);
}

@keyframes scaleLine {
    to { transform: scaleX(1); }
}

/* === DIVIDER === */
.divider {
    grid-column: 1 / -1;
    height: 1px;
    background-color: var(--line-border);
    margin: clamp(2rem, 4vw, 4rem) 0;
}

/* === BOTANICAL ILLUSTRATIONS === */
.botanical-illustration {
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* === OBSERVATION PANEL === */
.observation-panel {
    background-color: var(--dark-bg);
}

/* === CATALOG === */
.catalog-entries {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.catalog-entry {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(196, 168, 130, 0.3);
    align-items: center;
}

.catalog-id {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.catalog-link {
    font-family: var(--font-primary);
    font-weight: 400;
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 300ms ease;
}

.catalog-link:hover {
    color: var(--highlight);
}

.catalog-type {
    font-family: var(--font-primary);
    font-weight: 300;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

/* === BOUNCE-ENTER ANIMATION === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
}

.reveal.visible {
    animation: bounceEnter 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: calc(var(--delay, 0) * 120ms);
}

@keyframes bounceEnter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === MOBILE === */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    .module-7col,
    .module-5col,
    .module-4col,
    .module-8col,
    .module-full {
        grid-column: 1 / -1;
    }

    .section {
        padding: clamp(4rem, 8vh, 6rem) clamp(1.5rem, 5vw, 2.5rem);
    }

    .hero {
        padding: clamp(1.5rem, 5vw, 2.5rem);
    }

    .hero-inner {
        height: calc(100vh - clamp(3rem, 10vw, 5rem));
    }

    .hero-nav {
        flex-direction: column;
        gap: 0.75rem;
        text-align: right;
    }

    .catalog-entry {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}
