/* ==================================================================
   Jim Johnson — Poet of the North Woods
   Palette: birch paper, spruce ink, pine, falu red, ochre, lake mist
   Type: Fraunces (display) · Newsreader (body & poems)
   ================================================================== */

:root {
  --birch:   #F5F2EA;
  --paper:   #FDFCF6;
  --spruce:  #16211B;
  --pine:    #2C4437;
  --falu:    #8C3B2A;
  --ochre:   #D9A441;
  --mist:    #9FB4A6;
  --ink-soft: #43524A;

  --display: "Fraunces", Georgia, serif;
  --body:    "Newsreader", Georgia, serif;

  --measure: 62ch;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--spruce);
  background: var(--birch);
}

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

a { color: var(--falu); }
a:hover { color: var(--pine); }

:focus-visible {
  outline: 3px solid var(--falu);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------------- header ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--pad);
  background: color-mix(in srgb, var(--birch) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--spruce) 14%, transparent);
}

.wordmark {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  color: var(--spruce);
  text-decoration: none;
}
.wordmark:hover { color: var(--falu); }

.site-nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }

.site-nav a {
  font-family: var(--body);
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--spruce); }
.site-nav a.active {
  color: var(--spruce);
  border-bottom-color: var(--falu);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px; height: 2.5px;
  background: var(--spruce);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 700px) {
  /* solid header: backdrop-filter would otherwise become the containing
     block for the fixed-position nav overlay below */
  .site-header { background: var(--birch); backdrop-filter: none; }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 0;
    top: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.25rem;
    background: var(--birch);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: -1;
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { font-size: 1.6rem; font-family: var(--display); font-weight: 450; }
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.05rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--falu); color: var(--paper); }
.btn-primary:hover { background: var(--pine); color: var(--paper); }

.btn-ghost {
  background: transparent;
  color: var(--spruce);
  box-shadow: inset 0 0 0 1.5px var(--spruce);
}
.btn-ghost:hover { background: var(--spruce); color: var(--birch); }

.btn-ghost-light {
  background: transparent;
  color: var(--birch);
  box-shadow: inset 0 0 0 1.5px var(--mist);
}
.btn-ghost-light:hover { background: var(--mist); color: var(--spruce); }

/* ---------------- shared section chrome ---------------- */

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--falu);
  margin-bottom: 1rem;
}
.eyebrow-light { color: var(--ochre); }

.section { padding: clamp(3.5rem, 9vw, 6.5rem) var(--pad); }

/* keep anchored sections clear of the sticky header */
section[id] { scroll-margin-top: 4.25rem; }

.section-head { max-width: var(--measure); margin: 0 auto 2.5rem; text-align: center; }

.section h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40;
  font-weight: 450;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.section-lede { color: var(--ink-soft); font-size: 1.1rem; }

.section-alt { background: color-mix(in srgb, var(--mist) 22%, var(--birch)); }

.section-dark {
  background: var(--spruce);
  color: var(--birch);
  text-align: center;
}
.section-dark h2 { color: var(--paper); }

/* ---------------- hero ---------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  min-height: min(88vh, 780px);
  overflow: hidden;
}

.hero-text {
  padding: clamp(3rem, 7vw, 5rem) var(--pad);
  max-width: 40rem;
  justify-self: end;
  animation: rise 0.9s ease both;
}

.hero h1 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 70;
  font-weight: 350;
  font-size: clamp(2.75rem, 7vw, 4.75rem);
  line-height: 1.02;
  margin-bottom: 1.25rem;
}

.hero-lede {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink-soft);
  margin-bottom: 2rem;
  max-width: 34rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.hero-art { position: relative; height: 100%; min-height: 420px; overflow: hidden; }
.hero-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  animation: fade 1.2s ease both 0.2s;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, var(--birch), transparent 26%),
    linear-gradient(to bottom, var(--birch), transparent 16%),
    linear-gradient(to top, color-mix(in srgb, var(--spruce) 60%, transparent), transparent 42%);
  pointer-events: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-text { justify-self: start; padding-bottom: 1.5rem; }
  .hero-art { min-height: 260px; max-height: 320px; }
}

/* ---------------- new books band ---------------- */

.new-books {
  background: var(--spruce);
  color: var(--birch);
  padding: clamp(3.5rem, 8vw, 6rem) var(--pad);
  text-align: center;
}

.new-books-eyebrow { text-align: center; margin-bottom: 1.5rem; }

.new-books-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 340px));
  justify-content: center;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 68rem;
  margin: 0 auto;
}

.new-book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.new-book-cover {
  width: min(100%, 260px);
  margin-bottom: 1.5rem;
}

.new-book-cover img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 22px 45px -18px rgba(0, 0, 0, 0.65);
}

.new-book-text h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40;
  font-weight: 450;
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  line-height: 1.12;
  color: var(--paper);
  margin-bottom: 0.6rem;
}

.new-book-text p {
  color: color-mix(in srgb, var(--birch) 82%, var(--mist));
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .new-books-grid { grid-template-columns: 1fr; max-width: 20rem; }
}

/* ---------------- book library: shelf & list ---------------- */

.view-toggle {
  display: flex;
  width: max-content;
  margin: 1.75rem auto 0;
  border: 1.5px solid var(--spruce);
  border-radius: 999px;
  overflow: hidden;
}

.view-toggle button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.45rem 1.4rem;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.view-toggle button[aria-pressed="true"] {
  background: var(--spruce);
  color: var(--birch);
}
.view-toggle button:focus-visible { outline-offset: -3px; }

.shelf-wrap {
  position: relative;
  max-width: 74rem;
  margin: 0 auto;
}

.book-collection { list-style: none; }

/* shelf view: one horizontal, swipeable row */
.book-collection.shelf-view {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.5rem 0.25rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--spruce) 30%, transparent) transparent;
}

.shelf-view li {
  flex: 0 0 clamp(150px, 22vw, 205px);
  scroll-snap-align: start;
}

.shelf-view .book-text { text-align: center; }

.shelf-arrow {
  position: absolute;
  top: 34%;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: var(--spruce);
  color: var(--birch);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(22, 33, 27, 0.5);
  transition: background 0.2s ease, opacity 0.2s ease;
}
.shelf-arrow:hover:not(:disabled) { background: var(--falu); }
.shelf-arrow:disabled { opacity: 0.25; cursor: default; }
.shelf-arrow.prev { left: -1.1rem; }
.shelf-arrow.next { right: -1.1rem; }
@media (hover: none), (max-width: 700px) {
  .shelf-arrow { display: none; }
}

/* list view: compact rows */
.book-collection.list-view {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 46rem;
  margin: 0 auto;
}

.list-view .book-card {
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--spruce) 12%, transparent);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.list-view .book-card:hover,
.list-view .book-card:focus-visible {
  border-color: var(--falu);
  transform: translateX(4px);
}

.list-view .cover-wrap {
  flex: 0 0 58px;
  border-radius: 3px;
  box-shadow: 0 4px 10px -4px rgba(22, 33, 27, 0.4);
}
.list-view .cover-wrap::after { display: none; }
.list-view .book-card:hover .cover-wrap,
.list-view .book-card:focus-visible .cover-wrap {
  transform: none;
  box-shadow: 0 4px 10px -4px rgba(22, 33, 27, 0.4);
}

.list-view .book-text { flex: 1; min-width: 0; }
.list-view .book-card h3 { font-size: 1.1rem; }

.list-cta { display: none; }
.list-view .list-cta {
  display: inline-block;
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--falu);
  white-space: nowrap;
}
.list-view .list-cta::after { content: " \2192"; }
@media (max-width: 520px) {
  .list-view .list-cta { display: none; }
}

.book-card {
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.book-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.book-card .cover-wrap {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 7 / 10;
  background: var(--paper);
  box-shadow: 0 10px 24px -12px rgba(22, 33, 27, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-card img { width: 100%; height: 100%; object-fit: cover; }
.book-card img.fit-contain { object-fit: contain; padding: 6%; background: var(--paper); }

.book-card:hover .cover-wrap,
.book-card:focus-visible .cover-wrap {
  transform: translateY(-5px);
  box-shadow: 0 18px 32px -12px rgba(22, 33, 27, 0.45);
}

.cover-wrap::after {
  content: "Read a poem";
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.55rem 0.9rem;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--paper);
  background: linear-gradient(to top, rgba(22, 33, 27, 0.88), rgba(22, 33, 27, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}
.book-card:hover .cover-wrap::after,
.book-card:focus-visible .cover-wrap::after { opacity: 1; }

.book-card h3 {
  font-family: var(--display);
  font-weight: 450;
  font-size: 1.15rem;
  line-height: 1.25;
}

.book-card .book-pub {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.book-card .book-award {
  font-size: 0.85rem;
  color: var(--falu);
  font-style: italic;
}

/* ---------------- about ---------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 66rem;
  margin: 0 auto;
  align-items: start;
}

.about-text p { margin-bottom: 1.25rem; max-width: var(--measure); }

.about-lead {
  font-size: 1.3rem;
  line-height: 1.5;
  font-weight: 500;
}

.about-signature {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--falu);
}

.about-quote {
  position: sticky;
  top: 6rem;
  border-left: 3px solid var(--falu);
  padding: 0.5rem 0 0.5rem 1.75rem;
  font-family: var(--display);
  font-variation-settings: "SOFT" 70;
}

.about-quote p {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-style: italic;
  font-weight: 350;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.about-quote cite {
  font-family: var(--body);
  font-style: normal;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-quote { position: static; }
}

/* ---------------- gallery ---------------- */

/* tints toward --gallery-accent (set inline by main.js as the carousel
   scrolls) to signal a change of "album" — see js/books.js GALLERY.accent */
.gallery-section {
  --gallery-accent: var(--mist);
  background-color: color-mix(in srgb, var(--gallery-accent) 26%, var(--birch));
  transition: background-color 0.8s ease;
}

.gallery-album-label {
  font-family: var(--display);
  font-weight: 450;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
  transition: opacity 0.3s ease;
}

.gallery-carousel-wrap {
  position: relative;
  max-width: 74rem;
  margin: 0 auto;
}

.gallery-carousel {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  list-style: none;
  padding: 0.5rem 0.25rem 1.5rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--spruce) 30%, transparent) transparent;
}

.gallery-carousel li { flex: 0 0 clamp(160px, 22vw, 220px); scroll-snap-align: start; }

.gallery-thumb {
  display: block;
  width: 100%;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 10px 22px -10px rgba(22, 33, 27, 0.4);
  transition: transform 0.2s ease;
}
.gallery-thumb:hover img,
.gallery-thumb:focus-visible img { transform: scale(1.03); }

.gallery-thumb-caption {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.4rem;
}

.gallery-arrow {
  position: absolute;
  top: 38%;
  z-index: 2;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: var(--spruce);
  color: var(--birch);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(22, 33, 27, 0.5);
  transition: background 0.2s ease, opacity 0.2s ease;
}
.gallery-arrow:hover { background: var(--falu); }
.gallery-arrow.prev { left: -1.1rem; }
.gallery-arrow.next { right: -1.1rem; }
@media (hover: none), (max-width: 700px) {
  .gallery-arrow { display: none; }
}

/* ---------------- gallery lightbox ---------------- */

.gallery-dialog {
  border: none;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  background: var(--spruce);
  color: var(--birch);
}

.gallery-dialog[open] {
  display: grid;
  place-items: center;
  animation: overlay-in 0.4s ease;
}

.gallery-dialog-figure {
  margin: 0;
  max-width: min(90vw, 60rem);
  display: grid;
  gap: 0.85rem;
  justify-items: center;
}

.gallery-dialog-figure img {
  max-width: 100%;
  max-height: 74dvh;
  border-radius: 6px;
  box-shadow: 0 20px 45px -18px rgba(0, 0, 0, 0.6);
}

.gallery-dialog-figure figcaption {
  font-size: 1rem;
  color: var(--mist);
  text-align: center;
}
.gallery-dialog-figure figcaption:empty { display: none; }

.gallery-dialog-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 50%;
  background: rgba(253, 252, 246, 0.12);
  color: var(--birch);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.gallery-dialog-arrow:hover { background: rgba(253, 252, 246, 0.24); }
.gallery-dialog-arrow.prev { left: 1.25rem; }
.gallery-dialog-arrow.next { right: 1.25rem; }
.gallery-dialog-arrow[hidden] { display: none; }

@media (max-width: 640px) {
  .gallery-dialog-arrow { width: 2.4rem; height: 2.4rem; font-size: 1.4rem; }
  .gallery-dialog-arrow.prev { left: 0.5rem; }
  .gallery-dialog-arrow.next { right: 0.5rem; }
}

/* ---------------- events ---------------- */

.events-past-head { margin-top: 3.5rem; }
.events-past-head h3 {
  font-family: var(--display);
  font-weight: 450;
  font-size: 1.4rem;
  text-align: center;
}

.event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 74rem;
  margin: 0 auto;
}

.event-list-past .event-card { opacity: 0.82; }

.event-card {
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--spruce) 12%, transparent);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.event-card-body { padding: 1.75rem; display: flex; flex-direction: column; gap: 0.6rem; }

.event-date {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pine);
}

.event-card h3 {
  font-family: var(--display);
  font-weight: 450;
  font-size: 1.3rem;
  line-height: 1.25;
}

.event-location { font-size: 0.95rem; color: var(--ink-soft); }
.event-location a { font-weight: 600; }
.event-address { font-size: 0.88rem; color: var(--ink-soft); }
.event-card p.event-description { font-size: 1rem; color: var(--ink-soft); }

.event-empty {
  grid-column: 1 / -1;
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
}

/* ---------------- press ---------------- */

.press-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 74rem;
  margin: 0 auto 2.5rem;
}

.press-card {
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--spruce) 12%, transparent);
  border-radius: 8px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.press-source {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pine);
}

.press-card h3 {
  font-family: var(--display);
  font-weight: 450;
  font-size: 1.3rem;
  line-height: 1.25;
}

.press-card h3 a { color: var(--spruce); text-decoration: none; }
.press-card h3 a:hover { color: var(--falu); text-decoration: underline; }

.press-card p { font-size: 1rem; color: var(--ink-soft); }

.press-archive {
  text-align: center;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ---------------- contact ---------------- */

.contact-lede { max-width: 42ch; margin: 0 auto 2rem; color: color-mix(in srgb, var(--birch) 80%, var(--mist)); }

.contact-form {
  max-width: 32rem;
  margin: 0 auto 2rem;
  display: grid;
  gap: 1.1rem;
  text-align: left;
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--mist);
}

.contact-form input,
.contact-form textarea {
  font: inherit;
  color: var(--paper);
  padding: 0.7rem 0.95rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--mist) 45%, transparent);
  background: color-mix(in srgb, var(--paper) 7%, transparent);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--ochre);
}
.contact-form textarea { resize: vertical; min-height: 7rem; }

.contact-form .btn { justify-self: center; margin-top: 0.25rem; }

.form-status {
  min-height: 1.5em;
  text-align: center;
  font-style: italic;
  color: var(--ochre);
}

.contact-place { color: var(--mist); font-size: 1rem; letter-spacing: 0.05em; }

/* ---------------- footer ---------------- */

.site-footer {
  background: var(--spruce);
  color: var(--mist);
  text-align: center;
  padding: 0 var(--pad) 2.5rem;
  font-size: 0.95rem;
}

.site-footer .canoe {
  width: 170px;
  margin: 0 auto 1.25rem;
  color: var(--mist);
  display: block;
}

.site-footer p { margin-bottom: 0.4rem; }
.colophon { font-style: italic; opacity: 0.7; font-size: 0.85rem; }

/* ---------------- poem reader: full-screen overlay ---------------- */

.poem-dialog {
  border: none;
  border-radius: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  background: var(--birch);
  color: var(--spruce);
  overflow-y: auto;
}

/* [open] guard: a bare display value would override the browser's
   dialog:not([open]) { display: none } and render the closed dialog */
.poem-dialog[open] {
  display: grid;
  align-items: center;
  animation: overlay-in 0.4s ease;
}
@keyframes overlay-in {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.dialog-close {
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 2;
  border: 1.5px solid color-mix(in srgb, var(--spruce) 30%, transparent);
  background: var(--paper);
  color: var(--spruce);
  font-size: 1.5rem;
  line-height: 1;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  cursor: pointer;
}
.dialog-close:hover { background: var(--falu); border-color: var(--falu); color: var(--paper); }

.poem-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 5rem) var(--pad) clamp(3rem, 8vh, 5rem);
}

.poem-meta img {
  border-radius: 5px;
  box-shadow: 0 12px 28px -12px rgba(22, 33, 27, 0.45);
  margin-bottom: 1.1rem;
}

.poem-meta h3 {
  font-family: var(--display);
  font-weight: 450;
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.poem-pub { font-size: 0.92rem; color: var(--ink-soft); margin-bottom: 0.4rem; }
.poem-awards { font-size: 0.88rem; color: var(--falu); font-style: italic; }
.poem-blurb { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; margin-top: 0.75rem; }

.poem-page { border-left: 1px solid color-mix(in srgb, var(--spruce) 14%, transparent); padding-left: clamp(1.5rem, 3vw, 2.5rem); }

.poem-page .eyebrow { margin-bottom: 0.75rem; }

.poem-title {
  font-family: var(--display);
  font-variation-settings: "SOFT" 50;
  font-weight: 450;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.5rem;
}

.poem-lines p {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.75;
  margin: 0;
  /* the poems' tabs, indents, and spacing are intentional — preserve them */
  white-space: pre-wrap;
  tab-size: 3;
}
.poem-lines p.stanza-break { height: 1.2rem; }

.poem-coming-soon {
  font-style: italic;
  color: var(--ink-soft);
}

.poem-nav {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--spruce) 14%, transparent);
  padding-top: 1.4rem;
  margin-top: 1rem;
}

.poem-nav-btn {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  display: grid;
  gap: 0.25rem;
  padding: 0.3rem 0.4rem;
  text-align: left;
}
.poem-nav-btn.next { text-align: right; justify-items: end; }

.poem-nav-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--falu);
}

.poem-nav-title {
  font-family: var(--display);
  font-weight: 450;
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 38vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.poem-nav-btn:hover .poem-nav-title,
.poem-nav-btn:focus-visible .poem-nav-title { color: var(--spruce); }

@media (max-width: 640px) {
  .poem-layout { grid-template-columns: 1fr; }
  .poem-meta { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
  .poem-meta img { width: 110px; margin-bottom: 0; }
  .poem-meta h3 { flex: 1; min-width: 10rem; }
  .poem-pub, .poem-awards, .poem-blurb { width: 100%; margin: 0; }
  .poem-page { border-left: none; padding-left: 0; border-top: 1px solid color-mix(in srgb, var(--spruce) 14%, transparent); padding-top: 1.5rem; }
}

/* ---------------- scroll reveal ---------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
