/* ==========================================================================
   hinagiku.day — Botanical Grimoire Stylesheet
   Dark Academia · Victorian Herbarium · Ocean Deep Reinterpreted
   ========================================================================== */

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

:root {
    /* Palette — Ocean Deep (Scholarly) */
    --abyssal-navy:   #0A0E1A;
    --inkwell-blue:   #0D1B2A;
    --charcoal-vellum:#0F0F14;
    --deep-verdigris: #1A3A4A;
    --teal-scholar:   #2A4A5A;
    --archive-gold:   #C9A84C;
    --old-gilt:       #8B6914;
    --old-vellum:     #F0E6CC;
    --reading-cream:  #E8DFC8;
    --faded-ink:      #9B8E7A;

    /* Typography */
    --font-display:     'Playfair Display', Georgia, serif;
    --font-cinzel:      'Cinzel', 'Trajan Pro', serif;
    --font-body:        'IM Fell English', Georgia, serif;
    --font-annotation:  'Courier Prime', 'Courier New', monospace;
    --font-data:        'Josefin Sans', 'Gill Sans', sans-serif;

    /* Transitions */
    --ease-quart: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Layout */
    --max-width: 1200px;
    --section-pad: 120px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--abyssal-navy);
    color: var(--reading-cream);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.85;
    /* Subtle parchment warmth */
    filter: sepia(0.08);
    /* Aged paper grain texture */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* ── Fixed Navigation Marker ── */
.nav-marker {
    position: fixed;
    top: 28px;
    left: 32px;
    z-index: 1000;
    color: var(--archive-gold);
    font-size: 22px;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s var(--ease-quart), transform 0.3s var(--ease-quart);
    letter-spacing: 0;
}

.nav-marker:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* ── Chamber Layout — Shared ── */
.chamber {
    width: 100%;
    padding: var(--section-pad) 0;
}

.chamber-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 60px;
}

/* ── Ornamental Rule Separators ── */
.ornamental-rule {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.rule-svg {
    display: block;
    width: 100%;
    height: 24px;
}

/* ==========================================================================
   CHAMBER I: THE SPECIMEN FOLIO
   ========================================================================== */
.chamber-i {
    background-color: var(--abyssal-navy);
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.chamber-i .chamber-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* Left: SVG diagram */
.specimen-folio-left {
    display: flex;
    justify-content: center;
    align-items: center;
}

.daisy-svg {
    width: 100%;
    max-width: 560px;
    height: auto;
    display: block;
}

/* Petal path-draw animation */
.petal {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}

.petal#petal-1  { animation: draw-path 0.5s var(--ease-quart) 0.2s forwards; }
.petal#petal-2  { animation: draw-path 0.5s var(--ease-quart) 0.5s forwards; }
.petal#petal-3  { animation: draw-path 0.5s var(--ease-quart) 0.8s forwards; }
.petal#petal-4  { animation: draw-path 0.5s var(--ease-quart) 1.1s forwards; }
.petal#petal-5  { animation: draw-path 0.5s var(--ease-quart) 1.4s forwards; }
.petal#petal-6  { animation: draw-path 0.5s var(--ease-quart) 1.7s forwards; }
.petal#petal-7  { animation: draw-path 0.5s var(--ease-quart) 2.0s forwards; }
.petal#petal-8  { animation: draw-path 0.5s var(--ease-quart) 2.3s forwards; }
.petal#petal-stem { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw-path 0.6s var(--ease-quart) 2.6s forwards; }
.petal#petal-leaf-l { animation: draw-path 0.4s var(--ease-quart) 2.8s forwards; }
.petal#petal-leaf-r { animation: draw-path 0.4s var(--ease-quart) 3.0s forwards; }

#capitulum {
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: draw-path 0.6s var(--ease-quart) 0.0s forwards, pulse-attention 3s ease-in-out 3.5s infinite;
}

@keyframes draw-path {
    to { stroke-dashoffset: 0; }
}

@keyframes pulse-attention {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* SVG annotation text */
.annotation {
    font-family: var(--font-annotation);
    font-size: 11px;
    fill: var(--faded-ink);
    letter-spacing: 0.02em;
}

.scale-label {
    font-size: 10px;
    fill: var(--faded-ink);
    opacity: 0.7;
    font-style: italic;
}

/* Right: Title block */
.specimen-folio-right {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-left: 20px;
}

.folio-title-block {
    max-width: 500px;
}

.section-label {
    font-family: var(--font-cinzel);
    font-size: 13px;
    color: var(--archive-gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 24px;
    opacity: 0.9;
}

.site-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(64px, 8vw, 96px);
    color: var(--old-vellum);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 16px;
    opacity: 0;
    animation: fade-in 1.2s var(--ease-quart) 2.8s forwards;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.site-subtitle {
    font-family: var(--font-annotation);
    font-size: 14px;
    color: var(--archive-gold);
    letter-spacing: 0.12em;
    margin-bottom: 28px;
    opacity: 0;
    animation: fade-in 0.8s var(--ease-quart) 3.4s forwards;
}

.title-divider {
    width: 80px;
    height: 1px;
    background: var(--archive-gold);
    opacity: 0.5;
    margin-bottom: 28px;
    opacity: 0;
    animation: fade-in 0.6s var(--ease-quart) 3.6s forwards;
}

.site-tagline {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 17px;
    color: var(--reading-cream);
    line-height: 1.7;
    margin-bottom: 44px;
    opacity: 0;
    animation: fade-in 0.8s var(--ease-quart) 3.8s forwards;
}

/* Taxonomy list */
.taxonomy-block {
    opacity: 0;
    animation: fade-in 0.8s var(--ease-quart) 4.0s forwards;
}

.taxonomy-list {
    list-style: none;
    border-left: 1px solid var(--teal-scholar);
    padding-left: 20px;
}

.taxonomy-list li {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 4px 0;
}

.tax-rank {
    font-family: var(--font-cinzel);
    font-size: 11px;
    color: var(--archive-gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    min-width: 70px;
}

.tax-name {
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--reading-cream);
}

.tax-italic {
    font-style: italic;
}

/* ==========================================================================
   CHAMBER II: THE BOTANICAL RECORD
   ========================================================================== */
.chamber-ii {
    background-color: var(--inkwell-blue);
}

.chamber-ii .chamber-inner {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 80px;
    align-items: start;
}

/* Left annotation column */
.annotation-column {
    padding-top: 8px;
}

.annotation-column .section-label {
    margin-bottom: 36px;
}

.annotation-note {
    font-family: var(--font-annotation);
    font-size: 11px;
    color: var(--faded-ink);
    line-height: 1.7;
    margin-bottom: 28px;
    border-left: 1px solid var(--teal-scholar);
    padding-left: 12px;
}

.field-note {
    font-style: italic;
    color: var(--reading-cream);
    opacity: 0.6;
    border-left: 2px solid var(--archive-gold);
    border-left-opacity: 0.4;
}

/* Right: main text -->*/
.record-text .section-label {
    display: none; /* section label is in annotation column */
}

.chamber-title {
    font-family: var(--font-cinzel);
    font-size: 16px;
    color: var(--archive-gold);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-weight: 400;
}

.specimen-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-style: italic;
    font-size: 28px;
    color: var(--old-vellum);
    margin-bottom: 32px;
    line-height: 1.3;
}

.body-text {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--reading-cream);
    line-height: 1.85;
    margin-bottom: 24px;
    max-width: 74ch;
}

.body-text em {
    font-style: italic;
    color: var(--old-vellum);
}

.specimen-label {
    display: inline-block;
    border: 1px solid var(--teal-scholar);
    padding: 6px 16px;
    margin: 12px 0 28px;
}

.label-text {
    font-family: var(--font-annotation);
    font-size: 11px;
    color: var(--faded-ink);
    letter-spacing: 0.08em;
}

/* ==========================================================================
   CHAMBER III: THE CHROMATIC INDEX
   ========================================================================== */
.chamber-iii {
    background-color: var(--abyssal-navy);
}

.chamber-iii-inner {
    max-width: 1160px;
}

.chart-header {
    text-align: center;
    margin-bottom: 60px;
}

.chart-header .section-label {
    display: block;
    text-align: center;
    margin-bottom: 16px;
}

.chart-description {
    font-family: var(--font-annotation);
    font-size: 12px;
    color: var(--faded-ink);
    max-width: 600px;
    margin: 12px auto 0;
    line-height: 1.7;
    text-align: center;
}

.chart-container {
    width: 100%;
    overflow: visible;
}

.bloom-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Chart bars */
.chart-bar {
    fill: var(--deep-verdigris);
    stroke: var(--archive-gold);
    stroke-width: 0.6;
    transition: fill 0.3s var(--ease-quart);
    transform-origin: bottom center;
}

.chart-bar:hover {
    fill: var(--teal-scholar);
}

/* Bar value counter text */
.bar-value {
    font-family: var(--font-data);
    font-size: 12px;
    font-weight: 300;
    fill: var(--archive-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Month labels */
.chart-month-label {
    font-family: var(--font-data);
    font-size: 11px;
    font-weight: 300;
    fill: var(--faded-ink);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Axis labels */
.chart-axis-label {
    font-family: var(--font-annotation);
    font-size: 10px;
    fill: var(--faded-ink);
}

.chart-title-label {
    font-family: var(--font-annotation);
    font-size: 10px;
    fill: var(--faded-ink);
    font-style: italic;
}

/* ==========================================================================
   CHAMBER IV: THE ANTHOLOGY
   ========================================================================== */
.chamber-iv {
    background-color: var(--inkwell-blue);
}

.anthology-header {
    margin-bottom: 60px;
}

.anthology-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* Specimen card */
.specimen-card {
    position: relative;
    border: 1px solid var(--teal-scholar);
    padding: 48px 40px 40px;
    overflow: hidden;
    transition: border-color 0.3s var(--ease-quart);
    background-color: var(--inkwell-blue);
}

.specimen-card:hover {
    border-color: var(--archive-gold);
}

/* Watermark SVG */
.card-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    pointer-events: none;
    opacity: 0.06;
    transition: opacity 300ms var(--ease-quart);
}

.specimen-card:hover .card-watermark {
    opacity: 0.12;
}

.watermark-svg {
    width: 100%;
    height: auto;
    display: block;
}

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

.card-source {
    font-family: var(--font-annotation);
    font-size: 11px;
    color: var(--archive-gold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.card-verse {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 16px;
    color: var(--old-vellum);
    line-height: 1.9;
    border-left: 2px solid var(--archive-gold);
    padding-left: 20px;
    margin: 0 0 20px;
}

.card-note {
    font-family: var(--font-annotation);
    font-size: 12px;
    color: var(--faded-ink);
    line-height: 1.7;
}

/* ==========================================================================
   CHAMBER V: THE COLOPHON
   ========================================================================== */
.chamber-v {
    background-color: var(--charcoal-vellum);
    padding: 80px 0 60px;
}

.colophon {
    text-align: left;
    padding-left: 20px;
    border-left: 2px solid var(--teal-scholar);
    max-width: 540px;
}

.colophon-diamond {
    font-size: 20px;
    color: var(--archive-gold);
    margin-bottom: 20px;
    opacity: 0.7;
}

.colophon-title {
    font-family: var(--font-cinzel);
    font-size: 20px;
    color: var(--old-vellum);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.colophon-text {
    font-family: var(--font-body);
    font-size: 17px;
    color: var(--reading-cream);
    line-height: 1.85;
    margin-bottom: 20px;
    font-style: italic;
}

.colophon-imprint {
    font-family: var(--font-annotation);
    font-size: 11px;
    color: var(--faded-ink);
    letter-spacing: 0.1em;
    margin-bottom: 32px;
}

.colophon-taxonomy {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tax-entry {
    font-family: var(--font-annotation);
    font-size: 11px;
    color: var(--faded-ink);
    letter-spacing: 0.06em;
}

.tax-sep {
    color: var(--archive-gold);
    opacity: 0.5;
    font-size: 12px;
}

/* ==========================================================================
   RESPONSIVE — Mobile
   ========================================================================== */
@media (max-width: 900px) {
    :root {
        --section-pad: 70px;
    }

    .chamber-inner {
        padding: 0 28px;
    }

    /* Chamber I: stack vertically */
    .chamber-i .chamber-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .specimen-folio-left {
        order: 1;
    }

    .specimen-folio-right {
        order: 2;
        padding-left: 0;
    }

    .daisy-svg {
        max-width: 380px;
    }

    .site-title {
        font-size: clamp(48px, 12vw, 72px);
    }

    /* Chamber II: stack */
    .chamber-ii .chamber-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .annotation-column {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }

    .annotation-column .section-label {
        width: 100%;
        margin-bottom: 0;
    }

    .annotation-note {
        flex: 1;
        min-width: 140px;
        margin-bottom: 0;
    }

    /* Chamber IV: single column */
    .anthology-grid {
        grid-template-columns: 1fr;
    }

    /* Chart: allow horizontal scroll */
    .chart-container {
        overflow-x: auto;
    }

    .bloom-chart-svg {
        min-width: 640px;
    }
}

@media (max-width: 600px) {
    :root {
        --section-pad: 52px;
    }

    .chamber-inner {
        padding: 0 18px;
    }

    .site-title {
        font-size: 52px;
    }

    .body-text {
        font-size: 17px;
    }

    .specimen-card {
        padding: 32px 24px 28px;
    }

    .nav-marker {
        left: 16px;
        top: 16px;
    }
}
