/* ============================================================
   Blog index — built on the site design tokens (practice-nav-hero.css):
   --font-sans (Google Sans Flex), --font-serif (Fraunces), --accent, --ink,
   --muted, --line, --surface, --radius, --radius-sm, --radius-pill,
   --shadow-card. Structure: centered header → one large featured post →
   a grid of upcoming posts.
   ============================================================ */
.blog-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(150px, 18vh, 200px) 24px clamp(72px, 9vh, 104px);
}

/* ---- header ---- */
.blog-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
/* Eyebrow, h1, and lede styling now come from the shared page-header rules in
   practice-nav-hero.css (.blog-eyebrow / .blog-head h1 / .blog-head p are
   aliased there). Only the blog-specific bit stays here. */
/* "Orbit" in the heading reads as plain text — no italic, no accent color. */
.blog-head .blog-em {
  font-style: normal;
  color: inherit;
}

/* Post media is an <img>. Until the real image exists at its src path, a
   brand-tinted gradient shows underneath (so a missing/loading image reads as
   an intentional placeholder, not a broken icon). Drop the JPG/PNG at the
   src path in blog/index.html and it covers the gradient automatically. */
.post-feature-media,
.post-card-media {
  display: block;
  width: 100%;
  object-fit: cover;
  /* Neutral, quiet placeholder while the image loads (or if it's missing) —
     same flat tone for every card so nothing jumps out. The image covers it. */
  background: #eef1f4;
  color: transparent; /* hide any alt text / broken-image glyph */
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.post-tag {
  display: inline-block;
  padding: 4px 11px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(var(--accent-rgb, 45, 111, 232), 0.08);
  color: var(--accent, #2d6fe8);
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.post-date,
.post-soon {
  color: var(--muted, rgba(0, 0, 0, 0.5));
  font-size: 13px;
}
.post-soon {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(0, 0, 0, 0.4);
}

/* ---- featured post (latest, large) ---- */
.post-feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  margin: 0 0 64px;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius, 18px);
  background: var(--surface, #fff);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink, #1c1b1f);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.post-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb, 45, 111, 232), 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}
.post-feature-media {
  /* Fill the whole media cell and crop with object-fit; the cell height is set
     by the taller of the two columns. height:100% (not aspect-ratio) so the
     image never squashes when the text column is short or tall. */
  align-self: stretch;
  height: 100%;
}
.post-feature-body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.post-feature-body h2 {
  margin: 0 0 12px;
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.16;
  color: var(--ink, #1c1b1f);
}
.post-feature-body p {
  margin: 0;
  color: var(--muted, rgba(0, 0, 0, 0.56));
  font-size: 16px;
  line-height: 1.6;
}
.post-readmore {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  color: var(--accent, #2d6fe8);
  font-size: 15px;
  font-weight: 600;
}
.post-feature:hover .post-readmore span { transform: translateX(3px); }
.post-readmore span { transition: transform 0.18s ease; }

/* ---- section label ---- */
.blog-section-label {
  margin: 0 0 20px;
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, rgba(0, 0, 0, 0.5));
}

/* ---- upcoming grid ---- */
.post-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;   /* one card per row, horizontal layout */
  gap: 14px;
}
/* Collapsed (default with JS): show only the first 3 cards; "Load more" reveals
   the rest. SEO-safe — every card is in the HTML, just CSS-hidden, so crawlers
   still see all the links. */
.post-grid.is-collapsed > li:nth-child(n + 4) { display: none; }

.blog-loadmore {
  display: none; /* shown by JS only when there are more than 3 cards */
  margin: 28px auto 0;
  padding: 12px 26px;
  font: 600 14px var(--font-sans, Helvetica, Arial, sans-serif);
  color: var(--ink, #1c1b1f);
  background: var(--surface, #fff);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.14));
  border-radius: var(--radius-pill, 999px);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.blog-loadmore.is-shown { display: block; }
.blog-loadmore:hover {
  border-color: rgba(var(--accent-rgb, 45, 111, 232), 0.5);
  background: rgba(var(--accent-rgb, 45, 111, 232), 0.04);
}
.blog-loadmore:active { transform: scale(0.97); }
.post-card {
  border: 1px solid var(--line, rgba(0, 0, 0, 0.08));
  border-radius: var(--radius, 18px);
  background: var(--surface, #fff);
  overflow: hidden;
}
.post-card.is-soon { opacity: 0.78; }
/* Horizontal card: image on the left, text on the right. */
.post-card-link {
  display: grid;
  grid-template-columns: 200px 1fr;
  align-items: stretch;
  text-decoration: none;
  color: inherit;
}
.post-card:has(.post-card-link) {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.post-card:has(.post-card-link):hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb, 45, 111, 232), 0.4);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.07);
}
.post-card-media {
  height: 100%;
  min-height: 132px;
}
.post-card-body {
  padding: 22px 24px;
  align-self: center;
}
.post-card-body h3 {
  margin: 0 0 8px;
  font-family: var(--font-sans, Helvetica, Arial, sans-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--ink, #1c1b1f);
}
.post-card-body p {
  margin: 0;
  color: var(--muted, rgba(0, 0, 0, 0.55));
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .post-feature { grid-template-columns: 1fr; }
  .post-feature-media { min-height: 200px; }
  .post-feature-body { padding: 28px; }
  .post-grid { grid-template-columns: 1fr; }
  /* stack the horizontal card (image on top) on narrow screens */
  .post-card-link { grid-template-columns: 1fr; }
  .post-card-media { height: 170px; min-height: 0; }
  .post-card-body { align-self: stretch; }
}

/* ---- Blog post (detail page) ---- */
.post-main {
  max-width: 720px;
  margin: 0 auto;
  /* shared top spacing under the nav (matches blog/contact/legal); extra
     bottom space before the shared full-width closing CTA */
  padding: clamp(150px, 18vh, 200px) 24px clamp(48px, 7vh, 80px);
}

.post-hero {
  text-align: center;
  margin-bottom: 44px;
}

.post-hero .post-tag {
  margin-bottom: 18px;
}

/* .post-hero h1 styling comes from the shared .page-title rule
   (practice-nav-hero.css), aliased there for one consistent header. */

.post-hero .post-meta {
  margin-top: 18px;
  color: rgba(0, 0, 0, 0.4);
  font-size: 14px;
}

.post-cover {
  display: block;
  /* Show the WHOLE image (no crop), no rounding. Breaks out of the 720px
     article column a little — capped at 920px and centered — so it's
     prominent but not overwhelming. height:auto keeps natural aspect ratio. */
  width: min(920px, 100vw);
  max-width: 100vw;
  margin: 0 auto 48px;
  margin-left: 50%;
  transform: translateX(-50%);
  height: auto;
  border-radius: 0;
  color: transparent;
}

/* Article body: comfortable reading measure + serif accents. */
.post-article {
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: rgba(0, 0, 0, 0.82);
}

.post-article p {
  margin: 0 0 24px;
}

.post-article h2 {
  margin: 48px 0 16px;
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  /* medium weight + SOFT, in line with the page title and section headings */
  font-variation-settings: "SOFT" 100, "opsz" 30, "wght" 500;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink, #1c1b1f);
}

.post-article blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent, #2d6fe8);
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.45;
  color: var(--ink, #1c1b1f);
}

.post-article strong {
  font-weight: 600;
  color: var(--ink, #1c1b1f);
}

.post-article ul {
  margin: 0 0 24px;
  padding-left: 22px;
}

.post-article li {
  margin-bottom: 8px;
}

/* Share row at the foot of an article. */
.post-share {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 48px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line, rgba(0, 0, 0, 0.08));
}
.post-share-label {
  font-family: var(--font-mono, ui-monospace, Menlo, monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted, rgba(0, 0, 0, 0.5));
  margin-right: 4px;
}
.post-share a,
.post-share button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  font: 500 14px var(--font-sans, Helvetica, Arial, sans-serif);
  color: var(--ink, #1c1b1f);
  background: var(--surface, #fff);
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: var(--radius-pill, 999px);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.post-share a:hover,
.post-share button:hover {
  border-color: rgba(var(--accent-rgb, 45, 111, 232), 0.5);
  background: rgba(var(--accent-rgb, 45, 111, 232), 0.04);
  text-decoration: none;
}
.post-share a:active,
.post-share button:active { transform: scale(0.97); }
.post-share svg { width: 16px; height: 16px; }
.post-share .is-copied { color: var(--accent, #2d6fe8); border-color: var(--accent, #2d6fe8); }

/* Inline CTA after the article. */
.post-cta {
  margin: 56px 0 0;
  padding: 36px;
  border: 1px solid rgba(3, 88, 247, 0.25);
  border-radius: 20px;
  background: rgba(3, 88, 247, 0.04);
  text-align: center;
}

.post-cta h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif, "Fraunces", Georgia, serif);
  font-variation-settings: "SOFT" 100, "opsz" 26, "wght" 500;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink, #1c1b1f);
}

.post-cta p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 15px;
}

.post-back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}
.post-back:hover { color: var(--ink); }

@media (max-width: 640px) {
  .post-hero h1 { font-size: 34px; }
  .post-article { font-size: 17px; }
}
