/* ============================================================
   kaguya.day — Botanical Specimen Archive
   Colors: #EEF0E8 (parchment), #D4D9CC (sage), #8A9E8C (faded sage),
           #B8AAC4 (dusty lavender), #6A7D8B (slate), #3E4A42 (deep moss),
           #C2B8C8 (pressed violet), #F7F5F0 (bleached linen)
   Fonts: Cormorant Garamond, Lora, Source Code Pro
   ============================================================ */

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

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

body {
    background-color: #EEF0E8;
    color: #6A7D8B;
    font-family: 'Lora', serif;
    font-weight: 400;
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---- Typography -------------------------------------------- */
h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    color: #3E4A42;
    letter-spacing: -0.02em;
}

.section-heading {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 4vw, 3.25rem);
    font-weight: 300;
    font-style: italic;
    color: #3E4A42;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

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

.body-text {
    font-family: 'Lora', serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.9;
    color: #6A7D8B;
    margin-bottom: 1.5rem;
}

/* ---- Navigation -------------------------------------------- */
.site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 2.5rem;
    mix-blend-mode: multiply;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    font-weight: 400;
    font-style: italic;
    color: #6A7D8B;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 600ms ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #8A9E8C;
    transition: width 300ms ease-out;
}

.nav-link:hover {
    color: #3E4A42;
}

.nav-link:hover::after {
    width: 100%;
}

/* ---- Hero Section ----------------------------------------- */
.hero {
    min-height: 100vh;
    background-color: #F7F5F0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}

.hero-ruled-lines {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            to bottom,
            transparent,
            transparent 23px,
            rgba(106, 125, 139, 0.06) 23px,
            rgba(106, 125, 139, 0.06) 24px
        );
    pointer-events: none;
    z-index: 0;
}

.specimen-frame {
    width: 62vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    overflow: visible;
}

.folium-svg {
    width: 100%;
    max-width: 700px;
    height: auto;
    margin-right: -40px; /* overflow right edge */
    animation: folium-drift 8s ease-in-out infinite alternate;
    transform-origin: center center;
}

@keyframes folium-drift {
    from {
        transform: rotate(-0.5deg) translateY(0px);
    }
    to {
        transform: rotate(0.5deg) translateY(-8px);
    }
}

.hero-text {
    width: 38vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4rem 3rem 4rem 2rem;
    position: relative;
    z-index: 2;
}

.hero-text-inner {
    max-width: 380px;
}

.hero-classification {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.625rem;
    font-weight: 300;
    color: #8A9E8C;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 5vw;
    font-weight: 600;
    font-style: italic;
    color: #3E4A42;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero-dot {
    color: #8A9E8C;
}

.hero-descriptor {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.7;
    color: #6A7D8B;
    margin-bottom: 2.5rem;
}

.hero-link {
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #8A9E8C;
    text-decoration: none;
    position: relative;
    display: inline-block;
    letter-spacing: 0.02em;
}

.hero-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #8A9E8C;
    transition: width 300ms ease-out;
}

.hero-link:hover::after {
    width: 100%;
}

/* ---- Specimen Strip --------------------------------------- */
.specimen-strip {
    width: 100vw;
    background-color: #D4D9CC;
    padding: 5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.specimen-strip-inner {
    width: 60vw;
    max-width: 900px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.semen-svg {
    width: 100%;
    height: auto;
    opacity: 0.8;
}

.semen-svg .annotation-line {
    transition: stroke-dashoffset 200ms ease;
}

.semen-svg .specimen-annotation:hover .annotation-line {
    stroke-dasharray: 100;
    stroke-dashoffset: -8;
}

.specimen-caption {
    font-family: 'Source Code Pro', monospace;
    font-size: 10px;
    font-weight: 300;
    color: #6A7D8B;
    letter-spacing: 0.08em;
    margin-top: 2rem;
    opacity: 0.7;
}

/* ---- Text + Timeline Section ------------------------------ */
.text-timeline {
    background-color: #EEF0E8;
    padding: 8rem 0;
}

.text-timeline-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 0 4rem;
    align-items: start;
}

.text-col {
    padding-right: 2rem;
}

.text-col .section-heading {
    margin-bottom: 2.5rem;
}

.timeline-col {
    padding-left: 2rem;
    position: relative;
}

.timeline-rule {
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #B8C4B0;
}

/* The grid separator (middle column = 1px) */
.text-timeline-inner::before {
    content: '';
    width: 1px;
    background-color: #B8C4B0;
    align-self: stretch;
}

.timeline-list {
    list-style: none;
    margin-top: 1rem;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: baseline;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-date {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.6875rem;
    font-weight: 300;
    color: #8A9E8C;
    letter-spacing: 0.06em;
    white-space: nowrap;
    min-width: 5rem;
    padding-top: 0.15rem;
}

.timeline-event {
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #6A7D8B;
}

.timeline-event em {
    color: #3E4A42;
    font-style: italic;
}

/* ---- Feature Grid (Counter-animate) ----------------------- */
.feature-grid {
    background-color: #EEF0E8;
    padding: 8rem 0;
    overflow: hidden;
}

.feature-grid-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.feature-card {
    border: 1px solid #B8AAC4;
    background-color: #EEF0E8;
    padding: 3rem 2rem;
    will-change: transform;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #C2B8C8, transparent);
    opacity: 0.6;
}

.card-ornament {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.card-ornament svg {
    width: 100%;
    height: 100%;
}

.card-label {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.625rem;
    font-weight: 300;
    color: #8A9E8C;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.625rem;
    font-weight: 600;
    font-style: italic;
    color: #3E4A42;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.card-body {
    font-family: 'Lora', serif;
    font-size: 0.9375rem;
    line-height: 1.8;
    color: #6A7D8B;
    margin-bottom: 1.5rem;
}

.card-code {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.625rem;
    font-weight: 300;
    color: #B8AAC4;
    letter-spacing: 0.08em;
}

/* ---- Manifesto Section ------------------------------------ */
.manifesto {
    background-color: #F7F5F0;
    padding: 10rem 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.manifesto-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.spiralis-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 700px;
    height: auto;
    pointer-events: none;
    z-index: 0;
}

.manifesto-quote {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 3.5vw, 3.5rem);
    font-weight: 300;
    font-style: italic;
    color: #3E4A42;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.manifesto-quote.visible {
    opacity: 1;
    transform: translateY(0);
}

.manifesto-quote p {
    quotes: none;
}

.manifesto-cite {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    color: #8A9E8C;
    letter-spacing: 0.08em;
    font-style: normal;
    opacity: 0;
    transition: opacity 500ms ease-out 200ms;
}

.manifesto-cite.visible {
    opacity: 0.7;
}

/* ---- Footer ----------------------------------------------- */
.site-footer {
    background-color: #D4D9CC;
    padding: 6rem 0 3rem;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.footer-taxonomy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.taxonomy-line {
    font-family: 'Source Code Pro', monospace;
    font-size: 11px;
    font-weight: 300;
    color: #6A7D8B;
    letter-spacing: 0.05em;
    line-height: 1.7;
}

.taxonomy-line em {
    color: #3E4A42;
    font-style: italic;
}

.taxonomy-coords {
    margin-top: 0.8rem;
    color: #8A9E8C;
    letter-spacing: 0.08em;
}

.footer-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.footer-site-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    font-style: italic;
    color: #3E4A42;
    letter-spacing: -0.02em;
}

.footer-tagline {
    font-family: 'Lora', serif;
    font-size: 0.8125rem;
    color: #6A7D8B;
    font-style: italic;
}

.footer-ornament {
    width: 48px;
    height: 48px;
    margin-top: 0.5rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.footer-link {
    font-family: 'Lora', serif;
    font-size: 0.875rem;
    font-weight: 400;
    font-style: italic;
    color: #6A7D8B;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 600ms ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #8A9E8C;
    transition: width 300ms ease-out;
}

.footer-link:hover {
    color: #3E4A42;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-rule {
    width: 100%;
    height: 1px;
    background-color: #C2B8C8;
    margin: 3rem 0 1.5rem;
    opacity: 0.5;
}

.footer-notation {
    text-align: center;
    font-family: 'Source Code Pro', monospace;
    font-size: 0.625rem;
    font-weight: 300;
    color: #6A7D8B;
    letter-spacing: 0.1em;
    opacity: 0.6;
}

/* ---- Section entrance animations -------------------------- */
.section-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
}

.section-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ------------------------------------------- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        min-height: auto;
    }

    .specimen-frame {
        width: 100%;
        min-height: 60vh;
    }

    .folium-svg {
        max-width: 400px;
        margin-right: 0;
    }

    .hero-text {
        width: 100%;
        min-height: auto;
        padding: 3rem 2rem 4rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .text-timeline-inner {
        grid-template-columns: 1fr;
        padding: 0 2rem;
    }

    .text-timeline-inner::before {
        display: none;
    }

    .timeline-rule {
        display: none;
    }

    .timeline-col {
        padding-left: 0;
        border-top: 1px solid #B8C4B0;
        padding-top: 3rem;
        margin-top: 3rem;
    }

    .feature-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .footer-taxonomy {
        align-items: center;
    }

    .footer-nav {
        align-items: center;
    }

    .specimen-strip-inner {
        width: 90vw;
    }

    .feature-grid-inner,
    .text-timeline-inner,
    .manifesto-inner {
        padding: 0 2rem;
    }

    .footer-inner {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .site-nav {
        display: none;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-heading {
        font-size: 2rem;
    }
}
