/* TrueLevel Floors — blog templates (blog/index.html, blog/article.html).
   Loaded after styles.css and reuses its tokens (--accent, --bg, --ink,
   --grey, --body, --line, --card, --shell). Ported from the Claude Design
   project's blog-index.dc.html / blog-article.dc.html: sc-if becomes a CSS
   media query, style-hover becomes :hover, <image-slot> becomes a plain
   dashed-border placeholder since article photos aren't in yet. */

/* ------------------------------------------------------------- shared --- */

.site-nav a.is-active { color: var(--accent); font-weight: 700; }

.img-slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(139, 133, 124, 0.08);
  border: 1.5px dashed var(--line);
}
/* Real photos land in the same 16:9 wrappers .img-slot used to fill —
   picture/img needs the same fill rule once an article has real images. */
.article-hero__media img,
.article-figure__media img,
.post-card__media img,
.related-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-slot__cap {
  max-width: 90%;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--grey);
}

/* ---------------------------------------------------------- blog hero --- */

/* Vertical only — .shell inside already owns the horizontal 20px inset.
   Duplicating it here doubled the inset to 40px below ~1280px, where
   .shell's max-width no longer caps it (that's the width the padding-inline
   centering math would otherwise absorb), so the hero title sat 20px
   further right than the header/nav above it on mobile. */
.blog-hero { padding-top: 36px; }
.blog-hero__title {
  margin: 0 0 22px;
  font-weight: 750;
  font-size: clamp(38px, 6.5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.blog-hero__lede { margin: 0; max-width: 560px; font-size: clamp(15px, 2vw, 18px); line-height: 1.55; color: var(--body); }

/* --------------------------------------------------------- blog layout --- */

.blog-layout {
  padding: 56px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 48px;
  align-items: start;
}

.post-list {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
}

.post-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.post-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__body { padding: 22px; }
.post-card__tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 14px;
  background: rgba(192, 96, 58, 0.1);
  border: 1px solid rgba(192, 96, 58, 0.3);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.post-card__title { margin: 0 0 10px; font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); }
.post-card__excerpt { margin: 0 0 16px; font-size: 14px; line-height: 1.65; color: var(--body); }
.post-card__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.post-card__date { font-size: 12px; color: var(--grey); }
.post-card__cta { font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ------------------------------------------------------------ sidebar --- */

.sidebar { display: flex; flex-direction: column; gap: 36px; }
.sidebar__title { margin: 0 0 16px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink); }

.sidebar__posts { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.sidebar__post { display: flex; flex-direction: column; gap: 4px; }
.sidebar__post-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.sidebar__post-date { font-size: 12px; color: var(--grey); }

.sidebar__cats { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.sidebar__cat { display: flex; justify-content: space-between; font-size: 14px; color: var(--body); }

.promo-card { background: var(--card); border: 1px solid var(--accent); border-radius: 20px; padding: 24px; }
.promo-card--mobile { display: none; grid-column: 1 / -1; }
.promo-card__title { margin: 0 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.promo-card__text { margin: 0 0 18px; font-size: 13px; line-height: 1.55; color: var(--body); }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .promo-card--mobile { display: block; }
  /* .blog-layout's grid-template-columns keeps a phantom ~280-340px second
     track reserved even with .sidebar hidden (an explicit track's minmax
     floor holds regardless of whether anything occupies it), which squeezes
     .post-list into a sliver and reads as the whole page shifted left. */
  .blog-layout { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------- breadcrumbs --- */

.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; font-size: 13px; color: var(--grey); }
.breadcrumbs a { color: var(--grey); }
.breadcrumbs__sep { color: var(--accent); }

/* ------------------------------------------------------- article hero --- */

.article-hero { max-width: 820px; margin: 0 auto; padding: 36px 20px 0; }
.article-hero__title {
  margin: 0 0 20px;
  font-weight: 750;
  font-size: clamp(32px, 5.5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.article-hero__meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; font-size: 13px; color: var(--grey); }
.article-hero__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(29, 27, 24, 0.25);
}

/* ------------------------------------------------------- article body --- */

.article-body { max-width: 720px; margin: 0 auto; padding: 46px 20px 0; }
.article-body p { margin: 0 0 18px; font-size: 16px; line-height: 1.75; color: #3B3833; }
.article-body h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 44px 0 16px; padding-left: 16px; border-left: 3px solid var(--accent); }
.article-body h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 32px 0 12px; }

.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 0; list-style: none; }
.article-body li { position: relative; padding-left: 28px; margin-bottom: 10px; font-size: 16px; line-height: 1.7; color: #3B3833; }
.article-body ul li::before { content: ''; position: absolute; left: 0; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.article-body ol { counter-reset: ol-c; }
.article-body ol li { counter-increment: ol-c; }
.article-body ol li::before {
  content: counter(ol-c);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFF8F3;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-body blockquote {
  margin: 36px 0;
  padding: 8px 0 8px 28px;
  border-left: 3px solid var(--accent);
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 24px;
  line-height: 1.5;
  color: var(--ink);
}

.article-figure { margin: 32px 0; }
.article-figure__media { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; }
.article-figure__caption { margin: 10px 4px 0; font-size: 13px; color: var(--grey); }

/* ------------------------------------------------------------- article faq --- */
/* Boxed light-theme accordion — distinct from the dark homepage .faq,
   same details/summary + grid-rows expand trick, no JS. */

.article-faq { max-width: 720px; margin: 56px auto 0; padding: 0 20px; }
.article-faq__panel { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 4vw, 36px); }
.article-faq__title { margin: 0 0 24px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.article-faq__list { display: flex; flex-direction: column; gap: 10px; }

.article-faq__item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }

.article-faq__q {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s ease;
}
.article-faq__q::-webkit-details-marker { display: none; }
.article-faq__q:hover { color: var(--accent); }

.article-faq__icon {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFF8F3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.article-faq__icon::before { content: '+'; }
.article-faq__item[open] .article-faq__icon::before { content: '\2715'; }

.article-faq__item > .article-faq__a-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.article-faq__item[open] > .article-faq__a-wrap { grid-template-rows: 1fr; }
.article-faq__item > .article-faq__a-wrap > .article-faq__a { overflow: hidden; }
.article-faq__a p { margin: 0; padding: 0 18px 18px; font-size: 14px; line-height: 1.65; color: var(--body); }

/* --------------------------------------------------------- author bio --- */

.author-bio { max-width: 720px; margin: 44px auto 0; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.author-bio__mark { flex: 0 0 auto; }
.author-bio__name { font-size: 15px; font-weight: 700; color: var(--ink); }
.author-bio__text { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: var(--body); }

/* --------------------------------------------------------- related --- */

.related { max-width: var(--shell); margin: 70px auto 0; padding: 0 20px; }
.related__title { margin: 0 0 24px; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.related__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.related-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.related-card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.related-card__body { padding: 20px; }
.related-card__tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  background: rgba(192, 96, 58, 0.1);
  border: 1px solid rgba(192, 96, 58, 0.3);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.related-card__title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }

/* --------------------------------------------------------- cta banner --- */

/* Bottom margin is deliberate: without it this dark panel touches the
   footer's dark panel directly, same pinch bug fixed on the homepage FAQ. */
.cta-banner-wrap { max-width: var(--shell); margin: 70px auto clamp(28px, 4vw, 44px); padding: 0 20px; }
.cta-banner {
  background: var(--ink);
  border-radius: 26px;
  padding: clamp(32px, 6vw, 64px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.cta-banner__title { margin: 0; color: var(--bg); font-weight: 700; font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.02em; max-width: 600px; }
.cta-banner__text { margin: 0; color: rgba(250, 249, 248, 0.7); font-size: 15px; max-width: 460px; }
.cta-banner__actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; }
.cta-banner__phone { color: var(--bg); font-size: 15px; font-weight: 600; }
.cta-banner__phone:hover { color: var(--accent); }

@media (max-width: 480px) {
  /* The primary CTA button was sized to its text (~184-217px) inside a
     350-374px-wide banner on phones — small, off-center-looking target next
     to the phone link. Stack and make it full width, the phone link below. */
  .cta-banner__actions { flex-direction: column; width: 100%; }
  .cta-banner__actions .btn { width: 100%; }
}

/* ----------------------------------------------------- mobile call bar --- */
/* sc-if value="{{ showBar }}" (isMobile && !menuOpen) — this template has
   no mobile drawer to conflict with, so it collapses to a plain media
   query: shown only under the design's own 768px isMobile threshold. */

.mobile-bar-spacer { display: none; }
.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  gap: 10px;
  align-items: center;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(250, 249, 248, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-sizing: border-box;
}
.mobile-bar__call {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  background: var(--card);
}
.mobile-bar__quote {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  background: var(--accent);
  color: #FFF8F3;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}
.mobile-bar__quote:hover { color: #FFF8F3; background: var(--ink); }

@media (max-width: 767px) {
  .mobile-bar-spacer { display: block; height: 78px; }
  .mobile-bar { display: flex; }
}
