/* ---------- tokens ---------- */
:root {
  --paper: #faf6ee;
  --paper-dim: #f2ead9;
  --ink: #2a2521;
  --ink-soft: #554d43;
  --ink-faint: #8a8074;
  --rust: #b6502e;
  --rust-dark: #8f3d21;
  --rust-tint: #f1ded3;
  --line: #e3d7c2;
  --max-width: 46rem;
  --wide-width: 64rem;
  --radius: 0.4rem;
  --shadow: 0 1px 2px rgba(42, 37, 33, 0.06), 0 4px 14px rgba(42, 37, 33, 0.06);
}

/* ---------- reset-ish ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Lora", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; border-radius: var(--radius); }
main { flex: 1; }

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }
a { color: var(--rust-dark); text-decoration-thickness: from-font; }
a:hover { color: var(--rust); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap--wide { max-width: var(--wide-width); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6em 1em;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.6em 1.3em;
  border-radius: 999px;
  border: 1.5px solid var(--rust);
  color: var(--rust-dark);
  font-family: "Lora", serif;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--rust-tint); color: var(--rust-dark); }
.btn--accent {
  background: var(--rust);
  border-color: var(--rust);
  color: var(--paper);
}
.btn--accent:hover { background: var(--rust-dark); color: var(--paper); }

/* ---------- header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  max-width: var(--wide-width);
}
.wordmark {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark__rust { color: var(--rust); }
.wordmark__and { color: var(--ink-faint); font-weight: 400; margin: 0 0.08em; font-size: 0.8em; }
.wordmark__ink { color: var(--ink); }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.98rem;
}
.site-nav a:hover { color: var(--rust-dark); }
.site-nav a[aria-current="page"] { color: var(--rust-dark); font-weight: 600; }
.nav-cta { white-space: nowrap; }

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle-label span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  display: block;
}

@media (max-width: 720px) {
  .nav-toggle-label { display: flex; }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    display: none;
    gap: 1rem;
  }
  .site-nav ul { flex-direction: column; gap: 0.9rem; }
  .site-header__inner { position: relative; flex-wrap: wrap; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.9rem;
}
.site-footer__inner {
  max-width: var(--wide-width);
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  justify-content: space-between;
}
.site-footer a { color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper-dim), var(--paper) 70%);
}
.hero__inner {
  max-width: var(--wide-width);
  padding: 3.5rem 1.5rem 3rem;
}
.hero p.tagline {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 38rem;
}
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.5rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.3em; }
.card .meta { color: var(--ink-faint); font-size: 0.9rem; margin-bottom: 0.7em; }

/* ---------- quote widget ---------- */
.quote-of-the-day {
  border-left: 3px solid var(--rust);
  background: var(--rust-tint);
  padding: 1.2rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}
.quote-of-the-day blockquote {
  margin: 0 0 0.4em;
  font-family: "Playfair Display", serif;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
}
.quote-of-the-day figcaption {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- section ---------- */
section + section { margin-top: 3rem; }
.section-pad { padding: 3rem 0; }
.section-pad--tight { padding: 2rem 0; }

.callout {
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}

/* ---------- forms ---------- */
form.stack { display: flex; flex-direction: column; gap: 1rem; max-width: 32rem; }
form.stack label { font-weight: 600; font-size: 0.92rem; color: var(--ink-soft); display: block; margin-bottom: 0.3em; }
form.stack input,
form.stack textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.6em 0.8em;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
form.stack input:focus,
form.stack textarea:focus {
  outline: none;
  border-color: var(--rust);
}
form.stack button { align-self: flex-start; cursor: pointer; font-size: 1rem; }
.form-note { font-size: 0.88rem; color: var(--ink-faint); }
.form-status { font-size: 0.92rem; margin-top: 0.5em; }
.form-status[data-state="ok"] { color: #3a6b3a; }
.form-status[data-state="error"] { color: var(--rust-dark); }

/* honeypot field for basic bot deterrence */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- shuffler tool ---------- */
.shuffler {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.2rem;
  align-items: start;
}
.shuffler textarea {
  width: 100%;
  min-height: 14rem;
  font-family: "Lora", serif;
  font-size: 1rem;
  padding: 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  resize: vertical;
}
.shuffler__controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding-top: 5rem;
}
.shuffler ol {
  margin: 0;
  padding-left: 1.4rem;
}
.shuffler ol li { margin-bottom: 0.3em; }
@media (max-width: 700px) {
  .shuffler { grid-template-columns: 1fr; }
  .shuffler__controls { padding-top: 0; flex-direction: row; }
}

/* ---------- misc ---------- */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--rust-dark);
  font-weight: 600;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
hr.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}
