/* steps block */

.steps {
  position: relative;
  isolation: isolate;
  /* CSS counter for the auto-numbered card pseudo-elements */
  counter-reset: item;
}

/* --- Theme --- */
/* The section theme (data-theme) colours the decorative overlay panel.
   Cards carry their own theme (see .card-steps--dark / --light below). */
[data-theme='dark'] .steps__overlay,
[data-theme='ultra-dark'] .steps__overlay {
  --steps-overlay-color: var(--primary);
}

/* Container */
.steps__container {
  display: flex;
  flex-direction: column;
  row-gap: var(--container-gap);
  align-items: center;
}

/* Intro / header */
.steps__container-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: var(--space-xs);
  width: var(--width-80);
  max-width: 100%;
}

.steps__heading {
  font-size: var(--h1);
  text-align: center;
}

.steps__description {
  max-width: 65ch;
  font-size: var(--text-l);
  text-align: center;
}

/* Card grid */
.steps__grid {
  list-style: none;
  margin: 0;
  padding-left: 0;
  display: grid;
  grid-template-columns: var(--grid-3);
  grid-template-rows: var(--grid-1);
  gap: var(--grid-gap);
  align-items: stretch;
  width: 100%;
}

@media (max-width: 640px) {
  .steps__grid {
    grid-template-columns: var(--grid-1);
  }
}

/* Decorative background panel. Colour follows the section variant (light:
   secondary-light tint, dark: primary). bg_has_offset toggles 65% vs full height. */
.steps__overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 35%;
  z-index: -1;
  background-color: white;
}

/* --- Card --- */
/* The wrapper carries the CSS counter; the card draws the number via ::before */
.card-steps__wrapper {
  counter-increment: item;
}

.card-steps {
  display: flex;
  flex-direction: column;
  padding: var(--space-l);
  border: 1px solid var(--secondary-light);
  border-radius: var(--radius-m);
  row-gap: var(--content-gap);
  height: 100%;
}

/* Card variant: dark (default) — dark background, light text, light counter */
.card-steps--dark {
  --color-variant: var(--secondary);
  background-color: var(--primary);
  color: var(--white);
}

/* Card variant: light — light background, dark text, dark counter */
.card-steps--light {
  --color-variant: var(--primary);
  background-color: var(--secondary-light);
  color: var(--primary);
}

@media (max-width: 1024px) {
  .card-steps {
    padding: var(--space-m);
  }
}

/* Auto number rendered before the card content */
.card-steps__wrapper .card-steps::before {
  content: counter(item, decimal-leading-zero);
  font-family: swear-display, serif;
  font-size: var(--text-xxl);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-variant);
}

.card-steps__container-info {
  display: flex;
  flex-direction: column;
  row-gap: var(--space-xs);
}

.card-steps__heading {
  font-size: var(--text-xl);
  font-weight: 700;
}

.card-steps__btn {
  margin-top: auto;
}

/* Button colour follows the card variant: the card template applies btn--accent
   (dark) or btn--primary (light) directly, so the framework button tokens handle it. */
