/* =========================================================
   LLITTL.ai — The Mossbound Telemetry Garden
   Palette (burgundy-cream patina):
     #F2EAD8 Bisque Cream
     #EFE6D0 Bisque Deep
     #E5DCC8 Aged Linen
     #7A1F1B Cracked Burgundy
     #5C2B2B Mulberry Patina
     #B89968 Kintsugi Gold
     #9CA88A Lichen Green
     #3E4838 Wet Loam
     #FFFFFC Porcelain Highlight
   ========================================================= */

:root {
    --bisque-cream: #F2EAD8;
    --bisque-deep: #EFE6D0;
    --aged-linen: #E5DCC8;
    --cracked-burgundy: #7A1F1B;
    --mulberry-patina: #5C2B2B;
    --kintsugi-gold: #B89968;
    --lichen-green: #9CA88A;
    --wet-loam: #3E4838;
    --porcelain-highlight: #FFFFFC;

    --ease-meditative: cubic-bezier(0.5, 0.0, 0.2, 1.0);
    --ease-kintsugi: cubic-bezier(0.6, 0.0, 0.2, 1.0);

    --font-display: "Quicksand", system-ui, sans-serif;
    --font-body: "Nunito", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --font-whisper: "Cormorant Garamond", "Cormorant", Georgia, serif;
}

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

html, body {
    background-color: var(--bisque-cream);
    color: var(--mulberry-patina);
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    position: relative;
    cursor: none;
}

body.no-reticle-cursor {
    cursor: default;
}

/* ---------------------------------------------------------
   GLOBAL VIEWPORT KINTSUGI SEAM (drawn at 480ms)
   --------------------------------------------------------- */
.viewport-seam {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    animation: seam-fade-in 600ms var(--ease-meditative) 480ms forwards;
}

.viewport-seam .seam-line,
.viewport-seam .seam-highlight {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: seam-draw 1100ms var(--ease-kintsugi) 480ms forwards;
}

@keyframes seam-fade-in {
    to { opacity: 0.55; }
}

@keyframes seam-draw {
    to { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------
   PARALLAX FOG (0.18x scroll, slow drift)
   --------------------------------------------------------- */
.fog-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    will-change: transform;
}

.fog-cloud {
    position: absolute;
    width: 140vw;
    height: 60vh;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    background: radial-gradient(circle, var(--wet-loam) 0%, transparent 70%);
}

.fog-cloud--1 {
    top: -10vh;
    left: -20vw;
    animation: fog-drift-1 38s ease-in-out infinite alternate;
}

.fog-cloud--2 {
    top: 30vh;
    right: -30vw;
    background: radial-gradient(circle, var(--lichen-green) 0%, transparent 70%);
    opacity: 0.14;
    animation: fog-drift-2 46s ease-in-out infinite alternate;
}

.fog-cloud--3 {
    bottom: -10vh;
    left: 10vw;
    background: radial-gradient(circle, var(--cracked-burgundy) 0%, transparent 70%);
    opacity: 0.08;
    animation: fog-drift-3 52s ease-in-out infinite alternate;
}

@keyframes fog-drift-1 {
    from { transform: translate(0, 0); }
    to { transform: translate(8vw, 4vh); }
}

@keyframes fog-drift-2 {
    from { transform: translate(0, 0); }
    to { transform: translate(-6vw, -3vh); }
}

@keyframes fog-drift-3 {
    from { transform: translate(0, 0); }
    to { transform: translate(4vw, -5vh); }
}

/* ---------------------------------------------------------
   SAMARA FIELD (drifting maple keys)
   --------------------------------------------------------- */
.samara-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.samara {
    position: absolute;
    width: 28px;
    height: 28px;
    pointer-events: auto;
    cursor: none;
}

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

.samara-tooltip {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--cracked-burgundy);
    background: rgba(242, 234, 216, 0.92);
    border: 0.5px solid var(--kintsugi-gold);
    padding: 4px 8px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 400ms var(--ease-meditative);
    pointer-events: none;
    letter-spacing: 0.04em;
}

.samara:hover .samara-tooltip {
    opacity: 0.95;
}

/* ---------------------------------------------------------
   FOREGROUND FERN (parallax 1.22x, breathing)
   --------------------------------------------------------- */
.foreground-fern {
    position: fixed;
    right: -20px;
    top: 18vh;
    width: 200px;
    height: 600px;
    pointer-events: none;
    z-index: 7;
    transform-origin: 70% 100%;
    will-change: transform;
}

.foreground-fern svg {
    width: 100%;
    height: 100%;
}

.frond-bow {
    transform-origin: 100px 600px;
    animation: frond-breath 9s ease-in-out infinite;
}

@keyframes frond-breath {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(-1.4deg) translateY(-4px); }
}

/* ---------------------------------------------------------
   CURSOR RETICLE
   --------------------------------------------------------- */
.cursor-reticle {
    position: fixed;
    width: 44px;
    height: 44px;
    pointer-events: none;
    z-index: 999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 200ms var(--ease-meditative),
                transform 130ms var(--ease-meditative);
    opacity: 0;
}

.cursor-reticle.active {
    opacity: 0.78;
}

.cursor-reticle.snapped {
    opacity: 0.92;
}

.cursor-reticle svg {
    width: 100%;
    height: 100%;
    animation: cursor-pulse 4s ease-in-out infinite;
}

@keyframes cursor-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ---------------------------------------------------------
   SHARED ROOM LAYOUT
   --------------------------------------------------------- */
.room {
    position: relative;
    width: 100%;
    padding: 8vh 6vw 10vh;
    z-index: 2;
}

.room--hero {
    min-height: 64vh;
    background: var(--bisque-cream);
}

.room--greenhouse {
    min-height: 110vh;
    background: var(--bisque-cream);
}

.room--observatory {
    min-height: 110vh;
    background: var(--bisque-deep);
}

.room--library {
    min-height: 110vh;
    background: var(--bisque-cream);
}

.room--pond {
    min-height: 106vh;
    background: var(--bisque-deep);
    padding-bottom: 4vh;
}

/* ---------------------------------------------------------
   HERO CORNER MARKS + COORDS
   --------------------------------------------------------- */
.hud-corner-mark {
    position: absolute;
    font-family: var(--font-mono);
    color: var(--cracked-burgundy);
    opacity: 0.55;
    font-size: 12px;
    user-select: none;
}

.hud-corner-mark--tl { top: 18px; left: 18px; }
.hud-corner-mark--tr { top: 18px; right: 18px; }
.hud-corner-mark--bl { bottom: 18px; left: 18px; }
.hud-corner-mark--br { bottom: 18px; right: 18px; }

.hero-coordinates {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--cracked-burgundy);
    opacity: 0.62;
    text-transform: uppercase;
}

.hero-coordinates--ne {
    top: 6vh;
    right: 6vw;
}

.hero-coordinates--sw {
    bottom: 6vh;
    left: 6vw;
}

/* ---------------------------------------------------------
   HERO RETICLE (LIVING RETICLE, large)
   --------------------------------------------------------- */
.reticle--hero {
    position: absolute;
    width: clamp(280px, 38vw, 520px);
    height: clamp(280px, 38vw, 520px);
    left: 12%;
    top: 30%;
    transform: translateY(-50%);
    opacity: 0;
    animation: reticle-fade 1600ms var(--ease-meditative) 900ms forwards;
}

.reticle--hero svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

@keyframes reticle-fade {
    to { opacity: 0.34; }
}

.reticle-kintsugi {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: kintsugi-draw 1400ms var(--ease-kintsugi) 1500ms forwards;
}

@keyframes kintsugi-draw {
    to { stroke-dashoffset: 0; }
}

.lichen-cluster circle {
    transform-origin: center;
    animation: lichen-breathe 9s ease-in-out infinite;
}

.lichen-cluster circle:nth-child(odd) {
    animation-delay: -2.3s;
    animation-duration: 11s;
}

.lichen-cluster circle:nth-child(3n) {
    animation-delay: -4.6s;
    animation-duration: 13s;
}

@keyframes lichen-breathe {
    0%, 100% { opacity: var(--baseline, 0.7); transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.06); }
}

.hero-fern path:first-child {
    animation: fern-draw 1800ms var(--ease-meditative) 2100ms forwards;
}

@keyframes fern-draw {
    to { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------
   WORDMARK
   --------------------------------------------------------- */
.wordmark-wrap {
    position: absolute;
    left: 12%;
    top: 30%;
    width: clamp(280px, 60vw, 1100px);
    transform: translateY(-50%);
    z-index: 10;
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(7rem, 18vw, 17rem);
    letter-spacing: -0.04em;
    line-height: 0.9;
    color: var(--cracked-burgundy);
    margin: 0;
    user-select: none;
}

.wm-letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px);
    animation: letter-rise 700ms var(--ease-meditative) forwards;
}

.wm-letter:nth-child(1) { animation-delay: 1300ms; }
.wm-letter:nth-child(2) { animation-delay: 1380ms; }
.wm-letter:nth-child(3) { animation-delay: 1460ms; }
.wm-letter:nth-child(4) { animation-delay: 1540ms; }
.wm-letter:nth-child(5) { animation-delay: 1620ms; }
.wm-letter:nth-child(6) { animation-delay: 1700ms; }

.wm-letter--mended {
    position: relative;
}

.wm-letter--mended::after {
    content: "";
    position: absolute;
    left: 30%;
    top: 15%;
    width: 2px;
    height: 90%;
    background: linear-gradient(180deg, transparent 0%, var(--kintsugi-gold) 30%, var(--kintsugi-gold) 70%, transparent 100%);
    transform: rotate(28deg);
    transform-origin: center;
    pointer-events: none;
    opacity: 0;
    animation: mended-reveal 800ms var(--ease-kintsugi) 2200ms forwards;
}

@keyframes mended-reveal {
    to { opacity: 0.95; }
}

.wm-ai {
    display: inline-block;
    font-size: 0.18em;
    color: var(--kintsugi-gold);
    margin-left: 0.4em;
    vertical-align: top;
    letter-spacing: 0;
    opacity: 0;
    animation: letter-rise 800ms var(--ease-meditative) 2400ms forwards;
}

@keyframes letter-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------------------------------------------
   WHISPER LINE (Cormorant italic)
   --------------------------------------------------------- */
.whisper-line {
    font-family: var(--font-whisper);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.4rem, 2.6vw, 2.2rem);
    color: var(--mulberry-patina);
    margin-top: 1.4em;
    line-height: 1.4;
    max-width: 64ch;
    opacity: 0;
    animation: whisper-fade 1400ms var(--ease-meditative) 2600ms forwards;
}

@keyframes whisper-fade {
    to { opacity: 0.86; }
}

.whisper-line--observatory {
    margin: 2em auto 3em;
    text-align: center;
    max-width: 50ch;
    opacity: 0.86;
    animation: none;
}

/* ---------------------------------------------------------
   HERO RAIL NAV (footer-rail at bottom of hero)
   --------------------------------------------------------- */
.hero-rail {
    position: absolute;
    bottom: 2.8vh;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cracked-burgundy);
    display: flex;
    align-items: center;
    gap: 0.8em;
    opacity: 0;
    animation: whisper-fade 1200ms var(--ease-meditative) 2800ms forwards;
}

.hero-rail a {
    color: var(--cracked-burgundy);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 400ms var(--ease-meditative),
                color 400ms var(--ease-meditative);
}

.hero-rail a:hover {
    border-bottom-color: var(--kintsugi-gold);
    color: var(--mulberry-patina);
}

.rail-dot {
    opacity: 0.4;
}

/* ---------------------------------------------------------
   HORIZON DIVIDER
   --------------------------------------------------------- */
.horizon-divider {
    position: relative;
    width: 100%;
    height: 12px;
    margin: 0;
    z-index: 3;
}

.horizon-divider svg {
    width: 100%;
    height: 100%;
    display: block;
}

.horizon-line {
    opacity: 0.7;
}

.slug-trail {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.horizon-divider.in-view .slug-trail {
    animation: slug-draw 6000ms var(--ease-meditative) forwards;
}

@keyframes slug-draw {
    to { stroke-dashoffset: 0; }
}

.divider-label {
    position: absolute;
    bottom: -22px;
    right: 6vw;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cracked-burgundy);
    opacity: 0.55;
}

/* ---------------------------------------------------------
   ROOM HEADERS
   --------------------------------------------------------- */
.room-header {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 4vh;
    padding-top: 4vh;
}

.room-reticle {
    width: 180px;
    height: 180px;
    flex-shrink: 0;
    position: relative;
}

.room-title-block {
    flex: 1;
}

.room-eyebrow {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cracked-burgundy);
    opacity: 0.62;
    margin-bottom: 0.4em;
}

.room-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    letter-spacing: -0.02em;
    color: var(--cracked-burgundy);
    line-height: 1.05;
    margin-bottom: 0.2em;
}

.room-sub {
    display: block;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--mulberry-patina);
    opacity: 0.78;
    font-style: italic;
}

/* ---------------------------------------------------------
   CARD GRID (the moss-bed)
   --------------------------------------------------------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 36px;
    position: relative;
    z-index: 3;
}

.card-grid--greenhouse {
    grid-auto-rows: minmax(120px, auto);
}

.card-grid--observatory {
    grid-auto-rows: minmax(140px, auto);
    gap: 48px;
}

.card-grid--library {
    grid-auto-rows: minmax(110px, auto);
    gap: 28px 32px;
}

.card {
    position: relative;
    background: var(--aged-linen);
    padding: 22px 24px 26px;
    border: 0.5px solid rgba(122, 31, 27, 0.18);
    border-radius: var(--card-radius, 20px);
    transform: rotate(var(--card-rot, 0deg));
    transform-origin: center;
    transition: transform 420ms var(--ease-meditative),
                box-shadow 420ms var(--ease-meditative);
    cursor: none;
    overflow: visible;
    box-shadow: 0 2px 0 rgba(122, 31, 27, 0.04);
}

.card-frame {
    position: absolute;
    inset: 6px;
    border-radius: calc(var(--card-radius, 20px) - 6px);
    pointer-events: none;
    overflow: hidden;
}

/* HUD corner brackets on each card */
.card::before,
.card::after,
.card .card-frame::before,
.card .card-frame::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border: 0.6px solid var(--cracked-burgundy);
    opacity: 0.55;
}

.card::before {
    top: -1px;
    left: -1px;
    border-right: none;
    border-bottom: none;
}

.card::after {
    top: -1px;
    right: -1px;
    border-left: none;
    border-bottom: none;
}

.card .card-frame::before {
    bottom: -7px;
    left: -7px;
    border-right: none;
    border-top: none;
}

.card .card-frame::after {
    bottom: -7px;
    right: -7px;
    border-left: none;
    border-top: none;
}

.card:hover {
    transform: rotate(var(--card-rot, 0deg)) translateY(-2px);
    box-shadow: 0 6px 18px rgba(122, 31, 27, 0.10),
                0 2px 0 rgba(122, 31, 27, 0.06);
}

/* Hover tilt-3d for library */
.card--dense {
    perspective: 800px;
}

.card--dense:hover {
    transform: rotate(var(--card-rot, 0deg)) translateY(-2px) rotateX(2deg) rotateY(-3deg);
}

/* Card size variations */
.card--small { grid-column: span 3; }
.card--medium { grid-column: span 4; }
.card--wide { grid-column: span 6; }
.card--tall {
    grid-column: span 3;
    grid-row: span 2;
}

@media (max-width: 1100px) {
    .card-grid { grid-template-columns: repeat(4, 1fr); gap: 28px; }
    .card--small { grid-column: span 2; }
    .card--medium { grid-column: span 2; }
    .card--wide { grid-column: span 4; }
    .card--tall { grid-column: span 2; grid-row: span 2; }
}

@media (max-width: 640px) {
    .card-grid { grid-template-columns: 1fr; gap: 24px; }
    .card--small,
    .card--medium,
    .card--wide,
    .card--tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    .reticle--hero { left: 4%; }
    .wordmark-wrap { left: 4%; width: 92%; }
    .room { padding: 6vh 4vw 8vh; }
    .room-header { gap: 16px; }
    .room-reticle { width: 100px; height: 100px; }
}

/* ---------------------------------------------------------
   CARD CONTENT
   --------------------------------------------------------- */
.card-coord {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cracked-burgundy);
    opacity: 0.62;
    margin-bottom: 0.8em;
}

.card-prose {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.65;
    color: var(--mulberry-patina);
    max-width: 64ch;
}

.card-prose em {
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 12px;
    color: var(--cracked-burgundy);
    opacity: 0.75;
}

.card-prose--quote {
    font-family: var(--font-whisper);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    color: var(--mulberry-patina);
    line-height: 1.45;
}

.card-caption {
    margin-top: 0.6em;
    font-family: var(--font-body);
    font-size: 13px;
    font-style: italic;
    color: var(--mulberry-patina);
    opacity: 0.7;
    line-height: 1.4;
}

.card-artifact {
    margin: 0.6em 0;
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1 / 1;
}

.card-artifact--tall {
    max-width: 90px;
    aspect-ratio: 100 / 180;
}

.card-artifact svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Fern-corner overgrowth */
.card-corner-fern {
    position: absolute;
    width: 60px;
    height: 60px;
    bottom: -8px;
    right: -8px;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 60'><path d='M 50 60 Q 38 38 26 22 Q 18 12 10 8' stroke='%239CA88A' stroke-width='1.4' fill='none' stroke-linecap='round'/><path d='M 38 38 Q 28 36 22 32' stroke='%239CA88A' stroke-width='1' fill='none'/><path d='M 32 28 Q 22 26 14 22' stroke='%239CA88A' stroke-width='1' fill='none'/><path d='M 26 22 Q 18 20 12 14' stroke='%239CA88A' stroke-width='1' fill='none'/><path d='M 44 48 Q 34 46 28 42' stroke='%239CA88A' stroke-width='1' fill='none'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.85;
    transition: filter 1400ms var(--ease-meditative),
                transform 1400ms var(--ease-meditative);
}

.card:hover .card-corner-fern {
    filter: drop-shadow(0 0 6px rgba(156, 168, 138, 0.4));
    transform: scale(1.04);
}

.card--dense:hover .card-corner-fern {
    filter: drop-shadow(0 0 8px rgba(156, 168, 138, 0.55));
}

/* Library room: lichen glow on hover */
.card--dense:hover {
    background: linear-gradient(135deg, var(--aged-linen) 75%, rgba(156, 168, 138, 0.18) 100%);
}

/* ---------------------------------------------------------
   KINTSUGI CRACKS (overlaid on every card)
   --------------------------------------------------------- */
.kintsugi-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
    z-index: 2;
}

.kintsugi-overlay svg {
    width: 100%;
    height: 100%;
    display: block;
}

.kintsugi-crack {
    stroke: var(--kintsugi-gold);
    stroke-width: 1.4;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 800ms var(--ease-kintsugi);
}

.kintsugi-highlight {
    stroke: var(--porcelain-highlight);
    stroke-width: 0.6;
    fill: none;
    stroke-linecap: round;
    opacity: 0.7;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    transition: stroke-dashoffset 800ms var(--ease-kintsugi);
}

.card.is-mended .kintsugi-crack,
.card.is-mended .kintsugi-highlight {
    stroke-dashoffset: 0;
}

/* ---------------------------------------------------------
   INSTRUMENT READOUT (observatory cards)
   --------------------------------------------------------- */
.card--instrument {
    background: var(--bisque-cream);
    --card-radius: 16px;
}

.instrument-readout {
    margin: 0.8em 0;
    padding: 10px 12px;
    border: 0.5px solid rgba(122, 31, 27, 0.22);
    background: rgba(255, 255, 252, 0.4);
    font-family: var(--font-mono);
    font-size: 12px;
}

.readout-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 0.5px dashed rgba(122, 31, 27, 0.18);
}

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

.readout-label {
    color: var(--cracked-burgundy);
    opacity: 0.65;
    letter-spacing: 0.12em;
}

.readout-val {
    color: var(--cracked-burgundy);
    opacity: 0.9;
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

/* Observatory: HUD measurement lines (drawn via JS on hover) */
.measurement-line {
    position: absolute;
    pointer-events: none;
    z-index: 11;
    overflow: visible;
}

.measurement-line line {
    stroke: var(--cracked-burgundy);
    stroke-width: 0.6;
    opacity: 0;
    stroke-dasharray: 4 3;
    animation: hud-measure 600ms var(--ease-meditative) forwards;
}

@keyframes hud-measure {
    0% { opacity: 0; stroke-dashoffset: 200; }
    100% { opacity: 0.55; stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------
   ROOM FERNS
   --------------------------------------------------------- */
.room-fern {
    position: absolute;
    pointer-events: none;
    opacity: 0.7;
}

.room-fern svg {
    width: 100%;
    height: 100%;
}

.room-fern--right-top {
    right: -40px;
    top: 18vh;
    width: 160px;
    height: 320px;
    transform: rotate(-12deg);
}

.room-fern--right-bottom {
    right: -60px;
    bottom: 10vh;
    width: 200px;
    height: 400px;
    transform: rotate(8deg);
}

/* ---------------------------------------------------------
   ROOM RETICLE (medium, for room headers)
   --------------------------------------------------------- */
.room-reticle::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 180'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0' stop-color='%23B89968'/><stop offset='1' stop-color='%239C7E4E'/></linearGradient></defs><circle cx='90' cy='90' r='82' stroke='%237A1F1B' stroke-width='0.7' fill='none' opacity='0.7'/><circle cx='90' cy='90' r='58' stroke='%237A1F1B' stroke-width='0.6' fill='none' opacity='0.55'/><circle cx='90' cy='90' r='30' stroke='%237A1F1B' stroke-width='0.5' fill='none' opacity='0.45'/><line x1='90' y1='4' x2='90' y2='20' stroke='%237A1F1B' stroke-width='0.8'/><line x1='90' y1='160' x2='90' y2='176' stroke='%237A1F1B' stroke-width='0.8'/><line x1='4' y1='90' x2='20' y2='90' stroke='%237A1F1B' stroke-width='0.8'/><line x1='160' y1='90' x2='176' y2='90' stroke='%237A1F1B' stroke-width='0.8'/><circle cx='40' cy='128' r='2' fill='%239CA88A'/><circle cx='46' cy='136' r='1.4' fill='%239CA88A'/><circle cx='34' cy='140' r='1.6' fill='%239CA88A'/><circle cx='52' cy='144' r='1.2' fill='%233E4838'/><circle cx='28' cy='132' r='1.4' fill='%239CA88A'/><path d='M 28 28 L 152 152' stroke='url(%23g)' stroke-width='1.2' fill='none'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    animation: reticle-slow-spin 120s linear infinite;
}

@keyframes reticle-slow-spin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(0.6deg); }
}

/* ---------------------------------------------------------
   STILL POND
   --------------------------------------------------------- */
.pond-stage {
    position: relative;
    width: 100%;
    margin: 4vh auto 0;
    max-width: 1100px;
}

.pond-above {
    display: flex;
    justify-content: space-around;
    gap: 36px;
    padding: 4vh 0;
    position: relative;
    z-index: 3;
}

.pond-horizon {
    width: 100%;
    height: 1px;
    background: var(--cracked-burgundy);
    opacity: 0.7;
    box-shadow: 0 -2px 0 rgba(122, 31, 27, 0.2);
    position: relative;
    z-index: 2;
}

.pond-horizon::after {
    content: "";
    position: absolute;
    left: 25%;
    right: 25%;
    height: 3px;
    top: -1px;
    background: linear-gradient(90deg, transparent 0%, var(--cracked-burgundy) 50%, transparent 100%);
}

.pond-below {
    display: flex;
    justify-content: space-around;
    gap: 36px;
    padding: 4vh 0;
    position: relative;
    z-index: 1;
    transform: scaleY(-1);
    filter: blur(2px);
    overflow: hidden;
}

.pond-below::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(122, 31, 27, 0.14);
    pointer-events: none;
    z-index: 4;
}

.pond-card {
    position: relative;
    background: var(--bisque-cream);
    padding: 20px 24px;
    width: 240px;
    border: 0.5px solid rgba(122, 31, 27, 0.18);
    border-radius: 18px;
    text-align: center;
}

.pond-card--a { transform: rotate(-0.6deg); }
.pond-card--b { transform: rotate(0.4deg) translateY(6px); }
.pond-card--c { transform: rotate(-0.3deg); }

.pond-mirror {
    opacity: 0.72;
}

.pond-ripples {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border: 1px solid var(--cracked-burgundy);
    border-radius: 50%;
    opacity: 0;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    animation: ripple-expand 5s ease-out forwards;
}

@keyframes ripple-expand {
    0% { width: 4px; height: 4px; opacity: 0.6; }
    100% { width: 260px; height: 260px; opacity: 0; }
}

/* ---------------------------------------------------------
   FOOTER ROOTSTOCK
   --------------------------------------------------------- */
.footer-rootstock {
    position: relative;
    background: var(--wet-loam);
    color: var(--bisque-cream);
    padding: 8vh 6vw 6vh;
    min-height: 38vh;
    z-index: 4;
    text-align: center;
}

.footer-reticle {
    width: 140px;
    height: 140px;
    margin: 0 auto 28px;
    opacity: 0.7;
}

.footer-reticle svg {
    width: 100%;
    height: 100%;
}

.footer-reticle-flank {
    position: absolute;
    width: 64px;
    height: 64px;
    top: 10vh;
}

.footer-reticle-flank--left { left: 20vw; }
.footer-reticle-flank--right { right: 20vw; }

.footer-reticle-flank::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><circle cx='32' cy='32' r='28' stroke='%23EFE6D0' stroke-width='0.5' fill='none' opacity='0.5'/><circle cx='32' cy='32' r='16' stroke='%23EFE6D0' stroke-width='0.4' fill='none' opacity='0.45'/><line x1='32' y1='2' x2='32' y2='10' stroke='%23EFE6D0' stroke-width='0.5' opacity='0.5'/><line x1='32' y1='54' x2='32' y2='62' stroke='%23EFE6D0' stroke-width='0.5' opacity='0.5'/><line x1='2' y1='32' x2='10' y2='32' stroke='%23EFE6D0' stroke-width='0.5' opacity='0.5'/><line x1='54' y1='32' x2='62' y2='32' stroke='%23EFE6D0' stroke-width='0.5' opacity='0.5'/><path d='M 12 12 L 52 52' stroke='%23B89968' stroke-width='0.8' opacity='0.8'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
}

.colophon {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    line-height: 2;
    color: var(--bisque-cream);
    opacity: 0.82;
    max-width: 70ch;
    margin: 0 auto;
}

.colophon p {
    margin: 0.4em 0;
}

.delta-mark {
    margin-top: 32px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--kintsugi-gold);
}

.delta-mark span {
    display: inline-block;
    animation: delta-breathe 11s ease-in-out infinite;
}

@keyframes delta-breathe {
    0%, 100% { opacity: 0.8; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}

/* ---------------------------------------------------------
   INITIAL LOAD: 480ms pregnant pause
   ---------------------------------------------------------
   Body content fades in after 0ms (kintsugi seam starts at 480ms),
   but content beneath the seam is invisible until ~900ms.
*/
.room--hero > *:not(.viewport-seam):not(.hud-corner-mark):not(.hero-coordinates) {
    /* hero contents controlled by their own animations */
}

.room--greenhouse,
.room--observatory,
.room--library,
.room--pond,
.horizon-divider,
.footer-rootstock {
    opacity: 0;
    animation: room-reveal 1400ms var(--ease-meditative) 2900ms forwards;
}

@keyframes room-reveal {
    to { opacity: 1; }
}

/* Cards begin invisible, become visible when intersecting (mend-on-arrival) */
.card {
    opacity: 0;
    transform: rotate(var(--card-rot, 0deg)) translateY(20px);
    transition: opacity 1000ms var(--ease-meditative),
                transform 1000ms var(--ease-meditative);
}

.card.in-view {
    opacity: 1;
    transform: rotate(var(--card-rot, 0deg)) translateY(0);
}

/* Reduced motion: wabi-sabi never silences, just lengthens */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 3s !important;
        transition-duration: 1.4s !important;
    }
}
