/* Laurel Moon
   Colors, type and spacing for the whole site. Change a token here and it
   changes everywhere. */

:root {
  --ground: #E8ECE6;
  --ground-deep: #DDE3DA;
  --paper: #F1F3EF;
  --field: #F6F7F4;
  --rule: #C9D1C7;
  --control: #7A897E;
  --ink: #1C2B24;
  --muted: #4E5D55;
  --laurel: #24402F;
  --laurel-hover: #1A3023;
  --on-laurel: #F3F5F1;
  --laurel-muted: #B7C7B9;
  --night: #1B2440;
  --night-ink: #DCE2EE;
  --night-muted: #B3BCD0;
  --light-title: #F4F2EA;
  --moon: #EAD58F;
  --moon-hover: #F1E2AA;
  --moon-deep: #B8963A;
  --focus: #3D6FE0;

  --display: "Bodoni Moda", Didot, "Bodoni 72", Georgia, serif;
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Helvetica, sans-serif;
}

/* ---- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--laurel); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-weight: 400; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 10;
  padding: 12px 18px; border-radius: 999px;
  background: var(--laurel); color: var(--on-laurel);
  font-family: var(--sans); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-laurel); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---- Layout -------------------------------------------------------------- */

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }
.wrap--mid { max-width: 1000px; }
.wrap--narrow { max-width: 760px; }

.section { padding-block: 104px; }
.section--flush-top { padding-top: 0; }
.section--rule { border-top: 1px solid var(--rule); padding-block: 88px; }
.section--contents { padding-top: 24px; }
.section--rule + .section--contents { padding-top: 24px; }

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 20px 40px;
}
.section-head--divided { padding-top: 72px; border-top: 1px solid var(--rule); }

.two-col { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 64px 120px; }
.two-col > * { flex: 1 1 440px; min-width: 0; }

/* ---- Type ---------------------------------------------------------------- */

.display { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.08; }
.h-section { font-size: clamp(34px, 4vw, 52px); }
.h-sub { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; }
.h-small { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.lede { margin: 16px 0 0; max-width: 34em; font-size: 19px; line-height: 1.65; color: var(--muted); }
.body-lg { margin: 20px 0 0; font-size: 19px; line-height: 1.7; }
.small-heading { margin: 48px 0 8px; font-family: var(--sans); font-size: 16px; font-weight: 600; }
.more-link { margin: 16px 0 0; font-family: var(--sans); font-size: 15px; font-weight: 500; }
.byline { margin: 20px 0 0; font-size: 19px; font-style: italic; }

.prose { font-size: 20px; line-height: 1.75; }
.prose > :first-child { margin-top: 24px; }
.prose p { margin: 0 0 18px; }
.prose h2, .prose h3 { margin: 40px 0 12px; font-family: var(--display); line-height: 1.15; }
.prose h2 { font-size: 30px; }
.prose h3 { font-size: 24px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 1.2em; }
.prose--lead { font-size: 21px; }

/* ---- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px;
  font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease;
}
.btn--laurel { background: var(--laurel); color: var(--on-laurel); }
.btn--laurel:hover { background: var(--laurel-hover); color: var(--on-laurel); }
.btn--outline { border-color: var(--laurel); background: transparent; color: var(--laurel); }
.btn--outline:hover { background: rgba(36, 64, 47, .08); color: var(--laurel); }
.btn--moon { background: var(--moon); color: var(--night); }
.btn--moon:hover { background: var(--moon-hover); color: var(--night); }
.btn--ghost-light { border-color: rgba(220, 226, 238, .45); background: transparent; color: var(--light-title); }
.btn--ghost-light:hover { background: rgba(220, 226, 238, .1); color: var(--light-title); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-top: 40px; }
.notice { margin: 0; font-family: var(--sans); font-size: 15px; color: var(--muted); }

/* ---- Header -------------------------------------------------------------- */

.site-header { background: var(--ground); border-bottom: 1px solid var(--rule); }
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 32px; padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--display); font-size: 27px; font-weight: 500; }
.brand-moon { width: 26px; --moon-color: var(--moon-deep); --cover: var(--ground); }

.nav-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px;
  font-family: var(--sans); font-size: 16px; font-weight: 500;
}
.nav-links a:not(.btn) {
  display: inline-flex; align-items: center; min-height: 48px;
  color: var(--ink); text-decoration: none;
  /* The underline is a background line, so it can grow in from the left. */
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 0 calc(50% + 0.85em); background-size: 0% 2px;
  transition: background-size .3s cubic-bezier(.2, .7, .2, 1);
}
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"]:not(.btn) { background-size: 100% 2px; }
.nav-links .btn { min-height: 44px; padding: 0 20px; }

.nav-toggle {
  display: none; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--control); border-radius: 999px; background: transparent; color: var(--ink);
  font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer;
}

@media (max-width: 760px) {
  .js .nav-toggle { display: inline-flex; }
  .js .nav-links { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .js .nav-links.is-open { display: flex; }
  .nav-links .btn { margin-top: 8px; }
}

/* ---- Moon and covers ----------------------------------------------------- */

/* A moon is a lit disc with a shadow disc slid across it.
   --phase: 0 is a new moon, 100 is full. --cover is the shadow color. */
.moon {
  position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
  background: var(--moon-color, var(--moon));
}
.moon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--cover, var(--night));
  transform: translateX(calc(var(--phase, 36) * -1%));
}
.moon--ring { border: 1px solid rgba(234, 213, 143, .35); }

.cover {
  container-type: inline-size;
  display: flex; flex-direction: column; justify-content: space-between;
  width: 100%; aspect-ratio: 3 / 4; padding: 8%; border-radius: 4px; overflow: hidden;
  background: var(--cover, var(--night)); color: #EEF1EC;
}
.cover .moon { width: 58%; margin-inline: auto; }
.cover-masthead { font-family: var(--display); font-size: 8cqi; line-height: 1.1; }
.cover-title { font-family: var(--display); font-size: 10cqi; line-height: 1.1; }
.cover--lg { box-shadow: 0 30px 60px -30px rgba(27, 36, 64, .6); }
.cover--sm .moon { width: 62%; margin-bottom: 18%; }
.cover--sm .cover-title { display: none; }
.cover--sm .cover-masthead { font-size: 10cqi; }
.cover--image { padding: 0; background: var(--ink); }
.cover--image img { width: 100%; height: 100%; object-fit: cover; }

/* ---- Home: hero ---------------------------------------------------------- */

.hero { position: relative; overflow: hidden; background: var(--night); color: var(--night-ink); }
.hero-stars { position: absolute; inset: 0; pointer-events: none; }
.hero-star {
  position: absolute; width: var(--size, 2px); height: var(--size, 2px); border-radius: 50%;
  background: var(--light-title); opacity: .4;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 72px 80px; padding-block: 88px 104px;
}
.hero-text { flex: 1 1 520px; min-width: 0; max-width: 640px; }
.hero-kicker { margin: 0 0 24px; font-family: var(--sans); font-size: 15px; font-weight: 500; color: var(--moon); }
.hero-title {
  margin: 0; font-family: var(--display); font-size: clamp(44px, 6vw, 80px); font-weight: 400;
  line-height: 1; letter-spacing: -0.01em; color: var(--light-title);
}
.hero .byline { color: var(--night-muted); }
.hero-poem { margin-top: 40px; font-size: 21px; color: var(--night-ink); }
.hero-prose { margin: 40px 0 0; font-size: 21px; line-height: 1.75; color: var(--night-ink); }
.hero-image { margin-top: 40px; max-height: 440px; width: auto; border-radius: 4px; }
.hero-moon { position: relative; flex: 0 1 420px; min-width: 240px; padding-left: 56px; color: var(--moon); }
.hero-moon .moon { width: 100%; --cover: var(--night); --phase: 36; }
.hero-sprig { position: absolute; left: 0; bottom: -40px; width: 38%; height: auto; overflow: visible; }

@media (max-width: 760px) {
  .hero-inner { padding-block: 48px 72px; gap: 40px; }
  .hero-moon { order: -1; flex: 0 0 auto; width: 200px; min-width: 0; padding-left: 40px; }
  .hero-sprig { bottom: -24px; }
}

/* ---- Poems --------------------------------------------------------------- */

/* Each line is its own row so long lines wrap with a hanging indent,
   the way poems are set in print. Spaces at the start of a line are kept. */
.poem { font-size: 21px; line-height: 1.75; }
.poem-line {
  display: block; min-height: 1.75em; padding-left: 1.5em; text-indent: -1.5em;
  white-space: pre-wrap; overflow-wrap: break-word;
}

/* ---- Home: current issue and back issues --------------------------------- */

.issue-feature { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px 88px; }
.issue-feature-cover { flex: 0 1 360px; min-width: 240px; display: block; }
.issue-feature-text { flex: 1 1 480px; min-width: 0; }

.toc { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.toc li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.toc-title { font-size: 20px; color: var(--ink); }
.toc-meta { display: flex; align-items: baseline; gap: 16px 20px; font-family: var(--sans); font-size: 14px; color: var(--muted); }
.toc-genre { min-width: 48px; text-align: right; }
.toc--large { margin-top: 32px; }
.toc--large li { padding: 22px 0; }
.toc--large .toc-title { font-size: 23px; }
.toc-main { min-width: 0; }
.toc-by { margin: 6px 0 0; font-family: var(--sans); font-size: 15px; color: var(--muted); }
.badge { padding: 4px 10px; border-radius: 999px; background: var(--night); color: var(--moon); }

.issue-grid {
  margin: 40px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 24px;
}
.issue-grid--archive { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 40px 24px; }
.issue-card { display: flex; flex-direction: column; gap: 12px; color: var(--ink); text-decoration: none; }
.issue-card:hover { color: var(--ink); }
.issue-card-name { font-size: 19px; line-height: 1.3; }
.issue-card:hover .issue-card-name { text-decoration: underline; }
.issue-card-note { margin-top: -10px; font-family: var(--sans); font-size: 14px; color: var(--muted); }

/* ---- Home: submissions band ---------------------------------------------- */

.band-laurel { background: var(--laurel); color: #E3EAE1; }
.band-laurel h2 { color: var(--light-title); }
.band-inner { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px 96px; padding-block: 96px; }
.band-text { flex: 1 1 460px; min-width: 0; }
.band-lede { margin: 20px 0 0; max-width: 32em; font-size: 19px; line-height: 1.65; }

.facts {
  flex: 1 1 380px; margin: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px;
  font-family: var(--sans);
}
.facts dt { font-size: 14px; color: var(--laurel-muted); }
.facts dd { margin: 6px 0 0; font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--light-title); }
.facts--light { margin-top: 40px; max-width: 640px; }
.facts--light dt { color: var(--muted); }
.facts--light dd { color: var(--ink); }

/* ---- Home: about and events ---------------------------------------------- */

.events { margin: 24px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.events li { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.events h3 { margin: 0; font-size: 21px; font-weight: 500; line-height: 1.35; }
.events h3 a { color: var(--ink); }
.event-meta { margin: 6px 0 0; font-family: var(--sans); font-size: 15px; color: var(--muted); }
.event-details { margin: 8px 0 0; font-size: 17px; }
.events-empty { margin: 24px 0 0; font-size: 18px; color: var(--muted); }

/* ---- Inner pages --------------------------------------------------------- */

.page-head { padding-block: 48px 88px; }
.page-head--archive { padding-bottom: 40px; }
.breadcrumb { font-family: var(--sans); font-size: 15px; color: var(--muted); }
.breadcrumb span[aria-hidden] { margin: 0 10px; }
.page-title {
  margin: 0; font-family: var(--display); font-size: clamp(60px, 9vw, 128px); font-weight: 400;
  line-height: .95; letter-spacing: -0.02em;
}
.page-title--md { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; }
.page-head .lede { margin-top: 24px; font-size: 20px; }

.issue-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 56px 96px; margin-top: 40px;
}
.issue-head-text { flex: 1 1 520px; min-width: 0; }
.issue-head-cover { flex: 0 1 340px; min-width: 220px; }
.subtitle { margin: 24px 0 0; font-size: 23px; font-style: italic; }
.meta-line { margin: 20px 0 0; font-family: var(--sans); font-size: 16px; color: var(--muted); }
.meta-line--tight { margin-top: 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--sans); font-size: 15px; font-weight: 500; }
[data-contents] .chips { display: none; }
.js [data-contents] .chips { display: flex; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--laurel); border-radius: 999px; background: transparent; color: var(--laurel);
  font: inherit; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.chip:hover { background: rgba(36, 64, 47, .08); }
.chip[aria-pressed="true"] { background: var(--laurel); color: var(--on-laurel); }
.chip-count { opacity: .75; }

.band-soft { background: var(--ground-deep); padding-block: 88px; }
.band-soft-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.band-soft-inner > div { flex: 1 1 480px; min-width: 0; }
.staff-list {
  margin: 36px 0 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 32px 40px;
}
.staff-list dt { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.staff-list dd { margin: 6px 0 0; font-size: 20px; }

.issue-pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px; padding-block: 56px; font-family: var(--sans); font-size: 16px; font-weight: 500;
}
.issue-pager-links { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.issue-pager-links a { display: inline-flex; align-items: center; min-height: 48px; }

/* ---- Archive ------------------------------------------------------------- */

.archive-controls {
  margin-top: 44px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 32px;
  font-family: var(--sans);
}
.search { flex: 1 1 300px; max-width: 420px; }
.search label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.search-field { position: relative; color: var(--muted); }
.search-field svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); }
.search-field input {
  width: 100%; min-height: 50px; padding: 0 18px 0 48px;
  border: 1px solid var(--control); border-radius: 999px; background: var(--field); color: var(--ink);
  font: inherit; font-size: 16px;
}
.archive-count { margin: 28px 0 0; font-family: var(--sans); font-size: 15px; color: var(--muted); }
.empty-state { padding: 64px 32px; border: 1px dashed var(--control); border-radius: 8px; text-align: center; }
.empty-title { margin: 0; font-size: 23px; }
.empty-help { margin: 10px 0 24px; font-family: var(--sans); font-size: 15px; color: var(--muted); }

/* ---- Reader (poem, story, and artwork pages) ----------------------------- */

.reader {
  --r-muted: var(--muted); --r-rule: var(--rule); --r-btn: #FFFFFF; --reader-size: 21px;
  background: var(--paper); color: var(--ink);
  transition: background-color .3s ease, color .3s ease;
}
.reader.is-night {
  --r-muted: var(--night-muted); --r-rule: rgba(220, 226, 238, .28); --r-btn: rgba(220, 226, 238, .08);
  background: var(--night); color: var(--night-ink);
}
.reader a { color: inherit; }
.reader-inner { padding-block: 40px 104px; }
.reader-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
}
.reader-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.reader-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.reader-tools button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--r-rule); border-radius: 999px; background: var(--r-btn); color: inherit;
  font: inherit; cursor: pointer;
}
.reader-tools button[aria-pressed="true"] { border-color: currentColor; }
.tool-a { font-family: var(--display); line-height: 1; }
.tool-a--sm { font-size: 15px; }
.tool-a--lg { font-size: 22px; }

.reader-article { margin-top: 72px; }
.reader-kicker { margin: 0; font-family: var(--sans); font-size: 15px; color: var(--r-muted); }
.reader-title {
  margin: 16px 0 0; font-family: var(--display); font-size: clamp(42px, 6vw, 72px); font-weight: 400;
  line-height: 1.02; letter-spacing: -0.01em;
}
.reader-byline { margin-top: 18px; color: var(--r-muted); }
.reader-text { margin-top: 56px; font-size: var(--reader-size); line-height: 1.75; }
.reader-prose p { margin: 0 0 1em; }
.reader-statement { margin-top: 24px; font-size: 18px; color: var(--r-muted); }
.art-figure { margin: 56px 0 0; }
.art-figure img { max-height: 80vh; width: auto; margin-inline: auto; border-radius: 4px; }

.reader-bio { margin-top: 80px; padding-top: 32px; border-top: 1px solid var(--r-rule); }
.reader-bio h2 { margin: 0; font-family: var(--sans); font-size: 16px; font-weight: 600; }
.reader-bio p { margin: 12px 0 0; font-size: 19px; line-height: 1.7; color: var(--r-muted); }

.keep-reading { margin-top: 56px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.keep-reading a { display: flex; flex-direction: column; gap: 4px; min-height: 48px; text-decoration: none; }
.kr-label { font-family: var(--sans); font-size: 14px; color: var(--r-muted); }
.kr-title { font-size: 21px; text-decoration: underline; text-underline-offset: 4px; }
.keep-reading .kr-next { margin-left: auto; align-items: flex-end; text-align: right; }

/* ---- Footer -------------------------------------------------------------- */

.site-footer { background: var(--night); color: var(--night-muted); font-family: var(--sans); font-size: 15px; }
.site-footer a { color: var(--night-muted); }
.site-footer a:hover { color: var(--light-title); }
.site-footer h2 { margin: 0 0 8px; font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--light-title); }
.footer-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 72px; padding-block: 72px 40px; }
.footer-brand { flex: 1 1 280px; min-width: 0; }
.footer-wordmark {
  margin: 0; display: flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: 24px; color: var(--light-title);
}
.footer-moon { width: 24px; --cover: var(--night); }
.footer-tagline { margin: 16px 0 0; max-width: 24em; line-height: 1.6; }
.footer-nav { flex: 1 1 300px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; line-height: 2.2; }
.footer-news { flex: 1 1 320px; min-width: 0; }
.newsletter label { display: block; margin: 12px 0 8px; font-size: 14px; }
.newsletter-row { display: flex; flex-wrap: wrap; gap: 10px; }
.newsletter input[type="email"] {
  flex: 1 1 200px; min-width: 0; min-height: 48px; padding: 0 18px;
  border: 1px solid rgba(220, 226, 238, .45); border-radius: 999px; background: transparent;
  color: var(--light-title); font: inherit;
}
.newsletter input::placeholder { color: #8E98B0; }
.footer-contact { margin: 24px 0 0; line-height: 1.8; }
.footer-contact a { color: var(--light-title); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-block: 20px 32px; border-top: 1px solid rgba(220, 226, 238, .18); font-size: 14px;
}
.footer-bottom p { margin: 0; }

/* ---- Motion -------------------------------------------------------------
   Everything that moves lives here. People who ask their device to reduce
   motion get none of it: every animation below sits inside a
   prefers-reduced-motion: no-preference block. */

/* Covers lift and their moon grows fuller on hover. */
.cover { transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease; }
.moon::after { transition: transform .8s cubic-bezier(.3, .6, .2, 1); }
.toc-title { transition: transform .3s cubic-bezier(.2, .7, .2, 1); }

@media (hover: hover) {
  .issue-card:hover .cover,
  .issue-card:focus-visible .cover { transform: translateY(-6px); box-shadow: 0 24px 40px -24px rgba(27, 36, 64, .6); }
  .issue-feature-cover:hover .cover,
  .issue-feature-cover:focus-visible .cover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 44px 70px -32px rgba(27, 36, 64, .7); }
  .issue-card:hover .moon::after,
  .issue-card:focus-visible .moon::after,
  .issue-feature-cover:hover .moon::after,
  .issue-feature-cover:focus-visible .moon::after { transform: translateX(calc(min(var(--phase, 36) + 24, 100) * -1%)); }
  .brand:hover .brand-moon::after { transform: translateX(-100%); }
  .toc li:hover .toc-title { transform: translateX(6px); }
  .btn:hover { transform: translateY(-2px); }
  .btn--moon:hover { box-shadow: 0 10px 28px -10px rgba(234, 213, 143, .6); }
}
.btn:active { transform: translateY(0) scale(.98); }

@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes line-in { from { opacity: 0; transform: translateY(8px); filter: blur(2px); } }
@keyframes wax { from { transform: translateX(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes halo {
  from { box-shadow: 0 0 50px 0 rgba(234, 213, 143, .06); }
  to { box-shadow: 0 0 120px 14px rgba(234, 213, 143, .2); }
}
@keyframes sway { from { transform: rotate(-1.2deg); } to { transform: rotate(1.4deg); } }
@keyframes twinkle {
  0%, 100% { opacity: .12; transform: scale(.8); }
  50% { opacity: .8; transform: scale(1.2); }
}
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }

@media (prefers-reduced-motion: no-preference) {
  /* Home: the night sky */
  .hero-star { animation: twinkle var(--dur, 6s) ease-in-out var(--delay, 0s) infinite; }
  .hero-moon .moon { animation: halo 8s ease-in-out infinite alternate; }
  .hero-sprig { transform-origin: 40% 100%; animation: sway 10s ease-in-out infinite alternate; }

  /* Home: the opening, played once per visit (see the script in base.njk) */
  html:not(.hero-seen) .hero-moon .moon::after { animation: wax 2.6s cubic-bezier(.25, .6, .15, 1) .2s both; }
  html:not(.hero-seen) .hero-sprig path {
    stroke-dasharray: 1; stroke-dashoffset: 1;
    animation: draw .8s ease-out both;
    animation-delay: calc(1.1s + var(--n, 0) * .12s);
  }
  html:not(.hero-seen) .hero-sprig path:first-child { animation-duration: 1.4s; animation-delay: .6s; }
  html:not(.hero-seen) .hero-kicker,
  html:not(.hero-seen) .hero-title,
  html:not(.hero-seen) .hero .byline,
  html:not(.hero-seen) .hero-prose,
  html:not(.hero-seen) .hero-image,
  html:not(.hero-seen) .hero .btn-row { animation: rise-in 1s cubic-bezier(.2, .7, .2, 1) both; }
  html:not(.hero-seen) .hero-title { animation-delay: .12s; }
  html:not(.hero-seen) .hero .byline { animation-delay: .28s; }
  html:not(.hero-seen) .hero-prose,
  html:not(.hero-seen) .hero-image { animation-delay: .5s; }
  html:not(.hero-seen) .hero-poem .poem-line { animation: line-in .8s ease-out both; animation-delay: calc(.5s + var(--i, 0) * .14s); }
  html:not(.hero-seen) .hero .btn-row { animation-delay: 1.35s; }

  /* Page headings settle in on every page */
  .page-head .breadcrumb,
  .page-head .page-title,
  .page-head .subtitle,
  .page-head .meta-line,
  .page-head .lede,
  .page-head .prose,
  .page-head .facts,
  .page-head .btn-row { animation: rise-in .8s cubic-bezier(.2, .7, .2, 1) both; }
  .page-head .page-title { animation-delay: .05s; }
  .page-head .subtitle,
  .page-head .lede,
  .page-head .prose { animation-delay: .15s; }
  .page-head .meta-line { animation-delay: .2s; }
  .page-head .facts,
  .page-head .btn-row { animation-delay: .28s; }

  /* Reading pages: the title, then the poem a line at a time */
  .reader-kicker,
  .reader-title,
  .reader-byline { animation: rise-in .8s cubic-bezier(.2, .7, .2, 1) both; }
  .reader-title { animation-delay: .08s; }
  .reader-byline { animation-delay: .16s; }
  .reader-article .poem-line { animation: line-in .7s ease-out both; animation-delay: calc(min(var(--i, 0), 30) * 45ms + .3s); }
  .reader-prose,
  .art-figure { animation: rise-in .9s cubic-bezier(.2, .7, .2, 1) .3s both; }
  [data-night] svg { transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
  [data-night][aria-pressed="true"] svg { transform: rotate(-35deg) scale(1.1); }

  /* Sections drift up as they scroll into view (main.js adds these classes) */
  .reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
  }
  .reveal.is-revealed { opacity: 1; transform: none; }

  /* Results that a filter just showed */
  .pop-in { animation: pop-in .4s cubic-bezier(.2, .7, .2, 1) both; }

  /* Mobile menu */
  .js .nav-links.is-open { animation: menu-in .25s ease-out; }

  /* Moving between pages: covers glide into place, everything else cross-fades.
     Works in browsers that support view transitions; others simply load the page. */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: site-header; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: .3s; }
  ::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
}

/* ---- Small screens ------------------------------------------------------- */

@media (max-width: 760px) {
  body { font-size: 18px; }
  .section { padding-block: 72px; }
  .section--rule { padding-block: 64px; }
  .band-inner { padding-block: 72px; }
  .band-soft { padding-block: 64px; }
  .page-head { padding-block: 32px 64px; }
  .issue-head-cover { max-width: 280px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero-poem { font-size: 19px; }
}
