@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Mono:wght@400;500&family=Instrument+Serif:ital@0;1&family=Space+Mono:wght@400;700&display=swap');

:root {
  --black: #191424;
  --paper: #f2eadb;
  --lime: #e4f77c;
  --mono: 'DM Mono', monospace;
  --display: 'Archivo Black', Impact, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --gutter: clamp(20px, 6vw, 100px);
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--black); font-family: var(--mono); }
a { color: inherit; }
button { font: inherit; }
button:hover { cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
h1, h2, h3, p, figure { margin: 0; }
canvas { display: block; width: 100%; height: 100%; }
.eyebrow { font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.masthead {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 15px 24px; padding: 17px var(--gutter); border-bottom: 1px solid var(--rule, #ffffff35);
  color: var(--head-ink, #f2eadb); background: var(--head-bg, #191424);
  font-size: .76rem; letter-spacing: .065em; text-transform: uppercase;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; }
.wordmark span { color: var(--head-accent, var(--lime)); font-size: 1.45rem; line-height: 1; }
.masthead nav { display: flex; gap: clamp(14px, 3vw, 38px); }
.masthead nav a { text-decoration-thickness: 1px; text-underline-offset: 5px; }
.masthead nav a:not(:hover, [aria-current]) { text-decoration: none; }

.home { --head-bg: #191424; }
.prologue {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
  gap: clamp(26px, 5vw, 88px); padding: clamp(42px, 6vw, 100px) var(--gutter);
  background: #191424; color: var(--paper);
}
.prologue:focus { outline: none; }
.prologue .eyebrow { color: #d4c4e5; display: flex; align-items: center; gap: 9px; }
.prologue .eyebrow span { width: 7px; aspect-ratio: 1; border-radius: 50%; background: #f875a3; }
.prologue :is(h1, h2) {
  font-family: var(--serif); font-size: clamp(3.5rem, 7.8vw, 8.65rem);
  line-height: .85; font-weight: 400; letter-spacing: -.045em; margin: 22px 0 28px;
}
.prologue :is(h1, h2) em { display: block; color: var(--lime); font-weight: 400; }
.intro { color: #e6d9e9; font-size: clamp(.89rem, 1.2vw, 1.05rem); line-height: 1.75; max-width: 48ch; }
.source { margin-top: 25px; color: #eee1f4; font-size: .77rem; }
.source a { text-underline-offset: 5px; }
.source a:hover { color: var(--lime); }
.specimen { min-width: 0; }
.specimen-stage {
  position: relative; overflow: hidden; isolation: isolate; aspect-ratio: 1.53;
  background: #31254a; border: 1px solid #ddcaff55;
}
.specimen-words { position: absolute; inset: 0; pointer-events: none; display: grid; place-content: center; }
.specimen-words b {
  display: block; font: 500 clamp(1.32rem, 3vw, 3.9rem)/1.1 var(--display); letter-spacing: -.045em;
  color: var(--lime); text-align: center; text-shadow: 2px 3px #1e1639;
  transition: transform 650ms cubic-bezier(.19,1,.22,1), color 400ms;
}
.specimen-stage[data-state="process"] b:nth-child(1) { transform: translate(-34%, 12%) rotate(-13deg); }
.specimen-stage[data-state="process"] b:nth-child(2) { transform: translate(24%, -3%) rotate(8deg); color: #fff3d4; }
.specimen-stage[data-state="process"] b:nth-child(3) { transform: translate(4%, 13%) rotate(-6deg); color: #ff8bab; }
.specimen-stage[data-state="object"] b { color: #f2eadb; }
.specimen figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 13px; }
.switch { display: inline-flex; border: 1px solid #78698b; border-radius: 4px; padding: 3px; gap: 3px; }
.switch button {
  padding: 8px 9px; font-size: .68rem; background: transparent; border: 0; border-radius: 2px; color: #f5eadc;
}
.switch button:hover { background: #ffffff24; }
.switch button[aria-pressed="true"] { color: #191424; background: var(--lime); font-weight: 500; }
.specimen-note { font-size: .72rem; line-height: 1.5; color: #d4c4e5; }

.collection { padding: clamp(35px, 4.8vw, 76px) var(--gutter) clamp(52px, 6vw, 95px); }
.collection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.collection-heading h2 { font: 400 clamp(3rem, 6vw, 6rem)/.86 var(--serif); letter-spacing: -.035em; }
.collection-heading p { font-size: .79rem; line-height: 1.55; max-width: 34ch; }
.poem-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(13px, 2.3vw, 36px); }
.poem-card { display: block; color: inherit; text-decoration: none; border: 1px solid #20172865; }
.poem-card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.card-art { aspect-ratio: 1.6; overflow: hidden; }
.card-art canvas { transition: transform 450ms ease; }
.poem-card:hover canvas { transform: scale(1.045); }
.card-city .card-art, .city-art { background: #a21e28; }
.card-map .card-art, .map-art { background: #142125; }
.card-return .card-art, .return-art { background: #d4ae86; }
.card-copy { position: relative; min-height: 90px; padding: 13px 37px 14px 13px; border-top: 1px solid #20172865; }
.card-motif { font-size: .63rem; letter-spacing: .07em; text-transform: uppercase; }
.card-copy h3 { font: 400 clamp(1.65rem, 3vw, 3rem)/1 var(--serif); margin-top: 6px; }
.card-arrow { position: absolute; right: 13px; bottom: 15px; font-size: 1.1rem; }
.colophon {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  padding: 20px var(--gutter); border-top: 1px solid var(--rule, #20172865);
  font-size: .68rem; line-height: 1.5;
}

.poem-page { background: var(--bg); color: var(--fg); --head-bg: var(--bg); --head-ink: var(--fg); --head-accent: var(--accent); }
.city { --bg: #241415; --fg: #fff0da; --accent: #ff9869; --rule: #ffad7d56; }
.map { --bg: #142125; --fg: #e2ecd9; --accent: #ddf881; --rule: #b5e0a64a; font-family: 'Space Mono', var(--mono); }
.return { --bg: #eee1ca; --fg: #382327; --accent: #793243; --rule: #79324355; }
.poem-main { padding: 0 var(--gutter); }
.poem-layout {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center;
  gap: clamp(25px, 5vw, 92px); padding: clamp(36px, 6vw, 100px) 0 clamp(42px, 5vw, 90px);
}
.poem-copy { min-width: 0; }
.poem-copy .eyebrow { color: var(--accent); }
.poem-copy h1 { margin: 20px 0 clamp(22px, 3.2vw, 47px); }
.poem-copy h1 em { color: var(--accent); }
.verse { display: grid; gap: 5px; font-size: clamp(.96rem, 1.35vw, 1.3rem); line-height: 1.58; }
.verse span { display: block; }
.poem-figure { min-width: 0; }
.poem-art { position: relative; aspect-ratio: 1.38; border: 1px solid var(--rule); overflow: hidden; }
.poem-figure figcaption { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 15px; margin-top: 13px; }
.poem-figure figcaption p { font-size: .73rem; line-height: 1.5; flex: 1 1 150px; }
.action {
  color: var(--fg); background: transparent; border: 1px solid var(--accent); padding: 9px 12px;
  font-size: .75rem; line-height: 1.2; text-align: left;
}
.action:hover, .poem-page[data-state="1"]:is(.city, .return) [data-effect] { color: var(--bg); background: var(--accent); }
.reading-note {
  display: grid; grid-template-columns: minmax(125px, .42fr) minmax(0, 1.25fr) auto;
  align-items: start; gap: 12px 28px; border-top: 1px solid var(--rule); padding: 25px 0;
}
.reading-note h2 { font-size: .75rem; line-height: 1.6; text-transform: uppercase; letter-spacing: .09em; color: var(--accent); }
.reading-note p { font-size: .83rem; line-height: 1.6; max-width: 65ch; }
.copy-control { display: grid; justify-items: start; gap: 7px; }
.copy-control span { font-size: .68rem; }
.poem-nav {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 21px 0 29px; border-top: 1px solid var(--rule); font-size: clamp(.82rem, 1.5vw, 1.1rem);
}
.poem-nav a { text-decoration: none; }
.poem-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.poem-nav a:last-child { text-align: right; }
.poem-nav a span { display: block; color: var(--accent); font-size: .62rem; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .08em; }

.city .poem-copy h1 {
  font: 400 clamp(3.1rem, 7vw, 8rem)/.84 var(--display); letter-spacing: -.095em;
  text-transform: uppercase;
}
.city .poem-copy h1 em { display: block; font-style: normal; }
.city .verse span:last-child { transition: transform 360ms ease, color 360ms; }
.city[data-state="1"] .verse span:last-child { transform: translateX(10px) rotate(-1.5deg); color: var(--accent); transform-origin: left; }
.city .poem-art { box-shadow: 7px 7px 0 #a43e3380; }

.map .poem-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.map .poem-figure { grid-row: 1; grid-column: 1; }
.map .poem-copy { grid-column: 2; grid-row: 1; }
.map .poem-copy h1 { font: 700 clamp(2.8rem, 6.45vw, 6.5rem)/.93 'Space Mono', monospace; letter-spacing: -.1em; }
.map .poem-copy h1 em { font-style: normal; }
.map .poem-art { aspect-ratio: 1.18; }
.map .verse span { border-left: 2px solid transparent; padding-left: 10px; }
.map:not([data-state]) .verse span:first-child, .map[data-state="0"] .verse span:first-child,
.map[data-state="1"] .verse span:nth-child(2), .map[data-state="2"] .verse span:last-child {
  border-color: var(--accent); color: var(--accent);
}

.return .poem-layout { grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); }
.return .poem-copy h1 {
  font: 400 clamp(3.65rem, 8.3vw, 9rem)/.8 var(--serif); letter-spacing: -.04em;
}
.return .poem-copy h1 em { display: block; }
.return .verse { font: 400 clamp(1.35rem, 2.25vw, 2.1rem)/1.26 var(--serif); gap: 7px; }
.return .poem-figure { padding: 12px; background: #f5e8d3; border: 1px solid var(--rule); transform: rotate(-1deg); }
.return .poem-art { aspect-ratio: 1.42; }

.cover-content :is(h1, h2) { color: #fff3a3; }
.cover-content button {
  font: 500 .76rem var(--mono); letter-spacing: .035em; text-transform: uppercase;
  border: 3px solid #20113d; padding: 14px 18px; transition: transform .2s;
}
.cover-content button:hover { transform: translate(2px, 2px); }
.cover-content button:focus-visible { outline-color: #fff3a3; }

@media (max-width: 960px) {
  .specimen figcaption { gap: 8px 13px; }
  .reading-note { grid-template-columns: minmax(0, 1fr) auto; }
  .reading-note h2 { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .prologue, .poem-layout, .map .poem-layout, .return .poem-layout { grid-template-columns: minmax(0, 1fr); }
  .prologue { align-items: start; }
  .prologue :is(h1, h2) { font-size: clamp(3.5rem, 11.1vw, 5.8rem); }
  .prologue :is(h1, h2) em { display: inline; }
  .specimen-words b { font-size: clamp(1.7rem, 6.6vw, 3.1rem); }
  .collection-heading { align-items: start; flex-direction: column; gap: 10px; }
  .poem-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
  .map .poem-copy, .map .poem-figure { grid-area: auto; }
  .map .poem-art { aspect-ratio: 1.32; }
  .poem-copy h1 { margin-top: 15px; }
  .city .poem-copy h1 { font-size: clamp(3.2rem, 11vw, 5rem); }
  .map .poem-copy h1 { font-size: clamp(3.2rem, 10.5vw, 5rem); }
  .return .poem-copy h1 { font-size: clamp(4rem, 12vw, 6.8rem); }
  .city .poem-copy h1 em, .return .poem-copy h1 em { display: inline; }
  .reading-note { grid-template-columns: 1fr; }
}
@media (max-width: 365px) {
  .masthead { letter-spacing: 0; gap: 11px; }
  .masthead nav { gap: 11px; }
  .poem-figure figcaption { align-items: flex-start; flex-direction: column; }
  .poem-figure figcaption p { flex: initial; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; }
}
