/* ==========================================================================
   BrewBench
   ========================================================================== */

:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-2: #57534e;
  --ink-3: #8b857e;
  --line: #e7e0d6;
  --brand: #7c2d12;
  --brand-2: #b45309;
  --accent: #0f766e;
  --good: #15803d;
  --bad: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 8px 24px -12px rgba(28, 25, 23, 0.18);
  --max: 780px;
  --wide: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }

/* --- layout ------------------------------------------------------------- */
/* .wrap owns the HORIZONTAL padding; vertical rhythm is owned by the
   section/hero rules below via padding-block. Keeping the axes on separate
   rules avoids one shorthand clobbering the other on shared elements
   like <div class="wrap hero">. */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: 20px; }
.wide { max-width: var(--wide); }

/* --- header ------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 244, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .inner {
  max-width: var(--wide); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 24px;
}
.logo {
  font-weight: 800; font-size: 20px; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.logo span { color: var(--brand); }
.nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 15.5px; font-weight: 500; }
.nav a:hover { color: var(--brand); }

/* --- hero --------------------------------------------------------------- */
.hero { padding-block: 64px 40px; }
.hero h1 {
  font-size: clamp(32px, 5.2vw, 50px);
  line-height: 1.1; letter-spacing: -0.03em;
  margin: 0 0 16px; font-weight: 800;
}
.hero p.lede { font-size: 19px; color: var(--ink-2); margin: 0 0 28px; max-width: 62ch; }

/* --- buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 15.5px; transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: var(--brand-2); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); background: transparent; }

/* --- sections ----------------------------------------------------------- */
section { padding-block: 40px; }
h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.02em; margin: 0 0 8px; font-weight: 750; }
h3 { font-size: 20px; letter-spacing: -0.01em; margin: 32px 0 8px; }
.section-sub { color: var(--ink-3); margin: 0 0 28px; }

/* --- cards -------------------------------------------------------------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(28,25,23,.05), 0 18px 34px -16px rgba(28,25,23,.28); }
.card h3 { margin: 0 0 8px; font-size: 18.5px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card p { color: var(--ink-2); font-size: 15.5px; margin: 0 0 16px; }
.card .meta { margin-top: auto; font-size: 13px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }

/* --- rank / pick badges ------------------------------------------------- */
.badge {
  display: inline-block; align-self: flex-start;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.badge.pick { background: #fef3c7; color: #92400e; }
.badge.budget { background: #dcfce7; color: #166534; }
.badge.premium { background: #ede9fe; color: #5b21b6; }

/* --- product block ------------------------------------------------------ */
.product {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; margin: 26px 0;
  box-shadow: var(--shadow);
}
.product-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.product h3 { margin: 0 0 4px; font-size: 22px; }
.price { font-size: 26px; font-weight: 800; color: var(--brand); white-space: nowrap; }
.price small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }

.pros-cons { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin: 18px 0; }
.pros-cons ul { margin: 6px 0 0; padding-left: 18px; font-size: 15.5px; color: var(--ink-2); }
.pros-cons li { margin-bottom: 5px; }
.pros-cons .h { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; }
.pros-cons .h.yes { color: var(--good); }
.pros-cons .h.no { color: var(--bad); }

/* --- product visual ------------------------------------------------------ */
.product-visual {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 0 18px;
  background: linear-gradient(140deg, #f5f0e9 0%, #ece4d8 100%);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.product-visual svg { width: 76%; height: 84%; }
.product-visual .pv-note {
  position: absolute; left: 10px; bottom: 8px;
  font-size: 11px; color: var(--ink-3); letter-spacing: .04em;
}
/* real image swaps in when data-img is provided */
.product-visual img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
  background: #fff;
  display: none;
}
.product-visual.has-img img { display: block; }
.product-visual.has-img .pv-note { display: none; }

/* --- spec table --------------------------------------------------------- */
table.specs { width: 100%; border-collapse: collapse; font-size: 15.5px; margin: 16px 0; }
table.specs th, table.specs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.specs th { width: 42%; color: var(--ink-3); font-weight: 600; }
table.specs tr:last-child th, table.specs tr:last-child td { border-bottom: 0; }

/* --- comparison table --------------------------------------------------- */
.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }
table.cmp { width: 100%; min-width: 640px; border-collapse: collapse; background: var(--surface); font-size: 15px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.cmp th, table.cmp td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); }
table.cmp thead th { background: #f5f0e9; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
table.cmp tbody tr:last-child td { border-bottom: 0; }
table.cmp td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.cmp .is-top { background: #fffbeb; }

/* --- callout ------------------------------------------------------------ */
.callout {
  background: #f0fdfa; border: 1px solid #99f6e4;
  border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 18px 20px; margin: 26px 0; font-size: 15.5px;
}
.callout strong { color: var(--accent); }
.callout.warn { background: #fffbeb; border-color: #fde68a; border-left-color: var(--brand-2); }
.callout.warn strong { color: var(--brand-2); }

/* --- disclosure --------------------------------------------------------- */
.disclosure {
  font-size: 13px; line-height: 1.55; color: var(--ink-3);
  background: #f5f0e9; border-top: 1px solid var(--line);
  padding: 14px 20px; text-align: center;
}

/* --- affiliate stub (dev only, disappears when tag is set) -------------- */
.amz-stub {
  font-size: 10px; background: #fee2e2; color: #991b1b;
  padding: 1px 5px; border-radius: 4px; margin-left: 6px; font-weight: 700;
}

/* --- article ------------------------------------------------------------ */
article { padding: 40px 0 20px; }
article h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 14px; font-weight: 800; }
.byline { color: var(--ink-3); font-size: 14px; margin: 0 0 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.article-body p, .article-body ul, .article-body ol { font-size: 17.5px; }
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 7px; }

.toc {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; margin: 26px 0;
}
.toc .t { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; font-size: 15.5px; }
.toc li { margin-bottom: 4px; }

/* --- footer ------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 36px 0 8px; background: var(--surface); }
.site-foot .cols { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.site-foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 0 0 12px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 8px; }
.site-foot a { color: var(--ink-2); text-decoration: none; font-size: 15px; }
.site-foot a:hover { color: var(--brand); }
.legal { max-width: var(--wide); margin: 30px auto 0; padding: 18px 20px 0; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13.5px; }

/* --- breadcrumbs -------------------------------------------------------- */
.crumbs { font-size: 13.5px; color: var(--ink-3); margin: 0 0 20px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs span { margin: 0 6px; }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 720px) {
  .pros-cons { grid-template-columns: 1fr; }
  .site-head .inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .nav { margin-left: 0; gap: 16px; }
  .hero { padding-block: 44px 28px; }
}
