/* maidens.co.za — one stylesheet, no framework, no build step.
   Type: Libre Franklin (UI/headings) + Source Serif 4 (reading).
   Colour: warm grey paper, near-black ink, one red accent. */

:root {
  --paper: #fbfaf9;
  --band: #f4f2ef;
  --ink: #17181a;
  --body: #33363b;
  --soft: #5c6067;
  --muted: #8a8e94;
  --rule: #e5e2de;
  --rule-strong: #ddd9d4;
  --accent: #b32d27;
  --accent-dark: #7e1f1b;
  --sans: "Libre Franklin", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 1060px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

::selection { background: #f5d9d7; }

h1, h2, h3 { font-family: var(--sans); color: var(--ink); letter-spacing: -0.025em; line-height: 1.15; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.topbar { height: 3px; background: var(--accent); }

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
.eyebrow.accent, .eyebrow.accent a { color: var(--accent); }
.eyebrow.muted { color: var(--muted); font-size: 11.5px; letter-spacing: 0.12em; }

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

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
  flex-wrap: wrap;
}
.wordmark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }
.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
}
.site-nav a:hover { color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

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

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 22px;
}
.button:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }
.button-ghost {
  background: none;
  border: 1px solid var(--rule-strong);
  color: var(--body);
  padding: 12px 20px;
}
.button-ghost:hover { background: none; border-color: var(--ink); color: var(--ink); }

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

.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  align-items: flex-start;
  padding-top: 84px;
  padding-bottom: 72px;
}
.hero-main { flex: 1 1 460px; min-width: 0; }
.hero-side { flex: 1 1 240px; min-width: 220px; padding-top: 6px; }
.hero h1 {
  margin: 22px 0 24px;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}
.lede {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.62;
  color: #454951;
  max-width: 56ch;
  text-wrap: pretty;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-side img { width: 112px; height: 112px; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.pull {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.6;
  color: #6b6f76;
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}

/* ---------- section heads ---------- */

.band { border-top: 1px solid var(--rule); background: var(--band); padding: 60px 0 64px; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.section-head.ruled {
  margin: 72px 0 0;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}
.section-note { font-family: var(--serif); font-size: 16px; color: var(--muted); }
.section-link { font-size: 13.5px; font-weight: 600; }

/* ---------- category grid ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.cat-card {
  background: var(--paper);
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 172px;
}
.cat-card:hover { background: #fff; text-decoration: none; }
.cat-num { font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); }
.cat-name { font-size: 17.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); line-height: 1.25; }
.cat-blurb { font-family: var(--serif); font-size: 15px; line-height: 1.55; color: var(--soft); }
.cat-count {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- post list ---------- */

.post-list { display: flex; flex-direction: column; }
.post-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 26px 16px;
  border-bottom: 1px solid var(--rule);
}
.post-row:hover { background: var(--band); text-decoration: none; }
.post-meta { display: flex; flex-direction: column; gap: 6px; min-width: 181px; padding-top: 4px; }
.post-date { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.post-cat { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; flex: 1 1 320px; }
.post-title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; color: var(--ink); text-wrap: pretty; }
.post-excerpt { font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--soft); max-width: 62ch; text-wrap: pretty; }
.post-read { font-size: 12.5px; color: var(--muted); }

/* ---------- plugins ---------- */

.plugin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: 48px; }
.plugin { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.plugin h3 { margin: 0 0 8px; font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.plugin p { margin: 0 0 14px; font-family: var(--serif); font-size: 15.5px; line-height: 1.58; color: var(--soft); max-width: 46ch; }
.plugin a { font-size: 13px; font-weight: 600; }

/* ---------- pages, archive ---------- */

.page { padding: 64px 28px 80px; }
.page-title { margin: 0 0 12px; font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; letter-spacing: -0.03em; }
.page-lede { margin: 0 0 34px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--soft); max-width: 58ch; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 26px;
  border-bottom: 2px solid var(--ink);
}
.chip {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border: 1px solid var(--rule-strong);
  color: var(--soft);
}
.chip:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.chip-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-on:hover { color: #fff; border-color: var(--accent-dark); background: var(--accent-dark); }

/* ---------- article ---------- */

.article { padding: 56px 28px 40px; }
.back { display: inline-block; margin-bottom: 30px; font-size: 13px; font-weight: 600; color: var(--muted); }
.article-head { max-width: 700px; }
.article-head h1 {
  margin: 16px 0 20px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-wrap: balance;
}
.byline {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
  color: #74787e;
}
.byline img { width: 34px; height: 34px; object-fit: cover; filter: grayscale(1); }
.byline .sep { color: #c9c5c0; }

.article-grid { display: flex; flex-wrap: wrap; gap: 56px; padding-top: 38px; align-items: flex-start; }
.article-grid .prose { flex: 1 1 460px; max-width: 700px; min-width: 0; }
.article-aside {
  flex: 1 1 240px;
  min-width: 240px;
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.aside-links { display: flex; flex-direction: column; gap: 9px; border-left: 1px solid #e0ddd8; padding-left: 16px; margin-top: 12px; }
.aside-links a { font-size: 14px; color: var(--soft); line-height: 1.35; }
.aside-card { background: var(--band); border: 1px solid var(--rule); padding: 22px; font-size: 14.5px; line-height: 1.9; }
.aside-card .eyebrow { margin-bottom: 8px; }

/* ---------- prose ---------- */

.prose { font-family: var(--serif); font-size: 19px; line-height: 1.72; color: var(--body); max-width: 700px; }
.prose p { margin: 0 0 26px; text-wrap: pretty; }
.prose h2 { margin: 40px 0 16px; font-family: var(--sans); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.prose h3 { margin: 32px 0 12px; font-family: var(--sans); font-size: 19px; font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 26px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose blockquote {
  margin: 34px 0;
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--accent);
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose pre {
  margin: 0 0 30px;
  background: var(--ink);
  color: #e8e6e3;
  padding: 22px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
}
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--band); padding: 2px 5px; }
.prose pre code { background: none; padding: 0; font-size: 1em; }
.prose img { margin: 30px 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
.repo-cta { margin-top: 42px; padding-top: 26px; border-top: 1px solid var(--rule); }
.repo-cta .button { font-family: var(--sans); background: var(--ink); }
.repo-cta .button:hover { background: #000; }

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

.site-footer { border-top: 1px solid var(--rule); background: var(--band); margin-top: 64px; }
.footer-inner {
  padding: 44px 28px 52px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand { max-width: 40ch; }
.footer-name { margin: 0 0 10px; font-size: 15.5px; font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
.footer-tag { margin: 0 0 14px; font-family: var(--serif); font-size: 15.5px; line-height: 1.6; color: var(--soft); }
.footer-brand a { font-size: 14px; font-weight: 600; }
.footer-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col .eyebrow { margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--body); }
.copy { margin: 0; font-family: var(--mono); font-size: 12px; color: #9a9ea4; }

/* ---------- narrow ---------- */

@media (max-width: 640px) {
  .hero { padding-top: 52px; padding-bottom: 48px; }
  .post-row { padding: 20px 0; gap: 10px; }
  .post-meta { flex-direction: row; gap: 12px; min-width: 0; padding-top: 0; }
  .prose { font-size: 18px; }
  .article-aside { position: static; }
}

@media print {
  .site-header, .site-footer, .article-aside, .topbar, .back { display: none; }
  body { background: #fff; }
  .prose { font-size: 11.5pt; max-width: none; }
}
