/* ==========================================================================
   mypoorwords — a menagerie of the mind
   A hand-built estate. Parchment, ink, and old letterpress type.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=IM+Fell+English+SC&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --paper:      #f4ecd6;            /* parchment */
  --paper-edge: #ece0c2;
  --ink:        #2f2718;            /* dark sepia ink */
  --ink-soft:   #5b4f38;
  --rule:       #c9b78f;
  --oxblood:    #7a3522;            /* links & accents */
  --oxblood-lit:#9a4630;
  --shadow:     rgba(54, 41, 18, 0.18);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background-color: #efe4c6;
  /* faint paper grain, drawn entirely in CSS so there are no image files to upload */
  background-image:
    radial-gradient(circle at 20% 30%, rgba(120, 90, 40, 0.04) 0, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(120, 90, 40, 0.05) 0, transparent 55%);
  color: var(--ink);
  font-family: 'EB Garamond', 'Palatino Linotype', Palatino, Georgia, serif;
  font-size: 21px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* ---- the page itself: a leaf of parchment ------------------------------- */
.leaf {
  max-width: 720px;
  margin: 2.4rem auto 4rem;
  padding: 3.2rem clamp(1.4rem, 5vw, 3.6rem) 3rem;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  box-shadow:
    0 1px 0 #fff8e6 inset,
    0 18px 40px -28px var(--shadow);
  border-radius: 2px;
}

/* ---- masthead ----------------------------------------------------------- */
.masthead { text-align: center; margin-bottom: 1.4rem; }

.masthead a { text-decoration: none; color: inherit; }

.wordmark {
  font-family: 'IM Fell English SC', 'IM Fell English', serif;
  font-size: clamp(2.1rem, 7vw, 3.1rem);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
}

.subscript {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0;
  letter-spacing: 0.02em;
}

/* ---- ornamental rule ---------------------------------------------------- */
.flourish {
  display: block;
  margin: 1.6rem auto;
  width: 180px;
  height: auto;
  color: var(--rule);
}
.flourish.small { width: 120px; margin: 1.2rem auto; }

/* ---- navigation signpost ------------------------------------------------ */
.signpost {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.5rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  font-family: 'IM Fell English SC', serif;
  font-size: 1.06rem;
  letter-spacing: 0.05em;
}
.signpost a {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
.signpost a:hover { color: var(--oxblood); border-bottom-color: var(--oxblood); }
.signpost a[aria-current="page"] { color: var(--oxblood); border-bottom-color: var(--rule); }

/* ---- general typography ------------------------------------------------- */
a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--oxblood-lit); }

h1.page-title, h2.wing-title {
  font-family: 'IM Fell English', serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-align: center;
  margin: 0.6rem 0 0.2rem;
}
h1.page-title { font-size: clamp(1.8rem, 5vw, 2.4rem); }
h2.wing-title { font-size: clamp(1.6rem, 4.5vw, 2rem); }

.dateline {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 0 0.4rem;
  letter-spacing: 0.02em;
}

.story-title {
  text-align: center;
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--oxblood);
  font-size: 1.25rem;
  margin: -0.1rem 0 0.6rem;
  letter-spacing: 0.01em;
}

.lede {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0.6rem auto 0.4rem;
}

p { margin: 0 0 1.15rem; }

/* the body of an entry, justified like a printed book */
.entry { text-align: justify; hyphens: auto; }
.entry p:first-of-type { margin-top: 1.2rem; }

/* drop cap for the opening of an episode */
.entry > p:first-of-type::first-letter {
  font-family: 'IM Fell English', serif;
  float: left;
  font-size: 3.9rem;
  line-height: 0.74;
  padding: 0.22rem 0.55rem 0 0;
  color: var(--oxblood);
}

blockquote {
  margin: 1.4rem 1.2rem;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
}

/* ---- "skip to latest" jump button --------------------------------------- */
.jump-wrap { text-align: center; margin: 0.4rem 0 0.2rem; }
.latest-jump {
  display: inline-block;
  padding: 0.5rem 1.3rem;
  font-family: 'IM Fell English SC', serif;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  color: var(--oxblood);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255,250,235,0.55), rgba(236,224,194,0.3));
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.latest-jump:hover {
  border-color: var(--oxblood);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px -14px var(--shadow);
}

/* ---- the index of episodes (a roster) ----------------------------------- */
.roster { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.roster li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
}
.roster li:last-child { border-bottom: 1px solid var(--rule); }
.roster .no {
  font-family: 'IM Fell English SC', serif;
  color: var(--oxblood);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
}
.roster .title {
  font-family: 'IM Fell English', serif;
  font-size: 1.4rem;
  display: block;
  margin: 0.1rem 0 0.2rem;
}
.roster .title a { text-decoration: none; }
.roster .title a:hover { text-decoration: underline; }
.roster .teaser { color: var(--ink-soft); font-style: italic; margin: 0; font-size: 1rem; }

/* ---- the three gates on the front page ---------------------------------- */
.wings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.8rem 0 0.6rem;
}
@media (min-width: 620px) { .wings { grid-template-columns: repeat(2, 1fr); } }

.wing-card {
  display: block;
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding: 1.6rem 1.1rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(255,250,235,0.5), rgba(236,224,194,0.25));
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.wing-card:hover {
  transform: translateY(-2px);
  border-color: var(--oxblood);
  box-shadow: 0 10px 22px -16px var(--shadow);
}
.wing-card .name {
  font-family: 'IM Fell English SC', serif;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.4rem;
  color: var(--oxblood);
}
.wing-card .blurb { font-style: italic; color: var(--ink-soft); font-size: 0.98rem; margin: 0; }

/* ---- an empty wing (placeholder) ---------------------------------------- */
.empty-wing {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  margin: 2.2rem auto;
  max-width: 32rem;
}

/* ---- prev / next foot navigation ---------------------------------------- */
.turn {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.2rem;
  font-family: 'IM Fell English SC', serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
}
.turn a { text-decoration: none; }
.turn .spacer { flex: 1; }

/* ---- footer ------------------------------------------------------------- */
.colophon {
  text-align: center;
  margin: 2.6rem auto 0;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
}
.colophon a { color: var(--ink-soft); }

/* ---- the Salons: rooms & poems ------------------------------------------ */
.salon-room { margin: 2.6rem 0 1rem; }
.room-name {
  font-family: 'IM Fell English SC', serif;
  text-align: center;
  color: var(--oxblood);
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  margin: 0 0 0.2rem;
}
.room-note {
  text-align: center;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
  margin: 0 auto 0.6rem;
  max-width: 30rem;
}
.poem { text-align: center; margin: 2.3rem 0 2.8rem; }
.poem-title {
  font-family: 'IM Fell English', serif;
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 0.1rem;
}
.poem-date {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0 0 0.9rem;
}
.verse {
  display: inline-block;
  text-align: left;
  line-height: 1.5;
}
.stanza { margin: 0 0 1.05rem; }
.stanza:last-child { margin-bottom: 0; }

/* ---- the Study: essays -------------------------------------------------- */
.essay { margin-top: 1.2rem; }
.essay-body { text-align: justify; hyphens: auto; }
.essay-body > p:first-of-type::first-letter {
  font-family: 'IM Fell English', serif;
  float: left;
  font-size: 3.9rem;
  line-height: 0.74;
  padding: 0.22rem 0.55rem 0 0;
  color: var(--oxblood);
}
.subhead {
  font-family: 'IM Fell English', serif;
  font-weight: 400;
  font-style: italic;
  color: var(--oxblood);
  font-size: 1.28rem;
  line-height: 1.3;
  margin: 1.9rem 0 0.7rem;
  text-align: left;
}

/* ---- small screens ------------------------------------------------------ */
@media (max-width: 480px) {
  body { font-size: 19px; }
  .leaf { margin: 1rem auto 2rem; }
}
