/* =============================================================================
   DragonFire Sites — Section Style Library
   =============================================================================
   Semantic, composable classes the wizard's "✨ Style this section" picker
   can apply. Auto-included by page_assembler on every new-shape site.
   Site's own /css/style.css loads AFTER this and can override anything.

   Classes are grouped:
     • Section variants    — layout + backdrop  (mix-and-match)
     • Image treatments    — applied to .section__image
     • Gallery layouts     — applied to .section--gallery
     • Typography emphasis — title + body emphasis

   Every class is opt-in: a section with no `css_classes` slot renders
   identically to before. Adding classes is purely additive styling.

   Picker hint: 0–3 classes per section is the sweet spot. More than that
   tends to fight itself visually.
============================================================================= */

/* ─── design tokens (CSS vars so site can override) ────────────────────── */
:root {
  --df-tint:      rgba(74, 158, 255, 0.06);
  --df-alt-bg:   rgba(255, 255, 255, 0.025);
  --df-card-bg:  rgba(255, 255, 255, 0.04);
  --df-card-bd:  rgba(255, 255, 255, 0.08);
  --df-shadow-soft: 0 8px 28px rgba(0, 0, 0, 0.25);
  --df-radius-card: 14px;
}

/* ════════════════════════════════════════════════════════════════════════
   SECTION VARIANTS — apply to <section class="section ...">
   ════════════════════════════════════════════════════════════════════════ */

/* Centered single-column reading — narrows the column, centers text */
.section--centered .section__inner {
  max-width: 640px; margin-left: auto; margin-right: auto;
  text-align: center;
}
.section--centered .section__title { margin-left: auto; margin-right: auto; }

/* Narrow column — for long-form prose, comfortable line length */
.section--narrow .section__inner { max-width: 720px; }

/* Tinted accent background — subtle wash of the brand accent */
.section--tinted { background: var(--df-tint); }

/* Alternate backdrop — zebra-striping when sections alternate */
.section--alt-bg { background: var(--df-alt-bg); }

/* Card style — boxed with subtle border + radius. Looks great as a
   single mid-page callout, less so for every section in a row. */
.section--card .section__inner {
  background: var(--df-card-bg);
  border: 1px solid var(--df-card-bd);
  border-radius: var(--df-radius-card);
  padding: 36px 32px;
  box-shadow: var(--df-shadow-soft);
}

/* Hero — extra vertical padding + bigger heading */
.section--hero { padding-top: 100px; padding-bottom: 80px; }
.section--hero .section__title {
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.1;
}

/* ════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY EMPHASIS
   ════════════════════════════════════════════════════════════════════════ */

/* Larger title (one notch up from default, smaller than hero) */
.section--big-title .section__title {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: -0.01em;
}

/* Pull-quote opener — first paragraph becomes pulled prose */
.section--pull-quote .section__body > p:first-child {
  font-size: 1.2rem; line-height: 1.5;
  border-left: 3px solid var(--accent, #4a9eff);
  padding-left: 18px;
  margin-bottom: 18px;
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════════════
   IMAGE TREATMENTS — apply to .section--text-image
   ════════════════════════════════════════════════════════════════════════ */

/* Circle crop — for portraits, profile shots */
.image--rounded-full .section__image img {
  border-radius: 50%; aspect-ratio: 1; object-fit: cover;
}

/* Drop shadow — subtle elevation */
.image--soft-shadow .section__image img { box-shadow: var(--df-shadow-soft); }

/* Bordered — thin border around image */
.image--bordered .section__image img {
  border: 1px solid var(--df-card-bd);
  border-radius: 8px;
  padding: 6px; background: var(--df-card-bg);
}

/* ════════════════════════════════════════════════════════════════════════
   GALLERY LAYOUTS — apply to .section--gallery
   ════════════════════════════════════════════════════════════════════════ */

/* Featured-first — first image spans 2 columns, rest fill in */
.gallery--featured-first .gallery-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.gallery--featured-first .gallery-grid figure:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 1;
}

/* Strip — horizontal scroll on mobile, row on desktop */
.gallery--strip .gallery-grid {
  display: flex; gap: 12px; overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
}
.gallery--strip .gallery-grid figure {
  flex: 0 0 280px; scroll-snap-align: start;
  aspect-ratio: 4/3;
}

/* Mosaic — irregular grid, taller cells for variety */
.gallery--mosaic .gallery-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-auto-rows: 200px;
}
.gallery--mosaic .gallery-grid figure:nth-child(3n+1) { grid-row: span 2; }
