/* lupin.day - botanical illustration garden
   palette: parchment + deep lupin + violet + pink + blue + green + pressed flower
   typography: Cormorant Garamond / Lora / Josefin Sans
*/

:root {
    --parchment: #faf8f5;
    --pressed: #e8e0d5;
    --ink: #2a1f3d;
    --violet: #7b5ea7;
    --pink: #d4739d;
    --blue: #5b7fb5;
    --green: #4a6b3a;

    --max: 640px;
    --gutter: clamp(1.5rem, 5vw, 3rem);

    --ff-display: "Cormorant Garamond", "Lora", Georgia, serif;
    --ff-body: "Lora", Georgia, serif;
    --ff-label: "Josefin Sans", "Helvetica Neue", Arial, sans-serif;
}

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

html {
    background: var(--parchment);
    scroll-behavior: smooth;
}

body {
    background: var(--parchment);
    color: var(--ink);
    font-family: var(--ff-body);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.85;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* watercolor noise grain on entire page */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.16  0 0 0 0 0.12  0 0 0 0 0.24  0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
    opacity: 0.04;
    mix-blend-mode: multiply;
    z-index: 1;
}

main.scroll {
    position: relative;
    z-index: 2;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 10vh;
    padding-top: 4vh;
}

.hero-stem {
    position: absolute;
    top: 4vh;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 60vh;
    background: linear-gradient(
        to top,
        var(--green) 0%,
        var(--green) 8%,
        var(--violet) 50%,
        var(--pink) 92%,
        var(--pink) 100%
    );
    border-radius: 2px;
    box-shadow:
        0 0 24px rgba(123, 94, 167, 0.18),
        0 0 60px rgba(212, 115, 157, 0.10);
}

/* tiny flower buds along the stem */
.hero-stem::before,
.hero-stem::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
}
.hero-stem::before {
    top: 18%;
    background: var(--pink);
    box-shadow:
        -10px 14% 0 -1px var(--violet),
         10px 28% 0 -1px var(--pink);
}
.hero-stem::after {
    top: 60%;
    background: var(--violet);
    box-shadow:
        -10px -8% 0 -1px var(--blue),
         10px  4% 0 -1px var(--violet);
}

.hero-inner {
    position: relative;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    animation: fade-reveal 1200ms ease-out 200ms forwards;
}

.hero-label {
    font-family: var(--ff-label);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--violet);
    margin-bottom: 1.2rem;
    font-style: italic;
}

.hero-title {
    font-family: var(--ff-display);
    font-weight: 500;
    font-size: clamp(3rem, 9vw, 5.5rem);
    line-height: 1;
    color: var(--ink);
    letter-spacing: -0.01em;
    margin-bottom: 1.4rem;
}

.hero-sub {
    font-family: var(--ff-body);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--ink);
    opacity: 0.78;
    max-width: 28em;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- ORNAMENT (pentagon of dots: lupin top-down) ---------- */
.ornament {
    display: grid;
    grid-template-columns: repeat(3, 6px);
    grid-template-rows: repeat(3, 6px);
    column-gap: 8px;
    row-gap: 6px;
    width: max-content;
    margin: clamp(3rem, 7vh, 5rem) auto;
    justify-content: center;
}

.ornament span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: block;
}

/* pentagon arrangement within 3x3 grid */
.ornament span:nth-child(1) { grid-column: 2; grid-row: 1; background: var(--pink); }
.ornament span:nth-child(2) { grid-column: 1; grid-row: 2; background: var(--violet); }
.ornament span:nth-child(3) { grid-column: 3; grid-row: 2; background: var(--violet); }
.ornament span:nth-child(4) { grid-column: 1; grid-row: 3; background: var(--blue); }
.ornament span:nth-child(5) { grid-column: 3; grid-row: 3; background: var(--blue); }

.ornament.closing span:nth-child(1) { background: var(--green); }
.ornament.closing span:nth-child(2),
.ornament.closing span:nth-child(3) { background: var(--violet); }
.ornament.closing span:nth-child(4),
.ornament.closing span:nth-child(5) { background: var(--pink); }

/* ---------- ENTRIES (sections) ---------- */
.entry {
    position: relative;
    padding: clamp(1.5rem, 4vh, 2.4rem) clamp(1rem, 4vw, 1.8rem);
    margin-bottom: clamp(4rem, 10vh, 8rem);
    border-left: 3px solid var(--violet);
    box-shadow: 0 0 40px rgba(123, 94, 167, 0.08);
    background: var(--parchment);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

.entry.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* cycling section colours */
.entry:nth-of-type(3n+1) { border-left-color: var(--violet); }
.entry:nth-of-type(3n+2) { border-left-color: var(--pink); }
.entry:nth-of-type(3n+3) { border-left-color: var(--blue); }

/* alternating pressed-flower background */
.entry.pressed {
    background-color: var(--pressed);
    background-image:
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n2'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.20  0 0 0 0 0.14  0 0 0 0 0.30  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n2)' opacity='1'/></svg>");
    background-blend-mode: multiply;
    background-size: 200px 200px;
}

.entry-label {
    font-family: var(--ff-label);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: lowercase;
    color: var(--violet);
    margin-bottom: 1rem;
}

.entry-title {
    font-family: var(--ff-display);
    font-weight: 500;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 1.6rem;
    letter-spacing: -0.005em;
}

.entry-body {
    font-family: var(--ff-body);
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--ink);
    margin-bottom: 1.2rem;
}

.entry-body em {
    color: var(--violet);
    font-style: italic;
}

.entry-body:last-child {
    margin-bottom: 0;
}

.entry-meta {
    font-family: var(--ff-label);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--green);
    margin-top: 1.6rem;
    text-transform: lowercase;
}

/* ---------- ANATOMY LIST ---------- */
.anatomy-list {
    list-style: none;
    margin-top: 1rem;
}

.anatomy-list li {
    display: grid;
    grid-template-columns: 18px 110px 1fr;
    align-items: baseline;
    column-gap: 14px;
    padding: 0.7rem 0;
    border-bottom: 1px dotted rgba(42, 31, 61, 0.18);
}

.anatomy-list li:last-child {
    border-bottom: none;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transform: translateY(2px);
}

.anatomy-name {
    font-family: var(--ff-display);
    font-weight: 500;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--ink);
}

.anatomy-note {
    font-family: var(--ff-body);
    font-size: 0.95rem;
    color: var(--ink);
    opacity: 0.78;
    line-height: 1.6;
}

/* ---------- SEASONS ---------- */
.season {
    margin-bottom: 1.8rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(123, 94, 167, 0.25);
}

.season:last-child {
    margin-bottom: 0;
}

.season-name {
    font-family: var(--ff-label);
    font-weight: 300;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--pink);
    margin-bottom: 0.5rem;
}

/* ---------- TODAY / QUOTE / BUTTON ---------- */
.quote {
    margin: 1.6rem 0 2rem 0;
    padding: 1.4rem 1.6rem;
    background: rgba(232, 224, 213, 0.55);
    border-left: 2px solid var(--pink);
    transition: opacity 600ms ease;
}

.quote.is-fading {
    opacity: 0;
}

.quote-text {
    font-family: var(--ff-display);
    font-weight: 500;
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: 0.8rem;
}

.quote-attr {
    font-family: var(--ff-label);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--violet);
    text-transform: lowercase;
}

.petal-button {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.6rem 1.4rem;
    background: transparent;
    color: var(--violet);
    border: 1px solid var(--violet);
    border-radius: 999px;
    font-family: var(--ff-label);
    font-weight: 300;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: lowercase;
    cursor: pointer;
    transition: background 400ms ease, color 400ms ease, border-color 400ms ease, transform 600ms ease;
}

.petal-button:hover {
    background: var(--violet);
    color: var(--parchment);
    transform: translateY(-1px);
}

.petal-button:active {
    transform: translateY(0) scale(0.98);
}

/* ---------- HERBARIUM ---------- */
.herbarium {
    margin-top: 0.8rem;
}

.herb-row {
    padding: 1.1rem 0;
    border-bottom: 1px dotted rgba(42, 31, 61, 0.18);
}

.herb-row:last-child {
    border-bottom: none;
}

.herb-row dt {
    margin-bottom: 0.3rem;
}

.latin {
    font-family: var(--ff-display);
    font-weight: 500;
    font-style: italic;
    font-size: 1.15rem;
    color: var(--violet);
}

.herb-row dd {
    font-family: var(--ff-body);
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--ink);
    opacity: 0.85;
}

/* ---------- FOOTER ---------- */
.footer {
    text-align: center;
    padding: 3rem 0 5rem 0;
    opacity: 0.7;
}

.footer-line {
    font-family: var(--ff-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 0.4rem;
}

.footer-meta {
    font-family: var(--ff-label);
    font-weight: 300;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    text-transform: lowercase;
    color: var(--green);
}

/* ---------- LINKS ---------- */
a {
    color: var(--pink);
    text-decoration: none;
    border-bottom: 1px dotted var(--pink);
    transition: color 300ms ease, border-color 300ms ease;
}

a:hover {
    color: var(--violet);
    border-bottom-color: var(--violet);
}

/* ---------- ANIMATIONS ---------- */
@keyframes fade-reveal {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stem-grow {
    from {
        transform: translateX(-50%) scaleY(0);
        transform-origin: bottom center;
    }
    to {
        transform: translateX(-50%) scaleY(1);
        transform-origin: bottom center;
    }
}

.hero-stem {
    transform-origin: bottom center;
    animation: stem-grow 2400ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
    main.scroll {
        padding: 0 1.2rem;
    }
    .hero-title {
        font-size: 2.6rem;
    }
    .anatomy-list li {
        grid-template-columns: 16px 1fr;
        grid-row-gap: 4px;
    }
    .anatomy-list li .anatomy-name {
        grid-column: 2;
    }
    .anatomy-list li .anatomy-note {
        grid-column: 2;
    }
}
