/* Template: bg-cards — full-bleed background + overlay with a centered
   content column and numbered glass cards (see js/templates/bg-cards.js).
   The glass cards blur the background image behind them. */

.bg-cards {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;
}

.bg-cards__bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.bg-cards__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
}

/* Darker overlay for maximum text readability (data.overlay === "strong"). */
.bg-cards__overlay--strong {
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
}

.bg-cards__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: clamp(96px, 16vh, 160px);
  padding-bottom: clamp(72px, 12vh, 128px);
}

.bg-cards__title {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: clamp(0.04em, 1vw, 0.1em);
  line-height: 1.1;
}

.bg-cards__subtitle {
  margin-top: clamp(14px, 2.5vh, 22px);
  font-size: clamp(12px, 1.8vw, 16px);
  font-weight: 500;
  letter-spacing: clamp(0.28em, 4vw, 0.4em);
  text-indent: clamp(0.28em, 4vw, 0.4em);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.bg-cards__note {
  margin-top: clamp(18px, 3vh, 28px);
  max-width: 64ch;
  font-size: clamp(14px, 1.9vw, 16.5px);
  line-height: 1.75;
  color: var(--color-text-secondary);
}

/* --- Glass cards ------------------------------------------------------------ */

.bg-cards__grid {
  margin-top: clamp(32px, 6vh, 56px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
  width: 100%;
  text-align: left;
}

.bg-cards__card {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2vh, 18px);
  padding: clamp(26px, 3.2vw, 40px);
  background: var(--color-surface);
  background: color-mix(in srgb, var(--color-surface) 50%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.bg-cards__card-number {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--color-accent);
}

.bg-cards__card-title {
  font-size: clamp(16px, 2vw, 19px);
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: var(--color-text-primary);
}

.bg-cards__card-text {
  font-size: clamp(13px, 1.6vw, 14.5px);
  line-height: 1.75;
  color: var(--color-text-secondary);
}

/* --- Closing line ------------------------------------------------------------ */

.bg-cards__footer {
  margin-top: clamp(32px, 6vh, 56px);
  max-width: 72ch;
  font-size: clamp(13.5px, 1.7vw, 15.5px);
  line-height: 1.75;
  color: var(--color-text-secondary);
}

/* Optional three-column grid (data.columns === 3) — one row for up to
 * three cards, keeping tall content within a single viewport. */
.bg-cards__grid--cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 767px) {
  .bg-cards__grid {
    grid-template-columns: 1fr;
  }
}