/* Static-home page-layout CSS.
   Owns *structural* rules (grids, spacing, card chrome) for the six
   layouts in the SHI-180 catalog. Per-template stylesheets contribute
   palette / type tokens (CSS variables) — they must not own structure.
   See docs/superpowers/plans/2026-05-15-static-home-layout-css-decoupling.md */

/* Stat grid (used by the stats_and_testimonials layout — and by any
   page that has 2+ consecutive stat slides in body content).
   Templates theme via:
     --sh-section-stat-tile-bg
     --sh-section-stat-tile-radius
     --sh-section-stat-tile-padding
     --sh-section-stat-number-color
     --sh-section-stat-number-font
     --sh-section-stat-number-size
     --sh-section-stat-label-color
     --sh-section-stat-gap */
.sh-section-stat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sh-section-stat-gap, 16px);
}
.sh-section-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: var(--sh-section-stat-tile-padding, 20px);
  background: var(--sh-section-stat-tile-bg, rgba(0, 0, 0, 0.05));
  border-radius: var(--sh-section-stat-tile-radius, 12px);
}
.sh-section-stat-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: var(--sh-section-stat-number-color, currentColor);
}
.sh-section-stat-icon svg { width: 100%; height: 100%; }
.sh-section-stat-number {
  font-family: var(--sh-section-stat-number-font, inherit);
  font-size: var(--sh-section-stat-number-size, clamp(28px, 5vw, 44px));
  font-weight: 700;
  line-height: 1;
  color: var(--sh-section-stat-number-color, currentColor);
}
.sh-section-stat-label {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sh-section-stat-label-color, currentColor);
  opacity: 0.85;
}
@media (max-width: 768px) {
  .sh-section-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .sh-section-stat-grid { grid-template-columns: 1fr; }
}

/* Testimonial grid (static — not the homepage marquee, which lives in
   `.sh-testimonial-card` under each template's stylesheet).
   Templates theme via:
     --sh-section-testimonial-card-bg
     --sh-section-testimonial-card-radius
     --sh-section-testimonial-card-padding
     --sh-section-testimonial-mark-color
     --sh-section-testimonial-quote-color
     --sh-section-testimonial-meta-color
     --sh-section-testimonial-gap */
.sh-section-testimonial-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sh-section-testimonial-gap, 16px);
}
.sh-section-testimonial {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--sh-section-testimonial-card-padding, 24px);
  background: var(--sh-section-testimonial-card-bg, rgba(0, 0, 0, 0.05));
  border-radius: var(--sh-section-testimonial-card-radius, 12px);
}
.sh-section-testimonial-mark {
  display: inline-block;
  font-size: 40px;
  line-height: 1;
  color: var(--sh-section-testimonial-mark-color, currentColor);
  /* The partial sets a literal opening curly quote as the text node. */
}
.sh-section-testimonial-quote {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--sh-section-testimonial-quote-color, currentColor);
}
.sh-section-testimonial-meta {
  margin: 0;
  font-size: 14px;
  color: var(--sh-section-testimonial-meta-color, currentColor);
  opacity: 0.7;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.sh-section-testimonial-name { font-weight: 600; }
.sh-section-testimonial-dash { opacity: 0.5; }
.sh-section-testimonial-role { font-style: italic; }

@media (max-width: 640px) {
  .sh-section-testimonial-grid { grid-template-columns: 1fr; }
}

/* Figure grid (photo_story layout). Templates theme via:
     --sh-section-figure-card-bg
     --sh-section-figure-card-radius
     --sh-section-figure-card-padding
     --sh-section-figure-img-aspect
     --sh-section-figure-caption-color
     --sh-section-figure-gap */
.sh-section-figure-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sh-section-figure-gap, 16px);
}
.sh-section-figure {
  display: flex;
  flex-direction: column;
  background: var(--sh-section-figure-card-bg, rgba(0, 0, 0, 0.05));
  border-radius: var(--sh-section-figure-card-radius, 12px);
  padding: var(--sh-section-figure-card-padding, 12px);
  overflow: hidden;
}
.sh-section-figure-inner {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sh-section-figure-img {
  display: block;
  width: 100%;
  aspect-ratio: var(--sh-section-figure-img-aspect, 4 / 3);
  object-fit: cover;
  border-radius: calc(var(--sh-section-figure-card-radius, 12px) - 4px);
}
.sh-section-figure-caption {
  font-size: 14px;
  line-height: 1.4;
  color: var(--sh-section-figure-caption-color, currentColor);
  opacity: 0.85;
}

@media (max-width: 640px) {
  .sh-section-figure-grid { grid-template-columns: 1fr; }
}
