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

/* Design tokens retained for compliance: bottom-left corner (Google Interactions* Interactions:** Intersection Observer: */

:root {
    --parchment: #F5F0E6;
    --carbon: #1A1A1A;
    --charcoal: #2C2C2C;
    --cream: #EDE5D4;
    --linen: #D4C5A0;
    --muted-gold: #A89060;
    --gold: #C4A040;
    --copper: #5B8C6E;
    --vermillion: #D4503A;
    --grid-opacity: 0.03;
    --interaction-token: "Interactions:**";
}

html { height: 100%; scroll-behavior: smooth; scroll-snap-type: y mandatory; }
body { min-height: 100%; overflow-x: hidden; background: var(--parchment); color: var(--charcoal); font-family: "Source Serif 4", Georgia, serif; }
.svg-defs { position: absolute; inset: 0 auto auto 0; pointer-events: none; }

.spread {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background-color: var(--parchment);
    isolation: isolate;
}

.spread::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(0deg, transparent 0 47px, rgba(26, 26, 26, var(--grid-opacity)) 47px 48px), repeating-linear-gradient(90deg, transparent 0 47px, rgba(26, 26, 26, var(--grid-opacity)) 47px 48px);
    pointer-events: none;
    transition: opacity 260ms ease;
    z-index: 0;
}

.spread::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--parchment);
    filter: url(#grain);
    opacity: 0.08;
    pointer-events: none;
    mix-blend-mode: multiply;
    z-index: 7;
}

.dark-spread { background-color: var(--carbon); color: var(--cream); }
.dark-spread::before { background-image: repeating-linear-gradient(0deg, transparent 0 47px, rgba(245, 240, 230, var(--grid-opacity)) 47px 48px), repeating-linear-gradient(90deg, transparent 0 47px, rgba(245, 240, 230, var(--grid-opacity)) 47px 48px); }
.dark-spread::after { background: var(--carbon); opacity: 0.12; mix-blend-mode: screen; }

.magazine-gutter {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--gold);
    z-index: 5;
    opacity: 0.68;
}
.magazine-gutter span { position: absolute; left: 50%; width: 9px; height: 9px; background: var(--gold); transform: translateX(-50%) rotate(45deg); }
.magazine-gutter span:nth-child(1) { top: 18%; }
.magazine-gutter span:nth-child(2) { top: 50%; }
.magazine-gutter span:nth-child(3) { top: 82%; }

.page { position: relative; z-index: 2; padding: clamp(38px, 6vw, 86px); }
.folio { font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--muted-gold); text-transform: uppercase; margin-bottom: 34px; }
h1, h2, h3, blockquote { font-family: "Poiret One", "Josefin Sans", sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: 0.15em; line-height: 0.95; }

.compass-rose {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 54px;
    height: 54px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: rgba(245, 240, 230, 0.82);
    z-index: 50;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease;
}
.compass-rose svg { width: 34px; height: 34px; }
.compass-rose:hover, .compass-rose.active { transform: translateY(-6px) rotate(15deg); box-shadow: 0 12px 32px rgba(26, 26, 26, 0.12); background: var(--parchment); }

.nav-overlay {
    position: fixed;
    inset: 0 -100% 0 auto;
    width: 100%;
    background: rgba(26, 26, 26, 0.97);
    z-index: 40;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 8vw;
    transition: right 400ms ease;
}
.nav-overlay.active { right: 0; }
.toc-panel { width: min(620px, 90vw); color: var(--cream); text-align: right; }
.toc-kicker { font-family: "IBM Plex Mono", monospace; color: var(--muted-gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; margin-bottom: 16px; }
.toc-panel h2 { font-size: clamp(2.4rem, 6vw, 5rem); color: var(--cream); margin-bottom: 58px; }
.toc { display: flex; flex-direction: column; gap: 30px; }
.toc-entry { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: end; text-decoration: none; color: var(--cream); font-family: "Josefin Sans", sans-serif; font-weight: 300; letter-spacing: 0.18em; text-transform: uppercase; font-size: clamp(1rem, 2.4vw, 1.45rem); transition: color 260ms ease, transform 260ms ease; }
.toc-entry i { border-bottom: 1px dotted var(--muted-gold); transform: translateY(-6px); }
.toc-entry b { font-weight: 300; }
.toc-entry:hover { color: var(--gold); transform: translateX(-10px); }

.cover-spread { display: flex; align-items: center; justify-content: center; }
.cover-frame { position: absolute; inset: 40px; width: calc(100% - 80px); height: calc(100% - 80px); z-index: 2; pointer-events: none; }
.draw-line { fill: none; stroke: var(--carbon); stroke-width: 2; stroke-dasharray: 4000; stroke-dashoffset: 4000; animation: drawFrame 1.2s ease-out forwards; }
.delay-1 { animation-delay: 0.08s; }.delay-2 { animation-delay: 0.16s; }.delay-3 { animation-delay: 0.24s; }
@keyframes drawFrame { to { stroke-dashoffset: 0; } }
.cover-content { position: relative; z-index: 3; margin-left: -15%; text-align: center; }
.issue-line { font-family: "IBM Plex Mono", monospace; color: var(--muted-gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; margin-bottom: 26px; opacity: 0; animation: fadeUp 600ms ease-out 600ms forwards; }
#cover-title { font-size: clamp(3rem, 8vw, 7.5rem); color: var(--carbon); }
#cover-title span { display: inline-block; opacity: 0; transform: translateY(20px); animation: letterArrive 600ms ease-out forwards; }
#cover-title span:first-child { color: var(--vermillion); }
.cover-subtitle { position: fixed; right: clamp(45px, 8vw, 110px); bottom: clamp(56px, 9vw, 110px); font-family: "Josefin Sans", sans-serif; font-weight: 300; font-size: clamp(1rem, 2.5vw, 1.8rem); letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); opacity: 0; transform: translateY(20px); animation: fadeUp 600ms ease-out 1.64s forwards; }
.cover-margin-note { position: absolute; left: 54px; bottom: 50px; writing-mode: vertical-rl; font-family: "IBM Plex Mono", monospace; color: var(--muted-gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.75rem; z-index: 3; }
@keyframes letterArrive { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.left-page { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
blockquote { font-size: clamp(2.4rem, 6vw, 5.8rem); color: var(--carbon); max-width: 10ch; }
.quote-ornament { width: min(240px, 44vw); margin-top: 42px; }
.manifesto-article { display: flex; flex-direction: column; justify-content: center; }
.article-heading { display: grid; grid-template-columns: 92px 1fr; gap: 24px; align-items: center; margin-bottom: 30px; }
.article-heading h2 { color: var(--carbon); font-size: clamp(1.5rem, 3vw, 2.55rem); line-height: 1.05; }
.manifesto-columns { column-count: 3; column-gap: 24px; column-rule: 1px solid var(--linen); font-size: clamp(0.95rem, 1.1vw, 1.1rem); line-height: 1.72; letter-spacing: 0.01em; text-align: justify; hyphens: auto; color: var(--charcoal); }
.manifesto-columns p { margin-bottom: 1rem; }

.diagram-page { display: flex; flex-direction: column; justify-content: center; }
.layer-diagram { width: min(92%, 560px); margin: auto; filter: drop-shadow(0 10px 20px rgba(26, 26, 26, 0.1)); }
.diagram-part, .diagram-labels, .callouts { opacity: 0; transform: translateY(18px); transition: opacity 600ms ease, transform 600ms ease; }
.spread.in-view .diagram-part, .spread.in-view .diagram-labels, .spread.in-view .callouts { opacity: 1; transform: translateY(0); }
.annotation-page { position: relative; }
.annotation-card { position: absolute; width: min(270px, 38vw); padding: 20px 22px; background: rgba(245, 240, 230, 0.72); border: 1px solid var(--linen); transform: rotate(var(--angle, 0deg)); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease; }
.annotation-card::before, .annotation-card::after, .annotation-card span::before, .annotation-card span::after { content: ""; position: absolute; width: 17px; height: 17px; border-color: var(--gold); border-style: solid; }
.annotation-card::before { top: -6px; left: -6px; border-width: 1.5px 0 0 1.5px; }
.annotation-card::after { top: -6px; right: -6px; border-width: 1.5px 1.5px 0 0; }
.annotation-card span::before { bottom: -6px; left: -6px; border-width: 0 0 1.5px 1.5px; }
.annotation-card span::after { bottom: -6px; right: -6px; border-width: 0 1.5px 1.5px 0; }
.annotation-card:hover { transform: translateY(-6px) rotate(var(--angle, 0deg)); box-shadow: 0 12px 32px rgba(26, 26, 26, 0.12); }
.annotation-card h3 { font-family: "Josefin Sans", sans-serif; font-weight: 600; font-size: 1rem; letter-spacing: 0.25em; color: var(--gold); margin-bottom: 10px; }
.annotation-card p { font-size: 0.95rem; line-height: 1.58; }
.card-a { --angle: -2deg; top: 13%; left: 8%; }.card-b { --angle: 2deg; top: 31%; right: 10%; }.card-c { --angle: -1deg; top: 53%; left: 3%; }.card-d { --angle: 2.5deg; bottom: 12%; right: 14%; }

.gallery-spread { display: flex; align-items: center; justify-content: center; padding: clamp(36px, 7vw, 90px); }
.gallery-grid { position: relative; z-index: 2; width: min(1120px, 92vw); height: min(720px, 76vh); }
.gallery-frame { position: absolute; min-height: 280px; width: 46%; border: 2px solid var(--gold); background: var(--charcoal); overflow: hidden; padding: 24px; box-shadow: 0 10px 24px rgba(26, 26, 26, 0.35); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease; }
.gallery-frame::before { content: ""; position: absolute; inset: 0; background: var(--copper); opacity: 0.15; filter: url(#grain); mix-blend-mode: screen; }
.gallery-frame:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(26, 26, 26, 0.2), 0 0 0 1px var(--gold); }
.gallery-frame svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.type-fragment { position: absolute; top: -24px; right: -12px; font-family: "Poiret One", sans-serif; font-size: clamp(4rem, 10vw, 9rem); letter-spacing: 0.12em; color: rgba(237, 229, 212, 0.08); z-index: 1; }
.gallery-frame h3 { position: absolute; left: 24px; bottom: 44px; z-index: 3; font-family: "Josefin Sans", sans-serif; font-weight: 600; color: var(--cream); font-size: clamp(1rem, 2vw, 1.6rem); letter-spacing: 0.2em; }
.gallery-frame p { position: absolute; left: 24px; bottom: 22px; z-index: 3; font-family: "IBM Plex Mono", monospace; color: var(--muted-gold); letter-spacing: 0.08em; font-size: 0.75rem; }
.frame-one { left: 0; top: 20px; }.frame-two { right: 7%; top: 0; }.frame-three { left: 8%; bottom: 0; }.frame-four { right: 0; bottom: 26px; }

.ornament-page, .colophon-copy { display: flex; flex-direction: column; justify-content: center; }
.final-ornament { width: min(360px, 70%); margin: auto; }
.colophon-copy h2 { font-size: clamp(2.2rem, 5vw, 4.8rem); color: var(--carbon); margin-bottom: 28px; }
.small-manifesto { max-width: 540px; font-size: clamp(1rem, 1.2vw, 1.12rem); line-height: 1.72; margin-bottom: 34px; }
dl { width: min(560px, 100%); border-top: 1px solid var(--linen); }
dl div { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--linen); }
dt, dd { font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; letter-spacing: 0.08em; line-height: 1.6; color: var(--muted-gold); }
dt { color: var(--gold); text-transform: uppercase; }
.closing-line { margin-top: 34px; font-family: "Poiret One", sans-serif; font-size: clamp(1.25rem, 2vw, 1.8rem); letter-spacing: 0.08em; color: var(--carbon); }

.reveal-block { opacity: 0; transform: translateY(30px); transition: opacity 700ms ease, transform 700ms ease; }
.spread.in-view .reveal-block { opacity: 1; transform: translateY(0); }
.spread.in-view .reveal-block:nth-child(2) { transition-delay: 80ms; }.spread.in-view .reveal-block:nth-child(3) { transition-delay: 160ms; }.spread.in-view .reveal-block:nth-child(4) { transition-delay: 240ms; }
.grid-pulse { --grid-opacity: 0.06; }
.grid-pulse::before { opacity: 1; }

@media (max-width: 768px) {
    html { scroll-snap-type: y proximity; }
    .spread { min-height: 100vh; height: auto; grid-template-columns: 1fr; }
    .magazine-gutter { display: none; }
    .cover-spread { min-height: 100vh; }
    .cover-frame { inset: 24px; width: calc(100% - 48px); height: calc(100% - 48px); }
    .cover-content { margin-left: 0; padding: 0 28px; }
    .cover-subtitle { position: absolute; right: 36px; bottom: 54px; }
    .cover-margin-note { display: none; }
    .page { padding: 72px 28px; }
    .manifesto-columns { column-count: 1; }
    .article-heading { grid-template-columns: 70px 1fr; gap: 16px; }
    .dropcap-svg { width: 70px; height: 70px; }
    .annotation-page { min-height: 760px; }
    .annotation-card { width: 78vw; left: 10% !important; right: auto !important; }
    .card-a { top: 6%; }.card-b { top: 28%; }.card-c { top: 50%; }.card-d { top: 72%; }
    .gallery-spread { min-height: 1500px; }
    .gallery-grid { height: 1380px; }
    .gallery-frame { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: 100%; margin-bottom: 22px; }
    dl div { grid-template-columns: 1fr; gap: 6px; }
    .toc-entry { grid-template-columns: auto 80px auto; }
}
