/* Blog: the index (hero + filterable grid of posts) and the post pages.
   Same hero format as every H10 page: copy on the start side, the visual on the other side
   (index: the orbiting photo ring from the home page; post: the cover photo).
   Light reading ground for the grid and the article; yellow only as a fill there (base.css rule). */

/* ================= index: hero ================= */
.blog-hero {
  --gutter: clamp(24px, 5vw, 96px);
  position: relative; overflow: hidden;
  min-height: min(100svh, 860px);
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center; gap: clamp(24px, 3vw, 56px);
  padding: clamp(112px, 14vh, 150px) var(--gutter) clamp(48px, 8vh, 96px);
  background: var(--surface-dark); color: var(--text-on-dark);
}
.blog-hero__copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 580px; }
.blog-hero__copy .section-eyebrow { margin: 0; }
.blog-hero h1 { margin: 0; font-size: clamp(40px, 5vw, 80px); line-height: 1.2; font-weight: 700; }
.blog-hero h1 span, .blog-hero h1 .inline-logo { color: var(--h10-yellow); }
.blog-hero__lead { margin: 0; max-width: 48ch; font-size: clamp(16px, 1.3vw, 20px); line-height: 1.85; color: var(--muted-on-dark); }
.blog-hero__stats { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--dim-on-dark); font-size: 15px; }
.blog-hero__stats b { color: #FFFFFF; font-family: var(--font-sf); font-variant-numeric: tabular-nums; }

/* the orbit (css/gallery.css + js/gallery.js), sized to its column */
.blog-hero__ring { position: relative; align-self: center; }
/* bigger than its column: the ring runs off the end side of the screen (the section clips it) */
.blog-hero .gallery__stage { --stage-w: min(84vw, 1480px); margin: 0; margin-inline-end: calc(var(--gutter) * -1 - 12vw); }

/* ================= index: grid ================= */
.blog-list {
  --gutter: clamp(24px, 5vw, 96px);
  padding: clamp(72px, 10vh, 120px) var(--gutter) clamp(96px, 12vh, 144px);
  background: var(--surface-alt); color: var(--h10-ink);
}
.blog-list__inner { max-width: 1480px; margin-inline: auto; }
.blog-list__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }

/* category filter */
.blog-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-filter button {
  min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 999px;
  background: #FFFFFF; color: var(--h10-ink);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 600 15px/1 var(--font); cursor: pointer;
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 160ms var(--ease-out);
}
.blog-filter button:active { transform: scale(0.97); }
.blog-filter button[aria-pressed="true"] { background: var(--h10-ink); color: #FFFFFF; box-shadow: none; }
.blog-filter button span { margin-inline-start: 6px; font-family: var(--font-sf); font-variant-numeric: tabular-nums; opacity: 0.6; }
@media (hover: hover) and (pointer: fine) {
  .blog-filter button[aria-pressed="false"]:hover { box-shadow: inset 0 0 0 1px var(--h10-ink); }
}

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.2vw, 32px); margin: 0; padding: 0; list-style: none; }
.post-grid > li { display: flex; }
.post-grid > li[hidden] { display: none; }

.post-card { flex: 1; display: flex; }
.post-card a {
  flex: 1; display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
  background: #FFFFFF; color: inherit; text-decoration: none;
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow 250ms ease, transform 250ms var(--ease-out);
}
.post-card__media { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: #D6D9DE; }
.post-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.post-card__cat {
  position: absolute; inset-block-start: 14px; inset-inline-start: 14px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--h10-yellow); color: var(--h10-ink);
  font-size: 13px; font-weight: 600; line-height: 1.4;
}
.post-card__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }
.post-card h3 { margin: 0; font-size: clamp(18px, 1.35vw, 21px); line-height: 1.5; font-weight: 700; text-wrap: pretty; }
.post-card p {
  margin: 0; color: var(--ink-muted); font-size: 15px; line-height: 1.75;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__meta { margin-top: auto; padding-top: 6px; display: flex; gap: 8px; color: var(--ink-muted); font-size: 13px; }
@media (hover: hover) and (pointer: fine) {
  .post-card a:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--line), 0 24px 40px -28px rgba(22, 24, 28, 0.45); }
  .post-card a:hover .post-card__media img { transform: scale(1.04); }
}
.post-card a:focus-visible { outline-offset: 4px; }

/* the latest post, first and wide: photo on the end side, text on the start side */
.post-grid > li:has(.post-card--featured) { grid-column: 1 / -1; }
.post-card--featured a { flex-direction: row-reverse; }
.post-card--featured .post-card__media { flex: 1.25; aspect-ratio: auto; min-height: 360px; }
.post-card--featured .post-card__body { flex: 1; justify-content: center; gap: 14px; padding: clamp(24px, 3vw, 48px); }
.post-card--featured h3 { font-size: clamp(24px, 2.3vw, 36px); line-height: 1.4; }
.post-card--featured p { -webkit-line-clamp: 4; font-size: 16px; }
.post-card--featured .post-card__meta { margin-top: 8px; }
.post-card__read { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; }
.post-card__read svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease-out); }
.post-card__read svg:dir(rtl) { transform: scaleX(-1); }
@media (hover: hover) and (pointer: fine) {
  .post-card a:hover .post-card__read svg:dir(rtl) { transform: scaleX(-1) translateX(3px); }
  .post-card a:hover .post-card__read svg:dir(ltr) { transform: translateX(3px); }
}

/* ================= post: header ================= */
.post-hero {
  --gutter: clamp(24px, 5vw, 96px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 5vw, 96px);
  padding: clamp(120px, 15vh, 160px) var(--gutter) clamp(56px, 8vh, 96px);
  background: var(--surface-dark); color: var(--text-on-dark);
}
.post-hero > * { min-width: 0; }
.post-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; max-width: 680px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--dim-on-dark); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; opacity: 0.5; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { color: #FFFFFF; }
.post-hero h1 { margin: 0; font-size: clamp(32px, 3.6vw, 58px); line-height: 1.3; font-weight: 700; text-wrap: balance; }
.post-hero__lead { margin: 0; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.85; color: var(--muted-on-dark); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0; padding: 0; list-style: none; color: var(--dim-on-dark); font-size: 14px; }
.post-meta li { display: inline-flex; align-items: center; gap: 8px; }
.post-meta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.post-hero__cover { margin: 0; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 10; background: #1C1F24; }
.post-hero__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ================= post: body ================= */
.post-body {
  --gutter: clamp(24px, 5vw, 96px);
  padding: clamp(56px, 8vh, 96px) var(--gutter);
  background: var(--surface-alt); color: var(--h10-ink);
}
.post-body__inner {
  max-width: 1180px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start; gap: clamp(40px, 5vw, 88px);
}
.post-toc { position: sticky; top: 110px; order: 2; }
.post-toc h2 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--ink-muted); }
.post-toc ol { margin: 0; padding: 0; list-style: none; border-inline-start: 2px solid var(--line); }
.post-toc a {
  display: block; padding: 8px 14px; margin-inline-start: -2px;
  border-inline-start: 2px solid transparent;
  color: var(--ink-muted); text-decoration: none; font-size: 14px; line-height: 1.6;
  transition: color 150ms ease, border-color 150ms ease;
}
.post-toc a:hover { color: var(--h10-ink); }
.post-toc a[aria-current="true"] { color: var(--h10-ink); border-color: var(--h10-yellow); font-weight: 600; }

.prose { max-width: 72ch; font-size: 18px; line-height: 2; }
.prose > * + * { margin-top: 1em; }
.prose p { margin: 0; }
.prose h2 { margin: 2em 0 0.2em; font-size: clamp(24px, 2vw, 30px); line-height: 1.45; font-weight: 700; scroll-margin-top: 110px; }
.prose h3 { margin: 1.6em 0 0.1em; font-size: 20px; line-height: 1.5; font-weight: 700; }
.prose ul, .prose ol { margin-bottom: 0; padding-inline-start: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: #B98A00; }
/* text links only: the buttons and store badges in the article's CTA keep their own look */
.prose a:not(.arrow-btn, .store) { color: inherit; text-decoration: underline; text-decoration-color: var(--h10-yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.7; background: #FFFFFF; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.prose th, .prose td { padding: 12px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: #F7F8F9; font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose .inline-logo { height: 0.72em; }
.prose__table { overflow-x: auto; border-radius: 14px; }

.post-faq { margin-top: 3em; scroll-margin-top: 110px; }   /* clear of the nav when the menu's FAQ link jumps here */
.post-faq h2 { margin-bottom: 0.6em; }
.post-faq .faq__list { font-size: 16px; line-height: 1.8; }

.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 3em; padding-top: 1.5em; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-muted); }

/* ================= post: CTA + related ================= */
.post-cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px;
  margin-top: 3em; padding: clamp(24px, 3vw, 40px);
  border-radius: 24px;
  background: var(--h10-ink); color: var(--text-on-dark);
}
.post-cta h2 { margin: 0 0 6px; font-size: clamp(22px, 2vw, 28px); line-height: 1.4; }
.post-cta h2 span { color: var(--h10-yellow); }
.post-cta p { margin: 0; color: var(--muted-on-dark); font-size: 15px; line-height: 1.8; }
.post-cta__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.post-related { padding: 0 var(--gutter, clamp(24px, 5vw, 96px)) clamp(96px, 12vh, 144px); background: var(--surface-alt); color: var(--h10-ink); }
.post-related__inner { max-width: 1480px; margin-inline: auto; padding-top: clamp(48px, 6vh, 72px); border-top: 1px solid var(--line); }
.post-related .section-title { margin-bottom: 32px; }

@media (max-width: 1100px) {
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-body__inner { grid-template-columns: none; }
  .post-toc { position: static; order: 0; padding: 18px 20px; border-radius: 16px; background: #FFFFFF; box-shadow: 0 1px 0 var(--line); }
}
/* ================= legal pages (tools/build_legacy.py): text-only header ================= */
.post-hero--text { grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(40px, 6vh, 72px); }
.post-body__inner--single { grid-template-columns: minmax(0, 1fr); max-width: 820px; }

/* ================= payment return pages: one status card ================= */
.status-page {
  min-height: 100svh; display: grid; place-items: center;
  padding: 120px 16px 72px; background: var(--surface-dark); color: var(--text-on-dark);
}
.status-page__card { max-width: 480px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.status-page__icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; }
.status-page__icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.status-page__icon--ok { background: var(--h10-yellow); color: var(--h10-ink); }
.status-page__icon--fail { background: #2A2D33; color: #FF8A80; }
.status-page h1 { margin: 8px 0 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.3; }
.status-page p { margin: 0; color: var(--muted-on-dark); font-size: 18px; line-height: 1.8; }
.status-page__home { margin-top: 12px; color: var(--h10-yellow); font-weight: 700; text-decoration: none; }
.status-page__home:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .blog-hero { grid-template-columns: none; --gutter: 16px; padding-top: 104px; min-height: 0; }
  .blog-hero .gallery__stage { --stage-w: 170vw; margin-inline: calc((100vw - var(--stage-w)) / 2 - var(--gutter)); }
  .blog-list, .post-body, .post-related { --gutter: 16px; }
  .post-card--featured a { flex-direction: column; }
  .post-card--featured .post-card__media { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .post-hero { grid-template-columns: none; --gutter: 16px; padding-top: 104px; }
  .post-hero__cover { order: 2; }
  .post-cta { grid-template-columns: none; }
  .prose { font-size: 17px; }
}
@media (max-width: 640px) {
  .post-grid { grid-template-columns: none; }
}

@media (prefers-reduced-motion: reduce) {
  .post-card a, .post-card__media img, .blog-filter button, .post-card__read svg, .post-toc a { transition: none; }
}
