/* Containers, section bands, grid primitives. */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  max-width: 820px;
}

/* ---- Section bands ----------------------------------------------------- */

.band {
  position: relative;
  padding-block: var(--band);
}

.band-sm {
  position: relative;
  padding-block: var(--band-sm);
}

/* Where two sections share a background, halve the seam so the gap between
   them reads the same as the gap inside a single band. */
.seam-top {
  padding-top: calc(var(--band) * 0.42);
}

.band--alt {
  background: var(--bone-2);
}

.band--paper {
  background: var(--paper);
}

/* Inverted band. Re-points the text tokens so children need no overrides. */
.band--ink {
  background: var(--ink-2);
  color: var(--on-dark);
  --text: var(--on-dark);
  --muted: var(--on-dark-mut);
  --ink: var(--on-dark);
  --line: var(--line-ink);
  --bone-card: var(--ink-3);
}

.band--ink h1,
.band--ink h2,
.band--ink h3,
.band--ink h4 {
  color: var(--on-dark);
}

/* ---- Section headings -------------------------------------------------- */

.section-head {
  max-width: 760px;
  margin-bottom: var(--sp-7);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head > h2 {
  margin-top: var(--sp-3);
}

.section-head > .lead {
  margin-top: var(--sp-4);
}

/* Thin standalone rule, for a light break between a heading and what
   follows without the weight of a full section border. */
.rule-lite {
  height: 1px;
  margin: 0 0 var(--sp-7);
  border: 0;
  background: var(--line);
}

/* Lower-contrast, tighter-spaced variant for breaks inside a card, where a
   full-strength rule would compete with the icon and hover accents. */
.rule-lite--card {
  margin: var(--sp-4) 0;
  background: rgba(21, 32, 59, 0.08);
}

/* Heading and intro paragraph side by side on wide screens, so the lead
   copy reads as a considered second voice rather than trailing filler. */
.section-head--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  max-width: none;
}

.section-head--split .lead {
  margin-top: 0;
  padding-bottom: 3px;
}

.section-head--split h2 {
  margin-top: var(--sp-3);
}

@media (max-width: 760px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: var(--ls-lab);
  text-transform: uppercase;
  color: var(--coral-ink);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent-grad);
}

.band--ink .eyebrow {
  color: var(--amber);
}

.label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--muted);
}

/* ---- Grid primitives --------------------------------------------------- */

.cards-2,
.cards-3,
.cards-4 {
  display: grid;
  gap: 22px;
}

.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* ---- Reveal on scroll -------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.62s var(--ease),
    transform 0.62s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* Stagger children of a revealed group. */
.reveal-group.in > * {
  animation: rise 0.62s var(--ease) both;
}

.reveal-group.in > *:nth-child(2) { animation-delay: 0.07s; }
.reveal-group.in > *:nth-child(3) { animation-delay: 0.14s; }
.reveal-group.in > *:nth-child(4) { animation-delay: 0.21s; }
.reveal-group.in > *:nth-child(5) { animation-delay: 0.28s; }
.reveal-group.in > *:nth-child(6) { animation-delay: 0.35s; }

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 1024px) {
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cards-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .cards-2,
  .cards-3,
  .cards-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-head {
    margin-bottom: var(--sp-6);
  }
}
