/* ==========================================================
   THE FILING — shared site styles
   Used across: about, subscribe, archive, colophon, 404
   The homepage (index.html) has its own embedded styles
   ========================================================== */

:root {
  --paper: #FAF6EC;
  --paper-edge: #E8DFC7;
  --paper-deep: #DDD2B8;
  --ink: #14130F;
  --ink-soft: #3A352B;
  --ink-mute: #7A7264;
  --rule: #14130F;
  --rule-soft: #B8AE96;
  --brass: #8B6A1C;
  --brass-mid: #A07A2C;
  --brass-light: #C7A24A;
  --brass-deep: #5C4612;
  --crimson: #7A1F12;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(circle at 20% 10%, rgba(160, 122, 44, 0.025) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(140, 44, 31, 0.02) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Subtle paper grain */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.08 0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==================== TOP BAR (site nav) ==================== */
.site-top {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: relative;
  z-index: 10;
}
.site-top-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  gap: 16px;
  flex-wrap: wrap;
}
.site-top-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.site-top-brand img {
  width: 28px;
  height: 28px;
  display: block;
}
.site-top-brand .brand-text {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.site-top-nav {
  display: flex;
  gap: 26px;
}
.site-top-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.site-top-nav a:hover { color: var(--brass-deep); }
.site-top-nav a.active { color: var(--ink); }
.site-top-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brass);
}

/* ==================== MASTHEAD (page-level title block) ==================== */
.page-mast {
  text-align: center;
  padding: 60px 32px 40px;
  border-bottom: 4px double var(--ink);
  position: relative;
  z-index: 2;
}
.page-mast .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.page-mast .eyebrow::before,
.page-mast .eyebrow::after {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--brass);
}
.page-mast h1 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: clamp(38px, 5.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 16px;
}
.page-mast h1 em {
  font-style: italic;
  font-family: 'Fraunces', serif;
  color: var(--brass-deep);
  font-weight: 500;
}
.page-mast .deck {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--ink-soft);
  max-width: 36em;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==================== CONTENT CONTAINERS ==================== */
main {
  flex: 1;
  position: relative;
  z-index: 2;
}
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 32px;
}
.container-wide {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 32px;
}

/* ==================== TYPOGRAPHY ==================== */
.prose h2 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 48px 0 16px;
}
.prose h2::before {
  content: '§';
  color: var(--brass);
  font-weight: 400;
  margin-right: 12px;
  font-style: italic;
  font-family: 'Fraunces', serif;
}
.prose h3 {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink);
  margin: 36px 0 12px;
}
.prose p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 22px;
}
.prose p.lead-para::first-letter {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 4.2em;
  float: left;
  line-height: 0.85;
  margin: 0.05em 0.08em 0 0;
  color: var(--brass-deep);
}
.prose blockquote {
  border-left: 3px solid var(--brass);
  padding: 4px 0 4px 22px;
  margin: 28px 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.45;
  color: var(--ink);
}
.prose blockquote cite {
  display: block;
  margin-top: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.prose ul, .prose ol {
  margin: 0 0 22px 22px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
}
.prose li { margin-bottom: 8px; }
.prose a {
  color: var(--brass-deep);
  text-decoration: underline;
  text-decoration-color: var(--brass-mid);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s;
}
.prose a:hover { color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }

.pull-quote {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-style: italic;
  font-size: 28px;
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
  margin: 36px 0;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.01em;
}
.pull-quote::before {
  content: '✦';
  display: block;
  color: var(--brass);
  font-size: 14px;
  margin-bottom: 12px;
  font-style: normal;
}

/* ==================== BUTTONS / CTA ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover {
  background: var(--brass-deep);
  border-color: var(--brass-deep);
  color: var(--paper);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 32px 32px;
  margin-top: 80px;
  position: relative;
  z-index: 2;
  border-top: 4px double var(--brass);
}
.site-footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}
.site-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-mast {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.footer-mast img {
  width: 36px;
  height: 36px;
  display: block;
}
.footer-mast-text {
  font-family: 'Roboto Slab', Georgia, serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.12em;
  color: var(--paper);
}
.footer-blurb {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(250, 246, 236, 0.7);
  line-height: 1.6;
  max-width: 38ch;
}
.footer-col h6 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(184, 174, 150, 0.2);
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  color: rgba(250, 246, 236, 0.75);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--brass); }

.footer-colophon {
  border-top: 1px solid rgba(184, 174, 150, 0.15);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 246, 236, 0.5);
  gap: 14px;
  flex-wrap: wrap;
}
.footer-colophon .brass { color: var(--brass); }

/* ==================== MOBILE ==================== */
@media (max-width: 880px) {
  .site-top-inner { padding: 12px 18px; gap: 10px; }
  .site-top-nav { gap: 16px; font-size: 10px; }
  .site-top-brand .brand-text { font-size: 11px; }
  .page-mast { padding: 40px 18px 28px; }
  .container { padding: 36px 22px; }
  .container-wide { padding: 36px 18px; }
  .prose h2 { font-size: 24px; margin: 36px 0 14px; }
  .prose h3 { font-size: 19px; margin: 28px 0 10px; }
  .prose p { font-size: 17px; line-height: 1.65; }
  .pull-quote { font-size: 22px; padding: 22px 0; margin: 28px 0; }
  .site-footer { padding: 40px 22px 28px; margin-top: 56px; }
  .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-colophon { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 9px; }
}

@media (max-width: 520px) {
  .site-top-nav { flex-wrap: wrap; }
  .site-top-nav a:nth-child(n+4) { display: none; }
  .site-footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
