:root {
    --bg-primary: #F5F0E8;
    --bg-secondary: #EDE8DF;
    --bg-tertiary: #E5DDD2;
    --text-primary: #2A2520;
    --text-secondary: #6B6259;
    --accent-warm: #C4956A;
    --accent-botanical: #6B7F5A;
    --accent-deep: #2C3E2D;
    --accent-warm-inverted: #D4A97A;
    --rule-color: #9B8E7A;
    --font-display: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --font-label: 'Karla', 'Helvetica Neue', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.8;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* ============================
   Floating Elements
   ============================ */

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.float-el {
    position: absolute;
    opacity: 0.2;
    will-change: transform;
    pointer-events: none;
}

.float-leaf-1 {
    width: 45px;
    top: 15%;
    left: 8%;
    animation: floatDrift1 95s linear infinite;
    opacity: 0.25;
}

.float-seed-1 {
    width: 22px;
    top: 40%;
    right: 12%;
    animation: floatDrift2 120s linear infinite;
    opacity: 0.18;
}

.float-stem-1 {
    width: 30px;
    top: 60%;
    left: 15%;
    animation: floatDrift3 80s linear infinite;
    opacity: 0.22;
}

.float-leaf-2 {
    width: 35px;
    top: 10%;
    right: 8%;
    animation: floatDrift4 110s linear infinite;
    opacity: 0.2;
}

.float-seed-2 {
    width: 18px;
    top: 65%;
    left: 5%;
    animation: floatDrift1 100s linear infinite reverse;
    opacity: 0.15;
}

.float-stem-2 {
    width: 28px;
    top: 20%;
    right: 15%;
    animation: floatDrift3 90s linear infinite;
    opacity: 0.2;
}

.float-leaf-3 {
    width: 38px;
    top: 8%;
    left: 10%;
    animation: floatDrift2 105s linear infinite;
    opacity: 0.22;
}

.float-seed-3 {
    width: 20px;
    top: 55%;
    right: 10%;
    animation: floatDrift4 85s linear infinite reverse;
    opacity: 0.18;
}

.float-leaf-4 {
    width: 42px;
    top: 20%;
    right: 12%;
    animation: floatDrift1 115s linear infinite;
    opacity: 0.25;
}

.float-stem-3 {
    width: 24px;
    top: 60%;
    left: 8%;
    animation: floatDrift2 130s linear infinite reverse;
    opacity: 0.2;
}

@keyframes floatDrift1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(50px, -30px) rotate(90deg); }
    50% { transform: translate(100px, 10px) rotate(180deg); }
    75% { transform: translate(50px, 40px) rotate(270deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes floatDrift2 {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-40px, 25px) rotate(-90deg); }
    50% { transform: translate(-80px, -15px) rotate(-180deg); }
    75% { transform: translate(-40px, -40px) rotate(-270deg); }
    100% { transform: translate(0, 0) rotate(-360deg); }
}

@keyframes floatDrift3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(60px, 20px) rotate(120deg); }
    66% { transform: translate(-30px, -25px) rotate(240deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes floatDrift4 {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-25px, -35px) rotate(72deg); }
    40% { transform: translate(30px, -20px) rotate(144deg); }
    60% { transform: translate(50px, 25px) rotate(216deg); }
    80% { transform: translate(-10px, 35px) rotate(288deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

/* ============================
   Reveal Animation
   ============================ */

.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================
   Section 1: Specimen Card (Hero)
   ============================ */

.specimen-card {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 15vh 5vw 10vh;
    background-color: var(--bg-primary);
    overflow: hidden;
}

.specimen-content {
    text-align: center;
    max-width: 680px;
    z-index: 1;
}

.specimen-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(36px, 5vw, 80px);
    letter-spacing: 0.12em;
    line-height: 1.12;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.title-dot {
    color: var(--accent-warm);
}

.specimen-rule {
    width: 200px;
    height: 1px;
    background-color: var(--rule-color);
    margin: 0 auto 24px;
}

.specimen-subtitle {
    font-family: var(--font-label);
    font-size: 14px;
    letter-spacing: 0.06em;
    font-variant: small-caps;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.hero-root-system {
    position: absolute;
    bottom: -5%;
    left: 50%;
    transform: translateX(-50%);
    width: min(80vw, 600px);
    height: auto;
    opacity: 0.3;
    z-index: 0;
}

.root-node {
    animation: nodePulse 4s ease-in-out infinite alternate;
}

@keyframes nodePulse {
    0% { opacity: 0.3; r: 2; }
    100% { opacity: 0.8; }
}

/* ============================
   Section 2: Fork Diagram
   ============================ */

.fork-diagram {
    position: relative;
    background-color: var(--bg-secondary);
    padding: 15vh 5vw;
    overflow: hidden;
}

.fork-stem-top,
.fork-stem-bottom {
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.fork-svg-top,
.fork-svg-bottom {
    width: 200px;
    height: auto;
}

.fork-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 5vw, 100px);
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.fork-column h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(22px, 3vw, 32px);
    letter-spacing: 0.08em;
    line-height: 1.12;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.fork-column p {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* ============================
   Section 3: Annotation Band
   ============================ */

.annotation-band {
    position: relative;
    background-color: var(--bg-tertiary);
    min-height: 50vh;
    height: 80vh;
    padding: 10vh 5vw;
    overflow: hidden;
}

.annotation-stem {
    position: absolute;
    left: 50%;
    top: 5%;
    bottom: 5%;
    width: 1px;
    background-color: var(--rule-color);
    transform: translateX(-50%);
}

.annotation-item {
    position: absolute;
    width: 40%;
    max-width: 340px;
    display: flex;
    align-items: flex-start;
}

.annotation-left {
    left: 5%;
    flex-direction: row;
}

.annotation-right {
    right: 5%;
    flex-direction: row-reverse;
}

.annotation-line {
    flex-shrink: 0;
    display: block;
    height: 1px;
    background-color: var(--rule-color);
    align-self: center;
    margin-top: 10px;
}

.annotation-line-right {
    width: 30px;
    margin-left: auto;
    margin-right: 0;
    order: 2;
}

.annotation-line-left {
    width: 30px;
    margin-right: auto;
    margin-left: 0;
    order: 2;
}

.annotation-content {
    order: 1;
}

.annotation-label {
    font-family: var(--font-label);
    font-size: 12px;
    letter-spacing: 0.06em;
    font-variant: small-caps;
    text-transform: uppercase;
    color: var(--accent-warm);
    display: block;
    margin-bottom: 6px;
}

.annotation-content p {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================
   Section 4: Growth Ring
   ============================ */

.growth-ring {
    position: relative;
    background-color: var(--bg-primary);
    padding: 15vh 5vw;
    overflow: hidden;
}

.growth-ring-content {
    max-width: 680px;
    margin: 0 auto 60px;
    text-align: center;
}

.section-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(28px, 4vw, 56px);
    letter-spacing: 0.08em;
    line-height: 1.12;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.section-prose {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 680px;
    margin: 0 auto;
}

.growth-ring-diagram {
    display: flex;
    justify-content: center;
    margin: 40px auto;
    max-width: 500px;
}

.ring-svg {
    width: 100%;
    height: auto;
    animation: ringRotate 180s linear infinite;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ring-label {
    font-family: var(--font-label);
    font-size: 11px;
    letter-spacing: 0.04em;
    font-variant: small-caps;
    text-transform: uppercase;
}

.growth-ring-caption {
    text-align: center;
    margin-top: 40px;
    padding: 0 20px;
}

/* ============================
   Section 5: Pressed Specimen (Footer)
   ============================ */

.pressed-specimen {
    position: relative;
    background-color: var(--accent-deep);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15vh 5vw;
    overflow: hidden;
}

.colophon-vignette {
    width: 120px;
    height: auto;
    margin-bottom: 40px;
    opacity: 0.8;
}

.colophon-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(18px, 2.5vw, 28px);
    letter-spacing: 0.08em;
    line-height: 1.12;
    color: #F5F0E8;
    margin-bottom: 16px;
    text-align: center;
}

.colophon-text {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.8;
    color: #D4A97A;
    text-align: center;
    letter-spacing: 0.02em;
}

/* ============================
   Pollen Path Animation
   ============================ */

@keyframes pollenDrift {
    0% { offset-distance: 0%; opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { offset-distance: 100%; opacity: 0; }
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 768px) {
    .fork-columns {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .annotation-band {
        height: auto;
        min-height: auto;
        padding: 8vh 5vw;
    }

    .annotation-stem {
        display: none;
    }

    .annotation-item {
        position: relative;
        top: auto !important;
        left: auto;
        right: auto;
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        margin-bottom: 30px;
    }

    .annotation-left,
    .annotation-right {
        flex-direction: column;
    }

    .annotation-line {
        display: none;
    }

    .annotation-content {
        order: 1;
    }

    .specimen-title {
        letter-spacing: 0.06em;
    }

    .hero-root-system {
        width: 100vw;
        opacity: 0.2;
    }

    .growth-ring-diagram {
        max-width: 90vw;
    }
}

@media (max-width: 480px) {
    .specimen-title {
        font-size: 32px;
    }

    .fork-column h2 {
        font-size: 22px;
    }

    .section-heading {
        font-size: 26px;
    }
}
