/* Sappy Arts. Black paper, bone-white spores, brown spores for the quiet parts. */
:root {
  --paper: #000000;
  --bone: #e6dfd3;
  --spore: #9a7b66;
  --umber: #5e4a3e;
  --gutter: clamp(1rem, 4.5vw, 4.5rem);
  --fell: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--bone);
  font-family: var(--fell);
  font-size: 1.125rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration-color: var(--umber); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--bone); }
:focus-visible { outline: 1px solid var(--bone); outline-offset: 4px; }

.skip { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--bone); color: var(--paper); font-family: var(--sans); z-index: 10; }
.skip:focus { left: var(--gutter); }

/* ── masthead ─────────────────────────────────────────── */
.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.5rem var(--gutter) 0;
  position: relative;
  z-index: 2;
}
.wordmark { font-size: 1.5rem; text-decoration: none; letter-spacing: 0.01em; }
.masthead nav { text-shadow: 0 0 0.6rem #000, 0 0 1rem #000; display: flex; flex-wrap: wrap; gap: 0.25rem 1.6rem; font-family: var(--sans); font-size: 0.95rem; }
.masthead nav a { color: var(--spore); text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current] { color: var(--bone); }
.masthead nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--umber); }

/* ── home: the print ─────────────────────────────────── */
.hero {
  position: relative;
  min-height: max(100vh, 34rem);
  display: grid;
  align-items: end;
  padding: 0 var(--gutter) clamp(3rem, 8vh, 6rem);
  margin-top: -3.5rem;
  overflow: hidden;
}
.print {
  position: absolute;
  width: min(96vh, 84vw);
  height: min(96vh, 84vw);
  top: 50%;
  right: max(-16vw, -18vh);
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-text { position: relative; max-width: 46rem; }
.hero h1 {
  font-weight: 400;
  font-size: clamp(3rem, 8.4vw, 7.6rem);
  line-height: 0.92;
  letter-spacing: -0.012em;
  margin: 0 0 1.5rem;
  text-shadow: 0 0 1.2rem #000, 0 0 2.4rem #000;
}
.hero p {
  font-style: italic;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.5;
  max-width: 28em;
  margin: 0;
  color: var(--bone);
  text-shadow: 0 0 0.8rem #000, 0 0 1.6rem #000;
}

/* ── rooms and walls ──────────────────────────────────── */
.room { padding: clamp(4rem, 10vh, 8rem) var(--gutter) 0; }
.room-first { padding-top: clamp(3rem, 8vh, 6rem); }
.room-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 5vh, 4rem); }
.room-head h1, .room-head h2, .room h1 {
  font-weight: 400;
  font-size: clamp(2.1rem, 4.2vw, 3.3rem);
  line-height: 1.05;
  margin: 0;
}
.room-head p { font-style: italic; color: var(--spore); font-size: 1.2rem; margin: 0.6rem 0 0; }

/* Justified rows: each piece keeps its own proportions and grows to fill the row. */
.wall { display: flex; flex-wrap: wrap; gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 3vw, 3rem); align-items: flex-start; }
.wall-end { flex: 1000 1 0; }
.tile {
  flex: var(--r) 1 calc(var(--r) * 17rem);
  max-width: calc(var(--r) * 34rem);
  text-decoration: none;
  display: block;
}
.tile img { width: 100%; background: #0d0a08; }
.cap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.8rem; margin-top: 0.7rem; line-height: 1.35; }
.cap .t { font-style: italic; font-size: 1.08rem; }
.cap .n { font-family: var(--sans); font-size: 0.82rem; color: var(--spore); }
.tile:hover .t { text-decoration: underline; text-decoration-color: var(--umber); text-underline-offset: 0.2em; }
.tile:focus-visible { outline-offset: 8px; }

/* ── one piece ────────────────────────────────────────── */
.piece {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 24rem);
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2rem, 6vh, 4rem) var(--gutter) 0;
  align-items: start;
}
.piece-media { display: grid; gap: clamp(2rem, 5vh, 4rem); }
.piece-media figure { margin: 0; }
.piece-media img, .piece-media video { max-height: 88vh; width: auto; margin-inline: auto; background: #0d0a08; }
.piece-media video { width: 100%; object-fit: contain; }
.piece-text { position: sticky; top: 2rem; }
.piece-text h1 { font-weight: 400; font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.1; margin: 0 0 0.5rem; }
.back, .when, .ig, .pager { font-family: var(--sans); font-size: 0.88rem; color: var(--spore); }
.back { margin: 0 0 1.4rem; }
.back a, .ig a, .pager a { color: var(--spore); }
.back a:hover, .ig a:hover, .pager a:hover { color: var(--bone); }
.when { margin: 0 0 1.6rem; }
.words p { margin: 0 0 1em; max-width: 36em; }
.words a { overflow-wrap: anywhere; }
.ig { margin-top: 2rem; }
.pager { display: flex; gap: 1.6rem; margin-top: 0.8rem; }

/* ── about ────────────────────────────────────────────── */
.about { max-width: 40rem; padding: clamp(3rem, 8vh, 6rem) var(--gutter) 0; font-size: 1.22rem; }
.about h1 { font-weight: 400; font-size: clamp(2.1rem, 4.2vw, 3.3rem); margin: 0 0 2rem; line-height: 1.05; }
.about h2 { font-weight: 400; font-size: 1.7rem; margin: 3rem 0 1rem; }
.about blockquote { margin: 2.6rem 0; padding: 0; font-style: italic; font-size: 1.45rem; line-height: 1.45; }
.about blockquote p { margin: 0 0 0.8rem; }
.about blockquote footer { font-style: normal; font-family: var(--sans); font-size: 0.88rem; color: var(--spore); }

/* ── footer ───────────────────────────────────────────── */
.foot { padding: clamp(5rem, 14vh, 9rem) var(--gutter) 2.5rem; font-family: var(--sans); font-size: 0.88rem; color: var(--spore); }
.foot p { margin: 0; max-width: 40rem; }
.foot a { color: var(--spore); }
.foot a:hover { color: var(--bone); }

/* ── small screens ────────────────────────────────────── */
@media (max-width: 52rem) {
  .piece { grid-template-columns: 1fr; }
  .piece-text { position: static; order: 1; }
  .piece-media { display: contents; }
  .piece-media figure { order: 2; }
  .piece-media figure:first-child { order: 0; }
  .piece-media img, .piece-media video { max-height: none; width: 100%; }
}
@media (max-width: 40rem) {
  body { font-size: 1.06rem; }
  .hero { min-height: 88svh; margin-top: 0; padding-top: 0; }
  .print { width: 130vw; height: 130vw; top: 3.5rem; right: -55vw; transform: none; }
  .tile { flex-basis: calc(var(--r) * 9.5rem); }
  .masthead nav { gap: 0.25rem 1.1rem; }
}
