/* Blog: /blog and /blog/{slug}. Loaded only on those pages ($page['styles']), after site.css and ui.css.
   Same language as the rest of the site: near-black, platinum, the gold accent for small marks, radius 0. */

/* ---------- Shared bits ---------- */
.blog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; margin: 0; font: 600 0.7rem/1.2 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.blog-meta > span + span::before { content: ''; display: inline-block; width: 4px; height: 4px; margin-right: 0.9rem; background: var(--accent); vertical-align: middle; transform: translateY(-1px); }
.blog-excerpt { margin: 0; color: var(--text-2); }
.blog-more { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--platinum); font: 600 0.74rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; transition: color 0.3s var(--ease); }
.blog-more .icon { width: 16px; height: 16px; transition: transform 0.4s var(--ease); }
a:hover > .blog-more, .blog-more:hover, a:hover .blog-more { color: var(--white); }
a:hover .blog-more .icon[aria-hidden], .blog-more:hover .icon { transform: translate(3px, -3px); }
.blog-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn--sm { min-height: 2.6rem; padding: 0 1.15rem; font-size: 0.7rem; }

/* ---------- Card grid: /blog (every post) and "More from the blog" under an article. Three to a row. ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.blog-more-posts .blog-grid { margin-top: 1.5rem; }
.blog-card { display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); transition: border-color 0.4s var(--ease); }
.blog-card:hover { border-color: var(--line-strong); }
.blog-card__media { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--bg-3); }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.blog-card__body { display: flex; flex: 1; flex-direction: column; gap: 0.9rem; padding: 1.5rem; }
.blog-card__title { margin: 0; font-size: 1.6rem; line-height: 1.15; color: var(--white); }
.blog-card .blog-more { margin-top: auto; padding-top: 0.4rem; }
.blog-card:hover .blog-card__media img { transform: scale(1.04); }

@media (max-width: 1023px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .blog-grid { grid-template-columns: 1fr; } }

/* ---------- Banners: the shared .ab-hero (custom.css), with the car a little brighter than on the about
   page (there the car is atmosphere; here it is the subject) and the studio renders centred on the car. */
.blog-hero .ab-hero__media img { object-position: 62% 55%; opacity: 0.82; }
/* Clear the floating logo bar: its real height (logo + its padding, the same clamps as .hero-bar in site.css)
   plus a gap. The shared banner only reserves --nav-h, which a long article title, filling the banner to the
   top, ran into: the breadcrumb sat under the logo. */
.blog-hero { padding-top: calc(clamp(52px, 6vw, 84px) + 2 * clamp(0.7rem, 1.6vw, 1.15rem) + clamp(1.5rem, 3vw, 2.5rem)); }
/* Article titles are long sentences, not a two-word slogan: smaller, and a wider measure. */
.blog-hero--article .ab-hero__inner { max-width: 68rem; }
.blog-hero--article .ab-hero__title { font-size: clamp(2.2rem, 4.6vw, 4.1rem); line-height: 1.04; max-width: 24ch; }
.blog-hero--article .ab-hero__lede { max-width: 44rem; }
.blog-hero .ab-crumbs { flex-wrap: wrap; }
.blog-hero .ab-crumbs [aria-current] { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }

/* ---------- /blog/{slug} ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: var(--section); }
.article-layout--solo { grid-template-columns: minmax(0, 1fr); }
.article-main { min-width: 0; max-width: 74ch; }
.article-layout--solo .article-main { margin: 0 auto; }

/* Contents: sticky beside the article on wide screens, a collapsible box above it on phones */
.article-toc { position: sticky; top: calc(var(--nav-h) + 1.5rem); display: grid; gap: 1.5rem; }
.article-toc__box { border-top: 1px solid var(--line-strong); padding-top: 1.1rem; }
.article-toc__box summary { list-style: none; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font: 600 0.7rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.article-toc__box summary::-webkit-details-marker { display: none; }
.article-toc__box summary .icon { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.article-toc__box:not([open]) summary .icon { transform: rotate(-90deg); }
.article-toc ol { margin-top: 1.1rem; display: grid; gap: 0.2rem; counter-reset: toc; }
.article-toc li a { display: grid; grid-template-columns: 1.75rem 1fr; padding: 0.4rem 0; font-size: 0.9rem; line-height: 1.4; color: var(--text-2); transition: color 0.25s var(--ease); }
.article-toc li a::before { counter-increment: toc; content: counter(toc, decimal-leading-zero); font: 600 0.68rem/2 var(--sans); letter-spacing: 0.08em; color: var(--accent); }
.article-toc li a:hover { color: var(--white); }
.article-toc__cta { display: grid; gap: 0.75rem; justify-items: start; padding: 1.25rem; background: var(--bg-2); border: 1px solid var(--line); }
.article-toc__cta p { margin: 0; font: 500 1.25rem/1.2 var(--serif); color: var(--white); }
.article-toc__phone { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-2); }
.article-toc__phone .icon { width: 16px; height: 16px; }
.article-toc__phone:hover { color: var(--white); }
@media (max-width: 1023px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .article-toc { position: static; }
  .article-toc__cta { display: none; }
  .article-main { margin: 0 auto; }
}

/* Article text: the site's .prose, a touch larger, with the gold accent on list marks and links */
.blog-prose { max-width: none; font-size: 1.06rem; line-height: 1.75; }
.blog-prose > :first-child { margin-top: 0; }
.blog-prose h2 { margin: 3.5rem 0 1.25rem; font-size: clamp(1.8rem, 2.8vw, 2.5rem); line-height: 1.1; scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.blog-prose h3 { margin: 2.25rem 0 0.75rem; font-size: clamp(1.35rem, 1.9vw, 1.6rem); }
.blog-prose h3 + p { margin-top: 0; }
.blog-prose h4 { margin: 1.75rem 0 0.6rem; color: var(--text); }
.blog-prose ul, .blog-prose ol { padding-left: 1.35rem; margin: 0 0 1.5rem; }
.blog-prose ul li::marker { color: var(--accent); }
.blog-prose ol li::marker { color: var(--accent); font-weight: 600; }
.blog-prose li { padding-left: 0.25rem; }
.blog-prose a { color: var(--platinum); border-bottom: 1px solid var(--accent-soft); transition: color 0.25s var(--ease), border-color 0.25s var(--ease); }
.blog-prose a:hover { color: var(--white); border-color: var(--accent); }
.blog-prose h3 a { border-bottom: 0; color: inherit; }
.blog-prose h3 a:hover { color: var(--accent); }
.blog-prose blockquote { margin: 2rem 0; padding: 0.25rem 0 0.25rem 1.5rem; border-left: 2px solid var(--accent); font: 500 1.5rem/1.35 var(--serif); color: var(--white); }
.blog-prose figure { margin: 2.75rem 0; }
.blog-prose figure img { width: 100%; height: auto; background: var(--bg-3); }
.blog-prose figcaption { margin-top: 0.8rem; font-size: 0.85rem; line-height: 1.5; color: var(--muted); }
/* A paragraph that is one bold line (the article's key question, its closing statement) reads as a pull line;
   blog_render() marks them, since CSS cannot tell "all bold" from "one bold phrase". */
.blog-prose .blog-pull { margin: 2rem 0; padding-left: 1.25rem; border-left: 2px solid var(--accent); font: 500 1.5rem/1.35 var(--serif); color: var(--white); }
.blog-prose .blog-pull strong { font-weight: 500; }

.article-faq { margin-top: 4rem; scroll-margin-top: calc(var(--nav-h) + 1.5rem); }
.article-faq h2 { margin-bottom: 1.5rem; font-size: clamp(1.8rem, 2.8vw, 2.5rem); }
.article-faq .faq { max-width: none; }
.article-back { margin: 3.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.article-back .blog-more .icon { transform: none; }
.article-back .blog-more:hover .icon { transform: translateX(-3px); }

.blog-more-posts__head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; }
.blog-more-posts__head h2 { margin: 0; }
