/* lunch.day — Generative Botanical Almanac */

:root {
    --deep-root: #0f0a1a;
    --underground: #1b1040;
    --stem-teal: #0d7377;
    --leaf-green: #8cc63f;
    --blossom-pink: #e85d75;
    --noon-gold: #f2a154;
    --parchment: #f5f0e6;
    --ink: #2a2438;
    --aurora: linear-gradient(135deg, #0f0a1a 0%, #1b1040 15%, #0d7377 35%, #8cc63f 55%, #e85d75 75%, #f2a154 100%);
    --daytime: 0;
    --sidebar-width: 280px;
}

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

html {
    scroll-behavior: smooth;
}

body.aurora-ground {
    font-family: 'Source Serif 4', Georgia, serif;
    color: var(--ink);
    background: var(--parchment);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============ SIDEBAR TERRARIUM ============ */

.terrarium-sidebar {
    position: sticky;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: var(--deep-root);
    overflow: hidden;
    z-index: 10;
    flex-shrink: 0;
}

.site-title {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.4rem;
    color: var(--noon-gold);
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 5;
    mix-blend-mode: screen;
    letter-spacing: -0.02em;
}

.lsystem-garden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.particle-field .particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    opacity: 0.6;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100vh) translateX(20px);
        opacity: 0;
    }
}

/* ============ MAIN CONTENT ============ */

.almanac-content {
    flex: 1;
    min-width: 0;
}

.botanical-plate {
    min-height: 80vh;
    padding: 60px 48px;
    position: relative;
    background: var(--parchment);
}

.botanical-plate:nth-child(even) {
    background: color-mix(in srgb, var(--parchment) 95%, var(--underground));
}

.plate-frame {
    max-width: 1100px;
    margin: 0 auto;
    border: 0.5px solid var(--ink);
    border-radius: 2px;
    padding: 48px;
    position: relative;
    transition: border-color 0.5s ease, border-width 0.3s ease;
}

.plate-frame:hover {
    border-color: var(--stem-teal);
    border-width: 1px;
}

.plate-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    align-items: center;
}

.plate-grid.reverse {
    grid-template-columns: 1fr 2fr;
}

/* ============ TYPOGRAPHY ============ */

.plate-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--stem-teal);
    display: block;
    margin-bottom: 12px;
}

.plate-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    letter-spacing: -0.03em;
    color: var(--ink);
    line-height: 1.05;
    margin-bottom: 24px;
}

.plate-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: 24px;
}

.plate-body em {
    font-style: italic;
    color: var(--blossom-pink);
}

/* ============ BLOB QUOTES ============ */

.blob-quote {
    padding: 28px 32px;
    position: relative;
    animation: blobMorph 12s ease-in-out infinite;
    backdrop-filter: blur(2px);
    transition: transform 0.8s ease;
}

.blob-quote:hover {
    transform: scale(1.03);
}

.blob-quote p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ink);
}

.blob-teal {
    background: rgba(13, 115, 119, 0.15);
    border-radius: 42% 58% 63% 37% / 52% 41% 59% 48%;
}

.blob-pink {
    background: rgba(232, 93, 117, 0.12);
    border-radius: 58% 42% 37% 63% / 41% 59% 48% 52%;
}

.blob-gold {
    background: rgba(242, 161, 84, 0.15);
    border-radius: 48% 52% 58% 42% / 63% 37% 41% 59%;
}

@keyframes blobMorph {
    0%, 100% { border-radius: 42% 58% 63% 37% / 52% 41% 59% 48%; }
    25% { border-radius: 58% 42% 37% 63% / 41% 59% 48% 52%; }
    50% { border-radius: 37% 63% 52% 48% / 58% 42% 41% 59%; }
    75% { border-radius: 63% 37% 48% 52% / 42% 58% 59% 41%; }
}

/* ============ BOTANICAL SVGs ============ */

.plate-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
}

.botanical-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    will-change: transform;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.botanical-svg:hover {
    transform: scale(1.06);
}

/* SVG path drawing animation */
.botanical-svg path.draw-in {
    stroke-dasharray: var(--path-length, 1000);
    stroke-dashoffset: var(--path-length, 1000);
    transition: stroke-dashoffset 2s ease-out;
}

.botanical-plate.is-visible .botanical-svg path.draw-in {
    stroke-dashoffset: 0;
}

/* ============ AURORA PROGRESSION ============ */

.plate-seed .plate-label { color: var(--stem-teal); }
.plate-root .plate-label { color: var(--underground); }
.plate-stem .plate-label { color: var(--leaf-green); }
.plate-leaf .plate-label { color: var(--leaf-green); }
.plate-flower .plate-label { color: var(--blossom-pink); }
.plate-fruit .plate-label { color: var(--noon-gold); }

.plate-fruit .plate-title {
    color: var(--noon-gold);
}

.plate-fruit .plate-body em {
    color: var(--noon-gold);
}

/* ============ RESPONSIVE ============ */

@media (max-width: 900px) {
    :root {
        --sidebar-width: 60px;
    }

    .site-title {
        writing-mode: vertical-rl;
        font-size: 1rem;
        top: 16px;
        left: 50%;
        transform: translateX(-50%);
    }

    .plate-grid,
    .plate-grid.reverse {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .botanical-plate {
        padding: 32px 20px;
    }

    .plate-frame {
        padding: 28px;
    }
}

@media (max-width: 600px) {
    .terrarium-sidebar {
        position: fixed;
        width: 100%;
        height: 50px;
        min-width: unset;
        top: 0;
    }

    .site-title {
        writing-mode: horizontal-tb;
        top: 12px;
        left: 16px;
        transform: none;
    }

    .lsystem-garden, .particle-field {
        display: none;
    }

    body.aurora-ground {
        flex-direction: column;
    }

    .almanac-content {
        margin-top: 50px;
    }

    .botanical-plate {
        min-height: auto;
        padding: 24px 16px;
    }

    .plate-frame {
        padding: 20px;
    }

    .plate-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
