/* ============================================================
   Licensed fonts — self-hosted
   ============================================================ */
@font-face { font-family: "Founders Grotesk"; src: url("../fonts/founders-light.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Founders Grotesk"; src: url("../fonts/founders-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Founders Grotesk"; src: url("../fonts/founders-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Founders Grotesk"; src: url("../fonts/founders-medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Founders Grotesk"; src: url("../fonts/founders-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fournier MT"; src: url("../fonts/fournier-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fournier MT"; src: url("../fonts/fournier-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Adobe Caslon Pro"; src: url("../fonts/caslon-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

/* ============================================================
   Agatha Prieto Jeanty — An Active Archive
   Typography: Hanken Grotesk (titles) · Libre Caslon Text (body)
   · Cormorant (quotes) — served via Google Fonts, swappable.
   ============================================================ */

:root {
  --bone: #FAFAF8;
  --bone-deep: #EDEDEA;
  --ink: #161615;
  --ink-soft: #74746F;
  --clay: #6E6E69; /* strictly greys — no colour */
  --palm: #49573E;
  --night: #121211;
  --night-soft: #201F1D;
  --bone-dim: rgba(250, 250, 248, 0.62);
  --sans: "Founders Grotesk", "Liberation Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Adobe Caslon Pro", "Lora", Georgia, serif;
  --quote: "Fournier MT", "GFS Baskerville", Georgia, serif;
  --max: 1280px;
  --prose: 41rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.night { background: var(--night); color: var(--bone); }

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--clay); color: var(--bone); }

/* ---------- header: a quiet bar that is always legible ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: flex-start; align-items: baseline;
  padding: 1.1rem 2rem;
  font-family: var(--sans); font-weight: 500; font-size: 0.82rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink);
  background: rgba(250,250,248,0.82);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(22,22,21,0.06);
}
body.night .site-head {
  color: var(--bone);
  background: rgba(18,18,17,0.72);
  border-bottom-color: rgba(250,250,248,0.08);
}
.site-head a { color: inherit; }
.site-head .wordmark { font-weight: 600; letter-spacing: 0.09em; }
.site-head nav {
  display: flex; gap: 1.6rem; margin-left: auto;
  transform: translateX(-2.4rem); transition: transform 0.6s cubic-bezier(0.25,0.1,0.25,1);
}
body.scrolled .site-head nav { transform: none; }
.site-head nav a { opacity: 0.66; transition: opacity 0.3s; border-bottom: 1px solid transparent; }
.site-head nav a:hover { opacity: 1; }
.site-head nav a[aria-current] { opacity: 1; border-bottom-color: currentColor; }

/* ---------- home / breathing map ---------- */
.map-stage {
  position: relative; height: 100vh; height: 100svh;
  overflow: hidden; background: var(--night); color: var(--bone);
}
.map-stage video, .map-stage .poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.4s ease;
  animation: breathe 26s ease-in-out infinite alternate;
}
.map-stage video.on, .map-stage .poster.on { opacity: 1; }
/* photographs stand perfectly still — no breathing zoom */
.map-stage video.still-seg { animation: none; }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.055); } }
.map-veil {
  position: absolute; inset: 0; z-index: 2;
  background:
    linear-gradient(to right, rgba(18,18,17,0.55), rgba(18,18,17,0) 46%),
    linear-gradient(to bottom, rgba(18,18,17,0.6) 0%, rgba(18,18,17,0.05) 34%, rgba(18,18,17,0.05) 66%, rgba(18,18,17,0.55) 100%);
}
.map-id {
  position: absolute; z-index: 5; top: 1.6rem; left: 2rem; max-width: 21rem;
}
.map-id h1 {
  text-shadow: 0 1px 14px rgba(18,18,17,0.65);
  font-family: var(--sans); font-weight: 600; font-size: 1.02rem;
  letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.5;
}
.map-id p {
  font-family: var(--sans); font-weight: 500; font-size: 0.74rem;
  letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.65; margin-top: 0.3rem;
}
.map-edge {
  position: absolute; z-index: 5; left: 2rem; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 1.3rem; text-align: left;
  font-family: var(--sans); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.map-edge { text-shadow: 0 1px 12px rgba(18,18,17,0.65); }
.map-edge a { opacity: 0.78; transition: opacity 0.3s, letter-spacing 0.3s; }
.map-edge a:hover { opacity: 1; letter-spacing: 0.16em; }
.map-quote {
  position: absolute; z-index: 5; left: 50%; bottom: 3.6rem;
  transform: translateX(-50%); width: max-content; max-width: 86vw;
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem); text-align: center; opacity: 0.9;
}
.map-hint {
  position: absolute; z-index: 5; left: 50%; bottom: 1.3rem; transform: translateX(-50%);
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; opacity: 0.45;
}

/* location markers */
.marker {
  position: absolute; z-index: 6; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 0.7rem; cursor: pointer;
  background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left;
}
.marker .dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bone); flex: none;
  box-shadow: 0 0 0 0 rgba(250,250,248,0.45);
  animation: pulse 3.2s ease-out infinite;
}
.marker:nth-of-type(2) .dot { animation-delay: 1.1s; }
.marker:nth-of-type(3) .dot { animation-delay: 2.2s; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(250,250,248,0.45); }
  70% { box-shadow: 0 0 0 22px rgba(250,250,248,0); }
  100% { box-shadow: 0 0 0 0 rgba(250,250,248,0); }
}
.marker .tag {
  font-family: var(--sans); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.09em; text-transform: uppercase;
  background: rgba(18,18,17,0.55); backdrop-filter: blur(6px);
  padding: 0.45rem 0.8rem; border: 1px solid rgba(250,250,248,0.22);
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.35s, transform 0.35s;
  white-space: nowrap;
}
.marker .tag em { display: block; font-family: var(--quote); font-style: italic;
  text-transform: none; letter-spacing: 0; font-size: 0.86rem; opacity: 0.75; }
.marker:hover .tag, .marker:focus-visible .tag { opacity: 1; transform: none; }
@media (hover: none), (max-width: 720px) {
  .marker .tag { opacity: 1; transform: none; }
}
@media (max-width: 720px) {
  .map-edge { left: 1.4rem; }
  .marker { left: 1.4rem !important; transform: none; }
  .marker:nth-of-type(1) { top: 44% !important; }
  .marker:nth-of-type(2) { top: 56% !important; }
  .marker:nth-of-type(3) { top: 68% !important; }
  .marker .tag { white-space: normal; max-width: 74vw; }
}

/* home lower section */
.home-below { padding: 7rem 2rem 0; }
.home-statement {
  max-width: 46rem; margin: 0 auto 6rem;
  font-family: var(--quote); font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.5; text-align: center;
}
.home-statement em { font-style: italic; color: var(--clay); }

/* works index (shared with works.html) */
.works-index { max-width: var(--max); margin: 0 auto; border-top: 1px solid rgba(22,22,21,0.16); }
body.night .works-index, body.night .work-row { border-color: rgba(250,250,248,0.2); }
body.night .work-row:hover { background: var(--night-soft); }
body.night .work-row .meta { color: var(--bone-dim); }
.work-row {
  display: grid; grid-template-columns: 4.5rem 1fr auto 8.5rem;
  gap: 1.6rem; align-items: center;
  padding: 2.1rem 0.4rem; border-bottom: 1px solid rgba(22,22,21,0.16);
  transition: background 0.35s, padding-left 0.35s;
}
.work-row:hover { background: var(--bone-deep); padding-left: 1.1rem; }
.work-row .num { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--clay); }
.work-row h3 { font-family: var(--sans); font-weight: 600; font-size: clamp(1.25rem, 2.6vw, 1.9rem); letter-spacing: 0.01em; }
.work-row .meta { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); text-align: right; }
.work-row .thumb { width: 8.5rem; height: 5.6rem; object-fit: cover; filter: saturate(0.92); }
@media (max-width: 720px) {
  .work-row { grid-template-columns: 2.6rem 1fr; }
  .work-row .meta, .work-row .thumb { display: none; }
}

/* ---------- generic page scaffolding ---------- */
.page { padding-top: 6.5rem; }
.page-hero { max-width: var(--max); margin: 0 auto; padding: 3rem 2rem 3.5rem; }
.kicker {
  font-family: var(--sans); font-weight: 500; font-size: 0.78rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--clay);
  margin-bottom: 1.1rem;
}
h1.title {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem); line-height: 1.06; letter-spacing: -0.01em;
  max-width: 60rem;
}
.subtitle {
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem); margin-top: 1.3rem; color: var(--ink-soft);
  max-width: 44rem;
}
body.night .subtitle { color: var(--bone-dim); }
.meta-line {
  font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); margin-top: 1.6rem;
}
body.night .meta-line { color: var(--bone-dim); }

.prose { max-width: var(--prose); margin: 0 auto; padding: 0 2rem; }
.prose p + p { margin-top: 1.5em; }
.prose .lead { font-size: 1.2rem; line-height: 1.7; }

.frag { max-width: var(--prose); margin: 4.5rem auto; padding: 0 2rem; }
.frag p + p { margin-top: 1.5em; }
/* body text is justified across the site */
.frag p, .prose p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }

.pull {
  max-width: 52rem; margin: 6.5rem auto; padding: 0 2rem;
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.4; text-align: center;
  color: var(--clay);
}
body.night .pull { color: var(--bone); }

.bleed { margin: 5.5rem 0; }
.bleed img, .bleed video { width: 100%; max-height: 88vh; object-fit: cover; }
.wide { max-width: var(--max); margin: 5.5rem auto; padding: 0 2rem; }
.pair {
  max-width: var(--max); margin: 5.5rem auto; padding: 0 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; align-items: start;
}
.pair figure img { width: 100%; aspect-ratio: 4 / 3.1; object-fit: cover; }
.pair.offset { align-items: start; }
.pair .shift-down { transform: none; }
@media (max-width: 720px) {
  .pair { grid-template-columns: 1fr; }
  .pair .shift-down { transform: none; }
}
figcaption {
  font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft); margin-top: 0.7rem;
}
body.night figcaption { color: var(--bone-dim); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .map-stage video { animation: none; }
}

/* next-work link */
.next-link {
  display: block; max-width: var(--max); margin: 7rem auto 0; padding: 3.5rem 2rem;
  border-top: 1px solid rgba(22,22,21,0.16); text-align: center;
}
body.night .next-link { border-color: rgba(250,250,248,0.2); }
.next-link .kicker { margin-bottom: 0.6rem; }
.next-link .big {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.8rem); transition: color 0.3s;
}
.next-link:hover .big { color: var(--clay); }

/* ---------- archive (frequencies) ---------- */
.constellation {
  max-width: var(--max); margin: 3rem auto 0; padding: 0 2rem;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.1rem;
}
.scan { grid-column: span 2; position: relative; min-height: 15rem;
  border: 1px solid rgba(250,250,248,0.17);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 1.1rem 1.2rem; cursor: pointer; overflow: hidden;
  transition: border-color 0.35s, background 0.35s;
  background:
    radial-gradient(1.5px 1.5px at 22% 34%, rgba(250,250,248,0.4), transparent 55%),
    radial-gradient(1px 1px at 68% 22%, rgba(250,250,248,0.32), transparent 55%),
    radial-gradient(1.5px 1.5px at 81% 71%, rgba(250,250,248,0.36), transparent 55%),
    radial-gradient(1px 1px at 39% 78%, rgba(250,250,248,0.3), transparent 55%),
    radial-gradient(1px 1px at 55% 51%, rgba(250,250,248,0.25), transparent 55%);
}
.scan:hover { border-color: rgba(250,250,248,0.55); background-color: var(--night-soft); }
.scan.tall { grid-row: span 2; min-height: 20rem; }
.scan.wide2 { grid-column: span 3; }
.scan .s-num { font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.16em; opacity: 0.5; }
.scan h3 { font-family: var(--quote); font-style: italic; font-weight: 500; font-size: 1.45rem; line-height: 1.25; }
.scan .gloss { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.55; margin-top: 0.3rem; }
.scan .cta { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone); opacity: 0.65; }
.scan .cta::after { content: " ⟳"; }
.scan iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.scan.loaded { padding: 0; cursor: default; }
.scan.loaded .s-num, .scan.loaded h3, .scan.loaded .gloss, .scan.loaded .cta { display: none; }
@media (max-width: 980px) { .constellation { grid-template-columns: repeat(4, 1fr); } .scan.wide2 { grid-column: span 2; } }
@media (max-width: 640px) { .constellation { grid-template-columns: 1fr 1fr; } .scan, .scan.wide2 { grid-column: span 2; min-height: 13rem; } }

/* ---------- braiding page ---------- */
.braid-hero { position: relative; height: 86vh; overflow: hidden; background: var(--night); }
.braid-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.braid-hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 7rem; z-index: 2;
  background: linear-gradient(to bottom, rgba(18,18,17,0.6), transparent);
}
.braid-hero .over {
  position: absolute; inset: auto 0 0 0; padding: 0 2rem 4rem;
  background: linear-gradient(to top, rgba(18,18,17,0.75), transparent);
  color: var(--bone);
}
.braid-hero .over .inner { max-width: var(--max); margin: 0 auto; }
.word-line {
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); text-align: center;
  max-width: 50rem; margin: 7rem auto; padding: 0 2rem; line-height: 1.6;
}
.word-line span { display: inline-block; opacity: 0; transform: translateY(12px); transition: opacity 0.9s ease, transform 0.9s ease; }
.word-line.in span { opacity: 1; transform: none; }

.work-block { padding: 6rem 0 2rem; }
.work-block .head { max-width: var(--max); margin: 0 auto 3rem; padding: 0 2rem; }
.work-block h2 { font-family: var(--sans); font-weight: 600; font-size: clamp(1.9rem, 4.4vw, 3.2rem); letter-spacing: -0.01em; }
.work-block .head .meta-line { margin-top: 0.9rem; }
.materials { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--clay); margin-top: 0.5rem; }
.band-night { background: var(--night); color: var(--bone); padding: 5.5rem 0 6rem; margin-top: 6rem; }
.band-night .meta-line, .band-night figcaption { color: var(--bone-dim); }

/* video player */
.player { max-width: var(--max); margin: 3.5rem auto; padding: 0 2rem; }
.player video { width: 100%; background: #000; }

/* flipbook */
.flipbook-wrap { max-width: 62rem; margin: 3.5rem auto 1rem; padding: 0 2rem; }
.flipbook { position: relative; perspective: 2200px; user-select: none; }
.flipbook .page-stack { position: relative; width: 100%; aspect-ratio: 4134 / 2657; }
.flipbook .leaf {
  position: absolute; inset: 0; backface-visibility: hidden;
  transform-origin: left center;
  transition: transform 0.9s cubic-bezier(0.4, 0.05, 0.2, 1), opacity 0.45s 0.25s;
  box-shadow: 0 14px 45px rgba(18,18,17,0.35);
}
.flipbook .leaf img { width: 100%; height: 100%; object-fit: cover; }
.flipbook .leaf.flipped { transform: rotateY(-102deg); opacity: 0; pointer-events: none; }
.flip-ui {
  display: flex; justify-content: center; align-items: center; gap: 2rem;
  margin-top: 1.4rem; font-family: var(--sans); font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.flip-ui button {
  background: none; border: 1px solid rgba(250,250,248,0.35); color: inherit;
  font: inherit; letter-spacing: inherit; padding: 0.55rem 1.2rem; cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
body:not(.night) .flip-ui button { border-color: rgba(27,22,17,0.35); }
.flip-ui button:hover { background: var(--clay); border-color: var(--clay); color: var(--bone); }
.flip-ui .counter { opacity: 0.6; }

/* ---------- about ---------- */
.about-grid {
  max-width: var(--max); margin: 0 auto; padding: 0 2rem 2rem;
  display: grid; grid-template-columns: minmax(15rem, 24rem) 1fr; gap: 4rem; align-items: start;
}
.about-grid .portrait { position: sticky; top: 7rem; }
.about-grid .portrait img { filter: grayscale(1); width: 100%; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } .about-grid .portrait { position: static; max-width: 22rem; } }

/* ---------- cv ---------- */
.cv { max-width: 54rem; margin: 0 auto; padding: 0 2rem; }
.cv section { border-top: 1px solid rgba(22,22,21,0.16); padding: 2.4rem 0; display: grid; grid-template-columns: 12rem 1fr; gap: 2rem; }
.cv h2 { font-family: var(--sans); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--clay); }
.cv .entry + .entry { margin-top: 1.6rem; }
.cv .entry h3 { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; line-height: 1.45; }
.cv .entry p { font-family: var(--sans); font-size: 0.86rem; color: var(--ink-soft); margin-top: 0.2rem; }
@media (max-width: 640px) { .cv section { grid-template-columns: 1fr; gap: 0.9rem; } }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 8rem; background: var(--night); color: var(--bone);
  padding: 6rem 2rem 2.6rem; text-align: center;
}
body.night .site-foot { border-top: 1px solid rgba(250,250,248,0.14); }
.site-foot .greet {
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
}
.site-foot .sub { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; margin-top: 0.8rem; }
.site-foot .mail {
  display: inline-block; margin-top: 2.6rem;
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem); letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(250,250,248,0.4);
  padding-bottom: 0.2rem; transition: color 0.3s, border-color 0.3s;
}
.site-foot .mail:hover { color: var(--clay); border-color: var(--clay); }
.site-foot .fine {
  margin-top: 4.5rem; font-family: var(--sans); font-size: 0.7rem;
  letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.45;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}

/* support strip */
.support {
  max-width: var(--prose); margin: 5rem auto 0; padding: 2rem;
  display: flex; align-items: center; gap: 1.6rem;
  border-top: 1px solid rgba(22,22,21,0.16);
}
.support img { width: 130px; flex: none; }
.support p { font-family: var(--sans); font-size: 0.8rem; line-height: 1.6; color: var(--ink-soft); }

/* ============================================================
   The World — Frequencies of Belonging walk-through
   ============================================================ */
.world-track { position: relative; }
.world-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; background: var(--night);
}
.world-dust { position: absolute; inset: -20% 0; pointer-events: none; opacity: 1; background-size: 340px 340px; }
.world-dust.d1 {
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(250,250,248,0.5), transparent 60%),
    radial-gradient(1px 1px at 34% 64%, rgba(250,250,248,0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 58% 38%, rgba(250,250,248,0.4), transparent 60%),
    radial-gradient(1px 1px at 76% 80%, rgba(250,250,248,0.3), transparent 60%),
    radial-gradient(1px 1px at 90% 14%, rgba(250,250,248,0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 88%, rgba(250,250,248,0.3), transparent 60%);
}
.world-dust.d2 {
  background:
    radial-gradient(1px 1px at 18% 42%, rgba(250,250,248,0.28), transparent 60%),
    radial-gradient(1px 1px at 46% 16%, rgba(250,250,248,0.24), transparent 60%),
    radial-gradient(1px 1px at 66% 70%, rgba(250,250,248,0.26), transparent 60%),
    radial-gradient(1px 1px at 84% 46%, rgba(250,250,248,0.22), transparent 60%);
}
.world-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, transparent 40%, rgba(18,18,17,0.75) 100%);
}
.wnode { position: absolute; left: 50%; top: 50%; will-change: transform, opacity; }
.wplace { text-align: center; pointer-events: none; }
.wplace::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1;
  width: 46rem; height: 24rem; transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(250,250,248,0.12), rgba(250,250,248,0.05) 45%, transparent 70%);
}
.wplace h3 {
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: clamp(2rem, 5vw, 3.6rem); color: var(--bone); white-space: nowrap;
}
.wplace p {
  font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--bone-dim); margin-top: 0.4rem;
}
.wobj { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; background: none; border: 0; padding: 0.4rem; color: var(--bone); }
.wobj .dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--bone);
  box-shadow: 0 0 0 0 rgba(250,250,248,0.4); animation: pulse 3.4s ease-out infinite;
}
/* the object in its own shape, with a halo behind it (no circle crop) */
.wobj::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1;
  width: 32rem; height: 32rem; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(250,250,248,0.16), rgba(250,250,248,0.05) 45%, transparent 68%);
  pointer-events: none;
}
.wobj .othumb {
  display: block; width: 19rem; height: 19rem;
  overflow: visible; position: relative;
  transition: transform 0.35s;
  animation: ofloat 7s ease-in-out infinite alternate;
}
@keyframes ofloat { from { translate: 0 -5px; } to { translate: 0 6px; } }
.wobj .othumb img {
  width: 100%; height: 100%; object-fit: contain;
  mix-blend-mode: screen;
  filter: brightness(1.04) contrast(1.05);
  transition: filter 0.35s;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 58%, transparent 94%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000 58%, transparent 94%);
}
.wobj:hover .othumb { transform: scale(1.06); }
.wobj:hover .othumb img { filter: brightness(1.18) contrast(1.06); }
/* the title, under each object, on hover only — always legible */
.wnode:hover, .wnode:focus-visible { z-index: 6000 !important; }
.wobj .oname {
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: 1.1rem; color: var(--bone); white-space: nowrap;
  background: rgba(18,18,17,0.78); padding: 0.18em 0.75em; border-radius: 2px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(-5px);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}
.wobj:hover .oname, .wobj:focus-visible .oname { opacity: 1; transform: none; }
/* the object at centre stage shows its title on its own */
.wobj.titled .oname { opacity: 1; transform: none; transition-delay: 0.25s; }
/* low objects carry their title above the image so it never falls off-screen */
.wobj.name-top .oname { order: -1; transform: translateY(5px); }
.wobj.name-top:hover .oname, .wobj.name-top:focus-visible .oname { transform: none; }
/* the braid canvas: beneath the objects, above the dust */
.world-braid { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.wobj .othumb.broken img { display: none; }
.wobj .othumb.broken::after {
  content: ""; position: absolute; inset: 44%; border-radius: 50%; background: var(--bone);
}
.wobj .olabel {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.35s, transform 0.35s;
}
.wobj:hover .olabel, .wobj:focus-visible .olabel { opacity: 1; transform: none; }
@media (hover: none) { .wobj .olabel { opacity: 1; transform: none; } }
.wobj .lbl {
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: 1.15rem; white-space: nowrap; opacity: 0.85;
}
.wobj .sub { font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.5; white-space: nowrap; }
.wobj:hover .dot { background: var(--clay); }
.wobj:hover .lbl { opacity: 1; }
.world-hud {
  position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
  font-family: var(--sans); font-size: 0.66rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--bone-dim); text-align: center; pointer-events: none;
}
.world-progress {
  position: absolute; right: 1.6rem; top: 50%; transform: translateY(-50%);
  width: 1px; height: 34vh; background: rgba(250,250,248,0.18); pointer-events: none;
}
.world-progress i {
  position: absolute; left: -1px; top: 0; width: 3px; height: 0%;
  background: var(--clay); display: block;
}

/* scan overlay (lightbox) */
.scan-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(18,18,17,0.94);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 4.5rem 1.5rem 2rem;
}
.scan-overlay.open { display: flex; }
.scan-overlay iframe { width: min(1100px, 96vw); height: min(70vh, 640px); border: 1px solid rgba(250,250,248,0.2); background: #000; }
.scan-overlay .cap { margin-top: 1.1rem; text-align: center; color: var(--bone); }
.scan-overlay .cap h3 { font-family: var(--quote); font-style: italic; font-weight: 500; font-size: 1.6rem; }
.scan-overlay .cap p { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.55; margin-top: 0.25rem; }
.scan-overlay .close {
  position: absolute; top: 1.4rem; right: 1.8rem; background: none; border: 1px solid rgba(250,250,248,0.35);
  color: var(--bone); font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0.55rem 1.1rem; cursor: pointer;
}
.scan-overlay .close:hover { background: var(--clay); border-color: var(--clay); }

/* ============================================================
   Heavy MAD — the book
   ============================================================ */
.book-scene { max-width: 66rem; margin: 4rem auto 0; padding: 0 2rem; perspective: 2800px; }
.book3d {
  position: relative; width: 100%; aspect-ratio: 1600 / 1030;
  transform-style: preserve-3d; transform: rotateX(9deg);
  filter: drop-shadow(0 30px 50px rgba(0,0,0,0.55));
}
.book3d .bbase { position: absolute; top: 0; height: 100%; width: 50%; overflow: hidden; background: var(--night-soft); }
.book3d .bbase.left { left: 0; }
.book3d .bbase.right { right: 0; }
.book3d .bbase img { width: 100%; height: 100%; object-fit: cover; }
.sheet3d {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  transform-style: preserve-3d; transform-origin: left center;
  transition: transform 1.15s cubic-bezier(0.35, 0.08, 0.2, 0.96);
}
.sheet3d.flipped { transform: rotateY(-180deg); }
.sheet3d .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; background: var(--night-soft); }
.sheet3d .face img { width: 100%; height: 100%; object-fit: cover; }
.sheet3d .face.back { transform: rotateY(180deg); }
/* spine + edge shading */
.sheet3d .face.front::after, .book3d .bbase.right::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(0,0,0,0.38), transparent 14%);
}
.sheet3d .face.back::after, .book3d .bbase.left::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to left, rgba(0,0,0,0.38), transparent 14%);
}
.book-hint { text-align: center; font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.45; margin-top: 2rem; color: var(--bone); }
@media (max-width: 640px) { .book3d { transform: rotateX(5deg); } }

/* page title in the header on scroll */
.head-title {
  margin-left: 1.2rem; padding-left: 1.2rem;
  border-left: 1px solid rgba(246,241,233,0.4);
  font-weight: 400; opacity: 0; transform: translateY(4px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.head-title.show { opacity: 0.85; transform: none; }
@media (max-width: 720px) { .head-title { display: none; } }

/* memory-photos drifting through the world */
.wphoto { pointer-events: none; }
.wphoto img {
  width: 30rem; max-width: 44vw; height: auto;
  filter: sepia(0.18) saturate(0.85) brightness(0.9);
  -webkit-mask-image: radial-gradient(ellipse 72% 68% at 50% 50%, #000 46%, transparent 74%);
  mask-image: radial-gradient(ellipse 72% 68% at 50% 50%, #000 46%, transparent 74%);
}

/* braiding hero legibility */
.braid-hero .over {
  background: linear-gradient(to top, rgba(18,18,17,0.88) 0%, rgba(18,18,17,0.45) 55%, transparent 100%);
  padding-top: 7rem;
}
.braid-hero .over .kicker { color: var(--bone); opacity: 0.85; }
.braid-hero .over .title, .braid-hero .over h1 {
  color: var(--bone); text-shadow: 0 2px 22px rgba(18,18,17,0.65);
}


/* chapter navigation inside A Caring Practice */
.chapter-nav {
  display: flex; flex-wrap: wrap; gap: 1.6rem; margin-top: 2rem;
  font-family: var(--sans); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.chapter-nav a { color: var(--clay); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.chapter-nav a:hover { border-bottom-color: var(--clay); }
.chapter { scroll-margin-top: 4rem; }


/* ============================================================
   Selected Works — constellation map
   ============================================================ */
.constellation-page {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--bone);
}
.cstar {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem;
  animation: cdrift 14s ease-in-out infinite alternate;
}
.cstar:nth-child(2) { animation-name: cdrift2; animation-duration: 17s; animation-delay: -5s; }
.cstar:nth-child(3) { animation-name: cdrift3; animation-duration: 19s; animation-delay: -9s; }
.cstar:nth-child(4) { animation-name: cdrift2; animation-duration: 15s; animation-delay: -3s; animation-direction: alternate-reverse; }
@keyframes cdrift {
  0% { margin-left: 0; margin-top: 0; }
  45% { margin-left: 48px; margin-top: -34px; }
  100% { margin-left: 14px; margin-top: -66px; }
}
@keyframes cdrift2 {
  0% { margin-left: 0; margin-top: 0; }
  50% { margin-left: -52px; margin-top: 30px; }
  100% { margin-left: -12px; margin-top: 62px; }
}
@keyframes cdrift3 {
  0% { margin-left: 0; margin-top: 0; }
  40% { margin-left: 40px; margin-top: 40px; }
  100% { margin-left: -34px; margin-top: 10px; }
}
/* hover: an overview — a picture of the work */
.cstar .cpreview {
  position: absolute; bottom: calc(100% + 0.9rem); left: -0.4rem;
  width: clamp(13rem, 20vw, 17rem); pointer-events: none;
  opacity: 0; transform: translateY(8px) scale(0.98);
  transition: opacity 0.4s ease, transform 0.4s ease;
  box-shadow: 0 18px 50px rgba(22,22,21,0.18);
}
.cstar .cpreview img { display: block; width: 100%; height: auto; }
.cstar.flip .cpreview { left: auto; right: -0.4rem; }
.cstar.below .cpreview { bottom: auto; top: calc(100% + 0.9rem); }
.cstar:hover .cpreview, .cstar:focus-visible .cpreview { opacity: 1; transform: none; }
.cstar .cname {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(1.05rem, 1.8vw, 1.35rem); letter-spacing: 0.01em;
  transition: color 0.3s, transform 0.35s ease;
  transform-origin: left bottom;
}
.cstar:hover .cname { transform: scale(1.12); }
.cstar .cdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); margin-left: 2px; transition: background 0.3s, transform 0.3s; }
.cstar .csub {
  font-family: var(--sans); font-weight: 400; font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
  opacity: 0; transform: translateY(-3px); transition: opacity 0.35s, transform 0.35s;
}
.cstar:hover .cname { color: var(--clay); }
.cstar:hover .cdot { background: var(--clay); transform: scale(1.5); }
.cstar:hover .csub { opacity: 1; transform: none; }
.cdust { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: rgba(22,22,21,0.16); animation: cdrift 17s ease-in-out infinite alternate; }
.cst-hint {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ============================================================
   Project split layout — sticky slideshow left, text right
   ============================================================ */
.project-split {
  display: grid; grid-template-columns: 1fr 1fr; align-items: start;
}
.split-media {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 5.5rem 2rem 2rem;
}
.slideshow { position: relative; width: 100%; cursor: e-resize; }
.slideshow .frame { position: relative; width: 100%; aspect-ratio: 4 / 3.2; max-height: calc(100svh - 11rem); }
.slideshow .frame.tall { aspect-ratio: 4 / 4.6; max-height: calc(100svh - 11rem); }
.slideshow .slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease;
}
.slideshow .slide.active { opacity: 1; }
.slideshow .slide img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.slideshow .slidecap {
  margin-top: 0.9rem; text-align: center;
  font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-soft); min-height: 1.2em;
}
.slideshow .slidecount { text-align: center; font-family: var(--sans); font-size: 0.64rem; letter-spacing: 0.16em; color: var(--ink-soft); opacity: 0.7; margin-top: 0.3rem; }
.split-text { padding: 7rem 2.5rem 4rem clamp(1rem, 3vw, 3rem); max-width: 44rem; }
.split-text .frag { margin: 2.6rem 0; padding: 0; max-width: none; }
.split-text .pull { margin: 3.6rem 0; padding: 0; text-align: left; max-width: none; }
.split-text .player { margin: 3rem 0 0; padding: 0; max-width: none; }
.split-text .meta-line { margin-top: 1rem; }
@media (max-width: 900px) {
  .project-split { grid-template-columns: 1fr; }
  .split-media { position: static; height: auto; padding-top: 6.5rem; }
  .split-text { padding-top: 1rem; }
}

/* ============================================================
   A Caring Practice — video hero
   ============================================================ */
.video-hero {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--night); color: #FAFAF8;
}
.video-hero video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0.85;
}
.video-hero .vh-veil {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(18,18,17,0.5), rgba(18,18,17,0.08) 34%, rgba(18,18,17,0.62) 100%);
}
.video-hero .vh-content {
  position: absolute; inset: auto 0 0 0; padding: 0 2rem 3rem;
}
.video-hero .vh-inner { max-width: var(--max); margin: 0 auto; }
.video-hero .kicker { color: #FAFAF8; opacity: 0.85; }
.video-hero .title { color: #FAFAF8; text-shadow: 0 2px 24px rgba(18,18,17,0.5); }
.video-hero .subtitle { color: rgba(250,250,248,0.85); }
.video-hero .meta-line { color: rgba(250,250,248,0.65); }
.video-hero .chapter-nav a { color: #FAFAF8; }
.video-hero .chapter-nav a:hover { border-bottom-color: #FAFAF8; }
.yt-link {
  display: inline-block; margin-top: 1.4rem;
  font-family: var(--sans); font-weight: 500; font-size: 0.78rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid rgba(250,250,248,0.4); padding: 0.6rem 1.1rem;
  transition: background 0.3s, border-color 0.3s;
}
.yt-link:hover { background: var(--clay); border-color: var(--clay); }

/* heavy mad: the object holds the stage */
.book-scene.grand { max-width: 80rem; margin-top: 2.5rem; }
.book-ui.quiet { margin-top: 1.2rem; }
.book-ui.quiet button { display: none; }


/* ============================================================
   Work pages — map chrome (per Agatha's mock-up)
   ============================================================ */
.back-pill {
  position: fixed; top: 1.3rem; left: 1.6rem; z-index: 60;
  font-family: var(--sans); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.04em; color: var(--ink);
  background: rgba(250,250,248,0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(22,22,21,0.14); border-radius: 999px;
  padding: 0.55rem 1.1rem;
  transition: background 0.3s, transform 0.3s;
}
.back-pill:hover { background: var(--bone-deep); transform: translateX(-2px); }
body.night .back-pill { color: var(--bone); background: rgba(18,18,17,0.75); border-color: rgba(250,250,248,0.2); }
body.night .back-pill:hover { background: var(--night-soft); }

.proj-pills {
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center;
  padding: 3.5rem 2rem 4rem;
}
/* label above the chapter pills — one project, three parts */
.pills-label {
  text-align: center; margin-top: 4rem; margin-bottom: -2.6rem;
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-soft);
}
body.night .pills-label { color: rgba(250,250,248,0.55); }
.proj-pills a.now { pointer-events: none; }
.proj-pills a.now { background: var(--ink); color: var(--bone); border-color: var(--ink); }
body.night .proj-pills a.now { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.proj-pills a {
  font-family: var(--sans); font-weight: 500; font-size: 0.8rem;
  letter-spacing: 0.03em; color: var(--ink);
  border: 1px solid rgba(22,22,21,0.2); border-radius: 999px;
  padding: 0.5rem 1.05rem; background: var(--bone);
  transition: background 0.3s, border-color 0.3s;
}
.proj-pills a:hover { background: var(--bone-deep); border-color: rgba(22,22,21,0.4); }
body.night .proj-pills a { color: var(--bone); background: transparent; border-color: rgba(250,250,248,0.25); }
body.night .proj-pills a:hover { background: var(--night-soft); }

/* mock-up style work header + fields */
.work-kicker { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.work-fields {
  display: grid; grid-template-columns: repeat(3, minmax(6rem, 1fr)); gap: 1.4rem;
  margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid rgba(22,22,21,0.14);
  font-family: var(--sans); font-size: 0.82rem;
}
.work-fields .wf-label { color: var(--ink-soft); font-size: 0.72rem; letter-spacing: 0.08em; margin-bottom: 0.25rem; }
.work-fields .wf-value { font-weight: 500; line-height: 1.5; }
.about-this { font-family: var(--sans); font-weight: 600; font-size: 0.95rem; margin: 2rem 0 0.6rem; }

/* split with media on the RIGHT (mock-up) */
.project-split.media-right { grid-template-columns: 46% 54%; }
.project-split.media-right .split-media { order: 2; padding: 5rem 1.6rem 1.5rem 0.5rem; }
.project-split.media-right .split-text { order: 1; padding: 6.5rem 1.2rem 3rem 2.5rem; }
@media (max-width: 900px) { .project-split.media-right .split-media { order: 0; } }
.media-label {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-soft); text-align: center; margin-bottom: 0.8rem;
}

/* ============================================================
   A Caring Practice — landing with sound
   ============================================================ */
.acp-landing {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background: var(--night); color: #FAFAF8;
}
.acp-landing video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.acp-landing .veil { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(18,18,17,0.35), rgba(18,18,17,0.1) 40%, rgba(18,18,17,0.6)); }
.acp-content { position: absolute; inset: auto 0 0 0; padding: 0 2rem 3.2rem; }
.acp-content .inner { max-width: var(--max); margin: 0 auto; }
.acp-content .title { color: #FAFAF8; text-shadow: 0 2px 22px rgba(18,18,17,0.6); }
.acp-content .ongoing { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; margin-top: 0.6rem; }
.acp-points {
  display: flex; flex-wrap: wrap; gap: 2.2rem; margin-top: 2rem;
  font-family: var(--sans); font-weight: 500; font-size: 0.86rem;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.acp-points a { display: flex; align-items: center; gap: 0.6rem; opacity: 0.85; transition: opacity 0.3s; text-shadow: 0 1px 12px rgba(18,18,17,0.6); }
.acp-points a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FAFAF8; }
.acp-points a:hover { opacity: 1; }
.sound-toggle {
  position: absolute; right: 1.6rem; bottom: 3.6rem; z-index: 5;
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #FAFAF8; background: rgba(18,18,17,0.55); border: 1px solid rgba(250,250,248,0.35);
  border-radius: 999px; padding: 0.5rem 1rem; cursor: pointer;
}
.sound-toggle:hover { background: rgba(18,18,17,0.8); }

/* frequencies: text panel floating over the world */
.world-panel .work-kicker { font-size: 0.72rem; line-height: 1.4; text-align: left; opacity: 1; margin-bottom: 0.6rem; }
.world-panel {
  position: absolute; z-index: 1600; top: 50%; left: clamp(3rem, 8vw, 9rem);
  transform: translateY(-50%);
  width: min(27rem, 78vw); max-height: 72vh; overflow-y: auto;
  color: var(--bone); padding-right: 0.8rem;
}
.world-panel h1 { font-family: var(--sans); font-weight: 600; font-size: 1.35rem; line-height: 1.3; margin-bottom: 1rem; }
.world-panel p { font-size: 0.92rem; line-height: 1.7; margin-bottom: 1em; opacity: 0.85; }
.world-panel::-webkit-scrollbar { width: 3px; }
.world-panel::-webkit-scrollbar-thumb { background: rgba(250,250,248,0.3); }

/* heavy mad on white */
.book-scene.grand.light .book3d { filter: drop-shadow(0 22px 40px rgba(22,22,21,0.28)); }
.book-scene.grand.light .sheet3d .face, .book-scene.grand.light .bbase { background: var(--bone-deep); }


/* light-grey passage (the Hurston citation) */
/* quotes: one voice — Fournier italic, a centred block, justified text */
.grey-passage, .frag .grey-passage {
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: 1.18em; line-height: 1.7;
  color: var(--ink-soft); text-align: justify; hyphens: none; -webkit-hyphens: none;
  max-width: 32rem; margin-left: auto; margin-right: auto;
  padding: 0.4em 0;
}
body.night .grey-passage { color: rgba(250,250,248,0.62); }

/* frequencies: auto-paging text panel */
.world-panel .wp-fixedtitle {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem); line-height: 1.12; margin-bottom: 1.4rem;
}
.world-panel > p { font-size: 1rem; line-height: 1.75; margin-bottom: 1.1em; opacity: 0.85; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
/* the arrow: there is more text below */
.wp-more {
  position: sticky; bottom: 0; display: block; text-align: center;
  padding: 1.6rem 0 0.2rem; margin: 0;
  font-family: var(--sans); font-size: 1.05rem; color: var(--bone);
  background: linear-gradient(to bottom, rgba(18,18,17,0), var(--night) 65%);
  opacity: 0.8; transition: opacity 0.4s;
  animation: nudge 2.2s ease-in-out infinite;
}
.wp-more.off { opacity: 0; animation: none; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.world-panel .wp-page { position: absolute; inset: 0 0 auto 0; opacity: 0; transition: opacity 0.9s ease; }
.world-panel .wp-page.active { opacity: 1; }
.world-panel .wp-dots { display: flex; gap: 0.45rem; margin-top: 1rem; }
.world-panel .wp-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(250,250,248,0.3); transition: background 0.3s; }
.world-panel .wp-dots i.on { background: rgba(250,250,248,0.9); }
.world-panel { cursor: default; }

/* workshops section on the notes page */
.workshops-band { margin-top: 6rem; }
.workshops-band .video-hero { height: 92vh; height: 92svh; }
.wb-split {
  max-width: var(--max); margin: 5rem auto 0; padding: 0 2rem;
  display: grid; grid-template-columns: 42% 58%; gap: 2.5rem; align-items: center;
}
.wb-line {
  font-family: var(--quote); font-style: italic; font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.8;
  color: var(--ink); padding: 0 1rem;
}
@media (max-width: 900px) {
  .wb-split { grid-template-columns: 1fr; gap: 2rem; }
  .wb-line { text-align: center; padding: 0; }
}

/* the archive stays open — closing note under the index */
.archive-note {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(250,250,248,0.55);
  text-align: center; max-width: 40rem; line-height: 2.1;
  margin: 4.5rem auto 1rem; padding: 0 2rem;
}

/* socials, as emojis */
.socials { display: flex; justify-content: center; gap: 1.8rem; margin: 0.6rem 0 0.4rem; }
.socials a { font-size: 1.9rem; text-decoration: none; transition: transform 0.25s; }
.socials a:hover { transform: scale(1.15); }

/* credits over the A Caring Practice landing film */
.acp-credits {
  position: absolute; right: 1.6rem; bottom: 1.2rem; z-index: 5;
  font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(250,250,248,0.55);
  text-shadow: 0 1px 8px rgba(18,18,17,0.6); pointer-events: none;
}

/* Palenque notes: a static flow — each paragraph with its own pictures beside it */
.notes-flow { max-width: var(--max); margin: 0 auto; padding: 7.5rem 2rem 3rem; }
.notes-flow .notes-hero { margin-bottom: 4rem; max-width: 46%; }
.note-row {
  display: grid; grid-template-columns: 44% 52%; gap: 4%;
  align-items: center; margin-bottom: 5.5rem;
}
.note-row .ntext p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.note-row .ntext p + p { margin-top: 1.5em; }
.note-row .ntext .note-head { margin-top: 0; }
/* text and pictures on the same line — the paragraph sits centred beside its frame */
.note-row .nside .frame.tall { aspect-ratio: 4 / 3.6; max-height: calc(100svh - 14rem); }
@media (max-width: 900px) {
  .notes-flow .notes-hero { max-width: none; }
  .note-row { grid-template-columns: 1fr; gap: 1.6rem; }
  .note-row .nside { position: static; }
}

/* Palenque notes: each chapter of text carries its own pictures */
.secmedia { display: none; width: 100%; }
.secmedia .frame, .secmedia .frame.tall { max-height: calc(100svh - 16rem); }
.secmedia.on { display: block; animation: secfade 0.7s ease; }
@keyframes secfade { from { opacity: 0; } to { opacity: 1; } }
.slideshow .slide video { width: 100%; height: 100%; object-fit: contain; display: block; }
.secmedia .scanrow { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.1rem; }
.secmedia .scanrow button {
  font-family: var(--sans); font-weight: 500; font-size: 0.76rem; letter-spacing: 0.04em;
  color: var(--bone); background: transparent; border: 1px solid rgba(250,250,248,0.3);
  border-radius: 999px; padding: 0.45rem 1rem; cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}
.secmedia .scanrow button:hover { background: var(--night-soft); border-color: rgba(250,250,248,0.6); }
.secmedia .media-credit {
  text-align: center; margin-top: 0.9rem;
  font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: rgba(250,250,248,0.5);
}

/* section heads inside the Palenque notes */
.note-head {
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.01em; margin: 2.4em 0 0.7em;
}
.frag .note-head:first-child { margin-top: 0; }

/* the subtitle under the Frequencies title */
.world-panel .wp-subtitle {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.35;
  opacity: 0.85; margin: -0.6rem 0 1.4rem; text-align: left; hyphens: none; -webkit-hyphens: none;
}

/* scroll cue at the bottom of a video hero */
.scroll-cue {
  position: absolute; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
  z-index: 5; color: rgba(250,250,248,0.85); font-family: var(--sans); font-size: 1.15rem;
  text-shadow: 0 1px 8px rgba(18,18,17,0.6); pointer-events: none;
  animation: cue-nudge 2.2s ease-in-out infinite;
}
.scroll-cue { font-size: 1.7rem; }
/* braiding: text left, film right */
.wb-row {
  max-width: var(--max); margin: 5rem auto 0; padding: 0 2rem;
  display: grid; grid-template-columns: 36% 64%; gap: 2.8rem; align-items: center;
}
.wb-row .frag { margin: 0; padding: 0; max-width: none; }
.wb-row .player { margin: 0; padding: 0; max-width: none; }
@media (max-width: 900px) { .wb-row { grid-template-columns: 1fr; gap: 2rem; } }
@keyframes cue-nudge {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* support credit — A Caring Practice */
.support-band {
  max-width: var(--max); margin: 5.5rem auto 0; padding: 2.4rem 2rem 0;
  border-top: 1px solid rgba(22,22,21,0.14);
  display: flex; gap: 2.5rem; align-items: flex-start;
}
.support-band .sf-logo {
  font-family: var(--sans); font-weight: 700; font-size: 1.02rem;
  line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap;
}
.support-band .sf-text {
  font-family: var(--sans); font-size: 0.88rem; line-height: 1.65;
  color: var(--ink-soft); max-width: 36rem;
}
/* night variants for the work-page furniture (the three parts live on black) */
body.night .work-kicker { color: rgba(250,250,248,0.6); }
body.night .media-label { color: rgba(250,250,248,0.55); }
body.night .slideshow .slidecap { color: rgba(250,250,248,0.65); }
body.night .slideshow .slidecount { color: rgba(250,250,248,0.45); }
body.night .work-fields { border-top-color: rgba(250,250,248,0.18); }
body.night .work-fields .wf-label { color: rgba(250,250,248,0.55); }
body.night .support-band { border-top-color: rgba(250,250,248,0.18); }
body.night .support-band .sf-logo { color: var(--bone); }
body.night .support-band .sf-text { color: rgba(250,250,248,0.6); }
@media (max-width: 700px) { .support-band { flex-direction: column; gap: 0.9rem; } }

/* YouTube embeds: the heavy films live on YouTube */
.yt-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.yt-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   PHONES — one site, reflowed (≤700px)
   ============================================================ */
@media (max-width: 700px) {
  /* header: never wraps */
  .site-head { padding: 0.85rem 1.1rem; font-size: 0.66rem; align-items: center; }
  .site-head .wordmark { white-space: nowrap; letter-spacing: 0.07em; }
  .site-head nav { gap: 0.9rem; transform: none; }
  .head-title { display: none; }

  /* the map: portrait constellation, titles always on screen */
  .cstar { transform: none; }
  .cstar:nth-child(1) { left: 8% !important; top: 16% !important; }
  .cstar:nth-child(2) { left: 46% !important; top: 33% !important; }
  .cstar:nth-child(3) { left: 10% !important; top: 52% !important; }
  .cstar:nth-child(4) { left: 42% !important; top: 71% !important; }
  .cstar .cname { font-size: 1.15rem; }
  .cstar .cpreview { display: none; }
  .cstar .csub { opacity: 1; transform: none; }

  /* the world: text above, objects walk below */
  .world-panel {
    top: 4.6rem; left: 1.2rem; right: 1.2rem; width: auto;
    transform: none; max-height: 44vh;
  }
  .world-panel .wp-fixedtitle { font-size: 1.5rem; }
  .world-panel .wp-subtitle { font-size: 1rem; margin-top: -0.4rem; }
  .world-panel > p { font-size: 0.94rem; line-height: 1.65; }
  .wobj .othumb { width: 12.5rem; height: 12.5rem; }
  .wobj::before { width: 20rem; height: 20rem; }
  .wobj .oname { font-size: 0.95rem; }
  .world-hud { font-size: 0.56rem; letter-spacing: 0.16em; width: 90vw; }

  /* misc */
  .back-pill { top: 0.9rem; left: 0.9rem; font-size: 0.72rem; padding: 0.45rem 0.9rem; }
  .acp-credits { right: 1rem; bottom: 0.9rem; font-size: 0.55rem; }
  .support-band { margin-top: 3.5rem; }
  .notes-flow { padding-top: 5.5rem; }
}

/* phones: the anarchive text flows before the walk */
.world-panel.flowed {
  position: static; transform: none; width: auto; max-height: none;
  overflow: visible; margin: 5.5rem 1.3rem 1rem; padding: 0;
}
.world-panel.flowed .wp-more { display: none; }

@media (max-width: 700px) {
  /* work pages: pictures first, then the text — everything full width */
  .project-split.media-right { grid-template-columns: 1fr; }
  .project-split.media-right .split-media { order: 0; position: static; height: auto; padding: 4.6rem 1.2rem 0; }
  .project-split.media-right .split-text { order: 1; padding: 1.4rem 1.2rem 2.5rem; }
  .split-text .title { font-size: clamp(1.6rem, 7vw, 2.1rem) !important; }
  .work-fields { grid-template-columns: 1fr; gap: 0.9rem; }
  .slideshow .frame, .slideshow .frame.tall { max-height: 58svh; }
  .page-hero { padding: 2rem 1.2rem 1.6rem; }
  .frag { padding: 0 1.2rem; }
  .world-track { height: 1000vh !important; }
}
