/* ===================================================================
   masugomi.com — The Forest That Remembers
   styles.css
   Palette: forest-green, low-key under-exposed
   Typography: Commissioner (variable) + JetBrains Mono
=================================================================== */

:root {
    /* Palette */
    --moss-shadow: #0E1A14;     /* deepest shadow / canopy void */
    --wet-bark: #1F2E22;         /* mid-deep forest body */
    --fir-needle: #2D4A35;       /* living foliage primary */
    --moss-living: #3F5E45;      /* living foliage tertiary */
    --lichen-pale: #7A8E63;      /* lichen accent */
    --birch-bone: #D4D8C3;       /* field-light text on dark */
    --aged-paper: #F2EBDA;       /* parchment paper for cards */
    --humus-ink: #2C2A22;        /* text on pale */
    --cyanotype-ink: #1B3A4B;    /* cyanotype accent */
    --foxed-amber: #9A6F3D;      /* photo foxing */
    --thread-red: #7A2A2A;       /* red specimen-thread */

    /* breathing — global micro-jitter, applied to inner stratum content */
    --breath: 0px;

    /* parallax shared scroll position (px) */
    --scrollY: 0;

    /* viewport measure */
    --measure: clamp(320px, 60vw, 720px);

    --gutter-l: clamp(120px, 14vw, 200px);
    --gutter-r: clamp(120px, 14vw, 200px);
}

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

html, body {
    background: var(--moss-shadow);
    color: var(--birch-bone);
    font-family: 'Commissioner', 'Inter', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.74;
    overflow-x: hidden;
    min-height: 100vh;
}

body {
    /* fixed background — under-exposed pre-dawn forest base */
    background:
        radial-gradient(ellipse at 50% 28%, rgba(45,74,53,0.18) 0%, transparent 56%),
        radial-gradient(ellipse at 50% 80%, rgba(14,26,20,1) 0%, var(--moss-shadow) 100%),
        var(--moss-shadow);
    background-attachment: fixed;
    position: relative;
    cursor: none;
    /* total descent height = 7 strata * ~110vh */
    min-height: 780vh;
}

/* ===================================================================
   Particle canvases — three layers, fixed full-viewport
=================================================================== */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
}
#canvas-rear  { z-index: 1; opacity: 0.86; }
#canvas-mid   { z-index: 4; }
#canvas-front { z-index: 9; }

/* ===================================================================
   Soft cursor ring (the loupe / pen-tip)
=================================================================== */
#cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(212,216,195,0.24);
    filter: blur(14px);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 220ms ease, height 220ms ease, background 220ms ease, filter 220ms ease, border 220ms ease;
    border: 0 solid transparent;
    will-change: transform, width, height;
}
#cursor-ring.is-loupe {
    width: 56px;
    height: 56px;
    background: rgba(212,216,195,0.10);
    filter: blur(2px);
    border: 1px solid var(--cyanotype-ink);
}
#cursor-ring.is-pen-tip {
    width: 8px;
    height: 8px;
    background: var(--cyanotype-ink);
    filter: blur(0);
}

/* ===================================================================
   Field-journal corner-tab + collapsible strata list
=================================================================== */
#journal-tab {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: none;
    z-index: 100;
}
#journal-tab .folded-corner {
    display: block;
    transition: transform 320ms cubic-bezier(.2,.8,.2,1);
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.4));
}
#journal-tab:hover .folded-corner {
    transform: rotate(-6deg) translate(2px, 2px);
}

#strata-list {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 80vw;
    background: var(--aged-paper);
    color: var(--humus-ink);
    padding: 48px 32px 32px;
    transform: translateX(-100%);
    transition: transform 420ms cubic-bezier(.2,.8,.2,1);
    z-index: 99;
    box-shadow: 4px 0 22px rgba(0,0,0,0.6);
    border-right: 1px solid var(--cyanotype-ink);
}
#strata-list.open {
    transform: translateX(0);
}
#strata-list h2 {
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--cyanotype-ink);
    margin-bottom: 1.2rem;
    border-bottom: 0.5px solid var(--cyanotype-ink);
    padding-bottom: 0.6rem;
}
#strata-list ol {
    list-style: none;
    counter-reset: strata;
}
#strata-list li {
    margin-bottom: 0.7rem;
}
#strata-list a {
    display: flex;
    align-items: baseline;
    gap: 14px;
    color: var(--humus-ink);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 200ms;
}
#strata-list a:hover {
    color: var(--thread-red);
}
#strata-list .num {
    font-family: 'JetBrains Mono', monospace;
    color: var(--cyanotype-ink);
    font-size: 0.78rem;
    min-width: 26px;
    letter-spacing: 0.08em;
}
#strata-list .name {
    font-style: italic;
}
#strata-list .signature {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 0.5px dashed var(--cyanotype-ink);
    font-style: italic;
    font-size: 0.78rem;
    color: var(--cyanotype-ink);
}

/* ===================================================================
   Left margin — scrolling marginalia (date stamps, lat/long)
=================================================================== */
#margin-left {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--gutter-l);
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;
    padding: 64px 16px 24px 24px;
}
.marginalia {
    list-style: none;
    transform: translateY(calc(var(--scrollY) * -0.18px));
    will-change: transform;
}
.marginalia li {
    margin-bottom: 1.6rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    line-height: 1.6;
    color: #4A5D4F;
}
.m-date {
    display: block;
    color: var(--cyanotype-ink);
    opacity: 0.78;
}
.m-coord {
    display: block;
    opacity: 0.64;
}

/* ===================================================================
   Right margin — depth ruler + ambient toggle + timestamp
=================================================================== */
#margin-right {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--gutter-r);
    height: 100vh;
    z-index: 5;
    padding: 64px 24px 24px 16px;
    pointer-events: none;
}
#depth-ruler {
    position: relative;
    height: 70vh;
    margin-top: 2vh;
    pointer-events: none;
}
.ruler-track {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 6px;
    width: 1px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(212,216,195,0.4) 8%,
        rgba(212,216,195,0.4) 92%,
        transparent 100%);
}
.ruler-tick {
    position: absolute;
    left: 0;
    top: var(--y);
    width: 100%;
    height: 1px;
    background: transparent;
    transform: translateY(-0.5px);
}
.ruler-tick::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 12px;
    height: 1px;
    background: rgba(212,216,195,0.62);
}
.ruler-tick span {
    position: absolute;
    left: 18px;
    top: -6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 8.5px;
    color: rgba(212,216,195,0.42);
    letter-spacing: 0.04em;
    white-space: nowrap;
}
#depth-indicator {
    position: absolute;
    left: -10px;
    top: 0;
    color: var(--lichen-pale);
    font-size: 14px;
    line-height: 1;
    transform: translateY(-50%);
    transition: top 220ms cubic-bezier(.2,.8,.2,1);
}

#ambient-toggle {
    position: absolute;
    bottom: 64px;
    right: 24px;
    background: transparent;
    border: 1px solid rgba(212,216,195,0.32);
    color: rgba(212,216,195,0.62);
    font-family: 'Commissioner', sans-serif;
    font-style: italic;
    font-size: 0.74rem;
    padding: 4px 10px;
    cursor: none;
    pointer-events: auto;
    letter-spacing: 0.08em;
    transition: color 200ms, border-color 200ms;
}
#ambient-toggle:hover {
    color: var(--birch-bone);
    border-color: var(--birch-bone);
}
#ambient-toggle.is-on {
    color: var(--lichen-pale);
    border-color: var(--lichen-pale);
}

#local-timestamp {
    position: absolute;
    bottom: 24px;
    right: 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--cyanotype-ink);
    letter-spacing: 0.04em;
    opacity: 0.78;
}

/* ===================================================================
   Main descent — seven strata
=================================================================== */
#descent {
    position: relative;
    z-index: 2;
    width: 100%;
}

#drop-folio {
    position: fixed;
    top: 50vh;
    right: 28%;
    transform: translate(50%, -50%);
    font-family: 'Commissioner', serif;
    font-weight: 200;
    font-style: italic;
    font-size: 9rem;
    color: var(--moss-living);
    opacity: 0.10;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    transition: opacity 800ms;
}

.stratum {
    position: relative;
    width: 100%;
    min-height: 110vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4vh 0;
    z-index: 2;
}

.stratum-inner {
    width: var(--measure);
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
    transform: translate3d(0, calc(var(--scrollY) * var(--vy, 0.6) * -0.06px), var(--breath));
    will-change: transform;
}

.stratum[data-vy] { --vy: attr(data-vy number); }

/* Stratum titles */
.stratum-title {
    font-family: 'Commissioner', serif;
    font-weight: 600;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--cyanotype-ink);
    margin-bottom: 0.4rem;
    font-variant-caps: small-caps;
}

.ledger-rule {
    height: 1px;
    width: 100%;
    background:
        linear-gradient(to right,
            transparent 0%,
            var(--cyanotype-ink) 14%,
            var(--cyanotype-ink) 92%,
            transparent 100%);
    opacity: 0.6;
    margin-bottom: 2.4rem;
    transform: skewY(-0.18deg);
}

/* ===================================================================
   STRATUM 1 — Emergent canopy (hero)
=================================================================== */
#stratum-1 .stratum-inner {
    width: min(86vw, 880px);
    max-width: none;
}
.hero-plate {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 3.2;
    margin-top: 6vh;
}
.plate-photo {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(14,26,20,0.92),
        0 22px 64px rgba(0,0,0,0.66);
}
.plate-photo svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: sepia(0.32) contrast(0.92) brightness(0.94) saturate(0.78);
}
.plate-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 50%,
            transparent 0%,
            rgba(14,26,20,0.35) 78%,
            rgba(14,26,20,0.78) 100%);
    pointer-events: none;
    mix-blend-mode: multiply;
}

.hero-caption {
    position: absolute;
    bottom: 18px;
    left: 38px;
    right: 38px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    color: var(--cyanotype-ink);
    font-family: 'Commissioner', serif;
    font-weight: 200;
    font-size: 6.5rem;
    letter-spacing: 0.04em;
    line-height: 1;
    text-shadow: 0 1px 0 rgba(212,216,195,0.18);
    mix-blend-mode: screen;
    pointer-events: none;
}
.wordmark {
    color: var(--birch-bone);
    font-style: italic;
    font-weight: 300;
}
.wordmark-dot {
    color: var(--thread-red);
    font-weight: 400;
}
.wordmark-tld {
    color: var(--lichen-pale);
    font-style: italic;
    font-weight: 300;
}
.plate-no {
    align-self: flex-end;
    font-family: 'Commissioner', serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--birch-bone);
    opacity: 0.78;
    text-shadow: none;
}

.continue-arrow {
    position: absolute;
    bottom: -64px;
    left: 0;
    color: var(--cyanotype-ink);
    font-family: 'Commissioner', serif;
    font-style: italic;
    font-size: 0.86rem;
    letter-spacing: 0.06em;
    opacity: 0;
    transition: opacity 1.4s ease;
}
.continue-arrow.show {
    opacity: 0.74;
}

/* ===================================================================
   STRATUM 2 — Upper canopy
=================================================================== */
.stratum-2-inner {
    position: relative;
    min-height: 100vh;
}
.specimen-plate {
    position: absolute;
    width: 200px;
    transform: translateX(-50%) rotate(var(--rot, 0deg));
    left: var(--x, 50%);
    transition: transform 320ms ease;
}
.sp-1 { top: 18%; }
.sp-2 { top: 36%; }
.sp-3 { top: 56%; }

.specimen-plate .plate-photo {
    aspect-ratio: 5 / 6;
    box-shadow:
        0 0 0 6px var(--aged-paper),
        0 0 0 7px var(--cyanotype-ink),
        0 18px 38px rgba(0,0,0,0.62);
}
.specimen-plate .field-card {
    background: var(--aged-paper);
    color: var(--humus-ink);
    font-family: 'Commissioner', serif;
    font-style: italic;
    font-size: 0.84rem;
    line-height: 1.36;
    padding: 8px 12px 10px;
    margin-top: 8px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.4);
    position: relative;
}
.field-card .card-label {
    display: block;
    color: var(--humus-ink);
}
.field-card .card-bin {
    display: block;
    margin-top: 4px;
    font-family: 'Commissioner', serif;
    font-weight: 700;
    font-style: normal;
    text-transform: uppercase;
    font-size: 0.66rem;
    letter-spacing: 0.18em;
    color: var(--cyanotype-ink);
}

.card-pin-tl, .card-pin-tr {
    position: absolute;
    top: -4px;
    width: 12px;
    height: 12px;
    z-index: 3;
    filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.6));
}
.card-pin-tl { left: 8px; }
.card-pin-tr { right: 8px; }

/* ===================================================================
   STRATUM 3 — Mid-canopy prose with glitching ground
=================================================================== */
.stratum-3-inner {
    position: relative;
    padding: 6vh 0;
}
.glitch-ground {
    position: absolute;
    inset: -8% -32% -8% -32%;
    z-index: -1;
    overflow: hidden;
    box-shadow: inset 0 0 200px 40px var(--moss-shadow);
}
.glitch-ground svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: sepia(0.32) contrast(0.92) brightness(0.78) saturate(0.78);
}
.glitch-ground.is-glitching svg {
    animation: shutter-glitch 240ms ease-out 1;
}
.glitch-ground::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 50%,
            transparent 0%,
            rgba(14,26,20,0.4) 76%,
            rgba(14,26,20,0.94) 100%);
    pointer-events: none;
}

.prose {
    font-family: 'Commissioner', serif;
    font-weight: 400;
    color: var(--birch-bone);
    line-height: 1.74;
    font-size: 1.0625rem;
    background: rgba(14,26,20,0.66);
    padding: 2.4rem 2.6rem;
    border-left: 2px solid var(--cyanotype-ink);
    backdrop-filter: blur(2px);
    max-width: 38em;
}
.prose p {
    margin-bottom: 1.1rem;
}
.prose p:last-child {
    margin-bottom: 0;
}
.prose-marker {
    font-style: italic;
    font-size: 0.86rem;
    color: var(--lichen-pale);
    opacity: 0.78;
    margin-bottom: 1.4rem !important;
}
.prose-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--cyanotype-ink);
    letter-spacing: 0.04em;
    margin-top: 1.4rem !important;
    padding-top: 0.9rem;
    border-top: 0.5px dashed rgba(27,58,75,0.5);
}
.prose-mono span:first-child {
    font-style: italic;
}

/* ===================================================================
   STRATUM 4 — Sub-canopy / Index taxonomy card
=================================================================== */
.taxonomy-card {
    position: relative;
    background: var(--aged-paper);
    color: var(--humus-ink);
    padding: 38px 40px 40px;
    box-shadow:
        0 0 0 1px rgba(27,58,75,0.32),
        0 28px 64px rgba(0,0,0,0.64);
    transform: rotate(-0.4deg);
}
.taxonomy-card .card-pin-tl,
.taxonomy-card .card-pin-tr {
    top: -6px;
    width: 14px;
    height: 14px;
}
.card-title {
    font-family: 'Commissioner', serif;
    font-weight: 700;
    font-size: 1.08rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--cyanotype-ink);
    margin-bottom: 0.2rem;
}
.card-sub {
    font-style: italic;
    font-size: 0.8rem;
    color: var(--humus-ink);
    opacity: 0.74;
    margin-bottom: 1.6rem;
    border-bottom: 0.5px dashed rgba(27,58,75,0.42);
    padding-bottom: 0.8rem;
}
.index-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(6, 60px);
    gap: 14px 16px;
    justify-content: space-between;
}
.index-grid li {
    width: 60px;
    text-align: center;
    cursor: none;
    transition: transform 220ms ease;
}
.index-grid li:hover {
    transform: translateY(-2px);
}
.index-grid li:hover .index-thumb {
    animation: shutter-glitch 240ms ease-out;
}
.index-thumb {
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--moss-shadow);
    overflow: hidden;
}
.index-thumb svg.thumb-art {
    width: 100%;
    height: 100%;
    display: block;
    filter: sepia(0.32) contrast(0.92) brightness(0.94) saturate(0.78);
}
.index-thumb .frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.index-grid figcaption,
.index-grid .thumb-cap {
    font-family: 'Commissioner', serif;
    font-style: italic;
    font-size: 8.5px;
    color: var(--humus-ink);
    margin-top: 4px;
    letter-spacing: 0.02em;
    opacity: 0.86;
    line-height: 1.2;
}

/* ===================================================================
   STRATUM 5 — Method (long-form prose with marginalia)
=================================================================== */
.stratum-5-inner {
    width: min(80vw, 820px);
    max-width: none;
}
.method-block {
    display: grid;
    grid-template-columns: 60px 38ch;
    gap: 32px;
    align-items: start;
}
.method-marginalia {
    color: var(--cyanotype-ink);
    font-family: 'Commissioner', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 0.8125rem;
    text-align: right;
    line-height: 1.74;
    opacity: 0.86;
    padding-top: 2.4rem;
}
.method-marginalia p {
    margin-bottom: 0.6rem;
    letter-spacing: 0.04em;
}
.prose-method {
    max-width: 38ch;
}

/* ===================================================================
   STRATUM 6 — Herbaceous grid with glitching tiles
=================================================================== */
.grid-9 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 2.6rem;
}
.grid-9 .tile {
    aspect-ratio: 1 / 1;
    background: var(--moss-shadow);
    box-shadow: 0 0 0 4px var(--aged-paper), 0 0 0 5px var(--cyanotype-ink), 0 12px 28px rgba(0,0,0,0.6);
    overflow: hidden;
    position: relative;
}
.grid-9 .tile.in-view {
    animation: shutter-glitch 240ms ease-out;
}
.grid-9 .tile svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: sepia(0.32) contrast(0.92) brightness(0.94) saturate(0.78);
}
.grid-9 .tile.missing {
    background: var(--aged-paper);
    box-shadow: 0 0 0 4px var(--aged-paper), 0 0 0 5px var(--cyanotype-ink), 0 12px 28px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    text-align: center;
}
.grid-9 .tile.missing p {
    font-family: 'Commissioner', serif;
    font-style: italic;
    font-size: 0.74rem;
    color: var(--humus-ink);
    line-height: 1.36;
}
.grid-9 .tile.missing .ref-no {
    display: block;
    font-family: 'Commissioner', serif;
    font-weight: 700;
    font-style: normal;
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyanotype-ink);
    margin-top: 6px;
}

/* ===================================================================
   STRATUM 7 — Forest floor / colophon
=================================================================== */
.stratum-7-inner {
    text-align: center;
    padding: 14vh 0 18vh;
}
.colophon {
    font-family: 'Commissioner', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 1.32rem;
    color: var(--birch-bone);
    opacity: 0.86;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}
.colophon-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--cyanotype-ink);
    letter-spacing: 0.16em;
    opacity: 0.62;
}

/* ===================================================================
   Glitch animation — chromatic rolling-shutter
=================================================================== */
@keyframes shutter-glitch {
    0%   { filter: sepia(0.32) contrast(0.92) brightness(0.94) saturate(0.78); transform: translate3d(0,0,0); }
    18%  {
        filter: sepia(0.32) contrast(0.92) brightness(0.94) saturate(0.78)
                drop-shadow(2.4px 0 0 #7A2A2A)
                drop-shadow(-2.4px 0 0 #1B3A4B);
        transform: translate3d(0.6px, 0, 0);
    }
    36%  {
        filter: sepia(0.32) contrast(0.92) brightness(0.94) saturate(0.78)
                drop-shadow(6px 0 0 #7A2A2A)
                drop-shadow(-6px 0 0 #1B3A4B);
        transform: translate3d(-1.2px, 0, 0);
    }
    54%  {
        filter: sepia(0.32) contrast(0.92) brightness(0.94) saturate(0.78)
                drop-shadow(2.4px 0 0 #7A2A2A)
                drop-shadow(-2.4px 0 0 #1B3A4B);
        transform: translate3d(0.4px, 0, 0);
    }
    100% { filter: sepia(0.32) contrast(0.92) brightness(0.94) saturate(0.78); transform: translate3d(0,0,0); }
}

/* Heading glitch register — Commissioner doing the glitching itself */
@keyframes heading-glitch {
    0%   { font-weight: 600; transform: translate3d(0,0,0); }
    20%  { font-weight: 400; transform: translate3d(0.6px, 0, 0); }
    50%  { font-weight: 700; transform: translate3d(-1.0px, 0, 0); }
    80%  { font-weight: 400; transform: translate3d(0.4px, 0, 0); }
    100% { font-weight: 600; transform: translate3d(0,0,0); }
}
.stratum-title.is-glitching {
    animation: heading-glitch 320ms ease-out;
}

/* ===================================================================
   Breathing — global micro-jitter on every stratum content
=================================================================== */
@keyframes breath {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50%      { transform: translate3d(0, 0.4px, 0); }
}
.stratum-inner > * {
    animation: breath 7s ease-in-out infinite;
}
.stratum-2-inner > .specimen-plate {
    animation-delay: var(--breath-delay, 0s);
}
.sp-1 { --breath-delay: -0.4s; }
.sp-2 { --breath-delay: -2.1s; }
.sp-3 { --breath-delay: -4.3s; }

/* ===================================================================
   Reduced motion — calm everything
=================================================================== */
@media (prefers-reduced-motion: reduce) {
    .stratum-inner > * { animation: none; }
    .glitch-ground.is-glitching svg { animation: none; }
    .stratum-title.is-glitching { animation: none; }
    .grid-9 .tile.in-view { animation: none; }
    #cursor-ring { display: none; }
    body { cursor: auto; }
    .stratum-inner { transform: none; }
    .marginalia { transform: none; }
}

/* ===================================================================
   Responsive — narrow viewports collapse gutters
=================================================================== */
@media (max-width: 900px) {
    :root {
        --gutter-l: 28px;
        --gutter-r: 28px;
        --measure: calc(100vw - 56px);
    }
    #margin-left, #margin-right {
        display: none;
    }
    .hero-caption {
        font-size: 3rem;
        bottom: 12px;
        left: 16px;
        right: 16px;
    }
    .specimen-plate {
        position: relative;
        left: auto !important;
        top: auto !important;
        margin: 0 auto 2.4rem;
        transform: rotate(var(--rot, 0deg));
    }
    .sp-1, .sp-2, .sp-3 { top: auto; }
    .stratum-2-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .index-grid {
        grid-template-columns: repeat(4, 60px);
    }
    .method-block {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .method-marginalia {
        text-align: left;
        padding-top: 0;
        display: flex;
        gap: 14px;
        flex-wrap: wrap;
    }
}
