/* tanso.club - The Carbon Herbarium */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f0e8d8;
    color: #2b1f14;
    font-family: 'Source Serif 4', serif;
    overflow-x: hidden;
    position: relative;
    /* Palette reference: #3d2e1f #4a6741 #5c4a3a #8c5c52 #b89f6a */
}

/* Paper grain texture */
.paper-grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* Folio Frame */
.folio-frame {
    position: fixed;
    top: 32px;
    left: 32px;
    right: 32px;
    bottom: 32px;
    border: 1px solid rgba(92, 74, 58, 0.3);
    pointer-events: none;
    z-index: 100;
}

/* Plates - Full viewport sections */
.plate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: opacity 0.8s ease;
}

.plate-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.specimen-column {
    width: clamp(340px, 55vw, 680px);
    margin: 0 auto;
    padding: 2rem;
}

/* Plate I - Title Page */
.plate-i {
    background-color: #f0e8d8;
    flex-direction: column;
}

.plate-i .plate-content {
    z-index: 20;
}

.title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 9rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: rgba(43, 31, 20, 0.9);
    margin-bottom: 1.5rem;
}

.tagline {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    color: #7a6b5a;
    letter-spacing: 0.08em;
}

.hero-floral {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 50vw, 600px);
    height: clamp(300px, 50vw, 600px);
    z-index: 1;
    opacity: 0.7;
}

.hero-floral .draw-on-load path,
.hero-floral .draw-on-load line,
.hero-floral .draw-on-load ellipse,
.hero-floral .draw-on-load circle {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawIn 3s ease forwards;
}

.hero-floral .draw-on-load text {
    opacity: 0;
    animation: fadeIn 1s ease 2.5s forwards;
}

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.specimen-label {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 11px;
    fill: #7a6b5a;
    letter-spacing: 0.08em;
}

/* Scroll chevron */
.scroll-chevron {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    animation: pulse-down 2s ease-in-out infinite;
    z-index: 20;
}

@keyframes pulse-down {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* Plate II - The Thesis */
.plate-ii {
    background-color: #e6d9c3;
}

.body-text {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    line-height: 1.75;
    color: rgba(61, 46, 31, 0.85);
    text-align: left;
}

.fern-left {
    position: absolute;
    left: 0;
    bottom: 0;
    width: clamp(100px, 15vw, 200px);
    height: auto;
    z-index: 5;
}

/* Plate III - The Specimens */
.plate-iii {
    background-color: #f0e8d8;
}

.plate-iii .plate-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    text-align: left;
}

.specimen-entry {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.seed-pod {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.specimen-text h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: rgba(43, 31, 20, 0.9);
    margin-bottom: 0.75rem;
}

.specimen-text p {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    line-height: 1.75;
    color: rgba(61, 46, 31, 0.85);
}

/* Plate IV - Root Network */
.plate-iv {
    background-color: #f0e8d8;
}

.root-network {
    width: clamp(400px, 70vw, 800px);
    height: auto;
}

/* Plate V - Colophon */
.plate-v {
    background-color: #e6d9c3;
}

.pressed-flower {
    position: absolute;
    bottom: 30%;
    right: 15%;
    width: 120px;
    height: 120px;
    opacity: 0.6;
}

.colophon-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3.2rem, 8vw, 7rem);
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: rgba(43, 31, 20, 0.9);
    margin-bottom: 1.5rem;
}

.colophon-text {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.6vw, 1.2rem);
    line-height: 1.75;
    color: rgba(61, 46, 31, 0.85);
    margin-bottom: 3rem;
}

.copyright {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.75rem, 1.1vw, 0.9rem);
    color: #7a6b5a;
    letter-spacing: 0.08em;
}

/* Margin garden positioning */
.margin-garden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

/* Scroll draw animation for SVGs */
.scroll-draw path,
.scroll-draw line,
.scroll-draw circle,
.scroll-draw ellipse {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.5s ease;
}

.scroll-draw.visible path,
.scroll-draw.visible line,
.scroll-draw.visible circle,
.scroll-draw.visible ellipse {
    stroke-dashoffset: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .folio-frame {
        top: 16px;
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .specimen-column {
        width: 90%;
        padding: 1.5rem;
    }

    .specimen-entry {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .fern-left {
        opacity: 0.4;
    }

    .pressed-flower {
        right: 5%;
        width: 80px;
        height: 80px;
    }
}
