/* =========================================================
   chrono.games — surrealist horological garden
   palette: cool grays + sage bloom + lavender whisper
   typography: JetBrains Mono + IBM Plex Mono + Cormorant Garamond
   ========================================================= */

:root {
    --c-base: #EEF1F4;
    --c-mid-fog: #D6DEE5;
    --c-mid-fog-2: #C4CFD9;
    --c-deep-fog: #A8B3BF;
    --c-pencil: #5C6773;
    --c-slate: #2E3640;
    --c-midnight: #191E26;
    --c-bloom: #A8C0B5;
    --c-petal: #C7B8C9;
    --c-paper: #E8ECF0;

    --f-mono-label: 'JetBrains Mono', ui-monospace, monospace;
    --f-mono-num: 'IBM Plex Mono', ui-monospace, monospace;
    --f-serif: 'Cormorant Garamond', 'Lora', Georgia, serif;

    --sidebar-w: 240px;
    --pad-card: clamp(28px, 4vw, 56px);

    --ease-breath: cubic-bezier(0.45, 0.05, 0.35, 1);
    --ease-drift: cubic-bezier(0.65, 0, 0.35, 1);

    --t-breath: 6s;
    --t-drift-cloud: 22s;
    --t-pendulum-a: 4.4s;
    --t-pendulum-b: 2.7s;   /* ~ golden ratio */
    --t-pendulum-c: 5.6s;
    --t-pendulum-d: 3.4s;
}

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

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

body {
    background: var(--c-base);
    color: var(--c-pencil);
    font-family: var(--f-serif);
    font-weight: 400;
    font-size: clamp(1.0625rem, 0.92rem + 0.6vw, 1.25rem);
    line-height: 1.85;
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    overflow-x: hidden;
    position: relative;
    font-feature-settings: "ss01", "tnum";
}

::selection {
    background: var(--c-bloom);
    color: var(--c-slate);
}

/* =========================================================
   Background blob layer
   ========================================================= */

.blob-layer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.85;
}

.blob {
    transform-origin: center;
    animation: blob-breath 18s var(--ease-breath) infinite;
    will-change: transform, opacity;
}

.blob--stratus {
    animation: blob-stratus-drift 80s var(--ease-drift) infinite alternate, blob-breath 22s var(--ease-breath) infinite;
    transform-origin: 50% 80%;
}

.blob--cumulus {
    animation: blob-cumulus-drift 64s var(--ease-drift) infinite alternate, blob-breath 16s var(--ease-breath) infinite;
}

.blob--cirrus {
    animation: blob-cirrus-drift 90s var(--ease-drift) infinite alternate;
}

.blob--petal {
    animation: blob-petal-drift 56s var(--ease-drift) infinite alternate, blob-breath 24s var(--ease-breath) infinite;
}

@keyframes blob-breath {
    0%, 100% { opacity: 0.95; transform: translate3d(0, 0, 0) scale(1); }
    50% { opacity: 1; transform: translate3d(0, -6px, 0) scale(1.012); }
}

@keyframes blob-stratus-drift {
    0% { transform: translate3d(-40px, 10px, 0) scale(1.02); }
    100% { transform: translate3d(60px, -8px, 0) scale(1.05); }
}

@keyframes blob-cumulus-drift {
    0% { transform: translate3d(-30px, -10px, 0) scale(0.96); }
    100% { transform: translate3d(80px, 30px, 0) scale(1.08); }
}

@keyframes blob-cirrus-drift {
    0% { transform: translate3d(40px, 0, 0); }
    100% { transform: translate3d(-120px, -10px, 0); }
}

@keyframes blob-petal-drift {
    0% { transform: translate3d(20px, 10px, 0) scale(1); opacity: 0.32; }
    100% { transform: translate3d(-60px, -30px, 0) scale(1.08); opacity: 0.42; }
}

/* =========================================================
   Pollen line (horizontal floral horizon)
   ========================================================= */

.pollen-line {
    position: fixed;
    left: var(--sidebar-w);
    right: 0;
    top: 38vh;
    height: 14px;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    opacity: 0.55;
    mix-blend-mode: multiply;
}

.pollen-track {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 4px 7px, var(--c-deep-fog) 0.8px, transparent 1.2px),
        radial-gradient(circle at 22px 5px, var(--c-bloom) 1px, transparent 1.4px),
        radial-gradient(circle at 38px 9px, var(--c-deep-fog) 0.6px, transparent 1px),
        radial-gradient(circle at 56px 7px, var(--c-deep-fog) 0.8px, transparent 1.2px),
        radial-gradient(circle at 74px 4px, var(--c-petal) 0.9px, transparent 1.4px);
    background-repeat: repeat-x;
    background-size: 90px 14px;
    animation: pollen-drift 600s linear infinite;
}

@keyframes pollen-drift {
    from { background-position-x: 0; }
    to { background-position-x: 3600px; }
}

/* =========================================================
   Luna moth
   ========================================================= */

.moth {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    pointer-events: none;
    z-index: 4;
    transform: translate3d(-50%, -50%, 0);
    transition: transform 800ms cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.5;
    animation: moth-flutter 1.6s ease-in-out infinite;
    mix-blend-mode: multiply;
}

@keyframes moth-flutter {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); transform: translate3d(-50%, -50%, 0) scale(1); }
    50% { transform: translate3d(-50%, calc(-50% - 4px), 0) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
    .moth { display: none; }
}

/* =========================================================
   Sidebar
   ========================================================= */

.sidebar {
    position: sticky;
    top: 0;
    grid-row: 1;
    grid-column: 1;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(180deg, rgba(214,222,229,0.55) 0%, rgba(214,222,229,0.35) 100%);
    border-right: 1px solid var(--c-mid-fog);
    color: var(--c-slate);
    padding: 28px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 10;
    backdrop-filter: blur(2px);
    overflow: hidden;
}

.sidebar__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar__brand {
    font-family: var(--f-mono-label);
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--c-slate);
    font-size: 0.95rem;
    text-transform: lowercase;
}

.sidebar__brand-dot {
    color: var(--c-bloom);
}

.sidebar__brand-sub {
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 300;
    color: var(--c-pencil);
    font-size: 0.78rem;
    line-height: 1.4;
    opacity: 0.8;
}

.sidebar__chapters {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 4px;
}

.sidebar__chapters-label {
    font-family: var(--f-mono-label);
    font-size: 0.62rem;
    text-transform: lowercase;
    letter-spacing: 0.16em;
    color: var(--c-pencil);
    opacity: 0.75;
}

.chapters {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    padding-left: 6px;
    border-left: 1px dashed var(--c-mid-fog);
}

.chapter {
    font-family: var(--f-mono-label);
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    color: var(--c-pencil);
    cursor: pointer;
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 6px;
    padding: 4px 4px 4px 8px;
    border-radius: 1px;
    transition: color 480ms var(--ease-breath), background 480ms var(--ease-breath), transform 480ms var(--ease-breath);
    opacity: 0.7;
}

.chapter__num {
    color: var(--c-deep-fog);
    font-family: var(--f-mono-num);
    font-size: 0.66rem;
}

.chapter__name {
    font-style: italic;
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0;
    color: var(--c-slate);
    line-height: 1.2;
    text-transform: none;
}

.chapter:hover {
    color: var(--c-slate);
    background: rgba(168, 192, 181, 0.10);
    transform: translateX(2px);
    opacity: 1;
}

.chapter:hover .chapter__num { color: var(--c-bloom); }

.chapter.is-active {
    opacity: 1;
    background: rgba(168, 192, 181, 0.14);
}

.chapter.is-active .chapter__num {
    color: var(--c-bloom);
}

.chapter.is-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--c-bloom);
    box-shadow: 0 0 6px rgba(168,192,181,0.6);
}

.now-tick {
    position: absolute;
    left: -3px;
    top: 30%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-bloom);
    box-shadow: 0 0 8px rgba(168, 192, 181, 0.7), 0 0 14px rgba(168, 192, 181, 0.4);
    transition: top 1200ms var(--ease-breath);
    animation: now-tick-pulse 4s var(--ease-breath) infinite;
}

@keyframes now-tick-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

/* Weather glass */
.sidebar__weather {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.weather__label {
    font-family: var(--f-mono-label);
    font-size: 0.6rem;
    letter-spacing: 0.16em;
    color: var(--c-pencil);
    opacity: 0.7;
    text-transform: lowercase;
}

.weather__glass {
    position: relative;
    width: 100%;
    height: 38px;
    border: 1px solid var(--c-mid-fog);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(238,241,244,0.6);
}

.weather__fluid {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4%;
    background: linear-gradient(180deg, rgba(168, 192, 181, 0.5) 0%, rgba(168, 192, 181, 0.85) 100%);
    transition: height 500ms var(--ease-breath);
}

.weather__rim {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--c-mid-fog);
    opacity: 0.6;
}

.weather__readout {
    font-family: var(--f-mono-num);
    font-variant-numeric: tabular-nums;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--c-slate);
}

/* Clock */
.sidebar__clock {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-top: 1px dashed var(--c-mid-fog);
    padding-top: 14px;
}

.clock__label {
    font-family: var(--f-mono-label);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    color: var(--c-pencil);
    opacity: 0.7;
    text-transform: lowercase;
}

.clock__time {
    font-family: var(--f-mono-num);
    font-variant-numeric: tabular-nums;
    font-size: 1.1rem;
    color: var(--c-slate);
    letter-spacing: 0.04em;
}

.clock__date {
    font-family: var(--f-mono-num);
    font-variant-numeric: tabular-nums;
    font-size: 0.62rem;
    color: var(--c-pencil);
    letter-spacing: 0.18em;
    text-transform: lowercase;
}

/* Jasmine loop */
.sidebar__jasmine {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.85;
    border-top: 1px dashed var(--c-mid-fog);
    padding-top: 10px;
}

.sidebar__jasmine svg {
    animation: jasmine-rotate 14s linear infinite, jasmine-breath 8s var(--ease-breath) infinite;
    transform-origin: center;
}

#jasmineRing {
    animation: jasmine-dash 18s linear infinite;
}

@keyframes jasmine-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes jasmine-breath {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

@keyframes jasmine-dash {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -200; }
}

.jasmine__label {
    font-family: var(--f-mono-label);
    font-size: 0.54rem;
    letter-spacing: 0.2em;
    color: var(--c-pencil);
    opacity: 0.6;
    text-transform: lowercase;
}

/* Sidebar drawer toggle (hidden on desktop) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
    background: rgba(238,241,244,0.85);
    border: 1px solid var(--c-mid-fog);
    border-radius: 1px;
    cursor: pointer;
    z-index: 30;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.sidebar-toggle span {
    display: block;
    width: 16px;
    height: 1px;
    background: var(--c-slate);
}

/* =========================================================
   Garden (main column)
   ========================================================= */

.garden {
    grid-column: 2;
    position: relative;
    padding: 0 clamp(24px, 6vw, 96px);
    z-index: 2;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.scene {
    position: relative;
    padding: clamp(80px, 14vh, 200px) 0;
}

.scene__header {
    max-width: 62ch;
    margin: 0 auto clamp(40px, 8vh, 120px);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.scene__eyebrow {
    font-family: var(--f-mono-label);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    color: var(--c-pencil);
    text-transform: lowercase;
    opacity: 0.8;
}

.scene__eyebrow--center {
    display: block;
    text-align: center;
    margin-bottom: 24px;
}

.scene__title {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: clamp(2rem, 4vw, 3.4rem);
    color: var(--c-slate);
    line-height: 1.18;
    letter-spacing: -0.01em;
}

.scene__title em {
    font-style: italic;
    font-weight: 300;
    color: var(--c-pencil);
}

.scene__lead {
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--c-pencil);
    line-height: 1.7;
}

/* =========================================================
   1. Threshold
   ========================================================= */

.scene--threshold {
    min-height: 100vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 0;
    position: relative;
}

.threshold__clockflower {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(220px, 32vw, 420px);
    opacity: 0.55;
    z-index: 0;
    animation: cf-rotate 240s linear infinite, cf-breath 9s var(--ease-breath) infinite;
}

.threshold__clockflower svg { width: 100%; height: auto; }

@keyframes cf-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes cf-breath {
    0%, 100% { opacity: 0.4; filter: blur(0); }
    50% { opacity: 0.65; filter: blur(0.4px); }
}

.cf-petal {
    transform-origin: 160px 160px;
    transform-box: fill-box;
    animation: cf-petal-bloom 9s var(--ease-breath) infinite;
}
.cf-petal--diag { animation-delay: 1.2s; }

@keyframes cf-petal-bloom {
    0%, 100% { opacity: 0.6; transform: scale(0.94); }
    50% { opacity: 1; transform: scale(1.04); }
}

.cf-hand {
    transform-origin: 160px 160px;
    transform-box: fill-box;
}
.cf-hand--hour { animation: cf-hand-hour 720s linear infinite; }
.cf-hand--minute { animation: cf-hand-minute 60s linear infinite; }

@keyframes cf-hand-hour { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes cf-hand-minute { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.threshold__sentence {
    position: relative;
    z-index: 2;
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.8rem, 5vw, 4.6rem);
    color: var(--c-slate);
    line-height: 1.18;
    max-width: 26ch;
    padding: 0 clamp(16px, 4vw, 40px);
    letter-spacing: 0.005em;
}

.threshold__line {
    display: block;
    overflow: hidden;
    position: relative;
}

.threshold__line .ch {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.4em);
    transition: opacity 1200ms var(--ease-breath), transform 1200ms var(--ease-breath);
    transition-delay: var(--ch-delay, 0s);
    will-change: transform, opacity;
}

.threshold__line .ch.is-in {
    opacity: 1;
    transform: translateY(0);
}

.threshold__line .ch.space {
    width: 0.34em;
    height: 1px;
}

.threshold__caption {
    position: absolute;
    bottom: 9vh;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--f-mono-label);
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    color: var(--c-pencil);
    text-transform: lowercase;
    opacity: 0.5;
    z-index: 2;
}

.threshold__scroll-cue {
    position: absolute;
    bottom: 4vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--f-mono-label);
    font-size: 0.62rem;
    letter-spacing: 0.24em;
    text-transform: lowercase;
    color: var(--c-pencil);
    opacity: 0.7;
    z-index: 2;
}

.threshold__cue-line {
    display: block;
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, var(--c-pencil), transparent);
    animation: cue-pull 3.4s var(--ease-breath) infinite;
}

@keyframes cue-pull {
    0% { transform: scaleY(0.4); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    100% { transform: scaleY(0.4); transform-origin: bottom; }
}

/* =========================================================
   2. Specimen index
   ========================================================= */

.specimen-drift {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: clamp(80px, 12vh, 160px);
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

.specimen-drift::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -40px;
    bottom: -40px;
    width: 1px;
    background: repeating-linear-gradient(180deg, var(--c-mid-fog) 0 4px, transparent 4px 12px);
    opacity: 0.45;
    transform: translateX(-50%);
    pointer-events: none;
}

.specimen {
    margin-inline-start: var(--drift, 0);
    max-width: 540px;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1400ms var(--ease-breath), transform 1400ms var(--ease-breath);
    will-change: transform, opacity;
}

.specimen.is-in {
    opacity: 1;
    transform: translateY(0);
}

.specimen:nth-child(odd) {
    margin-left: auto;
    margin-right: var(--drift-right, 0);
}

.specimen__card {
    position: relative;
    background: rgba(232, 236, 240, 0.6);
    border: 1px solid var(--c-mid-fog);
    padding: var(--pad-card);
    backdrop-filter: blur(2px);
    animation: card-breath 6s var(--ease-breath) infinite;
    transition: border-color 600ms var(--ease-breath), background 600ms var(--ease-breath), transform 600ms var(--ease-breath);
}

@keyframes card-breath {
    0%, 100% { opacity: 0.97; }
    50% { opacity: 1; }
}

.specimen__card:hover {
    border-color: var(--c-bloom);
    background: rgba(232, 236, 240, 0.8);
    transform: translateY(-2px);
}

.specimen__card--rarest {
    border-color: rgba(199, 184, 201, 0.5);
    background:
        radial-gradient(circle at 90% 10%, rgba(199, 184, 201, 0.18), transparent 50%),
        rgba(232, 236, 240, 0.6);
}

.specimen__card--rarest:hover {
    border-color: var(--c-petal);
    background:
        radial-gradient(circle at 90% 10%, rgba(199, 184, 201, 0.32), transparent 50%),
        rgba(232, 236, 240, 0.8);
}

.specimen__index {
    display: block;
    font-family: var(--f-mono-label);
    font-weight: 300;
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-pencil);
    margin-bottom: 14px;
    opacity: 0.85;
}

.specimen__title {
    font-family: var(--f-serif);
    font-weight: 300;
    font-size: clamp(1.6rem, 2.4vw, 2.4rem);
    color: var(--c-slate);
    line-height: 1.18;
    margin-bottom: 18px;
}

.specimen__title em {
    font-style: italic;
    font-weight: 300;
}

.specimen__common {
    display: block;
    font-style: italic;
    font-weight: 300;
    font-size: 0.86rem;
    color: var(--c-pencil);
    margin-top: 4px;
    opacity: 0.85;
}

.specimen__notes {
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 300;
    color: var(--c-pencil);
    line-height: 1.7;
    margin-bottom: 22px;
    font-size: 1rem;
}

.specimen__meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 24px;
    border-top: 1px dashed var(--c-mid-fog);
    padding-top: 16px;
    margin-bottom: 22px;
}

.specimen__meta > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-family: var(--f-mono-label);
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: lowercase;
    color: var(--c-pencil);
}

.specimen__meta dd {
    font-family: var(--f-mono-num);
    font-variant-numeric: tabular-nums;
    color: var(--c-slate);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
}

.specimen__link {
    display: inline-block;
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 300;
    font-size: 0.96rem;
    color: var(--c-slate);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color 480ms var(--ease-breath), border-color 480ms var(--ease-breath);
}

.specimen__link:hover {
    color: var(--c-bloom);
    border-bottom-color: var(--c-bloom);
}

.specimen__lottie {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 56px;
    height: 56px;
    opacity: 0.75;
}

.specimen__lottie svg { width: 100%; height: 100%; }

/* Bespoke "lottie-style" SVG animations */
.lottie-bloom .lb-petal {
    transform-origin: 60px 60px;
    transform-box: fill-box;
    animation: bloom-petal 7s var(--ease-breath) infinite;
}
.lottie-bloom .lb-petal--n { animation-delay: 0s; }
.lottie-bloom .lb-petal--e { animation-delay: 1.6s; }
.lottie-bloom .lb-petal--s { animation-delay: 3.2s; }
.lottie-bloom .lb-petal--w { animation-delay: 4.8s; }
@keyframes bloom-petal {
    0%, 100% { transform: scale(0.86); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 1; }
}

.lottie-pendulum {
    transform-origin: 60px 14px;
}
.lottie-pendulum {
    animation: lp-swing 4.2s var(--ease-breath) infinite;
}
@keyframes lp-swing {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(12deg); }
}

.lottie-snowdrop .ls-bell {
    animation: ls-fall 9s var(--ease-breath) infinite;
    transform-origin: 60px 28px;
    transform-box: fill-box;
}
@keyframes ls-fall {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

.lottie-silk .lk-thread {
    stroke-dasharray: 80 200;
    animation: lk-weave 8s linear infinite;
}
.lottie-silk .lk-thread:last-of-type { animation-delay: -3s; }
@keyframes lk-weave {
    from { stroke-dashoffset: 280; }
    to { stroke-dashoffset: 0; }
}

.lottie-moss circle {
    transform-origin: center;
    transform-box: fill-box;
    animation: lm-pulse 7s var(--ease-breath) infinite;
}
.lottie-moss circle:nth-of-type(2) { animation-delay: 1s; }
.lottie-moss circle:nth-of-type(3) { animation-delay: 2s; }
.lottie-moss circle:nth-of-type(4) { animation-delay: 3s; }
@keyframes lm-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.lottie-peony path {
    transform-origin: 60px 60px;
    transform-box: fill-box;
    animation: peony-bloom 12s var(--ease-breath) infinite;
}
.lottie-peony path:nth-child(2) { animation-delay: 1.5s; }
.lottie-peony path:nth-child(3) { animation-delay: 3s; }
.lottie-peony path:nth-child(4) { animation-delay: 4.5s; }
@keyframes peony-bloom {
    0%, 100% { transform: scale(0.92); }
    50% { transform: scale(1.06); }
}

.lottie-silence circle {
    transform-origin: 60px 60px;
    transform-box: fill-box;
    animation: silence-ripple 8s var(--ease-breath) infinite;
}
.lottie-silence circle:nth-of-type(2) { animation-delay: 1.5s; }
.lottie-silence circle:nth-of-type(3) { animation-delay: 3s; }
@keyframes silence-ripple {
    0%, 100% { opacity: 0.3; transform: scale(0.92); }
    50% { opacity: 1; transform: scale(1.04); }
}

.lottie-forget circle {
    transform-origin: 60px 60px;
    transform-box: fill-box;
    animation: forget-pulse 10s var(--ease-breath) infinite;
}
.lottie-forget circle:nth-of-type(2) { animation-delay: 1s; }
.lottie-forget circle:nth-of-type(3) { animation-delay: 2s; }
.lottie-forget circle:nth-of-type(4) { animation-delay: 3s; }
@keyframes forget-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.lottie-wisteria path {
    stroke-dasharray: 200;
    animation: wisteria-draw 12s var(--ease-breath) infinite;
}
.lottie-wisteria circle {
    animation: wisteria-twinkle 5s var(--ease-breath) infinite;
}
.lottie-wisteria circle:nth-of-type(2) { animation-delay: 0.8s; }
.lottie-wisteria circle:nth-of-type(3) { animation-delay: 1.6s; }
.lottie-wisteria circle:nth-of-type(4) { animation-delay: 2.4s; }
@keyframes wisteria-draw {
    0%, 100% { stroke-dashoffset: 0; }
    50% { stroke-dashoffset: 100; }
}
@keyframes wisteria-twinkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* =========================================================
   3. Pendulum Glade
   ========================================================= */

.scene--pendulum {
    min-height: 140vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 60px;
    position: relative;
}

.pendulum-stage {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    opacity: 0.85;
}

.pendulums { width: 100%; height: auto; display: block; }

.pen-cloud {
    animation: pen-cloud-drift 36s var(--ease-drift) infinite alternate;
}
.pen-cloud:nth-of-type(2) { animation-delay: -8s; animation-duration: 44s; }
.pen-cloud:nth-of-type(3) { animation-delay: -16s; animation-duration: 50s; }
.pen-cloud:nth-of-type(4) { animation-delay: -24s; animation-duration: 40s; }

@keyframes pen-cloud-drift {
    0% { transform: translateX(-12px); }
    100% { transform: translateX(20px); }
}

.pendulum {
    transform-box: fill-box;
}

.pendulum--a { transform-origin: 240px 80px; animation: pen-swing var(--t-pendulum-a) ease-in-out infinite; }
.pendulum--b { transform-origin: 580px 100px; animation: pen-swing var(--t-pendulum-b) ease-in-out infinite; }
.pendulum--c { transform-origin: 900px 80px; animation: pen-swing var(--t-pendulum-c) ease-in-out infinite; }
.pendulum--d { transform-origin: 400px 90px; animation: pen-swing var(--t-pendulum-d) ease-in-out infinite; }

@keyframes pen-swing {
    0%, 100% { transform: rotate(-7deg); }
    50% { transform: rotate(7deg); }
}

.pendulum__quote {
    max-width: 32ch;
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.4rem, 2.6vw, 2.1rem);
    color: var(--c-slate);
    line-height: 1.4;
    position: relative;
    padding: 0 60px;
    margin: 0 auto;
}

.quote__open, .quote__close {
    font-family: var(--f-serif);
    font-style: italic;
    color: var(--c-bloom);
    font-size: 2.4em;
    line-height: 0;
    vertical-align: -0.4em;
    opacity: 0.7;
}

.quote__attribution {
    display: block;
    margin-top: 18px;
    font-family: var(--f-mono-label);
    font-style: normal;
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: var(--c-pencil);
    opacity: 0.7;
}

/* =========================================================
   4. Field Notes
   ========================================================= */

.field-notes {
    max-width: 62ch;
    margin: 0 auto;
    padding: 60px 0;
    position: relative;
    color: var(--c-pencil);
}

.field-notes p {
    margin-bottom: 28px;
    font-family: var(--f-serif);
    font-weight: 400;
    line-height: 1.85;
}

.field-notes__lead {
    font-style: italic;
    font-weight: 300;
    color: var(--c-slate);
    font-size: 1.18em;
    margin-bottom: 36px;
}

.field-notes__indent {
    padding-left: 32px;
    border-left: 1px dashed var(--c-mid-fog);
    color: var(--c-pencil);
    font-style: italic;
}

.field-notes em {
    color: var(--c-slate);
    font-style: italic;
}

.field-notes .num {
    font-family: var(--f-mono-num);
    font-variant-numeric: tabular-nums;
    font-size: 0.92em;
    letter-spacing: 0.04em;
    color: var(--c-slate);
}

.field-notes .link-soft {
    color: var(--c-petal);
    border-bottom: 1px solid rgba(199,184,201,0.5);
    cursor: pointer;
    transition: color 400ms var(--ease-breath);
}
.field-notes .link-soft:hover { color: var(--c-bloom); border-bottom-color: var(--c-bloom); }

.field-notes__pull {
    position: relative;
    margin: 36px -10% 36px -10%;
    padding: 24px 28px;
    border-top: 1px solid var(--c-mid-fog);
    border-bottom: 1px solid var(--c-mid-fog);
    background: rgba(214,222,229,0.18);
}

.pull--right {
    margin-left: 10%;
    margin-right: -10%;
}

.pull__label {
    display: block;
    font-family: var(--f-mono-label);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--c-pencil);
    opacity: 0.7;
    margin-bottom: 10px;
}

.pull__text {
    font-family: var(--f-mono-label);
    font-weight: 300;
    color: var(--c-slate);
    font-size: 0.96rem;
    letter-spacing: 0.02em;
    line-height: 1.65;
    text-transform: lowercase;
    margin: 0 !important;
    font-style: normal !important;
}

.pull__text em {
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 300;
    color: var(--c-bloom);
    text-transform: none;
    letter-spacing: 0;
}

.field-notes__moss {
    position: absolute;
    bottom: 20px;
    left: -40px;
    width: 140px;
    height: 80px;
    background:
        radial-gradient(circle at 10% 80%, rgba(168,192,181,0.55) 0 4px, transparent 5px),
        radial-gradient(circle at 30% 70%, rgba(168,192,181,0.45) 0 3px, transparent 4px),
        radial-gradient(circle at 50% 84%, rgba(168,192,181,0.5) 0 4px, transparent 5px),
        radial-gradient(circle at 70% 76%, rgba(168,192,181,0.38) 0 3px, transparent 4px),
        radial-gradient(circle at 88% 82%, rgba(168,192,181,0.45) 0 3px, transparent 4px),
        radial-gradient(circle at 18% 94%, rgba(168,192,181,0.4) 0 2px, transparent 3px),
        radial-gradient(circle at 60% 92%, rgba(168,192,181,0.35) 0 3px, transparent 4px);
    background-size: 100% 100%;
    pointer-events: none;
    transform-origin: bottom left;
    transform: scaleY(0.05);
    transition: transform 1200ms var(--ease-breath);
    opacity: 0.85;
}

/* =========================================================
   5. Closing petal
   ========================================================= */

.scene--closing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 24px;
    padding: 0;
    position: relative;
}

.closing__petal {
    width: clamp(220px, 32vw, 400px);
    opacity: 0.7;
    margin-bottom: 30px;
    animation: closing-breath 12s var(--ease-breath) infinite;
}

.closing__petal svg { width: 100%; height: auto; }

#closingPath {
    transform-origin: 200px 200px;
    transform-box: fill-box;
    animation: closing-fold 14s var(--ease-breath) infinite;
}

@keyframes closing-fold {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.84); opacity: 0.7; }
}

@keyframes closing-breath {
    0%, 100% { opacity: 0.65; }
    50% { opacity: 0.85; }
}

.closing__sentence {
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    color: var(--c-slate);
    max-width: 28ch;
}

.closing__sentence--small {
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    color: var(--c-pencil);
    opacity: 0.85;
}

.closing__forget {
    margin-top: 18px;
    opacity: 0.75;
    animation: forget-bob 8s var(--ease-breath) infinite;
}

@keyframes forget-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.closing__footer {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--f-mono-label);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    color: var(--c-pencil);
    opacity: 0.65;
    text-transform: lowercase;
    max-width: 80ch;
}

.footer__time {
    font-family: var(--f-mono-num);
    font-variant-numeric: tabular-nums;
    color: var(--c-slate);
    font-size: 0.7rem;
}

.footer__seed {
    font-size: 0.56rem;
    line-height: 1.7;
    max-width: 60ch;
    margin-top: 6px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    :root { --sidebar-w: 64px; }

    .sidebar {
        padding: 16px 8px;
        gap: 18px;
        align-items: center;
    }

    .sidebar__brand-sub,
    .chapter__name,
    .weather__label,
    .clock__label,
    .clock__date,
    .jasmine__label,
    .sidebar__chapters-label {
        display: none;
    }

    .chapter {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 6px 0;
    }
    .chapter__num { font-size: 0.7rem; }

    .chapters { padding-left: 0; border: none; align-items: center; }

    .sidebar__brand { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.8rem; }

    .clock__time { font-size: 0.7rem; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 0.1em; }

    .sidebar__weather, .weather__glass { width: 28px; align-self: center; }
    .weather__readout { font-size: 0.55rem; transform: rotate(-90deg); }

    .sidebar__jasmine svg { width: 44px; height: 44px; }

    .pollen-line { left: var(--sidebar-w); }
}

@media (max-width: 720px) {
    :root { --sidebar-w: 0px; }

    body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 78vw;
        max-width: 320px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 400ms var(--ease-breath);
        z-index: 40;
        background: var(--c-base);
        padding: 28px 22px 22px;
        align-items: flex-start;
        gap: 24px;
    }
    .sidebar.is-open { transform: translateX(0); }

    .sidebar__brand-sub,
    .chapter__name,
    .weather__label,
    .clock__label,
    .clock__date,
    .jasmine__label,
    .sidebar__chapters-label {
        display: block;
    }
    .chapter { grid-template-columns: 22px 1fr; padding: 4px 4px 4px 8px; justify-items: stretch; }
    .chapter__num { font-size: 0.66rem; }
    .chapters { padding-left: 6px; border-left: 1px dashed var(--c-mid-fog); align-items: stretch; }
    .sidebar__brand { writing-mode: horizontal-tb; transform: none; font-size: 0.95rem; }
    .clock__time { writing-mode: horizontal-tb; transform: none; font-size: 1.1rem; letter-spacing: 0.04em; }
    .sidebar__weather, .weather__glass { width: 100%; align-self: stretch; }
    .weather__readout { transform: none; font-size: 0.7rem; }
    .sidebar__jasmine svg { width: 90px; height: 90px; }

    .sidebar-toggle { display: flex; }

    .garden { padding: 0 24px; }

    .pollen-line { left: 0; }

    .threshold__sentence { font-size: clamp(1.6rem, 7vw, 2.6rem); }

    .specimen { max-width: 100%; margin-inline-start: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
    .specimen-drift::before { display: none; }
    .field-notes__pull { margin-left: 0; margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .blob, .blob--stratus, .blob--cumulus, .blob--cirrus, .blob--petal,
    .pollen-track, .threshold__clockflower, .cf-petal, .cf-hand, .cf-hand--hour, .cf-hand--minute,
    .pen-cloud, .pendulum, .pendulum--a, .pendulum--b, .pendulum--c, .pendulum--d,
    .lottie-bloom .lb-petal, .lottie-pendulum, .lottie-snowdrop .ls-bell, .lottie-silk .lk-thread,
    .lottie-moss circle, .lottie-peony path, .lottie-silence circle, .lottie-forget circle,
    .lottie-wisteria path, .lottie-wisteria circle, .closing__petal, #closingPath, .closing__forget,
    .now-tick, .sidebar__jasmine svg, #jasmineRing, .threshold__cue-line {
        animation: none !important;
    }
    .threshold__line .ch { opacity: 1; transform: none; }
}
