/* ==========================================================================
   elaineleigh.com — "The Journey"
   White gallery aesthetic, prehistoric undercurrent. Montserrat carries the
   walk; Cormorant Garamond speaks the poetry. All motion is opacity/transform
   (GPU-composited) and honours prefers-reduced-motion.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/montserrat-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/montserrat-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/cormorant-latin.woff2') format('woff2');
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/cormorant-italic-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
    --ink:        #151616;   /* darkest — Astra global 2 */
    --slate:      #393C40;   /* headings dark            */
    --stone:      #626262;   /* section titles           */
    --fog:        #848181;   /* soft labels              */
    --body:       #595959;   /* body text                */
    --mist:       #8c8c8c;   /* muted                    */
    --bone:       #F6F6F6;   /* subtle bg                */
    --chalk:      #F1F0F0;   /* alt bg                   */
    --white:      #FFFFFF;
    --accent:     #737880;   /* Astra link colour        */
    --moss:       #5d6b5d;   /* a breath of green for strata chips */

    --font-sans:  'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Cormorant Garamond', Georgia, serif;

    --container:  1140px;
    --header-height: 92px;

    --ease-out:   cubic-bezier(.19, 1, .22, 1);
    --shadow-card:  0 6px 24px rgba(21, 22, 22, .08);
    --shadow-lift:  0 18px 44px rgba(21, 22, 22, .16);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--body);
    background: var(--white);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; margin: 0 0 .5em; color: var(--stone); }
a { color: var(--accent); transition: color .2s ease; }
a:hover, a:focus-visible { color: var(--slate); }

.serif-italic { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.br-desktop { display: none; }
@media (min-width: 768px) { .br-desktop { display: inline; } }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 18px; z-index: 200; }
.skip-link:focus { left: 0; color: #fff; }

/* ==========================================================================
   Motion primitives
   ========================================================================== */
.anim {
    opacity: 0;
    transition: opacity 1.1s ease-out, transform 1.1s var(--ease-out);
    transition-delay: var(--delay, 0s);
    will-change: opacity, transform;
}
.fade-in-up    { transform: translate3d(0, 48px, 0); }
.fade-in-left  { transform: translate3d(-64px, 0, 0); }
.fade-in-right { transform: translate3d(64px, 0, 0); }
.anim.is-visible { opacity: 1; transform: translate3d(0, 0, 0); }

.light-speed-in.is-visible {
    animation: lightSpeedIn 1s var(--ease-out) both;
    animation-delay: var(--delay, 0s);
    transition: none;
}
@keyframes lightSpeedIn {
    0%   { opacity: 0; transform: translate3d(60%, 0, 0) skewX(-30deg); }
    60%  { opacity: 1; transform: skewX(18deg); }
    80%  { transform: skewX(-4deg); }
    100% { opacity: 1; transform: none; }
}

/* word-by-word reveal (spans injected by JS) */
.split-words .w {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, 1.1em, 0) rotate(2deg);
    transition: opacity .7s ease, transform .9s var(--ease-out);
    transition-delay: calc(var(--wi) * 45ms);
    will-change: opacity, transform;
}
.split-words.is-visible .w { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .anim, .split-words .w, .light-speed-in.is-visible,
    .tri-arm, .fragment, .passage-track, .notes-line-progress,
    .threshold-triskele, .interlude-spiral svg, .footer-spiral svg {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header { position: absolute; inset: 0 0 auto; height: var(--header-height); z-index: 90; }
.site-header.is-stuck {
    position: fixed;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 14px rgba(21, 22, 22, .08);
    animation: headerDrop .35s ease-out;
}
@keyframes headerDrop { from { transform: translateY(-100%); } to { transform: none; } }

/* Inner pages — the header sits on white, not on a hero */
.site-header--solid {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--chalk);
}

.header-inner {
    max-width: 1320px;
    height: var(--header-height);
    margin-inline: auto;
    padding-inline: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.header-logo img { width: 160px; height: auto; }

.nav-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-link {
    position: relative;
    display: inline-block;
    padding: 12px 16px;
    font-size: .8125rem;
    font-weight: 400;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--slate);
    text-decoration: none;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 16px; right: 16px; bottom: 6px;
    height: 1px;
    background: var(--slate);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease-out);
}
.nav-link:hover::after, .nav-link:focus-visible::after { transform: scaleX(1); }

.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 7px; width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer; }
.menu-toggle-bar { height: 1.5px; width: 100%; background: var(--slate); transition: transform .3s ease; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }

/* ==========================================================================
   Journey rail
   ========================================================================== */
.journey-rail {
    position: fixed;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 18px;
    opacity: 0;
    transition: opacity .5s ease;
}
.journey-rail.is-ready { opacity: 1; }
.journey-rail a { display: flex; align-items: center; gap: 10px; flex-direction: row-reverse; text-decoration: none; }
.rail-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 1px solid var(--fog);
    background: transparent;
    transition: background-color .3s ease, transform .3s ease, border-color .3s ease;
}
.rail-label {
    font-size: .625rem;
    font-weight: 500;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--fog);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity .3s ease, transform .3s ease;
    white-space: nowrap;
}
.journey-rail a:hover .rail-label,
.journey-rail a.is-active .rail-label { opacity: 1; transform: none; }
.journey-rail a.is-active .rail-dot { background: var(--ink); border-color: var(--ink); transform: scale(1.4); }
.journey-rail.on-dark .rail-dot { border-color: rgba(255,255,255,.6); }
.journey-rail.on-dark a.is-active .rail-dot { background: #fff; border-color: #fff; }
.journey-rail.on-dark .rail-label { color: rgba(255,255,255,.75); }

@media (max-width: 921px) { .journey-rail { display: none; } }

/* ==========================================================================
   I. Threshold
   ========================================================================== */
.threshold {
    position: relative;
    min-height: 100vh; min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 24px) 24px 96px;
    overflow: hidden;
    background: var(--white);
}

.threshold-triskele {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--ink);
    opacity: .07;
    pointer-events: none;
}
.threshold-triskele svg { width: min(88vmin, 780px); height: auto; animation: slowSpin 240s linear infinite; }
.tri-arm { stroke-dasharray: 640; stroke-dashoffset: 640; animation: drawArm 4.5s ease-out forwards; }
.tri-arm:nth-child(2) { animation-delay: .5s; }
.tri-arm:nth-child(3) { animation-delay: 1s; }
@keyframes drawArm  { to { stroke-dashoffset: 0; } }
@keyframes slowSpin { to { transform: rotate(360deg); } }

.threshold-inner { position: relative; width: 100%; min-width: 0; max-width: 860px; }
.threshold-kicker {
    font-size: .6875rem; font-weight: 500;
    letter-spacing: .42em; text-transform: uppercase;
    color: var(--mist); margin: 0 0 28px;
}
.threshold-logo img { width: min(660px, 92%); margin-inline: auto; }
.threshold-line { font-size: clamp(1.35rem, 2.6vw, 1.8rem); line-height: 1.5; color: var(--slate); margin: 30px 0 22px; }

.hero-divider { padding-block: 2px; }
.hero-divider span { display: block; width: 15%; margin-inline: auto; border-top: 1.5px solid var(--fog); }

.threshold-invite { margin: 26px 0 0; font-size: .9375rem; color: var(--body); }

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.scroll-cue-label { font-size: .625rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; color: var(--mist); }
.scroll-cue-line { width: 1px; height: 56px; background: var(--fog); overflow: hidden; position: relative; }
.scroll-cue-line::after {
    content: '';
    position: absolute; inset: 0;
    background: var(--ink);
    animation: cueDrop 2.2s ease-in-out infinite;
}
@keyframes cueDrop { 0% { transform: translateY(-100%); } 55% { transform: translateY(0); } 100% { transform: translateY(100%); } }

/* ==========================================================================
   II. Prologue
   ========================================================================== */
.prologue { position: relative; padding: 140px 24px 120px; background: var(--white); overflow: hidden; }
.prologue-inner { position: relative; max-width: 780px; margin-inline: auto; text-align: center; z-index: 2; }

.prologue-eyebrow {
    font-size: .6875rem; font-weight: 500;
    letter-spacing: .42em; text-transform: uppercase;
    color: var(--mist); margin: 0 0 22px;
}
.prologue-eyebrow--light { color: rgba(255,255,255,.65); }

.prologue-statement {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.9rem, 4.6vw, 3.1rem);
    line-height: 1.32;
    color: var(--slate);
    margin: 0 0 34px;
}
.prologue-body { font-size: 1.0625rem; line-height: 1.9; margin: 0 auto; max-width: 640px; }

.prologue-stats { display: flex; justify-content: center; gap: clamp(32px, 7vw, 84px); margin-top: 72px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.stat-number { font-family: var(--font-serif); font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-label { font-size: .6875rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--fog); text-align: center; }

.prologue-fragments { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.fragment { position: absolute; width: clamp(120px, 16vw, 230px); box-shadow: var(--shadow-card); opacity: .5; will-change: transform; }
.fragment img { filter: saturate(.6); }
.fragment-1 { top: 12%; left: 4%; transform: rotate(-5deg); }
.fragment-2 { bottom: 10%; right: 5%; transform: rotate(4deg); }

/* ==========================================================================
   III. Chapters
   ========================================================================== */
.chapters { padding: 120px 0 40px; background: var(--white); }
.chapters-head { text-align: center; max-width: 760px; margin: 0 auto 40px; padding-inline: 24px; }

.section-title { font-size: clamp(2.1875rem, 5vw, 3.125rem); font-weight: 300; color: var(--stone); margin-bottom: 18px; }
.chapters-intro { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--body); line-height: 1.6; }
.chapters-intro strong { font-weight: 600; font-style: normal; letter-spacing: .04em; color: var(--slate); }

.chapter {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(32px, 6vw, 88px);
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(48px, 8vh, 96px) 28px;
}
.chapter--flip .chapter-media { order: 2; }
.chapter--flip .chapter-text  { order: 1; }

.chapter-media { position: relative; }
.chapter-figure {
    margin: 0;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
    transition: transform .5s var(--ease-out), box-shadow .5s ease;
    will-change: transform;
}
.chapter-figure:hover { box-shadow: var(--shadow-lift); }
.chapter-figure img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    transform: scale(1.06) translateY(var(--py, 0));   /* parallax breathing room */
    transition: transform .2s linear;
    will-change: transform;
}

.chapter-numeral {
    position: absolute;
    top: -.55em;
    right: -8px;
    font-family: var(--font-serif);
    font-size: clamp(5rem, 11vw, 8.5rem);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(21, 22, 22, .18);
    pointer-events: none;
}
.chapter--flip .chapter-numeral { right: auto; left: -8px; }

.chapter-count { font-size: .6875rem; font-weight: 500; letter-spacing: .38em; text-transform: uppercase; color: var(--mist); margin: 0 0 14px; }
.chapter-title { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 300; color: var(--slate); margin: 0 0 10px; }
.chapter-tagline { font-size: clamp(1.15rem, 2vw, 1.4rem); color: var(--fog); margin: 0 0 18px; }
.chapter-desc { max-width: 52ch; margin: 0 0 26px; }

.strata-label {
    display: block;
    font-size: .625rem; font-weight: 600;
    letter-spacing: .3em; text-transform: uppercase;
    color: var(--mist); margin-bottom: 10px;
}
.strata-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.stratum-chip {
    display: inline-block;
    padding: 7px 18px;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--slate);
    text-decoration: none;
    border: 1px solid #DDDBDB;
    border-radius: 999px;
    transition: border-color .3s ease, background-color .3s ease, color .3s ease, transform .3s var(--ease-out);
}
.stratum-chip:hover, .stratum-chip:focus-visible {
    border-color: var(--slate);
    background: var(--ink);
    color: var(--white);
    transform: translateY(-2px);
}

/* ==========================================================================
   IV. The Passage — scroll-driven horizontal gallery
   ========================================================================== */
.passage { position: relative; background: var(--bone); }
.passage-sticky {
    position: sticky;
    top: 0;
    min-height: 100vh; min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding-block: 48px;
}
.passage-head { text-align: center; padding-inline: 24px; margin-bottom: 40px; }
.passage-hint { color: var(--fog); font-size: 1.05rem; }

.passage-track {
    display: flex;
    align-items: stretch;
    gap: clamp(28px, 4vw, 56px);
    padding-inline: max(28px, calc((100vw - var(--container)) / 2));
    width: max-content;
    will-change: transform;
}
.passage-item { margin: 0; width: clamp(240px, 30vw, 380px); flex-shrink: 0; }
.passage-frame {
    background: var(--white);
    padding: 14px;
    box-shadow: var(--shadow-card);
    transition: transform .5s var(--ease-out), box-shadow .5s ease;
}
.passage-item:hover .passage-frame { transform: translateY(-8px); box-shadow: var(--shadow-lift); }
.passage-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.passage-item figcaption { padding: 14px 4px 0; display: flex; flex-direction: column; gap: 2px; }
.passage-title { font-size: .9375rem; font-weight: 500; color: var(--slate); }
.passage-meta { font-size: .75rem; letter-spacing: .06em; color: var(--mist); }
.passage-meta em { font-style: italic; color: var(--fog); }

.passage-item--end { display: flex; }
.passage-endcard {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 18px;
    width: 100%;
    min-height: 100%;
    border: 1px dashed #CFCCCC;
    text-align: center;
    text-decoration: none;
    color: var(--fog);
    font-size: 1.35rem;
    line-height: 1.4;
    padding: 24px;
    transition: border-color .3s ease, color .3s ease;
}
.passage-endcard:hover { border-color: var(--slate); color: var(--slate); }
.passage-endlink { font-family: var(--font-sans); font-size: .75rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; }

/* ==========================================================================
   V. Interlude — the dark beneath
   ========================================================================== */
.interlude {
    position: relative;
    padding: clamp(120px, 20vh, 200px) 24px;
    background: #101112;
    color: #EDEBE8;
    text-align: center;
    overflow: hidden;
}
.interlude-spiral {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: #EDEBE8;
    opacity: .08;
    pointer-events: none;
}
.interlude-spiral svg { width: min(120vmin, 900px); animation: slowSpin 180s linear infinite reverse; }

.interlude-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.7rem, 4vw, 2.9rem);
    line-height: 1.45;
    max-width: 900px;
    margin: 0 auto;
    color: #EDEBE8;
    position: relative;
}
.interlude-attr { margin: 34px 0 0; font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; color: rgba(237, 235, 232, .5); position: relative; }

/* ==========================================================================
   VI. Field Notes — timeline
   ========================================================================== */
.field-notes { padding: 130px 24px 110px; background: var(--white); }

.notes-timeline { position: relative; max-width: 1080px; margin: 70px auto 0; }
.notes-line {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 1px;
    background: #E4E2E1;
    transform: translateX(-50%);
}
.notes-line-progress {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 100%;
    background: var(--slate);
    transform: scaleY(var(--progress, 0));
    transform-origin: top;
    will-change: transform;
}

.note { position: relative; width: 50%; padding: 34px 0; }
.note--left  { padding-right: clamp(36px, 5vw, 64px); }
.note--right { margin-left: 50%; padding-left: clamp(36px, 5vw, 64px); }

.note-node {
    position: absolute;
    top: 62px;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--white);
    border: 1.5px solid var(--slate);
    z-index: 2;
}
.note--left  .note-node { right: -6px; }
.note--right .note-node { left: -5px; }

.note-card {
    background: var(--white);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
    transition: transform .5s var(--ease-out), box-shadow .5s ease;
}
.note-card:hover { box-shadow: var(--shadow-lift); }
.note-media { display: block; overflow: hidden; }
.note-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .7s var(--ease-out); filter: saturate(.85); }
.note-card:hover .note-media img { transform: scale(1.05); filter: saturate(1); }

.note-body { padding: 22px 26px 20px; }
.note-epoch {
    display: inline-block;
    font-size: .625rem; font-weight: 600;
    letter-spacing: .26em; text-transform: uppercase;
    color: var(--moss);
    margin: 0 0 10px;
}
.note-title { font-size: 1.25rem; font-weight: 400; line-height: 1.4; margin: 0 0 10px; }
.note-title a { color: var(--slate); text-decoration: none; transition: color .2s ease; }
.note-title a:hover { color: var(--accent); }
.note-excerpt { font-size: .9rem; line-height: 1.75; margin: 0 0 16px; }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--chalk); padding-top: 14px; }
.note-foot time { font-size: .75rem; color: var(--mist); }

.post-readmore {
    font-size: .7rem; font-weight: 600;
    letter-spacing: .18em; text-transform: uppercase;
    text-decoration: none;
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: color .3s ease, border-color .3s ease;
}
.post-readmore:hover { color: var(--ink); border-bottom-color: currentColor; }

/* ==========================================================================
   VII. Contact
   ========================================================================== */
.contact {
    position: relative;
    padding: clamp(110px, 18vh, 170px) 24px;
    text-align: center;
    color: #F0F0F0;
    background:
        linear-gradient(rgba(5, 5, 6, .82), rgba(5, 5, 6, .82)),
        #CBCBCB url('../images/contact-bg.jpg') center / cover no-repeat fixed;
}
@supports (-webkit-touch-callout: none) { .contact { background-attachment: scroll; } }

.contact-inner { max-width: 729px; margin-inline: auto; }
.contact-title { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 300; color: #F5F4F2; }
.contact-divider { padding-block: 22px; }
.contact-divider span { display: block; width: 20%; margin-inline: auto; border-top: 2px solid #D5D5D4; }
.contact-lede { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: rgba(245, 244, 242, .85); margin-bottom: 20px; }
.contact p { font-size: .9375rem; font-weight: 400; margin: .4em 0; }

.contact-button {
    display: inline-block;
    margin-top: 30px;
    padding: 15px 44px;
    font-size: .75rem; font-weight: 600;
    letter-spacing: .26em; text-transform: uppercase;
    color: var(--ink);
    background: #F5F4F2;
    text-decoration: none;
    transition: background-color .3s ease, color .3s ease, transform .3s var(--ease-out), box-shadow .3s ease;
}
.contact-button:hover, .contact-button:focus-visible {
    background: transparent;
    color: #F5F4F2;
    box-shadow: inset 0 0 0 1px #F5F4F2;
    transform: translateY(-3px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding: 70px 24px 44px; text-align: center; background: var(--white); color: var(--mist); font-size: .8125rem; }
.footer-spiral { display: grid; place-items: center; color: var(--fog); margin-bottom: 18px; }
.footer-spiral svg { width: 44px; animation: slowSpin 90s linear infinite; }
.footer-line { font-size: 1.3rem; color: var(--fog); margin: 0 0 26px; }

.social-icons { display: flex; justify-content: center; gap: 14px; margin: 0 0 34px; padding: 0; list-style: none; }
.social-icons a {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(21, 22, 22, .12);
    transition: transform .25s var(--ease-out), box-shadow .25s ease;
}
.social-icons svg { width: 18px; height: 18px; fill: #757575; transition: fill .25s ease; }
.social-icons a:hover, .social-icons a:focus-visible { transform: translateY(-4px) scale(1.06); box-shadow: 0 8px 20px rgba(21, 22, 22, .18); }
.social-icons a:hover svg { fill: var(--ink); }

.site-footer p { margin: .3em 0; }
.footer-credit a { color: var(--body); font-weight: 400; text-decoration: none; }
.footer-credit a:hover { color: var(--ink); }

/* ---------- Scroll to top ---------- */
.scroll-top {
    position: fixed;
    right: 24px; bottom: 24px;
    z-index: 85;
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border: 0; border-radius: 50%;
    background: var(--slate); color: #fff;
    cursor: pointer;
    opacity: 0; visibility: hidden;
    transform: translateY(12px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s, background-color .2s ease;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.scroll-top:hover { background: var(--ink); }

/* ==========================================================================
   Inner pages — Field Note studies & collection chapters
   ========================================================================== */
.crumbs { display: flex; justify-content: center; gap: 10px; font-size: .6875rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 34px; color: var(--mist); }
.crumbs a { color: var(--mist); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* --- Field Note study --- */
.study { max-width: 880px; margin-inline: auto; padding: clamp(56px, 9vh, 96px) 24px 40px; }
.study-head { text-align: center; max-width: 700px; margin: 0 auto 44px; }
.study-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.2;
    color: var(--slate);
    margin: 0 0 16px;
}
.study-meta { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--mist); display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.study-site { color: var(--fog); font-weight: 500; }

.study-figure { margin: 0 0 52px; background: var(--white); padding: 14px; box-shadow: var(--shadow-card); }
.study-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.study-body { max-width: 640px; margin-inline: auto; font-size: 1.0625rem; line-height: 1.95; }
.study-body p { margin: 0 0 1.6em; }
.study-body > p:first-of-type::first-letter {
    font-family: var(--font-serif);
    font-size: 3.4em;
    line-height: .8;
    float: left;
    padding: .08em .12em 0 0;
    color: var(--slate);
}

.study-foot { text-align: center; margin-top: 56px; }
.study-foot-line { font-size: 1.3rem; color: var(--fog); margin: 22px 0 14px; }

.study-adjacent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--chalk);
    border-block: 1px solid var(--chalk);
    margin-top: 48px;
}
.adjacent-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(32px, 5vw, 56px);
    background: var(--white);
    text-decoration: none;
    transition: background-color .3s ease;
}
.adjacent-card:hover { background: var(--bone); }
.adjacent-card--next { text-align: right; align-items: flex-end; }
.adjacent-card:only-child { grid-column: 1 / -1; text-align: center; align-items: center; }
.adjacent-label { font-size: .625rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--mist); }
.adjacent-title { font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.35; color: var(--slate); }
.adjacent-card:hover .adjacent-title { color: var(--ink); }

/* --- Artwork product page --- */
.product-figure { margin: 0; }
.product-figure img { aspect-ratio: 6 / 5; }
.product-thumbs { display: flex; gap: 10px; margin: 14px 0 52px; flex-wrap: wrap; }
.product-thumb { width: 76px; height: 76px; padding: 0; border: 2px solid transparent; background: var(--white); box-shadow: var(--shadow-card); cursor: pointer; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb.is-active { border-color: var(--accent); }
.product-details { display: flex; flex-direction: column; gap: 28px; align-items: center; text-align: center; }
.product-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 20px 32px; width: 100%; max-width: 520px; margin: 0; padding: 24px 0; border-block: 1px solid var(--chalk); }
.product-specs dt { font-size: .625rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mist); margin: 0 0 4px; }
.product-specs dd { margin: 0; font-size: 1rem; color: var(--slate); }
.product-editions { width: 100%; max-width: 520px; }
.product-edition-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.product-edition-list li { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; color: var(--fog); padding-bottom: 10px; border-bottom: 1px solid var(--chalk); }

/* --- Product shipping & delivery --- */
.product-shipping { width: 100%; max-width: 520px; text-align: left; border-top: 1px solid var(--chalk); padding-top: 26px; }
.product-shipping-title {
    font-size: .6875rem; font-weight: 600;
    letter-spacing: .2em; text-transform: uppercase;
    color: var(--mist); margin: 0 0 12px;
}
.product-shipping-note { font-size: .9rem; line-height: 1.75; color: var(--body); margin: 0 0 20px; }
.shipping-estimator { display: flex; flex-direction: column; gap: 10px; }
.shipping-label { font-size: .625rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mist); }
.shipping-select {
    font-family: var(--font-sans);
    font-size: .95rem; color: var(--slate);
    padding: 12px 14px;
    width: 100%;
    background: var(--white);
    border: 1px solid #DDDBDB;
    border-radius: 2px;
    cursor: pointer;
    transition: border-color .3s ease;
}
.shipping-select:hover { border-color: var(--fog); }
.shipping-select:focus-visible { outline: 2px solid var(--slate); outline-offset: 2px; border-color: var(--slate); }
.shipping-terms {
    margin: 6px 0 0;
    font-size: .9rem; line-height: 1.65; color: var(--slate);
    padding: 12px 16px;
    background: var(--bone);
    border-left: 2px solid var(--slate);
}
.shipping-terms strong { letter-spacing: .06em; }
.shipping-terms-note { color: var(--fog); font-size: .82rem; }

/* --- Collection chapter --- */
.chapter-hero {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    gap: clamp(32px, 6vw, 88px);
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(56px, 9vh, 96px) 28px;
}
.chapter-hero .crumbs { justify-content: flex-start; margin-bottom: 26px; }
.chapter-hero-title { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 300; color: var(--slate); margin: 0 0 12px; }
.chapter-hero-figure { margin: 0; overflow: hidden; box-shadow: var(--shadow-card); }
.chapter-hero-figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

.stratum { max-width: 1240px; margin: 0 auto; padding: clamp(40px, 7vh, 72px) 28px; border-top: 1px solid var(--chalk); scroll-margin-top: calc(var(--header-height) + 16px); }
.stratum-head { margin-bottom: 34px; }
.stratum-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 300; color: var(--slate); margin: 0; }
.stratum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: clamp(24px, 3.5vw, 44px); }
.stratum-item { width: auto; }
.stratum-empty { font-size: 1.2rem; color: var(--fog); margin: 0; }
.stratum-empty a { color: var(--accent); }

.chapter-onward { text-align: center; padding: clamp(56px, 9vh, 90px) 24px; border-top: 1px solid var(--chalk); }
.chapter-onward-line { font-size: 1.3rem; color: var(--fog); margin: 22px 0 6px; }
.chapter-onward-links { display: flex; flex-direction: column; align-items: center; gap: 22px; }

.contact-button--dark { color: #F5F4F2; background: var(--slate); }
.contact-button--dark:hover, .contact-button--dark:focus-visible {
    background: var(--ink);
    color: #F5F4F2;
    box-shadow: none;
}

/* ==========================================================================
   The Gallery — hall + "The Room" viewer
   ========================================================================== */
.gallery-hall { max-width: 1240px; margin-inline: auto; padding: clamp(56px, 9vh, 96px) 28px 60px; }
.gallery-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }

.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 52px; }
.filter-chip {
    padding: 9px 22px;
    font-family: var(--font-sans);
    font-size: .75rem; font-weight: 500;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--slate);
    background: none;
    border: 1px solid #DDDBDB;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color .3s ease, background-color .3s ease, color .3s ease;
}
.filter-chip:hover { border-color: var(--slate); }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--white); }

.gallery-grid { columns: 3 300px; column-gap: clamp(24px, 3vw, 40px); }
.gallery-piece {
    display: block;
    width: 100%;
    margin: 0 0 clamp(24px, 3vw, 40px);
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    break-inside: avoid;
    font: inherit;
}
.gallery-piece.is-hidden { display: none; }

.piece-frame {
    position: relative;
    display: block;
    background: var(--white);
    padding: 12px;
    box-shadow: var(--shadow-card);
    transition: transform .5s var(--ease-out), box-shadow .5s ease;
}
.gallery-piece:hover .piece-frame,
.gallery-piece:focus-within .piece-frame { transform: translateY(-6px); box-shadow: var(--shadow-lift); }

.piece-hover {
    position: absolute;
    inset: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 17, 18, .55);
    opacity: 0;
    transition: opacity .35s ease;
}
.gallery-piece:hover .piece-hover,
.gallery-piece:focus-within .piece-hover { opacity: 1; }

.piece-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.piece-action {
    min-width: 154px;
    padding: 11px 24px;
    font-family: var(--font-sans);
    font-size: .6875rem; font-weight: 600;
    letter-spacing: .22em; text-transform: uppercase;
    text-align: center; text-decoration: none; white-space: nowrap;
    color: #F5F4F2;
    background: rgba(245, 244, 242, .06);
    border: 1px solid rgba(245, 244, 242, .55);
    border-radius: 999px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .4s ease, transform .5s var(--ease-out),
                background-color .3s ease, color .3s ease, border-color .3s ease;
}
.piece-action--alt { transition-delay: .05s; }
.gallery-piece:hover .piece-action,
.gallery-piece:focus-within .piece-action { opacity: 1; transform: none; }
.piece-action:hover, .piece-action:focus-visible {
    background: #F5F4F2; color: var(--ink); border-color: #F5F4F2;
}
.piece-action:focus-visible { outline: 2px solid #F5F4F2; outline-offset: 3px; }

/* Touch devices have no hover — surface the two actions along the base of
   the piece over a soft scrim so the artwork stays legible. */
@media (hover: none) {
    .piece-hover {
        opacity: 1;
        align-items: flex-end;
        justify-content: center;
        padding-bottom: 16px;
        background: linear-gradient(to top,
            rgba(16, 17, 18, .68), rgba(16, 17, 18, .12) 55%, transparent);
    }
    .piece-action { opacity: 1; transform: none; }
}

.piece-caption { display: flex; flex-direction: column; gap: 2px; padding: 12px 4px 0; }

/* --- The Room --- */
body.room-open { overflow: hidden; }

.room {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    background: #0C0C0D;
    opacity: 0;
    transition: opacity .35s ease;
}
.room.is-open { opacity: 1; }
.room[hidden], .room-closeup[hidden] { display: none; }

.room-scene {
    position: relative;
    flex: 1;
    margin: clamp(16px, 3vh, 36px) clamp(16px, 4vw, 64px) 0;
    overflow: hidden;
    border-radius: 3px;
    background: #E8E5DF url('../images/room-wall.jpg') center 38% / cover no-repeat;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.room-scene::before {            /* soften the photo's edges into the dark chrome */
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 50% 42%, transparent 45%, rgba(10, 10, 10, .38) 100%);
    pointer-events: none;
}

.room-hang {
    position: absolute;
    left: 50%; top: 47%;
    transform: translate(-50%, -50%);
}
.room-hang.is-hung .room-frame { animation: hangSettle .9s var(--ease-out) both; }
@keyframes hangSettle {
    0%   { opacity: 0; transform: translateY(-18px); }
    60%  { opacity: 1; transform: translateY(2px); }
    100% { opacity: 1; transform: none; }
}

.room-frame {
    margin: 0;
    padding: 0;                              /* no moulding — the canvas reads straight off the wall */
    box-shadow:
        0 2px 2px rgba(0, 0, 0, .18),
        0 34px 46px -16px rgba(0, 0, 0, .4),
        0 60px 70px -30px rgba(0, 0, 0, .32);
}
.room-frame img { display: block; object-fit: cover; }

.room-plaque {
    position: absolute;
    right: clamp(20px, 4vw, 56px);
    bottom: clamp(20px, 4vh, 48px);
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: clamp(160px, 17vw, 216px);
    padding: 18px 20px;
    background: rgba(251, 250, 248, .92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .3);
    border-radius: 1px;
    font-size: .75rem;
    color: var(--body);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .5s ease .25s, transform .5s ease .25s;
}
.room-hang.is-hung ~ .room-plaque { opacity: 1; transform: none; }
.plaque-title { font-family: var(--font-serif); font-style: italic; font-size: 1.05rem; color: var(--ink); line-height: 1.3; }
.plaque-meta { color: var(--stone); }
.plaque-dims { color: var(--mist); }
.plaque-price { margin-top: 6px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .6875rem; color: var(--slate); }
.plaque-link { margin-top: 12px; font-size: .8rem; color: var(--accent); text-decoration: none; }
.plaque-link:hover { text-decoration: underline; }

.room-closeup {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: clamp(16px, 3vh, 36px) clamp(16px, 4vw, 64px) 0;
    min-height: 0;
}
.room-closeup img { max-width: 100%; max-height: 78%; object-fit: contain; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.closeup-caption { font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; color: rgba(245, 244, 242, .75); text-align: center; max-width: 60ch; margin: 0; }

.room-chrome { position: relative; display: flex; align-items: center; justify-content: center; gap: 24px; padding: 18px 80px; }
.room-modes { display: flex; border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; overflow: hidden; }
.room-mode {
    padding: 9px 22px;
    font-family: var(--font-sans);
    font-size: .6875rem; font-weight: 500;
    letter-spacing: .2em; text-transform: uppercase;
    color: rgba(245, 244, 242, .7);
    background: none;
    border: 0;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease;
}
.room-mode.is-active { background: #F5F4F2; color: var(--ink); }
.room-note { margin: 0; font-size: .85rem; color: rgba(245, 244, 242, .45); }

.room-nav, .room-close {
    position: absolute;
    display: grid; place-items: center;
    width: 48px; height: 48px;
    font-size: 1.2rem;
    color: rgba(245, 244, 242, .8);
    background: none;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.room-nav:hover, .room-close:hover { background: #F5F4F2; color: var(--ink); border-color: #F5F4F2; }
.room-nav--prev { left: clamp(16px, 4vw, 64px); }
.room-nav--next { right: clamp(16px, 4vw, 64px); }
.room-close { position: fixed; top: clamp(24px, 4vh, 44px); right: clamp(24px, 4vw, 72px); }

@media (prefers-reduced-motion: reduce) {
    .room, .room-hang.is-hung .room-frame { transition: none; animation: none; opacity: 1; }
}

/* --- Lost path (404) --- */
.lost { min-height: 55vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 80px 24px; }
.lost-title { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 400; color: var(--slate); margin: 0 0 14px; }
.lost-body { max-width: 46ch; margin: 0 0 34px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 921px) {
    .menu-toggle { display: flex; }
    .site-nav {
        position: absolute;
        top: var(--header-height);
        left: 0; right: 0;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 16px 32px rgba(21, 22, 22, .12);
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease;
    }
    .site-nav.is-open { max-height: 60vh; }
    .site-header { background: rgba(255, 255, 255, .94); }
    .nav-menu { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0; }
    .nav-link { padding: 15px 28px; }
    .nav-link::after { display: none; }

    .chapter { grid-template-columns: 1fr; gap: 34px; }
    .chapter--flip .chapter-media { order: 0; }
    .chapter--flip .chapter-text  { order: 1; }
    .chapter-numeral { right: 8px; }
    .chapter--flip .chapter-numeral { left: 8px; }

    .notes-line { left: 14px; }
    .note, .note--right { width: 100%; margin-left: 0; padding: 26px 0 26px 48px; }
    .note--left { padding-right: 0; }
    .note--left .note-node, .note--right .note-node { left: 9px; right: auto; }

    .prologue-stats { flex-wrap: wrap; }
    .fragment { opacity: .28; }

    .chapter-hero { grid-template-columns: 1fr; gap: 34px; }
    .study-adjacent { grid-template-columns: 1fr; }
    .adjacent-card--next { text-align: left; align-items: flex-start; }
}

@media (max-width: 640px) {
    .room-hang { top: 40%; }
    .room-plaque {
        left: 16px; right: 16px; bottom: 16px; width: auto;
        flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px;
        padding: 10px 14px;
    }
    .room-note { display: none; }
    .room-chrome { padding-inline: 64px; }

    .threshold-line { font-size: 1.2rem; }
    .hero-divider span { width: 38%; }
    .passage-item { width: 76vw; }
    .contact { background-attachment: scroll; }
}

/* ==========================================================================
   Technical showcase — layered craft over the existing gallery aesthetic.
   Every effect is opacity/transform/clip-path (GPU-composited), degrades to
   nothing under prefers-reduced-motion, and stays monochrome + quiet.
   ========================================================================== */

/* --- Text selection ---------------------------------------------------- */
::selection      { background: var(--ink); color: #F5F4F2; }
::-moz-selection { background: var(--ink); color: #F5F4F2; }

/* --- Scroll progress meniscus (site-wide, hairline) -------------------- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    z-index: 95;
    transform: scaleX(var(--sp, 0));
    transform-origin: left center;
    background: linear-gradient(90deg, var(--fog), var(--slate) 60%, var(--ink));
    opacity: 0;
    transition: opacity .5s ease;
    pointer-events: none;
}
.scroll-progress.is-active { opacity: .9; }

/* --- Hero ghost-lights ("the lights that should not be followed") ------ */
.threshold-triskele { z-index: 0; }
.ghost-lights {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 2.4s ease;
}
.ghost-lights.is-lit { opacity: 1; }
.threshold-inner { z-index: 2; }
.scroll-cue      { z-index: 2; }

/* --- Cinematic image reveal (a canvas being unveiled) ------------------
   clip-path only — no transform/box-shadow interference with the tilt,
   parallax and framing already on these elements. */
/* Images are visible by default. The hidden-then-unveil state applies only
   once main.js has flagged <html class="reveal-on"> — so a missing, old or
   cached main.js can never leave a thumbnail permanently blank. */
.reveal-media {
    transition: clip-path 1.15s var(--ease-out), opacity .9s ease;
    transition-delay: var(--reveal-delay, 0s);
    will-change: clip-path;
}
html.reveal-on .reveal-media {
    clip-path: inset(0 0 100% 0);
    opacity: .001;
}
html.reveal-on .reveal-media.is-visible {
    clip-path: inset(0 0 0 0);
    opacity: 1;
}

/* --- Cursor sheen on tilt cards --------------------------------------- */
.chapter-figure, .note-media { position: relative; }
.chapter-figure::after,
.note-media::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(
        260px circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 60%);
    mix-blend-mode: soft-light;
    transition: opacity .4s ease;
}
.chapter-figure:hover::after,
.note-card:hover .note-media::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
    .ghost-lights { display: none; }
    .scroll-progress { display: none; }
    .reveal-media { clip-path: none; opacity: 1; transition: none; }
    .chapter-figure::after, .note-media::after { display: none; }
}

/* Trim entrance-travel on small screens so staged (pre-reveal) elements
   never sit off the right edge — kills the phantom horizontal scroll. */
@media (max-width: 640px) {
    .fade-in-left  { transform: translate3d(-28px, 0, 0); }
    .fade-in-right { transform: translate3d(28px, 0, 0); }
}
