/* ============================================================
   miko.pet — MUJI-botanical split-screen stylesheet
   Colors: #F5F0E8 #E8DFD0 #C8B89A #8B7355 #3D2E1E #A8C4A2 #D4B8C4 #B8A090
   Fonts: Cormorant Garamond (display), DM Sans (body), Fraunces (accent)
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --linen:       #F5F0E8;
    --oatmeal:     #E8DFD0;
    --reed:        #C8B89A;
    --bark:        #8B7355;
    --ink:         #3D2E1E;
    --sage:        #A8C4A2;
    --rose-petal:  #D4B8C4;
    --terra-rose:  #B8A090;

    --font-display:  'Cormorant Garamond', Georgia, serif;
    --font-body:     'DM Sans', system-ui, sans-serif;
    --font-accent:   'Fraunces', Georgia, serif;

    --split-left:  52%;
    --split-right: 48%;
    --seam-color:  #C8B89A;
    --seam-width:  1px;

    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
    background-color: var(--linen);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 300;
    letter-spacing: -0.025em;
    color: var(--ink);
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 72px;
    letter-spacing: -0.03em;
    color: var(--ink);
    line-height: 1;
    position: relative;
    z-index: 2;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 48px;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 8px;
}

.section-sub {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--bark);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.body-text {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: 20px;
}

.body-text.small-text {
    font-size: 13px;
    color: var(--bark);
    line-height: 1.6;
}

/* Fraunces variable wonk */
.fraunces-wonk {
    font-family: var(--font-accent);
    font-style: italic;
    font-weight: 300;
    font-variation-settings: 'WONK' 0;
    transition: font-variation-settings 400ms var(--ease-soft);
}

.fraunces-wonk:hover {
    font-variation-settings: 'WONK' 1;
}

/* --- Stem Navigation --- */
#stem-nav {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

#stem-svg {
    width: 24px;
    height: 200px;
}

.stem-node {
    transition: fill 300ms var(--ease-soft);
    cursor: pointer;
}

.stem-node:hover,
.stem-node.active {
    fill: var(--bark);
}

#stem-nav ul {
    display: none;
    list-style: none;
}

/* --- Acts / Sections --- */
.act {
    min-height: 100vh;
    display: flex;
    position: relative;
}

.act--split {
    flex-direction: row;
}

.act--full {
    flex-direction: column;
    background-color: var(--linen);
    padding: 80px 60px;
}

/* --- Split Layout --- */
.split-left {
    width: var(--split-left);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px 48px;
    background-color: var(--linen);
}

.split-seam {
    width: var(--seam-width);
    background-color: var(--seam-color);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.split-right {
    width: var(--split-right);
    padding: 60px 48px;
    background-color: var(--oatmeal);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

/* --- Botanical Collage --- */
.botanical-collage {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.collage-ground {
    position: absolute;
    inset: 0;
    background-color: var(--linen);
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(200,184,154,0.06) 3px,
            rgba(200,184,154,0.06) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 7px,
            rgba(200,184,154,0.03) 7px,
            rgba(200,184,154,0.03) 8px
        );
}

.collage-layer {
    position: absolute;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.collage-layer--1 {
    width: 70%;
    top: 5%;
    left: -5%;
    opacity: 0.55;
    transform: translateY(0);
    will-change: transform;
}

.collage-layer--2 {
    width: 65%;
    top: 20%;
    right: -8%;
    opacity: 0.45;
    transform: translateY(0);
    will-change: transform;
}

.collage-layer--3 {
    width: 75%;
    top: 40%;
    left: 10%;
    opacity: 0.50;
    transform: translateY(0);
    will-change: transform;
}

/* --- Hero Text --- */
.hero-text {
    position: relative;
    z-index: 2;
    margin-bottom: 16px;
}

.pull-quote {
    font-size: 22px;
    color: var(--bark);
    margin-top: 16px;
    display: block;
}

/* --- Margin Annotations --- */
.margin-annotation {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.margin-annotation span {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    color: var(--bark);
    opacity: 0.68;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* --- Hero Illustration (right panel) --- */
.hero-illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex: 1;
}

.cat-illustration {
    width: 60%;
    max-width: 280px;
    opacity: 0.88;
    mix-blend-mode: multiply;
}

.right-margin {
    align-self: flex-end;
    margin-top: auto;
}

/* --- Act II: Herbarium --- */
#act-2 .split-left {
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.specimen-illustration {
    width: 100%;
    max-width: 300px;
    position: relative;
}

.specimen-full {
    width: 100%;
    mix-blend-mode: multiply;
    opacity: 0.75;
}

.herbarium-header {
    margin-bottom: 8px;
}

/* Herb Cards */
.herb-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 8px;
    max-height: calc(100vh - 180px);
}

.herb-card {
    background-color: var(--linen);
    border: 1px solid var(--reed);
    padding: 20px 20px 20px 16px;
    display: flex;
    gap: 12px;
    transform: translateY(0px);
    opacity: 1;
    transition: transform 500ms var(--spring), box-shadow 300ms var(--ease-soft);
    position: relative;
    will-change: transform;
}

.herb-card.card-entering {
    opacity: 0;
    transform: translateY(8px);
}

.herb-card:hover {
    box-shadow: 0 4px 16px rgba(61, 46, 30, 0.08);
    transform: translateY(-2px);
    transition: transform 300ms var(--spring), box-shadow 300ms var(--ease-soft);
}

.herb-card__leaf {
    flex-shrink: 0;
    width: 20px;
    display: flex;
    align-items: flex-start;
    padding-top: 4px;
}

.leaf-stamp {
    width: 12px;
    height: auto;
}

.herb-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 2px;
}

.herb-latin {
    font-family: var(--font-body);
    font-size: 11px;
    font-style: italic;
    color: var(--bark);
    opacity: 0.68;
    margin-bottom: 8px;
    letter-spacing: 0.03em;
}

.herb-use {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--ink);
}

/* --- Act III: The Practice --- */
.specimen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 100%;
    height: 100%;
    padding: 40px;
}

.specimen-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--linen);
    padding: 20px;
    opacity: 0;
    transition: opacity 700ms var(--ease-soft);
}

.specimen-cell.visible {
    opacity: 1;
}

.specimen-img {
    width: 80%;
    mix-blend-mode: multiply;
    opacity: 0.7;
}

.specimen-label {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bark);
    opacity: 0.6;
    font-style: italic;
}

/* Practice layout: margin + main */
.practice-layout {
    display: flex;
    gap: 32px;
    height: 100%;
}

.margin-col {
    flex: 0 0 80px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding-top: 88px;
}

.margin-note {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 400;
    color: var(--bark);
    opacity: 0.68;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    writing-mode: horizontal-tb;
}

.main-text-col {
    flex: 1;
}

.pull-quote-block {
    font-size: 26px;
    color: var(--bark);
    border-left: 2px solid var(--reed);
    padding-left: 20px;
    margin: 28px 0;
    font-style: italic;
    line-height: 1.4;
}

/* --- Act IV: Field Notes --- */
.act--full {
    background-color: var(--linen);
}

.field-notes-header {
    margin-bottom: 40px;
}

.field-notes-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}

.field-notes-scroll:active {
    cursor: grabbing;
}

.field-notes-scroll::-webkit-scrollbar {
    height: 3px;
}

.field-notes-scroll::-webkit-scrollbar-track {
    background: var(--oatmeal);
}

.field-notes-scroll::-webkit-scrollbar-thumb {
    background: var(--reed);
}

.field-note-card {
    flex: 0 0 320px;
    padding: 36px 32px 28px;
    position: relative;
    scroll-snap-align: start;
    border: 1px solid var(--reed);
}

.field-note-card--linen {
    background-color: var(--linen);
}

.field-note-card--oatmeal {
    background-color: var(--oatmeal);
}

.note-text {
    font-size: 18px;
    line-height: 1.5;
    color: var(--ink);
    margin-bottom: 20px;
}

.note-attribution {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.note-author {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--ink);
}

.note-pet {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    color: var(--bark);
    opacity: 0.68;
}

.note-specimen {
    position: absolute;
    top: 16px;
    right: 16px;
    opacity: 0.4;
}

.note-leaf {
    width: 16px;
}

/* --- Act V: The Root --- */
.act--root .split-left {
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
}

.brand-mark-large {
    position: relative;
    z-index: 2;
}

.paw-brand {
    width: 200px;
    height: 200px;
}

.root-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    justify-content: center;
    height: 100%;
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-address {
    font-style: normal;
}

.contact-link {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 300;
    color: var(--bark);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 250ms var(--ease-soft);
}

.contact-link:hover {
    color: var(--terra-rose);
}

/* Newsletter */
.newsletter-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-label {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--bark);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.newsletter-form-wrap {
    display: flex;
    gap: 0;
    border: 1px solid var(--reed);
    max-width: 340px;
}

.botanical-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 300;
    color: var(--ink);
    outline: none;
}

.botanical-input::placeholder {
    color: var(--bark);
    opacity: 0.5;
}

.newsletter-btn {
    background: transparent;
    border: none;
    border-left: 1px solid var(--reed);
    padding: 12px 20px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bark);
    cursor: pointer;
    transition: background-color 250ms var(--ease-soft), color 250ms var(--ease-soft);
}

.newsletter-btn:hover {
    background-color: var(--reed);
    color: var(--linen);
}

.newsletter-confirmation {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--sage);
    font-style: italic;
}

.newsletter-confirmation[hidden] {
    display: none;
}

/* --- Footer --- */
#site-footer {
    background-color: var(--oatmeal);
    border-top: 1px solid var(--reed);
    padding: 0;
    overflow: hidden;
}

.footer-botanical {
    width: 100%;
    height: 80px;
    overflow: hidden;
    opacity: 0.5;
}

.footer-band-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    mix-blend-mode: multiply;
}

.footer-text {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    padding: 20px 60px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 300;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.footer-copy {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 300;
    color: var(--bark);
    opacity: 0.7;
    letter-spacing: 0.04em;
}

/* --- Scrollbar global --- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: var(--oatmeal);
}

::-webkit-scrollbar-thumb {
    background: var(--reed);
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    .act--split {
        flex-direction: column;
    }

    .split-left {
        width: 100%;
        height: 120px;
        min-height: 120px;
        position: relative;
        padding: 16px 24px;
        justify-content: flex-end;
    }

    .split-seam {
        width: 100%;
        height: var(--seam-width);
        position: relative;
        top: auto;
    }

    .split-right {
        width: 100%;
        min-height: auto;
        padding: 32px 24px;
    }

    .brand-name {
        font-size: 40px;
    }

    .section-title {
        font-size: 32px;
    }

    .botanical-collage {
        opacity: 0.4;
    }

    #stem-nav {
        display: none;
    }

    .practice-layout {
        flex-direction: column;
        gap: 16px;
    }

    .margin-col {
        flex-direction: row;
        flex: none;
        padding-top: 0;
        gap: 16px;
        flex-wrap: wrap;
    }

    .specimen-grid {
        padding: 16px;
    }

    .act--full {
        padding: 40px 24px;
    }

    .field-note-card {
        flex: 0 0 280px;
    }

    .act--root .split-left {
        height: 200px;
        min-height: 200px;
    }
}

/* --- Transition states for scroll-driven content swap --- */
.split-left-content {
    transition: opacity 600ms var(--ease-soft);
}

.split-left-content.fading {
    opacity: 0;
}

/* --- Herb card elastic entry --- */
@keyframes elasticEnter {
    0%   { transform: translateY(8px); opacity: 0; }
    60%  { transform: translateY(-3px); opacity: 1; }
    80%  { transform: translateY(2px); }
    100% { transform: translateY(0); opacity: 1; }
}

.herb-card.elastic-enter {
    animation: elasticEnter 500ms var(--spring) forwards;
}

/* --- Seed-head loading indicator --- */
@keyframes seedSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
