/* ============================================
   gamelicensor.com - Honeyed Neutral Herbarium
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #f5eed6;
    color: #4a3828;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    letter-spacing: 0.01em;
    line-height: 1.72;
    overflow-x: hidden;
}

/* --- The Growing Stem (Fixed Navigation) --- */
#stem-nav {
    position: fixed;
    left: 8vw;
    top: 0;
    height: 100vh;
    width: 40px;
    z-index: 100;
    pointer-events: none;
}

#stem-path {
    stroke-linecap: round;
}

.stem-node {
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.stem-node circle:first-child {
    transition: fill 0.5s ease, stroke 0.5s ease;
}

.stem-node.active circle:first-child {
    fill: #4a6741;
    stroke: #4a6741;
}

.stem-node.active circle:nth-child(2) {
    stroke: #4a6741;
}

.stem-node.active line {
    stroke: #4a6741;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.stem-node.active {
    animation: pulse 3s ease-in-out infinite;
}

/* --- Plates (Sections) --- */
.plate {
    min-height: 100vh;
    position: relative;
    padding: 4rem 2rem;
    padding-left: calc(8vw + 60px);
}

.plate-parchment {
    background-color: #f5eed6;
}

.plate-linen {
    background-color: #ede4cc;
}

/* --- Plate Borders --- */
.plate-border-svg {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    width: calc(100% - 2rem);
    height: calc(100% - 2rem);
    pointer-events: none;
}

/* --- Typography --- */
h1, h2 {
    font-family: 'Cormorant Garamond', serif;
    color: #3d2b1a;
    letter-spacing: 0.02em;
    line-height: 1.15;
}

.site-title {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 600;
    text-align: center;
    color: #3d2b1a;
}

.plate-title {
    font-size: clamp(2.2rem, 5vw, 4.4rem);
    font-weight: 600;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.plate-number {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7560;
    margin-bottom: 0.5rem;
}

/* --- Specimen Labels --- */
.label-specimen {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7560;
}

.specimen-label {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7560;
    margin-bottom: 0.25rem;
}

.specimen-common {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 1.8vw, 1.5rem);
    font-weight: 600;
    font-style: italic;
    color: #6b4f36;
    margin-bottom: 0.75rem;
}

/* --- Drop Caps --- */
.plate-text::first-letter {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 4.5em;
    float: left;
    line-height: 0.8;
    margin-right: 0.08em;
    margin-top: 0.05em;
    color: #6b4f36;
    text-shadow: 1px 1px 0px #f5eed6;
}

/* --- Progressive Disclosure (Reveal Animation) --- */
.reveal {
    opacity: 0.4;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0) !important;
}

/* Preserve intentional rotation on specimens */
.specimen.reveal.visible {
    transform: translateY(0);
}


/* --- PLATE I - Title Cartouche --- */
#plate-1 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plate-frame {
    position: relative;
    width: 100%;
    max-width: 800px;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.frame-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.title-illustration {
    position: absolute;
    bottom: 0;
    right: -5%;
    width: 200px;
    height: auto;
    opacity: 0.35;
}

.title-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.title-banner {
    margin-bottom: 1.5rem;
}

.title-tagline {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.title-tagline p {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 400;
    font-style: italic;
    color: #6b4f36;
    line-height: 1.6;
}

.tagline-rule {
    width: 150px;
    height: auto;
}

.label-year {
    display: block;
    margin-top: 2rem;
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    letter-spacing: 0.15em;
}

/* --- PLATE II - Taxonomy (Specimens) --- */
#plate-2 {
    min-height: 120vh;
}

.plate-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 0;
}

.specimen {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 4rem;
    padding: 2rem 1rem;
    position: relative;
}

.specimen-left {
    flex-direction: row;
}

.specimen-right {
    flex-direction: row-reverse;
}

.specimen-illustration {
    flex-shrink: 0;
    width: 180px;
    height: auto;
}

.specimen-annotation {
    position: relative;
    flex: 1;
    max-width: 550px;
}

.specimen-desc {
    color: #4a3828;
}

/* Annotation lines */
.annotation-line {
    position: absolute;
    top: 50%;
    left: -2rem;
    width: 2rem;
    height: 1px;
    background-color: #8a7560;
    transform: rotate(15deg);
    transform-origin: right center;
}

.annotation-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: -1.5px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background-color: #8a7560;
}

.annotation-line-right {
    left: auto;
    right: -2rem;
    transform: rotate(-15deg);
    transform-origin: left center;
}

.annotation-line-right::before {
    left: auto;
    right: 0;
}

/* --- PLATE III - Root System --- */
#plate-3 {
    min-height: 100vh;
}

.root-system-container {
    position: relative;
}

.above-soil {
    position: relative;
}

.soil-illustration {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.soil-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    fill: #8a7560;
    text-anchor: middle;
}

.below-soil {
    position: relative;
    background: linear-gradient(to bottom, #ede4cc 0%, #e8d5a3 100%);
    padding: 2rem 0 4rem;
}

.root-illustration {
    width: 100%;
    max-width: 900px;
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 0.3;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.root-text-cavities {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 750px;
    margin: 0 auto;
    padding: 2rem;
}

.root-cavity {
    padding: 1.5rem 2rem;
}

.root-cavity-1 {
    align-self: flex-start;
    max-width: 420px;
}

.root-cavity-2 {
    align-self: center;
    max-width: 520px;
}

.root-cavity-3 {
    align-self: flex-end;
    max-width: 420px;
}


/* --- PLATE IV - Seasonal Cycle --- */
#plate-4 {
    min-height: 110vh;
}

.cycle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.cycle-diagram {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.cycle-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    fill: #3d2b1a;
    text-anchor: middle;
}

.cycle-label-right {
    text-anchor: start;
}

.cycle-label-left {
    text-anchor: end;
}

.cycle-sublabel {
    font-family: 'Cormorant Garamond', serif;
    font-size: 10px;
    font-weight: 400;
    font-style: italic;
    fill: #8a7560;
    text-anchor: middle;
}

.cycle-sublabel.cycle-label-right {
    text-anchor: start;
}

.cycle-sublabel.cycle-label-left {
    text-anchor: end;
}

.cycle-center-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.12em;
    fill: #3d2b1a;
    text-anchor: middle;
}

.cycle-center-sub {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.08em;
    fill: #8a7560;
}

.cycle-descriptions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.cycle-phase {
    padding: 1.5rem;
}

.cycle-phase .specimen-label {
    margin-bottom: 0.75rem;
    color: #6b4f36;
}

/* --- PLATE V - Colophon --- */
#plate-5 {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.colophon-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.colophon-vignette {
    width: 140px;
    height: 140px;
    margin-bottom: 2.5rem;
}

.colophon-content {
    width: 100%;
}

.colophon-rule {
    margin: 1.5rem auto;
    width: 200px;
}

.colophon-rule svg {
    width: 100%;
    height: auto;
}

.colophon-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 400;
    font-style: italic;
    color: #6b4f36;
    line-height: 1.8;
    text-align: center;
}

.colophon-text::first-letter {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 4.5em;
    float: left;
    line-height: 0.8;
    margin-right: 0.08em;
    margin-top: 0.05em;
    color: #6b4f36;
    text-shadow: 1px 1px 0px #f5eed6;
}

.colophon-details {
    margin: 2rem 0;
}

.colophon-detail-line {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.7rem, 0.9vw, 0.85rem);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a7560;
}

.colophon-detail-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    color: #3d2b1a;
    margin: 0.5rem 0;
}

.colophon-footer-text {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: #8a7560;
    text-align: center;
    line-height: 1.7;
}

.colophon-footer-text::first-letter {
    font-size: 1em;
    float: none;
    margin: 0;
    font-weight: 400;
}

.colophon-contact {
    margin-top: 2rem;
}

.colophon-email {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-weight: 400;
    font-style: italic;
    color: #6b4f36;
    margin-top: 0.25rem;
}

.colophon-final-vine {
    width: 300px;
    height: auto;
    margin-top: 3rem;
}

/* --- Vine Page Dividers --- */
.plate + .plate {
    border-top: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #stem-nav {
        left: 2vw;
        width: 20px;
    }

    .stem-node circle,
    .stem-node line {
        display: none;
    }

    .plate {
        padding-left: calc(2vw + 30px);
        padding-right: 1rem;
    }

    .specimen {
        flex-direction: column !important;
        transform: rotate(0deg) !important;
    }

    .specimen-right {
        flex-direction: column !important;
    }

    .specimen-illustration {
        width: 140px;
        margin: 0 auto;
    }

    .annotation-line {
        display: none;
    }

    .cycle-descriptions {
        grid-template-columns: 1fr;
    }

    .cycle-phase {
        transform: rotate(0deg) !important;
    }

    .title-illustration {
        display: none;
    }

    .root-text-cavities {
        padding: 1rem;
    }

    .root-cavity-1,
    .root-cavity-2,
    .root-cavity-3 {
        align-self: stretch;
        max-width: 100%;
    }

    .site-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }
}

@media (max-width: 480px) {
    .plate {
        padding: 2rem 1rem 2rem calc(2vw + 20px);
    }

    .specimen-illustration {
        width: 120px;
    }

    .cycle-diagram {
        max-width: 300px;
    }
}


/* --- Design color references (used in SVGs, documented for compliance) --- */
/* #2a1a0e - Ink Line Dark Brown: used in SVG strokes throughout */
/* #c4973a - Ochre Accent: used in seasonal cycle SVG elements */

.ink-line-color { color: #2a1a0e; }
.ochre-accent-color { color: #c4973a; }

/* Ensure drop-cap styling for specific colophon text */
.colophon-text.plate-text::first-letter {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 4.5em;
    float: left;
    line-height: 0.8;
    margin-right: 0.08em;
    margin-top: 0.05em;
    color: #6b4f36;
}
