/* Stellar blog — hand-authored to match the main site's design tokens
   (Syne + DM Sans, brand #5046e4, page bg #f4f2f7, card surface #ffffff,
   10px card radius, pill buttons) rather than Framer's generated classes,
   same approach used for /privacypolicy and /termsofservice. */

:root {
  --brand: #5046e4;
  --brand-hover: #4038c8;
  --page-bg: #f4f2f7;
  --surface: #ffffff;
  --surface-2: #eae6ed;
  --ink: #262626;
  --ink-75: rgba(38, 38, 38, .75);
  --ink-60: rgba(38, 38, 38, .6);
  --ink-45: rgba(38, 38, 38, .45);
  --ink-15: rgba(38, 38, 38, .15);
  --ink-10: rgba(38, 38, 38, .1);
  --radius: 10px;
  --maxw: 1240px;
  --nav-h: 84px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page-bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.font-display { font-family: "Syne", sans-serif; }

/* ---------- Header (matches the main site's fixed nav) ---------- */
.blog-nav-spacer { height: var(--nav-h); }
header.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  background: var(--page-bg);
  padding: 15px 40px;
}
.site-nav-inner {
  max-width: 1425px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { width: 26px; height: 26px; }
.site-logo span { font-family: "Syne", sans-serif; font-weight: 800; font-size: 20.8px; color: var(--ink); }
.site-links { display: flex; align-items: center; gap: 32px; }
.site-links a { font-family: "DM Sans", sans-serif; font-weight: 600; font-size: 16px; color: var(--ink); }
.site-links a:hover { color: var(--brand); }
.site-links a[aria-current="page"] { color: var(--brand); }
.site-cta {
  font-family: "DM Sans", sans-serif; font-weight: 600; font-size: 15px;
  background: var(--brand); color: #fff; padding: 14px 24px; border-radius: 999px;
  white-space: nowrap;
}
.site-cta:hover { background: var(--brand-hover); }
.nav-toggle { display: none; background: none; border: none; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
#blog-mobile-menu[hidden] { display: none; }
#blog-mobile-menu {
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 39;
  background: var(--surface); border-bottom: 1px solid var(--ink-10);
  padding: 8px 24px 20px; display: flex; flex-direction: column; gap: 4px;
}
#blog-mobile-menu a {
  font-family: "DM Sans", sans-serif; font-weight: 600; font-size: 16px; color: var(--ink);
  padding: 12px 0; border-bottom: 1px solid var(--ink-10);
}
#blog-mobile-menu .site-cta { text-align: center; margin-top: 12px; }

@media (max-width: 1199.98px) {
  .site-links, .desktop-cta { display: none !important; }
  .nav-toggle { display: block; }
}

/* ---------- Blog index ---------- */
.blog-hero { max-width: var(--maxw); margin: 0 auto; padding: 64px 24px 40px; text-align: center; }
.blog-eyebrow {
  display: inline-block; font-family: "DM Sans", sans-serif; font-weight: 600; font-size: 12.8px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--brand);
  background: rgba(80,70,228,.08); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.blog-hero h1 {
  font-family: "Syne", sans-serif; font-weight: 500; font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1.1; margin: 0 0 16px; color: var(--ink);
}
.blog-hero p { font-size: 1.1rem; color: var(--ink-75); max-width: 620px; margin: 0 auto; }

.blog-main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 96px; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 1px 2px rgba(38,38,38,.04), 0 8px 24px -14px rgba(38,38,38,.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(38,38,38,.06), 0 16px 32px -14px rgba(38,38,38,.24); }
.post-card-media { aspect-ratio: 16/10; background: var(--surface-2); overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.post-topic {
  font-family: "DM Sans", sans-serif; font-weight: 600; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--brand); background: rgba(80,70,228,.08);
  padding: 3px 9px; border-radius: 999px;
}
.post-card-body h2 {
  font-family: "Syne", sans-serif; font-weight: 500; font-size: 1.25rem; line-height: 1.3; margin: 0;
  color: var(--ink);
}
.post-card-body .excerpt { font-size: 14.5px; color: var(--ink-60); line-height: 1.55; margin: 0; flex: 1; }
.post-meta { font-size: 12.5px; color: var(--ink-45); display: flex; gap: 8px; align-items: center; }
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-45); }

/* Featured (most recent) post — larger treatment */
.post-featured {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; align-items: stretch;
  background: var(--surface); border-radius: 16px; overflow: hidden; margin-bottom: 40px;
  box-shadow: 0 1px 2px rgba(38,38,38,.04), 0 12px 32px -16px rgba(38,38,38,.22);
}
.post-featured .post-card-media { aspect-ratio: auto; height: 100%; min-height: 280px; }
.post-featured .post-card-body { padding: 36px 40px; justify-content: center; gap: 14px; }
.post-featured .post-card-body h2 { font-size: 1.85rem; line-height: 1.2; }
.post-featured .excerpt { font-size: 15.5px; }
@media (max-width: 780px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured .post-card-media { min-height: 200px; }
  .post-featured .post-card-body { padding: 24px; }
}

.blog-empty {
  text-align: center; padding: 80px 24px; background: var(--surface); border-radius: 16px;
}
.blog-empty h2 { font-family: "Syne", sans-serif; font-weight: 500; font-size: 1.6rem; margin: 0 0 10px; }
.blog-empty p { color: var(--ink-60); margin: 0 0 24px; }
.blog-empty a {
  display: inline-block; font-weight: 600; background: var(--brand); color: #fff;
  padding: 12px 26px; border-radius: 999px;
}
.blog-empty a:hover { background: var(--brand-hover); }

/* ---------- Post detail: two-column layout (article left, rail right) ---------- */
.post-shell { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; padding: 48px 0 64px; }
.post-main { min-width: 0; }

.back-link { font-size: 14px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; margin-bottom: 28px; }
.back-link:hover { color: var(--brand-hover); }
.post-head { margin-bottom: 32px; }
.post-head .post-topics { margin-bottom: 18px; }
.post-head h1 {
  font-family: "Syne", sans-serif; font-weight: 500; font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.15; margin: 0 0 18px; color: var(--ink);
}
.post-head .post-meta { font-size: 14px; }
.post-hero-img { margin: 0 0 40px; }
.post-hero-img img { width: 100%; border-radius: 16px; }

.post-body { font-size: 17px; line-height: 1.75; color: var(--ink-75); }
.post-body h2 {
  font-family: "Syne", sans-serif; font-weight: 500; font-size: 1.55rem; color: var(--ink);
  margin: 44px 0 16px; line-height: 1.3;
}
.post-body h3 {
  font-family: "Syne", sans-serif; font-weight: 500; font-size: 1.2rem; color: var(--ink);
  margin: 32px 0 12px;
}
.post-body p { margin: 0 0 20px; }
.post-body ul, .post-body ol { margin: 0 0 20px; padding-left: 24px; }
.post-body li { margin-bottom: 8px; }
.post-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--brand-hover); }
.post-body blockquote {
  margin: 28px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brand);
  color: var(--ink-60); font-style: italic;
}
.post-body img { border-radius: 12px; margin: 8px 0; }
.post-body img + em { display: block; text-align: center; font-size: 13px; color: var(--ink-45); margin: -4px 0 20px; font-style: normal; }
.post-body strong { color: var(--ink); }
.post-body hr { border: none; border-top: 1px solid var(--ink-10); margin: 40px 0; }

.post-cta { margin-top: 8px; }
.post-cta-card {
  background: var(--surface-2); border-radius: 16px; padding: 36px 40px; text-align: center;
}
.post-cta-card h3 { font-family: "Syne", sans-serif; font-weight: 500; font-size: 1.4rem; margin: 0 0 10px; }
.post-cta-card p { color: var(--ink-60); margin: 0 0 22px; }
.post-cta-card a {
  display: inline-block; font-weight: 600; background: var(--brand); color: #fff;
  padding: 13px 28px; border-radius: 999px;
}
.post-cta-card a:hover { background: var(--brand-hover); }

/* ---------- Post sidebar ---------- */
.post-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--nav-h) + 24px); }
.sidebar-card {
  background: var(--surface); border-radius: var(--radius); padding: 24px;
  box-shadow: 0 1px 2px rgba(38,38,38,.04), 0 8px 24px -14px rgba(38,38,38,.18);
}
.sidebar-title {
  font-family: "Syne", sans-serif; font-weight: 500; font-size: 1rem; margin: 0 0 16px; color: var(--ink);
}

.share-icons { display: flex; gap: 10px; }
.share-icon {
  position: relative; width: 40px; height: 40px; border-radius: 999px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; color: var(--ink);
  border: none; cursor: pointer; padding: 0; font: inherit;
}
.share-icon svg { width: 17px; height: 17px; }
.share-icon:hover { background: var(--brand); color: #fff; }
.share-icon.copied::after {
  content: "Copied!"; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px;
  white-space: nowrap; pointer-events: none;
}

.sidebar-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sidebar-tag {
  font-family: "DM Sans", sans-serif; font-weight: 600; font-size: 12.5px; color: var(--brand);
  background: rgba(80,70,228,.08); padding: 6px 12px; border-radius: 999px;
}

.related-list { display: flex; flex-direction: column; gap: 16px; }
.related-card { display: flex; gap: 12px; align-items: flex-start; }
.related-card-media { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--surface-2); }
.related-card-media img { width: 100%; height: 100%; object-fit: cover; }
.related-card-body { min-width: 0; }
.related-eyebrow {
  display: block; font-family: "DM Sans", sans-serif; font-size: 11px; font-weight: 600; color: var(--ink-45);
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px;
}
.related-card-body h4 {
  font-family: "Syne", sans-serif; font-weight: 500; font-size: 13.5px; line-height: 1.35; margin: 0; color: var(--ink);
}
.related-card:hover h4 { color: var(--brand); }

.sidebar-blurb { font-size: 13.5px; color: var(--ink-60); line-height: 1.55; margin: 0 0 16px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input {
  font-family: "DM Sans", sans-serif; font-size: 14px; padding: 11px 14px; border-radius: 8px;
  border: 1px solid var(--ink-15); background: var(--page-bg); color: var(--ink); outline: none;
}
.newsletter-form input::placeholder { color: var(--ink-45); }
.newsletter-form input:focus { border-color: var(--brand); }
.newsletter-form button {
  font-family: "DM Sans", sans-serif; font-weight: 600; font-size: 14px; background: var(--brand); color: #fff;
  border: none; border-radius: 8px; padding: 11px 14px; cursor: pointer;
}
.newsletter-form button:hover { background: var(--brand-hover); }

@media (max-width: 980px) {
  .post-layout { grid-template-columns: 1fr; gap: 40px; }
  .post-sidebar { position: static; }
}

/* ---------- Footer (matches /privacypolicy, /termsofservice) ---------- */
footer.site-footer { background: rgb(234,230,237); padding: 56px 24px 32px; }
.site-footer-inner { max-width: 1300px; margin: 0 auto; }
.site-footer-cols { display: flex; flex-wrap: wrap; gap: 48px; padding-bottom: 40px; }
.site-footer-brand { display: flex; flex-direction: column; gap: 15px; max-width: 280px; }
.site-footer-logo { font-family: "Syne", sans-serif; font-weight: 800; font-size: 22px; color: var(--ink); }
.site-footer-tagline { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-60); }
.site-footer-col { display: flex; flex-direction: column; gap: 12px; }
.site-footer-col h4 { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.site-footer-col a { font-size: 14px; font-weight: 600; color: var(--ink); }
.site-footer-col a:hover { color: var(--brand); }
.site-footer-bottom { border-top: 1px solid var(--ink-10); padding-top: 24px; font-size: 13px; color: var(--ink-45); }

@media (max-width: 1199.98px) {
  header.site-nav { padding: 15px 20px !important; }
  footer.site-footer { padding: 40px 16px 20px !important; }
}
