/* Blog list (/blog) and post pages (/blog/<slug>). Loaded after site.css.
   Headings are Jost 600, text is Inter, colors are the site's. */

@font-face { font-family: 'Jost'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/jost-600.woff2') format('woff2'); }

:root {
  --font-blog-head: 'Jost', 'Inter', system-ui, sans-serif;
  --blog-line: #e4dfd5;
  --blog-muted: #4d5f55;
  --blog-shadow: 0 1px 2px rgba(39, 64, 52, .06), 0 18px 40px -22px rgba(39, 64, 52, .35);
  --blog-radius: 16px;
}

.nav a[aria-current="page"] { color: var(--terracotta); }

.blog-index h1, .blog-index h2, .blog-index h3,
.post h1, .post h2, .post h3 {
  font-family: var(--font-blog-head);
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--deep-green);
  text-wrap: balance;
}
.blog-index a:focus-visible, .post a:focus-visible, .post summary:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; border-radius: 4px; }

/* ---------- Shared bits ---------- */
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; line-height: 1; color: var(--blog-muted); }
.post-meta span:first-child { padding: 6px 10px; border-radius: 999px; background: #e3ebe6; color: var(--deep-green); font-weight: 600; }

.post-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap;
  margin: 44px 0; padding: 30px 34px;
  border-radius: var(--blog-radius);
  background: var(--deep-green); color: #d6e1da;
}
.post-cta > div { flex: 1 1 280px; }
.post-cta .post-cta__title { font-family: var(--font-blog-head); font-weight: 600; font-size: 23px; line-height: 1.25; color: #fff; margin: 0 0 6px; }
.post-cta p { margin: 0; font-size: 16px; line-height: 1.55; }
.post-cta .btn { white-space: nowrap; transition: background-color .2s ease, transform .15s ease; }
.post-cta .btn:hover { background: var(--terracotta-dark); }
.post-cta .btn:active { transform: translateY(1px); }
.post-cta--light { background: var(--cream); color: var(--blog-muted); }
.post-cta--light .post-cta__title { color: var(--deep-green); }

/* ---------- Blog list ---------- */
.blog-index { background: var(--cream); padding-bottom: 72px; }
.blog-intro { padding-top: 56px; padding-bottom: 36px; }
.blog-intro h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.06; max-width: 15ch; }
.blog-intro p { margin-top: 16px; max-width: 46ch; font-size: 18px; line-height: 1.55; color: var(--blog-muted); }

.blog-card { border-radius: var(--blog-radius); background: var(--paper); box-shadow: var(--blog-shadow); overflow: hidden; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.blog-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.blog-card__img { aspect-ratio: 16 / 10; overflow: hidden; background: #dfe6e1; }
.blog-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.blog-card__text { display: flex; flex-direction: column; gap: 12px; padding: 24px 26px 28px; flex: 1; }
.blog-card__title { font-size: 22px; line-height: 1.22; }
.blog-card__dek { margin: 0; font-size: 16px; line-height: 1.6; color: var(--blog-muted); }
.blog-card__more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; font-size: 15px; font-weight: 600; color: var(--terracotta); }
.blog-card__more svg { width: 18px; height: 18px; transition: transform .3s ease; }
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(39, 64, 52, .06), 0 26px 50px -24px rgba(39, 64, 52, .45); }
.blog-card:hover .blog-card__img img { transform: scale(1.035); }
.blog-card:hover .blog-card__more svg { transform: translateX(4px); }

@media (min-width: 900px) {
  .blog-card--featured .blog-card__link { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .blog-card--featured .blog-card__img { aspect-ratio: auto; min-height: 420px; }
  .blog-card--featured .blog-card__text { justify-content: center; gap: 16px; padding: 48px 52px; }
  .blog-card--featured .blog-card__title { font-size: 34px; line-height: 1.14; }
  .blog-card--featured .blog-card__dek { font-size: 17px; }
}

.blog-grid { display: grid; gap: 24px; margin-top: 24px; }
@media (min-width: 768px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.blog-index__cta { margin: 48px 0 0; }

/* ---------- Post ---------- */
.post { background: var(--paper); }
.post-head, .post-layout { display: grid; grid-template-columns: minmax(0, 720px); justify-content: center; }
@media (min-width: 1100px) {
  .post-head, .post-layout { grid-template-columns: 210px minmax(0, 720px); column-gap: 64px; }
  .post-head > * { grid-column: 2; }
}
.post-head { padding-top: 40px; }
.post-crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--blog-muted); }
.post-crumbs a { color: var(--forest); font-weight: 600; text-decoration: none; }
.post-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.post-head h1 { margin-top: 18px; font-size: clamp(34px, 4.2vw, 50px); line-height: 1.08; }
.post-dek { margin-top: 18px; font-size: 19px; line-height: 1.55; color: var(--blog-muted); }
.post-byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--blog-line); }
.post-byline img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--blog-line); }
.post-byline p { display: flex; flex-direction: column; gap: 2px; margin: 0; line-height: 1.35; }
.post-byline__name { font-size: 15px; font-weight: 600; color: var(--deep-green); }
.post-byline__when { font-size: 14px; color: var(--blog-muted); }

.post-hero { margin-top: 36px; }
.post-hero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--blog-radius); background: #dfe6e1; }
@media (max-width: 767px) { .post-hero img { aspect-ratio: 4 / 3; border-radius: 12px; } }

.post-layout { padding-bottom: 72px; }
.post-toc { display: none; }
@media (min-width: 1100px) {
  .post-toc { display: block; position: sticky; top: 28px; align-self: start; margin-top: 52px; }
  .post-layout > .post-body:only-child { grid-column: 2; }
}
.post-toc__title { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--deep-green); }
.post-toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--blog-line); }
.post-toc a { display: block; margin-left: -2px; padding: 7px 0 7px 14px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--blog-muted); text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.post-toc a:hover { color: var(--deep-green); border-left-color: var(--forest); }

.post-body { padding-top: 44px; font-size: 18px; line-height: 1.75; color: var(--ink-navy); }
.post-body > * + * { margin-top: 1.15em; }
.post-body p + p { margin-top: 1.15em; }
.post-body h2 { margin-top: 2.1em; font-size: clamp(26px, 2.6vw, 31px); line-height: 1.2; scroll-margin-top: 24px; }
.post-body h3 { margin-top: 1.8em; font-family: var(--font-body); font-weight: 600; font-size: 20px; letter-spacing: 0; }
.post-body h2 + *, .post-body h3 + * { margin-top: .6em; }
.post-body a { color: var(--terracotta); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--terracotta-dark); text-decoration-thickness: 2px; }
.post-body strong { font-weight: 600; color: var(--deep-green); }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li + li { margin-top: .5em; }
.post-body li::marker { color: var(--forest); }
.post-body .btn, .post-body .post-cta a { text-decoration: none; color: #fff; }

.post-callout { padding: 28px 32px; border-radius: var(--blog-radius); background: var(--cream); }
.post-body > .post-callout:first-child { margin-top: 0; }
.post-callout p { margin: 0; font-size: 18px; line-height: 1.7; }
.post-callout p + p { margin-top: .8em; }
.post-callout__title { margin-bottom: 8px !important; font-family: var(--font-blog-head); font-weight: 600; font-size: 21px !important; color: var(--deep-green); }

.post-table { overflow-x: auto; border: 1px solid var(--blog-line); border-radius: var(--blog-radius); }
.post-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.post-table th, .post-table td { padding: 15px 20px; text-align: left; vertical-align: top; }
.post-table thead th { background: var(--cream); font-size: 13px; font-weight: 600; color: var(--blog-muted); }
.post-table tbody tr + tr > * { border-top: 1px solid var(--blog-line); }
.post-table tbody th { font-weight: 500; color: var(--ink-navy); }
.post-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-table td.num { font-weight: 600; color: var(--deep-green); }
@media (max-width: 560px) {
  .post-table table { font-size: 15px; }
  .post-table th, .post-table td { padding: 13px 12px; }
}
@media (max-width: 400px) {
  .post-table table { font-size: 14px; }
  .post-table th, .post-table td { padding: 12px 10px; }
  .post-table td.num { white-space: normal; }
}

.post-faq { border-bottom: 1px solid var(--blog-line); }
.post-faq details { border-top: 1px solid var(--blog-line); }
.post-faq summary { position: relative; padding: 20px 44px 20px 0; list-style: none; cursor: pointer; font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--deep-green); }
.post-faq summary::-webkit-details-marker { display: none; }
.post-faq summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  background: linear-gradient(var(--terracotta), var(--terracotta)) center / 16px 2px no-repeat, linear-gradient(var(--terracotta), var(--terracotta)) center / 2px 16px no-repeat;
  transition: transform .25s ease;
}
.post-faq details[open] summary::after { transform: rotate(45deg); }
.post-faq__a { padding-bottom: 20px; }
.post-faq__a p { margin: 0; font-size: 17px; line-height: 1.7; }

.post-more { padding: 64px 0 72px; background: var(--cream); }
.post-more h2 { font-size: 30px; line-height: 1.2; }

@media (max-width: 767px) {
  .blog-intro { padding-top: 36px; padding-bottom: 28px; }
  .blog-intro p { font-size: 17px; }
  .blog-card__text { padding: 22px 22px 26px; }
  .post-head { padding-top: 28px; }
  .post-dek { font-size: 18px; }
  .post-body { padding-top: 32px; font-size: 17px; }
  .post-callout { padding: 22px 22px; }
  .post-callout p { font-size: 17px; }
  .post-cta { padding: 26px 24px; margin: 36px 0; }
  .post-cta .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-card, .blog-card__img img, .blog-card__more svg, .post-faq summary::after, .post-toc a, .post-cta .btn { transition: none; }
  .blog-card:hover { transform: none; }
  .blog-card:hover .blog-card__img img { transform: none; }
}
