/* ───────────────────────────────────────────────────────────────────────────
   HandymanHomePlan — Blog styles
   Standalone stylesheet for the static /blog/ pages (no Tailwind at runtime).
   Color values mirror tailwind.config.js so the blog matches the React site.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --paper:   #F4F2EC;
  --surface: #FBFAF6;
  --band:    #ECEEE8;
  --ink:     #1F2A28;
  --ink2:    #5A655F;
  --muted:   #84908A;
  --brand:   #5E8C6A;
  --brand-hover: #4A7457;
  --brand-deep:  #3E5E48;
  --brand-wash:  #DCE7DD;
  --line:    #D8D4CA;
  --line-strong: #C4C0B4;
  --footer:  #20302B;
  --footer-text: #AEBBB2;
  --footer-head: #EDF1EC;
  --caution: #C8901F;
  --maxw: 1120px;
  --readw: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-deep); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 246, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-lockup img { height: 34px; width: 34px; border-radius: 8px; }
.brand-lockup span {
  font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
  font-size: 1.05rem; white-space: nowrap;
}
.header-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--brand); color: var(--surface);
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
  padding: 10px 18px; border-radius: 10px;
  transition: background-color .2s ease;
}
.header-cta:hover { background: var(--brand-hover); }

/* ─── Page shells ─────────────────────────────────────────────────────────── */
main { display: block; }

.page-intro { padding: 56px 0 8px; }
.page-intro .eyebrow {
  display: inline-block; background: var(--brand-wash); color: var(--brand-deep);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.page-intro h1 { font-size: clamp(2rem, 4vw, 2.85rem); line-height: 1.1; margin: 0 0 14px; letter-spacing: -0.02em; }
.page-intro p { color: var(--ink2); font-size: 1.1rem; max-width: var(--readw); margin: 0; }

/* ─── Listing grid ────────────────────────────────────────────────────────── */
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px; padding: 40px 0 72px;
}
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; text-decoration: none; color: inherit;
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.post-card:hover {
  box-shadow: 0 12px 30px rgba(31,42,40,0.08);
  border-color: var(--line-strong); transform: translateY(-2px);
}
.post-card .thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--band); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card .cat {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--brand-deep); margin-bottom: 10px;
}
.post-card h2 { font-size: 1.2rem; line-height: 1.3; margin: 0 0 10px; letter-spacing: -0.01em; }
.post-card p { color: var(--ink2); font-size: 0.95rem; margin: 0 0 18px; flex: 1; }
.post-card .meta { color: var(--muted); font-size: 0.82rem; }
.post-card .readmore {
  margin-top: 14px; color: var(--brand-deep); font-weight: 600; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 6px;
}

/* ─── Article ─────────────────────────────────────────────────────────────── */
.breadcrumb { padding: 28px 0 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb a { color: var(--ink2); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-deep); }

article.post { padding: 8px 0 40px; }
article.post .head { max-width: var(--readw); margin: 0 auto; padding: 24px 0 12px; }
article.post .cat {
  font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--brand-deep); margin-bottom: 14px; display: block;
}
article.post h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.12; margin: 0 0 16px; letter-spacing: -0.02em; }
article.post .byline { color: var(--muted); font-size: 0.9rem; }

.post-hero { max-width: var(--maxw); margin: 24px auto 8px; padding: 0 20px; }
.post-hero img { width: 100%; border-radius: 18px; aspect-ratio: 16 / 8; object-fit: cover; }
.post-hero figcaption { color: var(--muted); font-size: 0.8rem; text-align: center; margin-top: 8px; }

.post-body { max-width: var(--readw); margin: 0 auto; padding: 28px 0 0; }
.post-body p { font-size: 1.08rem; color: var(--ink); margin: 0 0 22px; }
.post-body h2 {
  font-size: 1.55rem; line-height: 1.25; margin: 40px 0 14px; letter-spacing: -0.01em;
}
.post-body h3 { font-size: 1.2rem; margin: 30px 0 10px; }
.post-body ul, .post-body ol { margin: 0 0 22px; padding-left: 22px; }
.post-body li { margin: 8px 0; font-size: 1.05rem; }
.post-body a { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--brand-hover); }
.post-body strong { color: var(--ink); }

.post-body blockquote {
  margin: 26px 0; padding: 18px 22px;
  background: var(--brand-wash); border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
}
.post-body blockquote p { font-size: 1.1rem; font-style: italic; color: var(--brand-deep); margin: 0; }
.post-body blockquote cite {
  display: block; margin-top: 10px; font-style: normal; font-size: 0.85rem; color: var(--ink2);
}
.post-body blockquote cite a { color: var(--brand-deep); }

.callout {
  margin: 30px 0; padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px;
}
.callout p { margin: 0; font-size: 1.02rem; color: var(--ink2); }
.callout p + p { margin-top: 12px; }

.post-cta {
  max-width: var(--readw); margin: 40px auto 0; padding: 26px 24px;
  background: var(--footer); border-radius: 16px; text-align: center;
}
.post-cta p { color: var(--footer-text); margin: 0 0 16px; font-size: 1.02rem; }
.post-cta strong { color: var(--footer-head); }
.post-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: var(--surface); font-weight: 700; text-decoration: none;
  padding: 12px 24px; border-radius: 12px; transition: background-color .2s ease;
}
.post-cta a:hover { background: var(--brand-hover); }

.back-link { max-width: var(--readw); margin: 36px auto 0; }
.back-link a { color: var(--brand-deep); font-weight: 600; text-decoration: none; }
.back-link a:hover { text-decoration: underline; }

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--footer); color: var(--footer-text); padding: 48px 0 32px; margin-top: 24px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer img { height: 34px; width: auto; margin-bottom: 14px; }
.site-footer p.blurb { font-size: 0.9rem; max-width: 30ch; margin: 0; }
.site-footer h4 { color: var(--footer-head); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 8px 0; }
.site-footer a { color: var(--footer-text); text-decoration: none; font-size: 0.9rem; }
.site-footer a:hover { color: var(--brand); }
.site-footer .base {
  border-top: 1px solid rgba(94,140,106,0.25); margin-top: 32px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem; color: rgba(174,187,178,0.7);
}

@media (max-width: 720px) {
  .header-cta { padding: 9px 14px; font-size: 0.85rem; }
  .brand-lockup span { font-size: 0.98rem; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 28px; }
  .site-footer .base { flex-direction: column; }
}
