/* =====================================================================
   graphers.net — The Art & Science of Visual Mark-Making
   Light-academia aesthetic · magazine-spread layout · skeleton loading
   Palette: #4a3f35 #c8a882 #ebe3d3 #8a7a68 #a05e3b #f4ece0 #3b2e1e #7a9a6d
   Fonts:   Zilla Slab (display) · Source Serif 4 (body) · IBM Plex Sans (labels)
   ===================================================================== */

:root {
    /* Palette */
    --vellum:        #f4ece0;
    --parchment:     #ebe3d3;
    --ink:           #3b2e1e;
    --ink-soft:      #4a3f35;
    --terracotta:    #c8a882;
    --sage:          #7a9a6d;
    --clay:          #a05e3b;
    --linen:         #f9f5ee;
    --warm-gray:     #8a7a68;

    /* Type scale */
    --f-display:     "Zilla Slab", Georgia, serif;
    --f-body:        "Source Serif 4", "IBM Plex Serif", Georgia, serif;
    --f-label:       "IBM Plex Sans", "Inter", system-ui, sans-serif;

    /* Timing */
    --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out:      cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--vellum);
    color: var(--ink-soft);
    font-family: var(--f-body);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-image:
        radial-gradient(circle at 14% 18%, rgba(200, 168, 130, 0.08) 0, transparent 40%),
        radial-gradient(circle at 86% 72%, rgba(122, 154, 109, 0.06) 0, transparent 45%);
    background-attachment: fixed;
    overflow-x: hidden;
}

/* ===================== MAIN JOURNAL ===================== */

.journal {
    scroll-snap-type: y proximity;
    overflow-y: auto;
    min-height: 100vh;
}

/* Spread base */
.spread {
    position: relative;
    min-height: 100vh;
    padding: clamp(32px, 6vh, 72px) clamp(24px, 5vw, 96px);
    scroll-snap-align: start;
    overflow: hidden;
    isolation: isolate;
}

.spread::before {
    /* paper grain overlay */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(59, 46, 30, 0.03) 0, transparent 2px),
        radial-gradient(circle at 70% 50%, rgba(59, 46, 30, 0.025) 0, transparent 2px),
        radial-gradient(circle at 40% 80%, rgba(59, 46, 30, 0.03) 0, transparent 2px),
        radial-gradient(circle at 90% 20%, rgba(59, 46, 30, 0.02) 0, transparent 2px);
    background-size: 60px 60px, 80px 80px, 55px 55px, 75px 75px;
    z-index: 0;
    opacity: 0.9;
}

.spread::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-radial-gradient(circle at 50% 50%, transparent 0, transparent 2px, rgba(59,46,30,0.02) 2.5px, transparent 3px);
    mix-blend-mode: multiply;
    z-index: 0;
    opacity: 0.6;
}

.spread--specimen { background: var(--parchment); }
.spread--atlas    { background: var(--linen); }
.spread--colophon { background: var(--parchment); min-height: 60vh; }

/* Two-column magazine spread grid */
.spread__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 62% 4% 34%;
    gap: 0;
    min-height: calc(100vh - clamp(64px, 12vh, 144px));
    align-items: stretch;
}

.spread__grid--inverted {
    grid-template-columns: 34% 4% 62%;
}

/* Panels */
.panel {
    position: relative;
    padding: clamp(18px, 2.5vw, 40px);
    display: flex;
    flex-direction: column;
}

.panel--dominant {
    background: transparent;
}

.panel--annotation {
    background: var(--linen);
    border: 1px solid rgba(200, 168, 130, 0.45);
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(59, 46, 30, 0.04);
}

/* Spine gutter line */
.spine {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.spine::before {
    content: "";
    width: 1px;
    height: 100%;
    background: var(--terracotta);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.9s var(--ease-out) 0.2s;
}

.spread.is-visible .spine::before {
    transform: scaleY(1);
}

/* ===================== TYPOGRAPHY ===================== */

.tag {
    font-family: var(--f-label);
    font-size: clamp(0.7rem, 0.85vw, 0.82rem);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--warm-gray);
    display: inline-block;
    padding: 4px 0;
    border-bottom: 1px solid var(--terracotta);
    align-self: flex-start;
}

.tag--muted {
    font-weight: 400;
    letter-spacing: 0.14em;
    border-bottom: none;
    color: var(--warm-gray);
}

.spread-title {
    font-family: var(--f-display);
    font-weight: 700;
    color: var(--ink);
    font-size: clamp(2.2rem, 4.4vw, 3.8rem);
    line-height: 1.08;
    letter-spacing: 0.01em;
    margin: 0.2em 0 0.4em;
}

.spread-title--wide {
    font-size: clamp(2.6rem, 5vw, 4.4rem);
}

.annotation-title {
    font-family: var(--f-display);
    font-weight: 700;
    color: var(--ink);
    font-size: clamp(1.4rem, 2vw, 1.9rem);
    line-height: 1.15;
    margin: 18px 0 10px;
}

.dek {
    font-family: var(--f-body);
    font-style: italic;
    color: var(--ink-soft);
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.55;
    max-width: 46ch;
    margin: 0.6em 0 1.2em;
}

.dek--wide {
    max-width: 68ch;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
}

.subtitle {
    font-family: var(--f-label);
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0.2em 0 0.8em;
}

.caption,
.marginalia {
    font-family: var(--f-label);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: var(--warm-gray);
    line-height: 1.55;
    margin-top: 12px;
    max-width: 60ch;
}

.marginalia--hanging {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(200, 168, 130, 0.55);
    font-style: italic;
    font-family: var(--f-body);
    font-size: 0.92rem;
    color: var(--ink-soft);
    letter-spacing: 0.01em;
}

/* ===================== RULES / DECOR ===================== */

.rule {
    border: none;
    height: 1px;
    background: var(--ink);
    margin: 16px 0 22px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.9s var(--ease-out) 0.15s;
}
.spread.is-visible .rule { transform: scaleX(1); }

.rule--thin { background: var(--ink); height: 1px; }

/* ===================== SPREAD 1 — FOLIO COVER ===================== */

.spread--cover .panel--dominant {
    justify-content: space-between;
}

.folio-meta {
    display: flex;
    align-items: center;
    gap: 18px;
    font-family: var(--f-label);
    font-size: 0.78rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin-bottom: 24px;
}

.folio-meta__label { white-space: nowrap; }

.folio-meta__rule {
    flex: 1;
    height: 1px;
    background: var(--terracotta);
}

.folio-title {
    font-family: var(--f-display);
    font-weight: 700;
    color: var(--ink);
    font-size: clamp(3.6rem, 12vw, 11rem);
    line-height: 0.92;
    letter-spacing: 0.02em;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.folio-title__letter {
    display: inline-block;
    transform: rotateY(90deg);
    opacity: 0;
    transform-origin: left center;
    transition: transform 0.6s var(--ease-out), opacity 0.6s var(--ease-out);
    transition-delay: calc(var(--i) * 80ms);
}

.spread--cover.is-visible .folio-title__letter {
    transform: rotateY(0deg);
    opacity: 1;
}

.compass-wrap {
    position: absolute;
    right: 6%;
    bottom: 6%;
    width: clamp(110px, 14vw, 180px);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s var(--ease-out) 0.5s, transform 0.8s var(--ease-out) 0.5s;
}

.spread--cover.is-visible .compass-wrap {
    opacity: 1;
    transform: scale(1);
}

.compass-rose {
    width: 100%;
    height: auto;
    animation: compass-spin 120s linear infinite;
    transform-origin: center;
}

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

/* Cover annotation — cross section */
.annotation-stack {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cross-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

.cross-section svg {
    width: 100%;
    max-width: 220px;
    height: auto;
    max-height: 62vh;
}

/* ===================== SKELETON / DRAW-PATH ===================== */

.draw-path path,
.draw-path line,
.petal,
.flourish path,
.leaves ellipse,
.leaves circle {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 2s var(--ease-out);
}

.spread.is-visible .draw-path path,
.spread.is-visible .draw-path line {
    stroke-dashoffset: 0;
}

/* ===================== SPREAD 2 — SPECIMEN ===================== */

.panel--illustration {
    align-items: flex-start;
}

.illustration {
    width: 100%;
    max-width: 640px;
    margin: 10px auto 12px;
}

.illustration svg {
    width: 100%;
    height: auto;
    max-height: 58vh;
    display: block;
}

/* Petal draw + fill */
.petal {
    fill-opacity: 0;
    transition: stroke-dashoffset 0.9s var(--ease-out), fill-opacity 0.6s var(--ease-out);
}

.petal--1 { transition-delay: 0ms,   900ms; }
.petal--2 { transition-delay: 200ms, 1100ms; }
.petal--3 { transition-delay: 400ms, 1300ms; }
.petal--4 { transition-delay: 600ms, 1500ms; }
.petal--5 { transition-delay: 800ms, 1700ms; }

.spread--specimen.is-visible .petal {
    stroke-dashoffset: 0;
    fill-opacity: 0.72;
}

.petal-veins path {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.4s var(--ease-out) 1.2s;
}
.spread--specimen.is-visible .petal-veins path { stroke-dashoffset: 0; }

/* Prose panel */
.panel--prose {
    padding: clamp(24px, 3vw, 48px);
}

.prose p {
    margin: 0 0 1.1em;
    text-align: justify;
    hyphens: auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.prose p:nth-child(1) { transition-delay: 0.3s; }
.prose p:nth-child(2) { transition-delay: 0.45s; }
.prose p:nth-child(3) { transition-delay: 0.6s; }
.prose p:nth-child(4) { transition-delay: 0.75s; }
.prose p:nth-child(5) { transition-delay: 0.9s; }
.prose p:nth-child(6) { transition-delay: 1.05s; }

.spread--specimen.is-visible .prose p {
    opacity: 1;
    transform: translateY(0);
}

.drop-cap {
    position: relative;
}

.drop-cap__letter {
    float: left;
    font-family: var(--f-display);
    font-weight: 700;
    color: var(--clay);
    font-size: 4.4em;
    line-height: 0.88;
    padding: 6px 10px 0 0;
    margin-top: 4px;
}

.hedera {
    text-align: center;
    color: var(--terracotta);
    font-size: 1.6rem;
    line-height: 1;
    margin: 0.6em 0 1em !important;
    letter-spacing: 0.4em;
}

.pull-quote {
    margin: 1.6em 0;
    padding: 0.4em 0 0.4em 1.2em;
    border-left: 4px solid var(--terracotta);
    font-family: var(--f-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.4rem, 2.3vw, 1.9rem);
    line-height: 1.35;
    color: var(--ink);
}

.colophon-mini {
    margin-top: auto;
    padding-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    border-top: 1px solid rgba(200, 168, 130, 0.55);
}

/* ===================== SPREAD 3 — WORKSHOP ===================== */

.panel--toolkit {
    padding: clamp(24px, 3vw, 40px);
}

.toolkit {
    list-style: none;
    margin: 18px 0;
    padding: 0;
    counter-reset: tool;
}

.toolkit li {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px dashed rgba(200, 168, 130, 0.6);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.toolkit li:nth-child(1) { transition-delay: 0.3s; }
.toolkit li:nth-child(2) { transition-delay: 0.45s; }
.toolkit li:nth-child(3) { transition-delay: 0.6s; }
.toolkit li:nth-child(4) { transition-delay: 0.75s; }
.toolkit li:nth-child(5) { transition-delay: 0.9s; }

.spread--workshop.is-visible .toolkit li {
    opacity: 1;
    transform: translateX(0);
}

.toolkit__num {
    flex: 0 0 auto;
    font-family: var(--f-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--clay);
    min-width: 2.4ch;
    line-height: 1;
    padding-top: 2px;
}

.toolkit__body {
    flex: 1;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--ink-soft);
}

.toolkit__body strong {
    font-weight: 600;
    color: var(--ink);
    font-family: var(--f-display);
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

/* Workshop panel */
.panel--workshop {
    padding: clamp(20px, 2.5vw, 36px);
}

.workshop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.workshop-header .spread-title {
    margin: 0;
}

.graph-paper {
    position: relative;
    flex: 1;
    border: 1px solid rgba(200, 168, 130, 0.6);
    background-color: var(--vellum);
    background-image:
        repeating-linear-gradient(0deg, transparent 0, transparent 79px, rgba(200, 168, 130, 0.20) 79px, rgba(200, 168, 130, 0.20) 80px),
        repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(200, 168, 130, 0.20) 79px, rgba(200, 168, 130, 0.20) 80px),
        repeating-linear-gradient(0deg, transparent 0, transparent 19px, rgba(200, 168, 130, 0.09) 19px, rgba(200, 168, 130, 0.09) 20px),
        repeating-linear-gradient(90deg, transparent 0, transparent 19px, rgba(200, 168, 130, 0.09) 19px, rgba(200, 168, 130, 0.09) 20px);
    padding: 18px;
    opacity: 0;
    transition: opacity 1s var(--ease-out);
    min-height: 360px;
}

.spread--workshop.is-visible .graph-paper { opacity: 1; }

.graph {
    width: 100%;
    height: auto;
    display: block;
    max-height: 52vh;
}

.curve {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    transition: stroke-dashoffset 2.4s var(--ease-out) 0.6s;
}

.spread--workshop.is-visible .curve { stroke-dashoffset: 0; }

.curve--wash {
    opacity: 0;
    transition: opacity 0.9s var(--ease-out) 2.4s;
    stroke-dasharray: none;
}

.spread--workshop.is-visible .curve--wash { opacity: 1; }

.dp {
    fill: var(--clay);
    stroke: var(--ink);
    stroke-width: 1.2;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0);
    transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-spring);
    transition-delay: calc(0.8s + var(--i) * 180ms);
}

.spread--workshop.is-visible .dp {
    opacity: 1;
    transform: scale(1);
    animation: dp-pulse 0.6s var(--ease-spring);
    animation-delay: calc(0.95s + var(--i) * 180ms);
    animation-fill-mode: backwards;
}

@keyframes dp-pulse {
    0%   { transform: scale(0); }
    50%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}

.callout {
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    transition-delay: calc(1.2s + var(--i) * 180ms);
}

.spread--workshop.is-visible .callout { opacity: 1; }

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 26px;
    margin-top: 16px;
    font-family: var(--f-label);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--warm-gray);
}

.legend__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend__swatch {
    display: inline-block;
    width: 20px;
    height: 10px;
    border: 1px solid var(--ink);
}

.legend__swatch--line { background: var(--ink); height: 2px; border: none; }
.legend__swatch--wash { background: rgba(122, 154, 109, 0.28); border-color: rgba(122, 154, 109, 0.5); }
.legend__swatch--clay { background: var(--clay); border-color: var(--ink); }

/* ===================== SPREAD 4 — ATLAS ===================== */

.atlas-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: calc(100vh - clamp(64px, 12vh, 144px));
    width: 100%;
    margin: 0 auto;
    max-width: 1500px;
}

.atlas-header {
    max-width: 92%;
    margin: 0 auto;
    text-align: left;
}

.atlas-header .tag { margin-bottom: 10px; }

.atlas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: clamp(18px, 2.4vw, 36px);
    flex: 1;
    width: 90%;
    margin: 0 auto;
}

.atlas-cell {
    position: relative;
    background: var(--vellum);
    border: 1px solid rgba(200, 168, 130, 0.6);
    padding: clamp(16px, 2vw, 28px);
    display: grid;
    grid-template-rows: 1fr auto;
    gap: 12px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.atlas-cell[data-quadrant="1"] { transition-delay: 0.1s; }
.atlas-cell[data-quadrant="2"] { transition-delay: 0.4s; }
.atlas-cell[data-quadrant="3"] { transition-delay: 0.7s; }
.atlas-cell[data-quadrant="4"] { transition-delay: 1.0s; }

.spread--atlas.is-visible .atlas-cell {
    opacity: 1;
    transform: translateY(0);
}

.atlas-cell__figure {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.atlas-cell__figure svg {
    width: 100%;
    max-width: 320px;
    height: auto;
    max-height: 26vh;
}

.atlas-cell__caption h4 {
    font-family: var(--f-display);
    font-weight: 700;
    color: var(--ink);
    font-size: clamp(1.1rem, 1.3vw, 1.3rem);
    margin: 8px 0 4px;
    letter-spacing: 0.01em;
}

.atlas-cell__caption p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 46ch;
}

/* Tessellation tile snap-in */
.tess__tile {
    transform-origin: center;
    transform: scale(0);
    transition: transform 0.55s var(--ease-spring);
    transition-delay: calc(0.8s + var(--i) * 80ms);
}

.spread--atlas.is-visible .tess__tile {
    transform: scale(1);
}

/* Rose group rotates in */
.rose-group {
    transform-origin: center;
    transform: rotate(-180deg);
    opacity: 0;
    transition: transform 1s var(--ease-out) 0.9s, opacity 0.9s var(--ease-out) 0.9s;
}

.spread--atlas.is-visible .rose-group {
    transform: rotate(0deg);
    opacity: 1;
}

/* Dot rings pulse concentrically */
.dot-ring {
    opacity: 0;
    transform-origin: center;
    transform: scale(0.6);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-spring);
}

.dot-ring[style*="--i:0"] { transition-delay: 1.1s; }
.dot-ring[style*="--i:1"] { transition-delay: 1.25s; }
.dot-ring[style*="--i:2"] { transition-delay: 1.40s; }
.dot-ring[style*="--i:3"] { transition-delay: 1.55s; }

.spread--atlas.is-visible .dot-ring {
    opacity: 1;
    transform: scale(1);
}

.atlas-footer {
    text-align: center;
    padding: 12px 0 0;
    border-top: 1px solid rgba(200, 168, 130, 0.5);
    width: 90%;
    margin: 0 auto;
}

/* ===================== SPREAD 5 — COLOPHON ===================== */

.spread--colophon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(36px, 8vh, 88px) clamp(24px, 6vw, 120px);
}

.colophon-inner {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.colophon-inner .tag { align-self: center; }

.colophon-title {
    font-family: var(--f-display);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2rem, 3.6vw, 3rem);
    line-height: 1.1;
    color: var(--ink);
    margin: 6px 0 12px;
}

.colophon-body {
    font-family: var(--f-body);
    font-size: clamp(1.05rem, 1.35vw, 1.25rem);
    line-height: 1.7;
    color: var(--ink-soft);
    margin: 0 0 18px;
    max-width: 62ch;
    opacity: 0;
    transition: opacity 1.2s var(--ease-out) 0.3s;
}

.spread--colophon.is-visible .colophon-body { opacity: 1; }

.flourish {
    width: clamp(180px, 22vw, 300px);
    margin: 10px auto 6px;
}

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

.flourish path,
.leaves ellipse,
.leaves circle {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    transition: stroke-dashoffset 1.6s var(--ease-out) 0.6s;
}

.leaves ellipse,
.leaves circle {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}

.spread--colophon.is-visible .flourish path,
.spread--colophon.is-visible .leaves ellipse,
.spread--colophon.is-visible .leaves circle {
    stroke-dashoffset: 0;
}

.signoff {
    font-family: var(--f-label);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--warm-gray);
    margin: 10px 0 0;
    line-height: 1.6;
}

.signoff__line { display: block; }

.signoff__line:first-child {
    color: var(--ink);
    font-weight: 600;
    font-size: 1rem;
}

.signoff__line--small { font-size: 0.72rem; opacity: 0.9; }

/* ===================== FIXED FOLIO COUNTER ===================== */

.folio-counter {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 40;
    font-family: var(--f-label);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    color: var(--ink);
    background: rgba(249, 245, 238, 0.85);
    border: 1px solid var(--terracotta);
    padding: 8px 14px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: inline-flex;
    gap: 6px;
    transition: background 0.3s var(--ease-out), transform 0.3s var(--ease-spring);
}

.folio-counter__current {
    color: var(--clay);
    transition: color 0.4s var(--ease-out);
}

.folio-counter__sep { color: var(--warm-gray); }

.folio-counter.is-pulse {
    animation: folio-pulse 0.7s var(--ease-spring);
}

@keyframes folio-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ===================== SKELETON SHIMMER (text skeleton) ===================== */
/* Applied via .is-skeleton class before content resolves */

.text-skel {
    position: relative;
    background: linear-gradient(90deg, var(--parchment) 25%, var(--vellum) 50%, var(--parchment) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
    border-radius: 2px;
    display: inline-block;
    height: 1em;
    width: 100%;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
    .spread {
        padding: 36px 24px;
        min-height: auto;
    }

    .spread__grid,
    .spread__grid--inverted {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 0;
    }

    .spine { display: none; }

    .panel--annotation {
        margin-top: 24px;
        border-top: 2px solid var(--terracotta);
    }

    .spread--cover { min-height: 100vh; }

    .compass-wrap {
        position: relative;
        right: auto;
        bottom: auto;
        margin: 24px auto 0;
        width: 140px;
    }

    .atlas-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        width: 100%;
    }

    .atlas-header,
    .atlas-footer { width: 100%; }

    .workshop-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .folio-title { font-size: clamp(3rem, 16vw, 7rem); }
}

@media (max-width: 520px) {
    .spread { padding: 28px 18px; }

    .folio-counter {
        bottom: 14px;
        right: 14px;
        font-size: 0.72rem;
        padding: 6px 10px;
    }

    .pull-quote { font-size: 1.2rem; padding-left: 0.9em; }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001s !important;
        transition-duration: 0.001s !important;
    }
    .compass-rose { animation: none; }
}
