/* ==========================================================================
   WD Brewer — design system
   A home-brewing & craft beverage journal.
   Palette: stout (near-black brown) bookends a kraft-parchment reading body.
   Signature: the "batch card" — every post carries a brew-log spec plate
   (category / read time / difficulty) the way a homebrewer logs a batch.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Figtree:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  /* stout bookends */
  --stout: #1c1712;
  --stout-soft: #2a2119;
  --stout-line: #3a2f24;

  /* kraft-parchment body */
  --parchment: #f3ecdd;
  --card: #fffcf5;
  --paper-line: #e3d7c1;

  /* ink */
  --ink: #241c14;
  --ink-muted: #6b5d4c;
  --cream: #f3e9d6;

  /* signature accent */
  --amber: #c97a2c;
  --amber-deep: #9c5c1c;

  /* category spec colors — like bottle-cap codes */
  --cat-beer: #c97a2c;
  --cat-cider: #b5471f;
  --cat-kombucha: #71804a;
  --cat-coffee: #6b4226;
  --cat-equipment: #55666e;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --container: 1180px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--parchment);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

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

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

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

.site-header {
  background: var(--stout);
  color: var(--cream);
  position: relative;
  z-index: 10;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 0;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--cream);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.wordmark span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--amber);
  text-transform: uppercase;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--stout-line);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 0.5rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.9rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--cream);
  border-bottom: 2px solid transparent;
  padding-bottom: 0.3rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-color: var(--amber);
  color: var(--amber);
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .site-nav {
    display: none;
    width: 100%;
    padding-bottom: 1.15rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.9rem; }
  .site-header__bar { flex-wrap: wrap; }
}

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

.hero {
  background: var(--stout);
  color: var(--cream);
  padding: 4.5rem 0 4.8rem;
  position: relative;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1.1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  line-height: 1.08;
  max-width: 15ch;
  margin: 0 0 1.3rem;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: italic;
  color: var(--amber);
}

.hero p.lede {
  max-width: 46ch;
  font-size: 1.15rem;
  color: #cabca6;
  margin: 0 0 2.2rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn--amber { background: var(--amber); color: var(--stout); }
.btn--amber:hover { background: #dd8b3c; }

.btn--ghost { border-color: var(--stout-line); color: var(--cream); background: transparent; }
.btn--ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- brew log feed (signature component) ----------
   Replaces a card grid with a chronological logbook feed — entries strung
   along a vertical rule like pages in an actual brew log, each stamped
   with a batch marker instead of sitting in a boxed card. */

.log-filters {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0 0 2.6rem;
}

.log-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  padding: 0.5rem 1rem;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-muted);
  background: var(--card);
}
.log-filter .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dot-color, var(--amber)); flex-shrink: 0; }
.log-filter:hover { border-color: var(--dot-color, var(--amber)); color: var(--ink); }
.log-filter[aria-current="page"] { border-color: var(--dot-color, var(--amber)); color: var(--ink); background: var(--parchment); font-weight: 600; }

.log-feed {
  border-left: 2px solid var(--paper-line);
  margin-left: 6px;
  padding-left: 2.2rem;
}

.log-entry {
  position: relative;
  padding-bottom: 2.6rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.log-entry:last-child { padding-bottom: 0.2rem; }

.log-entry::before {
  content: "";
  position: absolute;
  left: -2.31rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--entry-color, var(--amber));
  box-shadow: 0 0 0 4px var(--parchment);
}

.log-entry__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--entry-color, var(--amber-deep));
  margin: 0 0 0.5rem;
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}
.log-entry__meta span.muted { color: var(--ink-muted); }

.log-entry h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.28;
  margin: 0 0 0.5rem;
  transition: color 0.15s ease;
}
.log-entry:hover h3 { color: var(--entry-color, var(--amber-deep)); }

.log-entry p {
  color: var(--ink-muted);
  font-size: 1rem;
  margin: 0;
  max-width: 62ch;
}

/* entry accent colors (reuses category palette) */
.entry--beer { --entry-color: var(--cat-beer); }
.entry--cider { --entry-color: var(--cat-cider); }
.entry--kombucha { --entry-color: var(--cat-kombucha); }
.entry--coffee { --entry-color: var(--cat-coffee); }
.entry--equipment { --entry-color: var(--cat-equipment); }

.filter--beer { --dot-color: var(--cat-beer); }
.filter--cider { --dot-color: var(--cat-cider); }
.filter--kombucha { --dot-color: var(--cat-kombucha); }
.filter--coffee { --dot-color: var(--cat-coffee); }
.filter--equipment { --dot-color: var(--cat-equipment); }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  color: #fff;
}
/* .tag--beer and .tag--kombucha use a slightly darker shade than the shared
   category color so white label text clears WCAG AA contrast (4.5:1) at this
   small font size; the shared --cat-beer/--cat-kombucha variables (used for
   dots, tiles, and entry accents elsewhere) are left unchanged. */
.tag--beer { background: #a96625; }
.tag--cider { background: var(--cat-cider); }
.tag--kombucha { background: #6e7c48; }
.tag--coffee { background: var(--cat-coffee); }
.tag--equipment { background: var(--cat-equipment); }

/* ---------- sections ---------- */

.section { padding: 4.5rem 0; }
.section--tight { padding: 2.5rem 0; }
.section--alt { background: var(--card); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }

.section__head { max-width: 62ch; margin: 0 0 2.4rem; }

.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin: 0 0 0.6rem;
}

.section__head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  margin: 0 0 0.7rem;
  letter-spacing: -0.01em;
}

.section__head p { color: var(--ink-muted); margin: 0; font-size: 1.02rem; }

/* category tiles on homepage */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.1rem;
}

.cat-tile {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--paper-line);
  border-left: 5px solid var(--tile-color, var(--amber));
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 22px -16px rgba(28,23,18,0.4); }
.cat-tile h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 0.35rem; }
.cat-tile p { margin: 0; font-size: 0.88rem; color: var(--ink-muted); }

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

.site-footer {
  background: var(--stout);
  color: #b7a892;
  padding: 3.2rem 0 2.4rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 1rem;
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-grid a { text-decoration: none; color: #b7a892; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--amber); }

.site-footer .wordmark { margin-bottom: 0.8rem; }
.site-footer p.tagline { max-width: 34ch; font-size: 0.92rem; color: #8f7f68; }

.footer-bottom {
  border-top: 1px solid var(--stout-line);
  margin-top: 2.6rem;
  padding-top: 1.4rem;
  font-size: 0.82rem;
  color: #8f7f68;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

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

.article-head {
  background: var(--stout);
  color: var(--cream);
  padding: 3.2rem 0 3rem;
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #a8987f;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 1.4rem;
}
.breadcrumb:hover { color: var(--amber); }

.article-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  max-width: 26ch;
  margin: 0 0 1.1rem;
}

.article-plate {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #cabca6;
  flex-wrap: wrap;
}

.prose {
  max-width: 68ch;
  margin: 0 auto;
  padding: 3.2rem 1.5rem 2rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 2.4rem 0 1rem;
}
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  margin: 1.8rem 0 0.8rem;
}
.prose p { margin: 0 0 1.2rem; font-size: 1.06rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }
.prose li { margin-bottom: 0.5rem; }
.prose a { color: var(--amber-deep); text-decoration-thickness: 1.5px; }

.note {
  background: var(--card);
  border: 1px solid var(--paper-line);
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  margin: 1.8rem 0;
  font-size: 0.96rem;
}
.note strong.note__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: 0.5rem;
}

.article-footer {
  max-width: 68ch;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  border-top: 1px dashed var(--paper-line);
}

.affiliate-note {
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-style: italic;
}

/* ---------- static pages (about / contact / legal) ---------- */

.page-head {
  background: var(--stout);
  color: var(--cream);
  padding: 3.5rem 0 3.2rem;
}
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 3.6vw, 2.8rem);
  margin: 0;
}
.page-head p { color: #cabca6; margin: 0.8rem 0 0; max-width: 52ch; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}

.stat-plate {
  background: var(--card);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.stat-plate h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin: 0 0 0.9rem;
}
.stat-row { display: flex; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px dashed var(--paper-line); font-size: 0.92rem; }
.stat-row:last-child { border-bottom: none; }
.stat-row span:last-child { font-family: var(--font-mono); color: var(--ink-muted); }

@media (max-width: 780px) {
  .about-grid { grid-template-columns: 1fr; }
}

