@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --terracotta: #C77C5E;
  --ink: #2A2520;
  --ink-soft: rgba(42, 37, 32, 0.6);
  --ink-muted: rgba(42, 37, 32, 0.38);
  --cream: #FAF6EF;
  --cream-soft: #F5EFE6;
  --border: rgba(42, 37, 32, 0.12);
  --sage: #7FA68C;
  --sage-dark: #5b8571;
  --teal: #4DB6AC;
  --teal-dark: #2E8B80;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ---- Container ---- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(42, 37, 32, 0.08);
  padding: 14px 0;
}
.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fredoka', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
}
.pip-logo { width: 36px; height: 36px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 600;
}
.nav-links a { color: var(--ink-soft); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-cta {
  background: var(--sage);
  color: white !important;
  padding: 9px 18px;
  border-radius: 999px;
  border: 2px solid var(--sage-dark);
  font-weight: 700;
  transition: background 0.15s, transform 0.15s;
}
.nav-cta:hover { background: var(--sage-dark); transform: translateY(-1px); }

/* ---- Category tags ---- */
.cat-tag {
  display: inline-block;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.cat-tag.green  { background: rgba(127,166,140,0.15); color: var(--sage-dark); }
.cat-tag.build  { background: rgba(199,124,94,0.12);  color: var(--terracotta); }
.cat-tag.parents{ background: rgba(232,184,68,0.15);   color: #B8902A; }

/* ---- Blog listing header ---- */
.blog-header {
  padding: 45px 0 40px;
  text-align: center;
}
.blog-header .eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #D97757;
  margin-bottom: 14px;
}
.blog-header h1 {
  font-size: clamp(36px, 5vw, 54px);
  color: var(--ink);
  margin-bottom: 14px;
}
.blog-header p {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Category filter bar ---- */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 44px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  padding: 10px 17px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.filter-pill:hover { transform: translateY(-1px); }
.filter-pill .filter-count { font-size: 12px; font-weight: 800; opacity: 0.55; }
.filter-pill.green   { border-color: rgba(127,166,140,0.5); color: var(--sage-dark); }
.filter-pill.build   { border-color: rgba(199,124,94,0.5);  color: var(--terracotta); }
.filter-pill.parents { border-color: rgba(232,184,68,0.5);   color: #B8902A; }
.filter-pill.active { color: #fff; }
.filter-pill.all.active     { background: var(--ink);        border-color: var(--ink); }
.filter-pill.green.active   { background: var(--sage-dark);  border-color: var(--sage-dark); }
.filter-pill.build.active   { background: var(--terracotta); border-color: var(--terracotta); }
.filter-pill.parents.active { background: #B8902A;          border-color: #B8902A; }
.filter-pill.active .filter-count { opacity: 0.8; }

/* Filtered cards */
.post-card.is-hidden { display: none; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.post-card.just-shown { animation: cardIn 0.28s ease both; }

/* ---- Post grid ---- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 80px;
}
.post-card {
  background: white;
  border-radius: 16px;
  padding: 26px;
  border: 1.5px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(42,37,32,0.1);
}
.post-card .cat-tag { margin-bottom: 14px; }
.post-card h2 {
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.3;
  flex: 1;
}
.post-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 2;
}
.post-meta {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 700;
  margin-bottom: 14px;
}
.read-more {
  font-size: 14px;
  font-weight: 800;
  color: var(--terracotta);
}

/* ---- Post page header ---- */
.post-page-header {
  padding: 60px 0 40px;
}
.post-page-header .inner {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px;
}
.post-page-header .cat-tag { margin-bottom: 18px; }
.post-page-header h1 {
  font-size: clamp(30px, 4.5vw, 48px);
  color: var(--ink);
  margin-bottom: 18px;
  line-height: 1.2;
}
.post-byline {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.byline-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ink-muted);
  display: inline-block;
}
.post-divider {
  max-width: 740px;
  margin: 0 auto 48px;
  padding: 0 24px;
  border: none;
  border-top: 1.5px solid var(--border);
}

/* ---- Post body ---- */
.post-body {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.post-body p {
  font-size: 17px;
  line-height: 1.85;
  margin-bottom: 24px;
  color: var(--ink);
}
.post-body h2 {
  font-size: 26px;
  margin-top: 52px;
  margin-bottom: 16px;
  color: var(--ink);
}
.post-body h3 {
  font-size: 19px;
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--ink);
}
.post-body ul, .post-body ol {
  margin-bottom: 24px;
  padding-left: 22px;
}
.post-body li {
  font-size: 17px;
  line-height: 1.8;
  margin-bottom: 8px;
}
.post-body strong { font-weight: 800; }
.post-body blockquote {
  border-left: 4px solid var(--terracotta);
  padding: 16px 24px;
  margin: 36px 0;
  background: rgba(199,124,94,0.06);
  border-radius: 0 12px 12px 0;
  font-size: 18px;
  font-style: italic;
  color: var(--ink-soft);
  line-height: 1.7;
}
.post-body hr {
  border: none;
  border-top: 1.5px solid var(--border);
  margin: 40px 0;
}

/* Checklist styling */
.post-body .checklist {
  list-style: none;
  padding-left: 0;
  margin-bottom: 24px;
}
.post-body .checklist li {
  padding: 10px 16px;
  background: var(--cream-soft);
  border-radius: 10px;
  margin-bottom: 7px;
  font-size: 15px;
  border: 1px solid var(--border);
  line-height: 1.5;
}
.post-body .checklist li.section-label {
  background: var(--ink);
  color: var(--cream);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 20px;
}
.post-body .checklist li.red-flag { border-left: 3px solid #E57373; }
.post-body .checklist li.green-flag { border-left: 3px solid var(--sage); }

/* Try-this-tonight box */
.post-body .try-box {
  background: rgba(127,166,140,0.1);
  border: 1.5px solid rgba(127,166,140,0.4);
  border-radius: 14px;
  padding: 22px 26px;
  margin: 40px 0;
}
.post-body .try-box .try-label {
  display: inline-block;
  font-family: 'Fredoka', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 8px;
}
.post-body .try-box p { margin-bottom: 0; font-size: 16px; line-height: 1.7; }
.post-body .try-box p + p { margin-top: 12px; }

/* Pull stat / callout line */
.post-body .pull-stat {
  font-family: 'Fredoka', sans-serif;
  font-size: clamp(23px, 3.2vw, 31px);
  line-height: 1.3;
  font-weight: 600;
  color: var(--terracotta);
  text-align: center;
  letter-spacing: -0.01em;
  margin: 44px 0;
}

/* Forward / share nudge */
.post-body .share-nudge {
  font-size: 16px;
  color: var(--ink-soft);
  font-style: italic;
  border-top: 1.5px solid var(--border);
  padding-top: 24px;
  margin-top: 8px;
}

/* Answer-first summary box */
.post-body .answer-box {
  background: var(--cream-soft);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--terracotta);
  border-radius: 0 14px 14px 0;
  padding: 20px 26px;
  margin: 0 0 40px;
}
.post-body .answer-box .answer-label {
  display: inline-block;
  font-family: 'Fredoka', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 8px;
}
.post-body .answer-box p {
  margin-bottom: 0;
  font-size: 17px;
  line-height: 1.7;
  font-weight: 600;
}

/* FAQ section */
.post-body .post-faq {
  margin-top: 56px;
  border-top: 1.5px solid var(--border);
  padding-top: 4px;
}
.post-body .post-faq h2 { margin-top: 28px; margin-bottom: 4px; }
.post-body .faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.post-body .faq-item h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
}
.post-body .faq-item p { margin-bottom: 0; }

/* Comparison table */
.post-body .compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0 12px;
  border-radius: 12px;
}
.post-body .compare-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 660px;
  font-size: 14.5px;
}
.post-body .compare-table th,
.post-body .compare-table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.post-body .compare-table thead th {
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 800;
}
.post-body .compare-table tbody th {
  font-weight: 800;
  background: var(--cream-soft);
  white-space: nowrap;
}
.post-body .compare-table tr.is-loopz th,
.post-body .compare-table tr.is-loopz td {
  background: rgba(199, 124, 94, 0.09);
}
.post-body .compare-table tr.is-loopz th { color: var(--terracotta); }
.post-body .compare-caption {
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 24px;
}

/* Share row */
.post-body .share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1.5px solid var(--border);
}
.post-body .share-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  margin-right: 2px;
}
.post-body .share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--cream-soft);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease;
}
.post-body .share-btn:hover { transform: translateY(-1px); }
.post-body .share-btn.wa:hover { background: rgba(37, 211, 102, 0.13); border-color: #25D366; }
.post-body .share-btn.fb:hover { background: rgba(24, 119, 242, 0.12); border-color: #1877F2; }
.post-body .share-btn.x:hover { background: rgba(42, 37, 32, 0.08); border-color: var(--ink); }
.post-body .share-btn.em:hover { background: rgba(127, 166, 140, 0.16); border-color: var(--sage); }
.post-body .share-btn.copy:hover { background: rgba(199, 124, 94, 0.12); border-color: var(--terracotta); }
.post-body .share-btn.copied { background: var(--sage); color: #fff; border-color: var(--sage); }
.post-body .share-btn.native { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.post-body .share-btn svg { width: 15px; height: 15px; display: block; }

/* ---- Post CTA ---- */
.post-cta-wrap {
  max-width: 740px;
  margin: 0 auto 80px;
  padding: 0 24px;
}
.post-cta {
  background: var(--cream-soft);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
}
.post-cta h3 { font-size: 24px; margin-bottom: 10px; }
.post-cta p { font-size: 15px; color: var(--ink-soft); margin-bottom: 24px; }
.cta-form {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
}
.cta-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  background: white;
  outline: none;
}
.cta-form input:focus { border-color: var(--terracotta); }
.cta-form button {
  padding: 12px 20px;
  background: var(--terracotta);
  color: white;
  border: 2.5px solid var(--ink);
  border-bottom-width: 4px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s;
}
.cta-form button:hover { transform: translateY(-1px); }
.cta-note { font-size: 13px; color: var(--ink-muted); margin-top: 10px; }

/* ---- Footer ---- */
footer {
  background: var(--ink);
  color: rgba(250,246,239,0.65);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { color: var(--cream); margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.6; }
.footer-col h4 {
  font-family: 'Fredoka', sans-serif;
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-col a { display: block; font-size: 14px; margin-bottom: 10px; transition: color 0.15s; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(250,246,239,0.1);
  font-size: 13px;
}

/* ---- Back link ---- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 16px 24px 0;
  max-width: 740px;
  margin: 0 auto;
  display: block;
  transition: color 0.15s;
}
.back-link:hover { color: var(--ink); }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links a:not(.nav-cta) { display: none; }
  .cta-form { flex-direction: column; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .post-cta { padding: 28px 20px; }
}
