/* 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: 1160px; margin: 0 auto; padding: 48px 48px 80px; }
.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: 420px; padding: 44px 44px 36px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%, var(--navy-light) 0%, var(--navy) 60%);
  color: #fff; box-shadow: 0 18px 40px var(--shadow); transition: transform .2s, box-shadow .2s;
}
.feature::before {
  content: ''; position: absolute; top: 0; left: 44px; width: 56px; height: 4px;
  background: var(--gold); border-radius: 0 0 3px 3px;
}
.feature:hover { transform: translateY(-3px); box-shadow: 0 24px 48px rgba(28, 43, 58, .18); }
.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(30px, 3.6vw, 44px); line-height: 1.12; margin-bottom: 16px; max-width: 18ch;
}
.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, .82); font-size: 17px; line-height: 1.65; max-width: 52ch; }
.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: 20px; 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: 13px; color: var(--text-light); margin-bottom: 8px; }

/* More articles (card grid) */
.blog-more { margin-top: 64px; }
.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, box-shadow .2s, transform .15s;
}
.post-card article:hover { border-color: var(--gold); box-shadow: 0 8px 24px var(--shadow); transform: translateY(-2px); }
.post-card h3 {
  font-family: 'Playfair Display', serif; font-weight: 500; color: var(--navy);
  font-size: 21px; 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: 15px; line-height: 1.65; }
.post-more { margin-top: auto; padding-top: 16px; font-size: 14px; 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; }
}
