/* Blog index and article pages. Builds on page.css tokens and .prose styles. */

/* Index: featured article + latest list, then a card grid */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.blog-index { width: 100%; max-width: 1400px; margin: 0 auto; padding: 40px 48px 48px; }
.blog-top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 40px; align-items: stretch; }
.blog-top--solo { grid-template-columns: minmax(0, 1fr); }

/* Featured card (whole card is clickable via the title link) */
.feature {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 440px; padding: 48px 48px 40px; border-radius: 16px; overflow: hidden;
  background: var(--navy);
  color: #fff;  transition: transform .2s;
}
.feature::before {
  content: ''; position: absolute; top: 0; left: 48px; width: 56px; height: 4px;
  background: var(--gold); border-radius: 0 0 3px 3px;
}
.feature:hover { transform: translateY(-3px);  }
.feature-label {
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 16px;
}
.feature h2 {
  font-family: 'Playfair Display', serif; font-weight: 500; letter-spacing: -.01em;
  font-size: clamp(32px, 3.8vw, 50px); line-height: 1.12; margin-bottom: 16px; max-width: 22ch;
}
.feature h2 a { color: #fff; text-decoration: none; }
.feature h2 a::after { content: ''; position: absolute; inset: 0; border-radius: 16px; }
.feature h2 a:focus-visible { outline: none; }
.feature h2 a:focus-visible::after { outline: 3px solid var(--gold-light); outline-offset: -3px; }
.feature-desc { color: rgba(255, 255, 255, .85); font-size: 19px; line-height: 1.65; max-width: 60ch; }
.feature-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14);
}
.feature-meta { font-size: 13px; color: rgba(255, 255, 255, .72); }
.feature-more { font-size: 14px; font-weight: 500; color: var(--gold-light); }
.feature:hover .feature-more { text-decoration: underline; text-underline-offset: 4px; }

/* Section headings */
.list-heading {
  font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-text); padding-bottom: 12px; border-bottom: 1px solid var(--border);
}

/* Latest (side list) */
.blog-side { display: flex; flex-direction: column; }
.side-list { list-style: none; display: flex; flex-direction: column; flex: 1; }
.side-list li { flex: 1; border-bottom: 1px solid var(--border); }
.side-list article { position: relative; padding: 22px 0; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.side-list h3 {
  font-family: 'Playfair Display', serif; font-weight: 500; color: var(--navy);
  font-size: 22px; line-height: 1.3;
}
.side-list h3 a { text-decoration: none; }
.side-list h3 a::after { content: ''; position: absolute; inset: 0; }
.side-list article:hover h3 a { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }

.post-meta { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }

/* More articles (card grid) */
.blog-more { margin-top: 48px; }
.card-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.post-card article {
  position: relative; height: 100%; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 26px 26px 22px; transition: border-color .2s, transform .15s;
}
.post-card article:hover { border-color: var(--gold);  transform: translateY(-2px); }
.post-card h3 {
  font-family: 'Playfair Display', serif; font-weight: 500; color: var(--navy);
  font-size: 23px; line-height: 1.28; margin-bottom: 10px;
}
.post-card h3 a { text-decoration: none; }
.post-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.post-card p:not(.post-meta) { color: var(--text-mid); font-size: 17px; line-height: 1.65; }
.post-more { margin-top: auto; padding-top: 16px; font-size: 15px; font-weight: 500; color: var(--gold-text); }
.post-card a:focus-visible, .side-list a:focus-visible { outline: none; }
.post-card a:focus-visible::after, .side-list a:focus-visible::after { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.post-empty { color: var(--text-mid); font-size: 15px; text-align: center; padding: 32px 0; }

@media (max-width: 980px) {
  .blog-top { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .feature { min-height: 360px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .feature, .post-card article { transition: none; }
  .feature:hover, .post-card article:hover { transform: none; }
}

/* Article body: extras .prose doesn't cover (Markdown can produce any of these) */
.post-body ol { padding-left: 22px; margin: 10px 0; }
.post-body h2 + p, .post-body h3 + p { margin-top: 0; }
.post-body ul + p, .post-body ol + p, .post-body blockquote + p, .post-body figure + p,
.post-body p + ul, .post-body p + ol { margin-top: 12px; }
.post-body h4 { font-size: 15px; font-weight: 500; color: var(--navy); margin: 18px 0 6px; }
.post-body img { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 20px 0; }
.post-body blockquote {
  border-left: 3px solid var(--gold); background: var(--cream); border-radius: 0 8px 8px 0;
  padding: 14px 18px; margin: 20px 0; font-style: italic;
}
.post-body blockquote p { color: var(--navy); }
.post-body hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em;
  background: var(--cream); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px;
}
.post-body pre { background: var(--navy); color: #fff; border-radius: 8px; padding: 16px 18px; overflow-x: auto; margin: 18px 0; }
.post-body pre code { background: none; border: 0; padding: 0; color: inherit; }
.post-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; color: var(--text-mid); }
.post-body th { background: var(--cream); color: var(--navy); font-weight: 500; }
.post-cover { margin: 0 0 28px; }
.post-cover img { margin: 0; width: 100%; }

.post-cta {
  margin-top: 44px; background: var(--gold-pale); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.post-cta p { margin: 0; flex: 1 1 280px; }
.post-cta .nav-cta { color: #fff; text-decoration: none; }
.post-back { margin-top: 28px; }

@media (max-width: 640px) {
  .blog-index { padding: 24px 16px 56px; }
  .feature { min-height: 0; padding: 36px 24px 26px; }
  .feature::before { left: 24px; }
  .feature-desc { font-size: 16px; }
  .card-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .post-card article { padding: 22px 20px 18px; }
  .blog-more { margin-top: 48px; }
}

/* Related pages block (pages and posts) */
.related { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); }
.related h2 { font-size: 18px !important; margin: 0 0 10px !important; }
.related ul { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.related li { margin: 0 !important; }
.related a { font-size: 14px; }

/* Case studies */
.cases { background: var(--warm-white); padding: 40px 48px 8px; }
.cases-inner { max-width: 1400px; margin: 0 auto; display: grid; gap: 28px; }
.case-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden;  }
.case-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 26px 30px 20px; border-bottom: 1px solid var(--border); }
.case-head h2 { font-family: 'Playfair Display', serif; font-weight: 500; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; color: var(--navy); margin: 0; }
.case-meta { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-text); margin-top: 6px; }
.case-tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.case-tags li { font-size: 11px; font-weight: 500; letter-spacing: .03em; color: var(--gold-text); background: var(--gold-pale); border-radius: 20px; padding: 4px 11px; }
.case-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.case-step { padding: 22px 30px 24px; }
.case-step + .case-step { border-left: 1px solid var(--border); }
.case-step-label { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 8px; }
.case-step p:not(.case-step-label) { font-size: 15px; line-height: 1.65; color: var(--text-mid); }
.case-step:last-child p:not(.case-step-label) { color: var(--navy); font-weight: 500; }
.case-quote { margin: 0; background: var(--navy); color: #fff; padding: 26px 30px 24px; border-top: 3px solid var(--gold); }
.case-quote blockquote { margin: 0; }
.case-quote blockquote p { font-family: 'Playfair Display', serif; font-style: italic; font-size: clamp(17px, 2vw, 21px); line-height: 1.5; color: #fff; }
.case-quote blockquote p::before { content: '\201C'; color: var(--gold-light); }
.case-quote blockquote p::after { content: '\201D'; color: var(--gold-light); }
.case-quote figcaption { margin-top: 12px; font-size: 13px; letter-spacing: .03em; color: rgba(255, 255, 255, .72); }
@media (max-width: 760px) {
  .cases { padding: 32px 16px 0; }
  .case-head { padding: 20px 20px 16px; }
  .case-steps { grid-template-columns: minmax(0, 1fr); }
  .case-step { padding: 18px 20px; }
  .case-step + .case-step { border-left: 0; border-top: 1px solid var(--border); }
  .case-quote { padding: 22px 20px; }
}

/* Cross-links between services and who we serve */
.crosslinks { margin-top: 40px; background: var(--cream); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; }
.crosslinks h2 { font-size: 18px !important; margin: 0 0 10px !important; }
.crosslinks ul { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 12px !important; }
.crosslinks li { margin: 0 !important; }
.crosslinks li a { display: inline-block; font-size: 14px; text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; color: var(--navy); }
.crosslinks li a:hover { border-color: var(--gold); }
.crosslinks p { font-size: 14px; }

/* Blog index closing call to action */
.blog-cta { background: var(--navy); border-top: 4px solid var(--gold); }
.blog-cta-inner { max-width: 1400px; margin: 0 auto; padding: 32px 48px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.blog-cta h2 { font-family: 'Playfair Display', serif; font-weight: 500; color: #fff; font-size: 28px; margin-bottom: 6px; }
.blog-cta p { color: rgba(255, 255, 255, .85); font-size: 17px; }
.blog-cta .btn-gold { display: inline-block; }

/* Post sidebar: contents list */
.side-toc { margin-top: 20px; border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; background: #fff; }
.side-toc-title { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 10px; }
.side-toc ol { list-style: none; padding: 0; margin: 0; }
.side-toc li + li { margin-top: 8px; }
.side-toc a { font-size: 15px; line-height: 1.45; color: var(--navy); text-decoration: none; display: block; }
.side-toc a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.post-body h2[id] { scroll-margin-top: 96px; }
.post-body table { display: table; }
@media (max-width: 980px) {
  .blog-index { padding: 28px 24px 32px; }
  .blog-cta-inner { padding: 28px 24px; }
  .blog-cta .btn-gold { width: 100%; text-align: center; }
  .side-toc { display: none; }
}

/* Quote credits */
.post-body blockquote cite { display: block; margin-top: 8px; font-style: normal; font-size: 15px; color: var(--text-mid); }
