/* ===================================================
   eyes.team — A Collective Botanical Vision
   Inflated 3D · Editorial Flow · Hand-Drawn · Creamy Pastel
   Intersection Observer to create a "drawing in" effect as each botanical element enters the viewport. The illustrations should feel like they are being sketched in real-time as the visitor scrolls.
   =================================================== */

:root {
    /* ---- Color Palette (from DESIGN.md) ---- */
    --parchment-cream: #FBF5ED;   /* primary background "paper" */
    --warm-biscuit: #F3E8D9;      /* card surfaces */
    --deep-espresso: #3D2E24;     /* primary text */
    --warm-clay: #7D5A4F;         /* secondary text, ink outlines */
    --blush-petal: #E8B4A2;       /* accent 1 - flower */
    --sage-mist: #B5C4A8;         /* accent 2 - leaf */
    --lavender-haze: #C5B3D1;     /* accent 3 - shadow */
    --deep-umber: #4A3728;        /* hero anchor */
    --muted-rose: #B8927E;        /* captions */

    /* ---- Inflated 3D shadow ladder ---- */
    --inflate-shadow:
        0 4px 12px rgba(74, 55, 40, 0.08),
        0 12px 32px rgba(74, 55, 40, 0.05),
        0 28px 60px rgba(74, 55, 40, 0.04),
        inset 0 -2px 6px rgba(255, 255, 255, 0.6),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);

    --inflate-shadow-strong:
        0 6px 18px rgba(74, 55, 40, 0.12),
        0 20px 48px rgba(74, 55, 40, 0.08),
        0 40px 80px rgba(197, 179, 209, 0.18),
        inset 0 -3px 8px rgba(255, 255, 255, 0.7),
        inset 0 2px 6px rgba(255, 255, 255, 0.55);

    --inflate-highlight:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%);

    /* ---- Type ---- */
    --font-display: 'Caveat', 'Lora', cursive;
    --font-section: 'Shadows Into Light', 'Caveat', cursive;
    --font-body: 'Nunito', 'Inter', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--deep-espresso);
    background: var(--parchment-cream);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ===================================================
   VIEWPORT FRAME — animated border (border-animate)
   =================================================== */
.viewport-frame {
    position: fixed;
    inset: 16px;
    pointer-events: none;
    z-index: 90;
}

.frame-edge {
    position: absolute;
    background: var(--blush-petal);
    border-radius: 1px;
    transform-origin: top left;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1);
}

.frame-edge--top {
    top: 0;
    left: 0;
    height: 1px;
    width: 100%;
    transform: scaleX(0);
    animation: traceX 0.9s 0.2s forwards, borderShift 8s 1.5s infinite;
}

.frame-edge--right {
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top;
    animation: traceY 0.9s 1.0s forwards, borderShift 8s 2.0s infinite;
}

.frame-edge--bottom {
    bottom: 0;
    right: 0;
    height: 1px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: right;
    animation: traceX 0.9s 1.8s forwards, borderShift 8s 2.5s infinite;
}

.frame-edge--left {
    bottom: 0;
    left: 0;
    width: 1px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: bottom;
    animation: traceY 0.9s 2.6s forwards, borderShift 8s 3.0s infinite;
}

@keyframes traceX {
    to { transform: scaleX(1); }
}
@keyframes traceY {
    to { transform: scaleY(1); }
}

@keyframes borderShift {
    0%   { background: var(--blush-petal); }
    33%  { background: var(--sage-mist); }
    66%  { background: var(--lavender-haze); }
    100% { background: var(--blush-petal); }
}

/* ---- Paper grain overlay ---- */
.paper-grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 80;
    opacity: 0.35;
    mix-blend-mode: multiply;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(125, 90, 79, 0.04) 0%, transparent 12%),
        radial-gradient(circle at 78% 42%, rgba(232, 180, 162, 0.05) 0%, transparent 14%),
        radial-gradient(circle at 38% 78%, rgba(181, 196, 168, 0.04) 0%, transparent 16%),
        radial-gradient(circle at 88% 88%, rgba(197, 179, 209, 0.05) 0%, transparent 14%);
}

/* ===================================================
   JOURNAL CONTAINER
   =================================================== */
.journal {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 4rem;
    position: relative;
    z-index: 1;
}

/* ===================================================
   SPREADS
   =================================================== */
.spread {
    min-height: 100vh;
    padding: 6rem 0;
    position: relative;
    display: grid;
    align-items: center;
    gap: 4rem;
}

/* ----- HERO SPREAD ----- */
.spread--hero {
    grid-template-columns: 4fr 6fr;
    padding-top: 8rem;
}

.hero-title-block {
    position: relative;
    z-index: 2;
    transform: rotate(-1deg);
}

.caption {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted-rose);
    margin-bottom: 1.5rem;
}

.caption--top {
    margin-bottom: 2rem;
}

.caption--center {
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--deep-umber);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title__line--1 {
    transform: rotate(-2deg) translateX(-0.2rem);
}

.hero-title__dot {
    color: var(--blush-petal);
    line-height: 0.4;
    margin: 0.2rem 0;
    transform: translateX(2.6rem) rotate(8deg);
    font-size: 0.7em;
}

.hero-title__line--2 {
    transform: rotate(1.5deg) translateX(1.4rem);
    color: var(--warm-clay);
}

.hero-subtitle {
    margin-top: 1.6rem;
    font-family: var(--font-section);
    font-size: clamp(1.15rem, 1.8vw, 1.6rem);
    color: var(--warm-clay);
    line-height: 1.4;
    letter-spacing: 0.02em;
    transform: rotate(0.5deg);
}

.hero-meta {
    margin-top: 2.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-pill {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--warm-clay);
    background: var(--warm-biscuit);
    padding: 0.5rem 1.2rem;
    border-radius: 24px;
    box-shadow:
        0 2px 6px rgba(74, 55, 40, 0.06),
        inset 0 -1px 3px rgba(255, 255, 255, 0.6);
}

.meta-divider {
    width: 16px;
    height: 1px;
    background: var(--muted-rose);
    opacity: 0.5;
}

/* ----- HERO BLOOM (Inflated 3D peony) ----- */
.hero-bloom-stage {
    position: relative;
    height: clamp(420px, 55vw, 640px);
    z-index: 1;
}

.bloom {
    position: absolute;
    border-radius: 50%;
    transition: transform 800ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bloom--primary {
    width: 78%;
    aspect-ratio: 1;
    top: 10%;
    right: 6%;
    animation: bloomFloat 9s ease-in-out infinite;
}

.bloom-petal,
.bloom-center {
    position: absolute;
    border-radius: 50%;
    background-image: var(--inflate-highlight);
    box-shadow: var(--inflate-shadow-strong);
}

.bloom-petal {
    width: 58%;
    aspect-ratio: 1;
    top: 21%;
    left: 21%;
    background-color: var(--blush-petal);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%),
        linear-gradient(135deg, #F0C2B2 0%, #E8B4A2 60%, #D49880 100%);
}

.bloom-petal--1 { transform: rotate(0deg)   translateY(-32%); }
.bloom-petal--2 { transform: rotate(60deg)  translateY(-32%); }
.bloom-petal--3 { transform: rotate(120deg) translateY(-32%); }
.bloom-petal--4 { transform: rotate(180deg) translateY(-32%); }
.bloom-petal--5 { transform: rotate(240deg) translateY(-32%); }
.bloom-petal--6 { transform: rotate(300deg) translateY(-32%); }

.bloom-center {
    width: 38%;
    aspect-ratio: 1;
    top: 31%;
    left: 31%;
    background-color: var(--warm-biscuit);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.7) 0%, transparent 60%),
        radial-gradient(circle at 50% 50%, #F8E1CA 0%, #E8B4A2 100%);
    box-shadow:
        0 6px 20px rgba(74, 55, 40, 0.15),
        inset 0 -4px 10px rgba(125, 90, 79, 0.18),
        inset 0 4px 10px rgba(255, 255, 255, 0.7);
}

.bloom-center::after {
    content: "";
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, var(--deep-umber) 0%, var(--warm-clay) 60%, transparent 100%);
    opacity: 0.35;
}

@keyframes bloomFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-14px) rotate(2deg); }
}

/* Satellite buds */
.bloom--satellite {
    width: 28%;
    aspect-ratio: 1;
}

.bloom--satellite-a {
    top: 4%;
    left: 4%;
    animation: budFloat 7s ease-in-out infinite;
}

.bloom--satellite-b {
    bottom: 4%;
    left: 22%;
    animation: budFloat 11s ease-in-out infinite reverse;
}

.bud {
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    background-color: var(--lavender-haze);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%),
        linear-gradient(135deg, #D8C8E0 0%, #C5B3D1 100%);
    box-shadow: var(--inflate-shadow);
}

.bud--small {
    inset: 22%;
    background-color: var(--sage-mist);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%),
        linear-gradient(135deg, #C8D4BC 0%, #B5C4A8 100%);
}

@keyframes budFloat {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(8px, -10px); }
}

/* Hand-drawn vine on hero */
.vine {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

/* ===================================================
   HAND-DRAWN PATH STYLES (botanical SVG)
   =================================================== */
.draw-path,
.draw-circle,
.draw-ellipse {
    fill: none;
    stroke: var(--warm-clay);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.leaf-fill {
    fill: rgba(181, 196, 168, 0.45);
}

.bloom-fill {
    fill: rgba(232, 180, 162, 0.5);
}

.bloom-fill--inner {
    fill: rgba(232, 180, 162, 0.3);
}

.bloom-fill--mist {
    fill: rgba(181, 196, 168, 0.4);
}

.draw-path--leaf {
    fill: rgba(181, 196, 168, 0.4);
}

/* Initial state for path-drawing (set via JS using getTotalLength) */
.draw-path,
.draw-circle,
.draw-ellipse {
    transition: stroke-dashoffset 1800ms cubic-bezier(0.4, 0, 0.2, 1),
                fill-opacity 1200ms ease 600ms;
}

/* ===================================================
   CORNER FLOURISHES
   =================================================== */
.corner-flourish {
    position: absolute;
    width: 96px;
    height: 96px;
    overflow: visible;
    opacity: 0.85;
    pointer-events: none;
}

.corner-flourish--tl { top: 1rem; left: 0; }
.corner-flourish--tr { top: 1rem; right: 0; }
.corner-flourish--bl { bottom: 1rem; left: 0; }
.corner-flourish--br { bottom: 1rem; right: 0; }

/* ===================================================
   SCROLL CUE
   =================================================== */
.scroll-cue {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-section);
    font-size: 1.1rem;
    color: var(--warm-clay);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    opacity: 0.85;
}

.scroll-cue__arrow {
    display: inline-block;
    animation: cueBob 2.4s ease-in-out infinite;
    color: var(--blush-petal);
    font-size: 1.3rem;
}

@keyframes cueBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

/* ===================================================
   INFLATED DIVIDERS
   =================================================== */
.divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 3rem 0;
}

.divider-pill {
    display: block;
    width: 56px;
    height: 18px;
    border-radius: 32px;
    background-color: var(--warm-biscuit);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.6) 0%, transparent 70%);
    box-shadow:
        0 3px 8px rgba(74, 55, 40, 0.08),
        0 8px 18px rgba(74, 55, 40, 0.05),
        inset 0 -2px 4px rgba(255, 255, 255, 0.7),
        inset 0 1px 2px rgba(255, 255, 255, 0.5);
    animation: dividerBreathe 5s ease-in-out infinite;
}

.divider-pill--mid {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: var(--blush-petal);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%),
        linear-gradient(135deg, #F0C2B2 0%, #E8B4A2 100%);
    animation-delay: 1s;
}

@keyframes dividerBreathe {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

/* ===================================================
   EDITORIAL SPREADS — text + illustration
   =================================================== */
.spread--editorial {
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 880px) {
    .spread--text-left {
        grid-template-columns: 13fr 7fr;
    }
    .spread--text-right {
        grid-template-columns: 7fr 13fr;
    }
    .spread--text-right .spread-illustration--left {
        order: 1;
    }
    .spread--text-right .spread-text {
        order: 2;
    }
}

.spread-text {
    padding: 1rem;
    max-width: 640px;
}

.section-heading {
    font-family: var(--font-section);
    font-weight: 400;
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: var(--warm-clay);
    margin-bottom: 1.6rem;
    transform: rotate(-0.5deg);
}

.body-text {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 18px;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--deep-espresso);
    margin-bottom: 1.4rem;
    max-width: 56ch;
}

.body-text em {
    font-style: italic;
    color: var(--warm-clay);
    font-weight: 600;
}

.pull-quote {
    margin-top: 2.4rem;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(1.5rem, 2.6vw, 2.2rem);
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--deep-umber);
    padding-left: 1.4rem;
    border-left: 2px solid var(--blush-petal);
    transform: rotate(-1deg);
    max-width: 40ch;
}

.pull-quote--tilt {
    transform: rotate(1.5deg);
    border-left-color: var(--sage-mist);
}

.practice-list {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.practice-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-section);
    font-size: 1.25rem;
    color: var(--warm-clay);
    letter-spacing: 0.02em;
}

.practice-bullet {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--sage-mist);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%);
    box-shadow:
        0 2px 5px rgba(74, 55, 40, 0.12),
        inset 0 -1px 2px rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

/* ----- Illustration columns ----- */
.spread-illustration {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    min-height: 360px;
}

.puff-card {
    position: relative;
    background-color: var(--warm-biscuit);
    background-image: var(--inflate-highlight);
    border-radius: 36px;
    padding: 2.4rem;
    box-shadow: var(--inflate-shadow);
    border: 1px solid var(--blush-petal);
    transition: transform 600ms ease, box-shadow 600ms ease, border-color 800ms ease;
    animation: cardBorderShift 8s ease-in-out infinite;
}

.puff-card--portrait {
    width: min(320px, 100%);
    aspect-ratio: 4 / 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.puff-card--landscape {
    width: min(420px, 100%);
    aspect-ratio: 5 / 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.puff-card--alt {
    background-color: var(--parchment-cream);
    animation-delay: -3s;
}

.puff-card:hover {
    transform: scale(1.02);
    box-shadow: var(--inflate-shadow-strong);
    border-color: var(--sage-mist);
}

@keyframes cardBorderShift {
    0%   { border-color: var(--blush-petal); }
    33%  { border-color: var(--sage-mist); }
    66%  { border-color: var(--lavender-haze); }
    100% { border-color: var(--blush-petal); }
}

.botanical-svg {
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: visible;
}

.card-label {
    margin-top: 1rem;
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-rose);
    text-align: center;
}

/* ----- Floating puff orbs (decorative) ----- */
.puff-orb {
    position: absolute;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-image: var(--inflate-highlight);
    box-shadow: var(--inflate-shadow);
    pointer-events: none;
    animation: orbDrift 9s ease-in-out infinite;
}

.puff-orb--lavender {
    background-color: var(--lavender-haze);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%),
        linear-gradient(135deg, #D8C8E0 0%, #C5B3D1 100%);
    top: 8%;
    right: 6%;
}

.puff-orb--sage {
    background-color: var(--sage-mist);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%),
        linear-gradient(135deg, #C8D4BC 0%, #B5C4A8 100%);
    bottom: 8%;
    left: 4%;
    animation-delay: -3s;
}

.puff-orb--blush {
    background-color: var(--blush-petal);
    background-image:
        radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.55) 0%, transparent 70%),
        linear-gradient(135deg, #F0C2B2 0%, #E8B4A2 100%);
    top: 12%;
    left: 4%;
    animation-delay: -5s;
}

.puff-orb--small {
    width: 40px;
    height: 40px;
    bottom: 10%;
    right: 8%;
    animation-delay: -2s;
}

@keyframes orbDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%      { transform: translate(8px, -10px) rotate(2deg); }
    66%      { transform: translate(-6px, 6px) rotate(-2deg); }
}

/* ===================================================
   ORNAMENT (between sections within a spread)
   =================================================== */
.ornament {
    margin-top: 2.4rem;
    width: 240px;
    opacity: 0.9;
}

.ornament svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

/* ===================================================
   CLOSING SPREAD
   =================================================== */
.spread--closing {
    grid-template-columns: 1fr;
    text-align: center;
    align-items: start;
    padding-top: 4rem;
    padding-bottom: 8rem;
    min-height: 110vh;
}

.closing-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    line-height: 1.1;
    color: var(--deep-umber);
    margin: 0 auto 2rem;
    transform: rotate(-1deg);
    max-width: 24ch;
}

.closing-vine {
    width: clamp(280px, 60vw, 600px);
    height: clamp(560px, 85vh, 800px);
    margin: 0 auto;
    display: block;
    overflow: visible;
}

.closing-vine__main {
    stroke-width: 1.4;
}

.closing-pod {
    fill: var(--warm-biscuit);
    stroke: var(--warm-clay);
    stroke-width: 1.2;
    filter: drop-shadow(0 6px 16px rgba(74, 55, 40, 0.12))
            drop-shadow(0 14px 30px rgba(197, 179, 209, 0.2));
}

.closing-pod__text {
    font-family: var(--font-display);
    font-size: 36px;
    fill: var(--deep-umber);
    letter-spacing: 0.02em;
    opacity: 0;
    transition: opacity 1200ms ease 1500ms;
}

.is-visible .closing-pod__text {
    opacity: 1;
}

.closing-signoff {
    margin-top: 1.5rem;
    font-family: var(--font-section);
    font-size: 1.2rem;
    color: var(--warm-clay);
    letter-spacing: 0.04em;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 880px) {
    .journal {
        padding: 0 2rem;
    }
    .spread {
        min-height: auto;
        padding: 4rem 0;
    }
    .spread--hero {
        grid-template-columns: 1fr;
        padding-top: 5rem;
    }
    .hero-bloom-stage {
        height: 360px;
    }
    .scroll-cue {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        margin-top: 2rem;
    }
    .corner-flourish {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 540px) {
    .journal {
        padding: 0 1.4rem;
    }
    .viewport-frame {
        inset: 8px;
    }
    .puff-card--portrait,
    .puff-card--landscape {
        width: 100%;
    }
    .puff-orb {
        width: 44px;
        height: 44px;
    }
}
