/* ------------------------------------------------------------
   The Leopard's Swim-Up Bar — all the styling, in one file.
   White page, black ink, one column. Change anything.
   ------------------------------------------------------------ */

:root {
  --ink: #000;
  --paper: #fff;
  --font: Arial, Helvetica, sans-serif;
  --column: 40rem;   /* max width of the text column */
  --gutter: 1.25rem; /* side padding on phones */
}

* { box-sizing: border-box; }

html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;         /* 16px, plain old web */
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

@media (min-width: 48rem) {
  body { font-size: 1.0625rem; } /* 17px on desktop */
}

a { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

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

/* ---------- masthead (hand-drawn title) ---------- */
.masthead { padding: 2.5rem var(--gutter) 1.5rem; text-align: center; }
.masthead-link { display: inline-block; }
.title-art { width: min(26rem, 86vw); margin: 0 auto; }

/* ---------- the post ---------- */
main { flex: 1; }

.post {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
}

/* arrows above the work */
.arrows {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  margin: 0.5rem 0 2rem;
}
.arrow img { width: 3.5rem; height: auto; }
.arrow.is-off { opacity: 0.15; }

/* the drawing */
.art { margin: 0 0 2rem; }
.art img { margin: 0 auto; }

/* the poem: every line break and leading space kept as typed */
.poem {
  font: inherit;
  white-space: pre-wrap;
  margin: 0;
}

/* prose (chapters, notes) */
.text p { margin: 0 0 1.25em; }
.text h2, .text h3 { font-weight: bold; margin: 1.5em 0 0.5em; }
.text em { font-style: italic; }

.dateline {
  margin-top: 3rem;
  font-size: 0.85em;
  color: #666;
}
.dateline a { color: inherit; text-decoration: none; }
.dateline a:hover { text-decoration: underline; }

/* ---------- archive ---------- */
.archive {
  list-style: none;
  padding: 0 var(--gutter) 3rem;
  margin: 0 auto;
  max-width: var(--column);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1rem;
}
.archive a { text-decoration: none; display: block; }
.archive img,
.archive-blank {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top;
  display: block;
}
.archive-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.85em;
  border: 1px solid #000;
}
.archive-date {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8em;
  color: #666;
  text-align: center;
}
.archive a:hover .archive-date { text-decoration: underline; }
@media (max-width: 30rem) {
  .archive { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- about ---------- */
.about { max-width: var(--column); margin: 0 auto; padding: 0 var(--gutter) 3rem; text-align: center; }

/* ---------- footer ---------- */
.colophon { padding: 2rem var(--gutter) 3rem; text-align: center; }
.colophon-nav { display: flex; justify-content: center; align-items: center; gap: 3rem; margin-bottom: 2rem; }
.word-art { height: 1.75rem; width: auto; }
.note { font-size: 0.85em; color: #666; max-width: 30rem; margin: 0 auto; }
.note a { color: inherit; }

@media (prefers-reduced-motion: no-preference) {
  .arrow img { transition: transform 120ms ease; }
  .arrow:hover img { transform: scale(1.06); }
}
