/* ============================================================
   monopole.tech
   Hand-drawn physics diagrams, dreamy-ethereal, burnt-orange
   monochromatic, glitch-disrupted, masonry layout.

   Animations on diagrams are triggered via an Intersection
   Observer in script.js, so each cell draws itself as it
   enters the viewport.
   ============================================================ */

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --c-ground: #1A1209;          /* deep ground */
    --c-ground-2: #1E1611;        /* chalkboard */
    --c-accent: #CC6B2E;          /* burnt sienna */
    --c-accent-2: #E8943A;        /* amber glow */
    --c-accent-3: #A85A30;        /* faded terracotta */
    --c-paper: #F5EDE3;           /* parchment cream */
    --c-bone: #E8D5BC;            /* bone white */
    --c-umber: #3B2A18;           /* deep umber */
    --c-grid: #D4A574;            /* muted tan */
    --c-glitch: #FF7A33;          /* hot orange */
    --c-ink: #8B6A42;             /* hand-drawn ink (notebook borders, grid) */

    --gutter: 24px;

    --font-display: 'Josefin Sans', 'Inter', system-ui, sans-serif;
    --font-body: 'Nunito Sans', 'Inter', system-ui, sans-serif;
    --font-mono: 'Inconsolata', 'Space Mono', ui-monospace, monospace;
}

html, body {
    background: var(--c-ground);
    color: var(--c-bone);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100%;
}

body {
    position: relative;
    background:
        radial-gradient(ellipse 90% 60% at 50% 0%, rgba(204, 107, 46, 0.08), transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(232, 148, 58, 0.05), transparent 60%),
        var(--c-ground);
}

/* Subtle grain on the whole body */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9;
    background-image:
        radial-gradient(rgba(212, 165, 116, 0.025) 1px, transparent 1px);
    background-size: 3px 3px;
    mix-blend-mode: overlay;
    opacity: 0.7;
}

.svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

img, svg { display: block; max-width: 100%; }

/* ---------- Bokeh layer ---------- */
.bokeh-layer {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.bokeh {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(232, 148, 58, 0.32) 0%, rgba(204, 107, 46, 0.18) 35%, transparent 70%);
    filter: blur(6px);
    will-change: transform, opacity;
    mix-blend-mode: screen;
}

.bokeh.bokeh-warm {
    background: radial-gradient(circle at center, rgba(232, 148, 58, 0.28) 0%, rgba(204, 107, 46, 0.14) 40%, transparent 75%);
}

.bokeh.bokeh-bright {
    background: radial-gradient(circle at center, rgba(255, 122, 51, 0.30) 0%, rgba(232, 148, 58, 0.16) 40%, transparent 75%);
}

/* ---------- Crystalline wireframe layer ---------- */
.crystal-layer {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.crystal {
    position: absolute;
    width: 260px;
    height: 260px;
    opacity: 0.55;
    filter: drop-shadow(0 0 8px rgba(212, 165, 116, 0.15));
}

.crystal-1 { top: 14%; left: 8%; width: 260px; height: 260px; opacity: 0.5; }
.crystal-2 { top: 48%; right: 6%; width: 320px; height: 320px; opacity: 0.45; }
.crystal-3 { top: 78%; left: 35%; width: 280px; height: 280px; opacity: 0.35; }
.crystal-4 { top: 22%; right: 28%; width: 200px; height: 200px; opacity: 0.4; }

.crystal-rotate {
    transform-origin: center;
    animation: crystalSpin 48s linear infinite;
}
.crystal-rotate-rev {
    transform-origin: center;
    animation: crystalSpinRev 56s linear infinite;
}
@keyframes crystalSpin {
    0%   { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    50%  { transform: rotateX(180deg) rotateY(180deg) rotateZ(20deg); }
    100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(0deg); }
}
@keyframes crystalSpinRev {
    0%   { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
    50%  { transform: rotateX(-160deg) rotateY(-200deg) rotateZ(-15deg); }
    100% { transform: rotateX(-360deg) rotateY(-360deg) rotateZ(0deg); }
}

/* ---------- Glitch overlay ---------- */
.glitch-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
    overflow: hidden;
}

.glitch-band {
    position: absolute;
    left: -10px;
    right: -10px;
    background: rgba(245, 237, 227, 0.04);
    border-top: 1px solid rgba(255, 122, 51, 0.45);
    border-bottom: 1px solid rgba(204, 107, 46, 0.30);
    box-shadow:
        inset 3px 0 0 rgba(255, 122, 51, 0.35),
        inset -3px 0 0 rgba(204, 107, 46, 0.25);
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

.scanline-overlay {
    position: fixed;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(232, 213, 188, 0.025) 0px,
        rgba(232, 213, 188, 0.025) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.6;
    mix-blend-mode: overlay;
}

/* ---------- Compass ---------- */
.compass {
    position: fixed;
    top: 28px;
    left: 28px;
    width: 64px;
    height: 64px;
    background: rgba(26, 18, 9, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(204, 107, 46, 0.35);
    border-radius: 50%;
    cursor: pointer;
    z-index: 50;
    padding: 6px;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s;
}
.compass svg { width: 100%; height: 100%; }
.compass:hover { transform: scale(1.06); border-color: rgba(232, 148, 58, 0.7); }
.compass-needle {
    transform-origin: 0 0;
    animation: needleSweep 18s ease-in-out infinite;
}
@keyframes needleSweep {
    0%   { transform: rotate(-12deg); }
    20%  { transform: rotate(34deg); }
    50%  { transform: rotate(-25deg); }
    72%  { transform: rotate(48deg); }
    100% { transform: rotate(-12deg); }
}

/* ---------- Menu overlay ---------- */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 18, 9, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
}
.menu-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}
.menu-inner {
    text-align: center;
    color: var(--c-bone);
    max-width: 600px;
    padding: 2rem;
}
.menu-label {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.2em;
    color: var(--c-accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 2.4rem;
}
.menu-list {
    list-style: none;
    margin: 0 0 2.4rem 0;
    padding: 0;
}
.menu-list li {
    margin: 0.7em 0;
}
.menu-list a {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(28px, 4.5vw, 44px);
    letter-spacing: 0.12em;
    color: var(--c-bone);
    text-decoration: none;
    transition: color 0.3s, letter-spacing 0.5s;
    display: inline-block;
    border-bottom: 1px solid transparent;
    padding: 0.05em 0.1em;
}
.menu-list a:hover {
    color: var(--c-accent-2);
    letter-spacing: 0.18em;
    border-bottom-color: var(--c-accent-3);
}
.menu-coords {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--c-grid);
    opacity: 0.7;
    letter-spacing: 0.12em;
}

/* ---------- Page wrapper ---------- */
.page {
    position: relative;
    z-index: 5;
    padding: 0 4vw 6rem;
    max-width: 1480px;
    margin: 0 auto;
}

/* ---------- THE THRESHOLD ---------- */
.threshold {
    position: relative;
    min-height: 100vh;
    padding: 8vh 0 6vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.threshold-cell {
    position: relative;
    width: 100%;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 3rem 2rem;
    border: 1px solid rgba(212, 165, 116, 0.18);
    background:
        repeating-linear-gradient(0deg, rgba(212, 165, 116, 0.025) 0px, rgba(212, 165, 116, 0.025) 1px, transparent 1px, transparent 32px),
        repeating-linear-gradient(90deg, rgba(212, 165, 116, 0.025) 0px, rgba(212, 165, 116, 0.025) 1px, transparent 1px, transparent 32px),
        radial-gradient(ellipse at center, rgba(204, 107, 46, 0.08), transparent 70%);
}

.threshold-cell::before,
.threshold-cell::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(212, 165, 116, 0.4);
}
.threshold-cell::before { top: 14px; left: 14px; border-right: none; border-bottom: none; }
.threshold-cell::after { bottom: 14px; right: 14px; border-left: none; border-top: none; }

.hero-field {
    position: absolute;
    width: clamp(380px, 60vw, 720px);
    height: clamp(380px, 60vw, 720px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.7;
    pointer-events: none;
}

.hero-text {
    position: relative;
    text-align: center;
    z-index: 2;
    padding: 1.5rem;
}

.kicker, .subkicker {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: 1.4rem;
    opacity: 0;
    animation: fadeIn 1.6s ease 0.4s forwards;
}
.subkicker {
    margin-top: 1.6rem;
    margin-bottom: 0;
    color: var(--c-grid);
    text-transform: none;
    letter-spacing: 0.18em;
    font-style: italic;
    animation-delay: 1.4s;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(56px, 11vw, 120px);
    letter-spacing: 0.12em;
    color: var(--c-bone);
    line-height: 1;
    filter: url(#hand-drawn);
    opacity: 0;
    animation: fadeIn 2.2s ease 0.7s forwards;
    text-shadow:
        0 0 24px rgba(204, 107, 46, 0.18),
        0 0 60px rgba(232, 148, 58, 0.08);
}
.hero-title .dot {
    color: var(--c-accent-2);
    display: inline-block;
}

.threshold-meta {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 2.4rem;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    color: var(--c-grid);
    opacity: 0.6;
    text-transform: uppercase;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Movements ---------- */
.movement {
    position: relative;
    padding: 8rem 0 4rem;
}

.movement-header {
    margin-bottom: 3rem;
    padding: 0 2vw;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 800px;
}

.movement-num {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.32em;
    color: var(--c-accent);
    text-transform: uppercase;
}

.movement-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(36px, 6vw, 56px);
    letter-spacing: 0.12em;
    color: var(--c-bone);
    line-height: 1.1;
    filter: url(#hand-drawn);
}

.movement-sub {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 15px;
    color: var(--c-grid);
    letter-spacing: 0.04em;
}

/* ---------- Masonry grid (CSS columns) ---------- */
.masonry {
    column-count: 3;
    column-gap: var(--gutter);
}

.cell {
    break-inside: avoid;
    margin-bottom: var(--gutter);
    padding: 1.6rem 1.4rem;
    position: relative;
    display: block;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s;
    opacity: 0;
    transform: translateY(20px);
}

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

/* deliberate negative margin offsets to suggest overlap */
.cell:nth-child(3n+1) { margin-left: -2px; }
.cell:nth-child(3n+2) { margin-right: -3px; }
.cell:nth-child(5n) { margin-top: -3px; }

/* ---------- Notebook cells ---------- */
.cell-notebook {
    background: var(--c-paper);
    color: var(--c-umber);
    border: 1.5px solid var(--c-ink);
    border-radius: 2px;
    background-image:
        repeating-linear-gradient(0deg, rgba(212, 165, 116, 0.18) 0px, rgba(212, 165, 116, 0.18) 1px, transparent 1px, transparent 24px),
        repeating-linear-gradient(90deg, rgba(212, 165, 116, 0.12) 0px, rgba(212, 165, 116, 0.12) 1px, transparent 1px, transparent 24px);
    box-shadow:
        2px 3px 0 rgba(59, 42, 24, 0.12),
        4px 6px 14px rgba(0, 0, 0, 0.35);
    font-family: var(--font-body);
}

.movement-weathered .cell-notebook {
    background-image:
        repeating-linear-gradient(0deg, rgba(168, 90, 48, 0.22) 0px, rgba(168, 90, 48, 0.22) 1px, transparent 1px, transparent 22px),
        repeating-linear-gradient(90deg, rgba(168, 90, 48, 0.16) 0px, rgba(168, 90, 48, 0.16) 1px, transparent 1px, transparent 22px);
    box-shadow:
        1px 2px 0 rgba(59, 42, 24, 0.18),
        3px 5px 18px rgba(0, 0, 0, 0.4);
}

.cell-notebook .cell-tag {
    color: var(--c-accent-3);
}
.cell-notebook .cell-body {
    color: var(--c-umber);
    font-size: 15.5px;
}

/* hand-drawn corner marks (notebook decoration) */
.cell-corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--c-ink);
}
.cell-corner-tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.cell-corner-br { bottom: 8px; right: 8px; border-left: none; border-top: none; }

/* ---------- Chalkboard cells ---------- */
.cell-chalkboard {
    background: var(--c-ground-2);
    color: var(--c-bone);
    border: 1px solid rgba(232, 148, 58, 0.18);
    border-radius: 1px;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, 0.6),
        0 0 24px rgba(0, 0, 0, 0.4);
    position: relative;
}
.cell-chalkboard::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(232, 213, 188, 0.04) 0%, transparent 25%),
        radial-gradient(circle at 84% 75%, rgba(232, 213, 188, 0.03) 0%, transparent 25%),
        repeating-linear-gradient(45deg, rgba(232, 213, 188, 0.012) 0px, rgba(232, 213, 188, 0.012) 1px, transparent 1px, transparent 4px);
    mix-blend-mode: overlay;
}

.cell-chalkboard .cell-tag {
    color: var(--c-accent-2);
}
.cell-chalkboard .chalk-body {
    letter-spacing: 0.02em;
    color: var(--c-bone);
}

/* ---------- Glitch cells (semi-transparent) ---------- */
.cell-glitch {
    background: rgba(30, 22, 17, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(204, 107, 46, 0.45);
    color: var(--c-bone);
    padding: 2.2rem 1.8rem;
    position: relative;
    overflow: hidden;
}

.cell-glitch::before,
.cell-glitch::after {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    height: 1px;
    background: var(--c-accent);
    opacity: 0.7;
    animation: borderShift 6s ease-in-out infinite;
}
.cell-glitch::before { top: -1px; }
.cell-glitch::after { bottom: -1px; animation-delay: 3s; }

@keyframes borderShift {
    0%, 100% { transform: translateX(0); opacity: 0.7; }
    47%      { transform: translateX(0); opacity: 0.7; }
    50%      { transform: translateX(4px); opacity: 1; background: var(--c-glitch); }
    53%      { transform: translateX(-3px); opacity: 0.5; }
    56%      { transform: translateX(0); opacity: 0.7; background: var(--c-accent); }
}

/* ---------- Data cells (CRT scanline) ---------- */
.cell-data {
    background: #15100A;
    color: var(--c-bone);
    border: 1px solid rgba(232, 148, 58, 0.25);
    position: relative;
    overflow: hidden;
    padding: 1.6rem 1.4rem 1.4rem;
}

.cell-data .scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(232, 213, 188, 0.06) 0px,
        rgba(232, 213, 188, 0.06) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.55;
    mix-blend-mode: overlay;
}

.cell-data .data-tag {
    color: var(--c-accent-2);
    display: block;
    margin-bottom: 0.9rem;
}

.data-readout {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--c-bone);
    background: transparent;
    margin: 0 0 0.9rem 0;
    white-space: pre-wrap;
    letter-spacing: 0.04em;
}
.data-readout .hot {
    color: var(--c-glitch);
    text-shadow: 0 0 6px rgba(255, 122, 51, 0.45);
}

.data-list {
    list-style: none;
    margin: 0 0 0.9rem 0;
    padding: 0;
}
.data-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 13px;
    color: var(--c-bone);
    padding: 0.35rem 0;
    border-bottom: 1px dashed rgba(212, 165, 116, 0.25);
}
.data-list li:last-child { border-bottom: none; }
.data-list .mono {
    font-family: var(--font-mono);
    color: var(--c-accent-2);
}

/* ---------- Final cell (the question mark) ---------- */
.cell-final {
    background: transparent;
    border: 1px dashed rgba(204, 107, 46, 0.25);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    grid-column: span 2;
}
.question-mark {
    width: 140px;
    height: 220px;
}
.qmark-path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: drawQMark 4s ease-out 0.2s forwards;
    filter: drop-shadow(0 0 12px rgba(232, 148, 58, 0.45));
}
.qmark-dot {
    opacity: 0;
    animation: fadeIn 0.6s ease 4.2s forwards;
    filter: drop-shadow(0 0 12px rgba(232, 148, 58, 0.45));
}
@keyframes drawQMark {
    to { stroke-dashoffset: 0; }
}

/* ---------- Cell tag (small label) ---------- */
.cell-tag {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.9rem;
    color: var(--c-accent);
}

.cell-body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    margin-top: 0.8rem;
}
.cell-body.small { font-size: 14px; }
.cell-body.small-italic { font-style: italic; font-size: 14.5px; opacity: 0.92; }

/* ---------- Equations ---------- */
.equation {
    font-family: var(--font-mono);
    font-size: 22px;
    color: var(--c-accent-2);
    margin: 1rem 0;
    text-align: center;
    letter-spacing: 0.05em;
}
.equation .frac {
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
    font-size: 18px;
    margin: 0 0.2em;
}
.equation .frac span {
    text-align: center;
    padding: 0 0.4em;
}
.equation .frac span:first-child {
    border-bottom: 1px solid var(--c-accent-2);
}
.eq-note {
    display: block;
    font-size: 13px;
    color: var(--c-grid);
    margin-top: 0.4rem;
    letter-spacing: 0.1em;
}

.equations-stack {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
    color: var(--c-accent-2);
    font-size: 15px;
    letter-spacing: 0.04em;
}
.eq-line.small { font-size: 14px; }
.eq-line.ghost {
    color: var(--c-accent-3);
    opacity: 0.55;
    font-style: italic;
}

/* ---------- Quote (glitch cell content) ---------- */
.quote {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.35;
    letter-spacing: 0.06em;
    color: var(--c-bone);
    filter: url(#hand-drawn);
    margin-bottom: 1rem;
}
.quote.small-quote {
    font-size: clamp(17px, 1.8vw, 22px);
    line-height: 1.5;
}
.quote-attr {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--c-accent-2);
    text-transform: uppercase;
}

/* ---------- Diagrams ---------- */
.diagram {
    width: 100%;
    height: auto;
    margin: 0.5rem auto;
    max-width: 320px;
    display: block;
}
.diagram-radial { max-width: 280px; }
.diagram-string { max-width: 320px; }
.diagram-tetra { max-width: 240px; }
.diagram-track { max-width: 320px; }
.diagram-listen { max-width: 200px; margin: 1.2rem auto; }

.field-line, .hero-field-line {
    fill: none;
    stroke-linecap: round;
}

.tetra-rotate {
    transform-origin: center;
    animation: tetraSpin 28s linear infinite;
    transform-box: fill-box;
}
@keyframes tetraSpin {
    from { transform: rotateY(0deg); }
    to   { transform: rotateY(360deg); }
}

.string-path {
    stroke-dasharray: 8 4;
    animation: dashShift 12s linear infinite;
}
@keyframes dashShift {
    to { stroke-dashoffset: -120; }
}

.dirac-arrows path,
.spin-arrows path {
    opacity: 0.85;
}

/* ---------- Cell modifiers ---------- */
.cell.tall { padding-bottom: 2rem; }
.cell.short { padding: 1.2rem; }

/* ---------- Movement variants ---------- */
.movement-weathered .cell-glitch {
    border-color: rgba(168, 90, 48, 0.5);
}

.movement-dissolving .cell {
    border-color: rgba(168, 90, 48, 0.25);
}
.movement-dissolving .cell-notebook {
    background-color: #ECE0CF;
    border-style: dashed;
    box-shadow: 1px 2px 12px rgba(0, 0, 0, 0.3);
    filter: url(#hand-drawn);
}
.movement-dissolving .cell-chalkboard {
    opacity: 0.85;
}

/* ---------- Colophon ---------- */
.colophon {
    margin-top: 8rem;
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px dashed rgba(204, 107, 46, 0.3);
    position: relative;
}
.colophon-inner {
    max-width: 480px;
    margin: 0 auto;
    color: var(--c-bone);
}
.colophon-mark {
    display: block;
    font-size: 24px;
    color: var(--c-accent);
    margin-bottom: 1rem;
    animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.15); }
}
.colophon-text {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.7;
    color: var(--c-bone);
    margin: 0.4rem 0;
}
.colophon-text.small-italic {
    font-style: italic;
    color: var(--c-grid);
    font-size: 14px;
}
.colophon-coords {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--c-grid);
    opacity: 0.6;
    margin-top: 1.4rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .masonry {
        column-count: 2;
    }
    .cell-final {
        grid-column: span 2;
    }
    .compass {
        width: 54px;
        height: 54px;
        top: 18px;
        left: 18px;
    }
    .threshold-meta {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
        padding: 0 1rem;
        font-size: 10px;
    }
}

@media (max-width: 640px) {
    .masonry {
        column-count: 1;
    }
    .page {
        padding: 0 5vw 4rem;
    }
    .threshold-cell {
        min-height: 75vh;
        padding: 2rem 1rem;
    }
    .hero-title {
        font-size: clamp(48px, 14vw, 72px);
    }
    .movement {
        padding: 5rem 0 3rem;
    }
    .menu-list a {
        font-size: clamp(24px, 7vw, 36px);
    }
    .crystal { display: none; }
    .crystal-1, .crystal-2 { display: block; opacity: 0.25; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .cell { opacity: 1; transform: none; }
}
