/* ─────────────────────────────────────────────────────────────────
   block-setup — onboarding / process steps.
   Two layouts:
     1. .block-setup__steps--horizontal  (T10 — recommended)
        Numbered cards in a row on desktop, stacked on mobile.
     2. legacy editorial alternating rows (kept for backward-compat
        with already-published .row-based pages — selectors below).
   T10 (2026-05-06).
   ─────────────────────────────────────────────────────────────── */

.block-setup {
  position: relative;
  overflow: hidden;
}

/* WAVE3-F06 2026-05-08: pin color #fff (audit §7.3) — was --scheme-fg
   which resolved to ink (black) on light schemes; the white-on-orange
   eyebrow is the design intent. Bump font-weight to 700 + size floor so
   white-on-orange (3.48:1) qualifies as AA Large. */
.block-setup__eyebrow {
  display: inline-block;
  background: var(--ds-cta);
  color: #fff;
  font-family: var(--ds-font-mono, monospace);
  font-size: max(0.95rem, var(--ds-fs-eyebrow, 0.78rem));
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--ds-space-2) var(--ds-space-4);
  border-radius: var(--ds-radius-pill);
  margin-bottom: var(--ds-space-5);
}

/* ─────────────────────────────────────────────────────────────
   Horizontal numbered-card layout (T10)
   ───────────────────────────────────────────────────────────── */

.block-setup__steps--horizontal {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ds-space-5);
  list-style: none;
  margin: 0 0 var(--ds-space-6) 0;
  padding: 0;
}

@media (min-width: 768px) {
  .block-setup__steps--horizontal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .block-setup__steps--horizontal {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    grid-template-columns: unset;
  }
}

.block-setup__step {
  position: relative;
  background: var(--scheme-card-bg, #fff);
  border: 1px solid var(--scheme-rule, rgba(0,0,0,0.08));
  border-radius: var(--ds-radius);
  padding: var(--ds-space-5) var(--ds-space-5) var(--ds-space-6);
  box-shadow: var(--ds-shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ds-space-3);
}

/* ── Numbered circle (Anton) ──
   FIX-T10 — locked to 64×64 via min/max clamp. Some long-content
   step bodies were causing the flexbox to stretch the circle. The
   min-/max- pins keep the badge perfectly square at every viewport.
*/
.block-setup__num {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  max-width: 64px;
  max-height: 64px;
  border-radius: 50%;
  background: var(--ds-cta);
  /* WAVE3-F06 2026-05-08: pin #fff (audit §7.2). Anton numerals at
     1.85rem (29.6px) qualify as AA Large (3.0); white-on-orange = 3.48:1. */
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--ds-shadow-md, 0 4px 14px rgba(0,0,0,0.12));
  flex: 0 0 64px;        /* fixed basis — never grow / shrink */
  margin-top: -38px;     /* pop above card top edge */
  aspect-ratio: 1 / 1;
}

.block-setup__num-text {
  font-family: 'Anton', var(--ds-font-display, sans-serif);
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: 0.02em;
  font-weight: 400;             /* Anton is a single-weight display face */
}

/* ── Connector line (desktop only) ── */
@media (min-width: 992px) {
  .block-setup__steps--with-dividers .block-setup__step + .block-setup__step::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--ds-space-5));
    top: 0;                                    /* aligns to circle vertical center via translate */
    width: var(--ds-space-5);
    height: 2px;
    background: linear-gradient(90deg, var(--ds-accent), var(--ds-cta));
    transform: translateY(-6px);
    pointer-events: none;
  }
}

.block-setup__step-body {
  width: 100%;
}

/* SENIOR-T7 2026-05-07: step title kept Anton (display) per framework
   h3-allowance, but minimum bumped to 1.5rem (24px) at every viewport
   so older readers can scan the step heading from arm's length.
   line-height bumped to 1.2 for two-line wrap breathing room. */
.block-setup__title {
  font-family: var(--ds-font-display, var(--ds-font-heading, sans-serif));
  font-size: clamp(1.5rem, 1.8vw, 1.75rem);
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 1.2;
  margin: 0 0 var(--ds-space-3) 0;
  color: var(--scheme-fg);
  display: flex;
  align-items: center;
  gap: var(--ds-space-2);
}

.block-setup__icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ds-accent) 18%, transparent);
  color: var(--ds-accent);
  font-size: 1.05rem;
  flex: 0 0 auto;
}

/* SENIOR-T7 2026-05-07: step body bumped to ds-fs-body-lg (1.25rem /
   20px) per spec sub-heading-text rule, line-height to 1.6 AARP.
   SWEEP-B4 2026-05-08: a later, equal-specificity `.block-setup p`
   rule (legacy editorial layout) was undercutting this to 1.125rem
   (18px) at every viewport. Force 1.25rem so the audience-45-70+
   step body never drops below 20px. */
.block-setup__text,
.block-setup .block-setup__text {
  color: var(--scheme-fg-soft);
  font-family: var(--ds-font-body, sans-serif);
  font-size: 1.25rem !important;   /* 20px floor — AARP humane */
  line-height: 1.6;
  margin: 0;
  max-width: 56ch;
}

.block-setup__step-img {
  margin-top: var(--ds-space-4);
  width: 100%;
  max-width: 100%;       /* FIX-T10 — never burst step body */
  height: auto;
  border-radius: calc(var(--ds-radius) - 2px);
  display: block;
}

/* ── Final CTA ── */
.block-setup__cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ds-space-2);
  margin-top: var(--ds-space-6);
  text-align: center;
}

/* SENIOR-T7 2026-05-07: primary CTA bumped to 56px AARP minimum;
   font bumped to 1.125rem so the action verb is unambiguous. */
.block-setup__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--ds-touch-target-primary, 56px);
  padding: 0 var(--ds-space-6);
  background: var(--ds-cta);
  /* WAVE3-F06 2026-05-08: pin #fff (audit §7.4). */
  color: #fff;
  font-family: var(--ds-font-heading, var(--ds-font-display, sans-serif));
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--ds-fs-body);
  text-decoration: none;
  border-radius: calc(var(--ds-radius) - 2px);
  box-shadow: var(--ds-shadow-sm);
  transition: transform var(--ds-duration, 220ms) var(--ds-ease-out, ease-out),
              box-shadow var(--ds-duration, 220ms) var(--ds-ease-out, ease-out),
              background-color var(--ds-duration, 220ms) var(--ds-ease-out, ease-out);
}

.block-setup__cta:hover,
.block-setup__cta:focus-visible {
  background: color-mix(in srgb, var(--ds-cta) 92%, #000 8%);
  box-shadow: var(--ds-shadow-md);
  transform: translateY(-1px);
  color: #fff;
}

.block-setup__cta:focus-visible {
  outline: 3px solid var(--ds-accent);
  outline-offset: 3px;
}

/* SENIOR-T7 2026-05-07: helper bumped from 13px mono to 16px humanist
   sans, contrast bumped from fg-mute → fg-soft for AAA. */
.block-setup__cta-helper {
  color: var(--scheme-fg-soft, var(--ds-ink));
  font-family: var(--ds-font-body, sans-serif);
  font-size: var(--ds-fs-body-sm, 1rem);
  letter-spacing: 0.01em;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .block-setup__cta { width: 100%; max-width: 360px; padding: 0 var(--ds-space-4); }
  /* FIX-T10 — also re-clamp at mobile so the badge stays a perfect
     square at the 54-px size used on small screens. */
  .block-setup__num {
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    max-width: 54px;
    max-height: 54px;
    flex: 0 0 54px;
    margin-top: -30px;
  }
  .block-setup__num-text { font-size: 1.5rem; }
  .block-setup__step { padding: var(--ds-space-4); }
}

/* ─────────────────────────────────────────────────────────────
   Legacy editorial alternating rows — preserved for backward
   compatibility with already-published pages using the old
   layout. Selectors carried from previous theme version.
   ───────────────────────────────────────────────────────────── */

.block-setup > .container > .row > .col-12 > .row {
  margin: 0 0 var(--ds-space-4) 0;
  background: var(--scheme-card-bg);
  border: 1px solid var(--scheme-rule);
  border-radius: var(--ds-radius);
  padding: var(--ds-space-5) var(--ds-space-6);
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--ds-shadow-sm);
  transition: box-shadow var(--ds-duration) var(--ds-ease-out);
}

.block-setup > .container > .row > .col-12 > .row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--ds-cta), var(--ds-accent));
}

.block-setup > .container > .row > .col-12 > .row.flex-lg-row-reverse::before {
  left: auto;
  right: 0;
  background: linear-gradient(180deg, var(--ds-accent), var(--ds-cta));
}

@media (min-width: 992px) {
  .block-setup > .container > .row > .col-12 > .row > .col-lg-4:first-of-type {
    flex: 0 0 42%;
    max-width: 42%;
  }
  .block-setup > .container > .row > .col-12 > .row > .col-lg-4:last-of-type {
    flex: 0 0 58%;
    max-width: 58%;
  }
}

.block-setup h3 {
  margin-bottom: var(--ds-space-3);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  line-height: 1;
}

/* SENIOR-T7 2026-05-07: legacy <p> explicitly locked to ds-fs-body
   (18px) + 1.6 line-height for AARP body floor. */
.block-setup p {
  color: var(--scheme-fg-soft);
  font-family: var(--ds-font-body, sans-serif);
  font-size: var(--ds-fs-body, 1.125rem);
  margin: 0;
  max-width: 56ch;
  line-height: 1.6;
}

.block-setup .px-g { padding: 0; }

@media (max-width: 992px) {
  .block-setup > .container > .row > .col-12 > .row {
    padding: var(--ds-space-4) var(--ds-space-5);
  }
}

@media (max-width: 600px) {
  /* SENIOR-T7 2026-05-07: keep h3 ≥1.5rem and p ≥18px on mobile. */
  .block-setup h3 { font-size: 1.5rem; }
  .block-setup p  { font-size: var(--ds-fs-body, 1.125rem); line-height: 1.6; }
}

/* W2-A19 mobile overflow fix — preserved */
.block-setup .container-edge-to-edge {
  max-width: 100vw;
  overflow-x: hidden;
}

/* W2-A20 — Anton typography enforcement, preserved */
.block-setup h2,
.block-setup h3,
.block-setup .step-title,
.block-setup .integration-name {
  font-family: var(--ds-font-display, "Anton", sans-serif) !important;
}

/* SWEEP-B4 2026-05-08: align with sister modules — reserve clearance
   below the CTA on small viewports so the global #acme-sticky-cta bar
   never tucks the helper line ("15-min call. No commitment...") under
   itself. Token shipped wave-coord; default 96px keeps parity. */
@media (max-width: 768px) {
  .block-setup {
    padding-bottom: var(--ds-sticky-cta-clearance, 96px);
  }
}

/* ─────────────────────────────────────────────────────────────────
   WAVE3-F06 2026-05-08 — Pattern C scheme-scoped overrides
   On .scheme-accent (orange section) eyebrow, num circle, and CTA all
   collapse to orange-on-orange. Inverse-swap.
   ───────────────────────────────────────────────────────────────── */
.scheme-accent .block-setup__eyebrow,
.scheme-accent .block-setup__num,
.scheme-accent .block-setup__cta {
  background: #fff;
  color: var(--ds-cta);
}
.scheme-accent .block-setup__cta:hover,
.scheme-accent .block-setup__cta:focus-visible {
  background: rgba(255,255,255,0.92);
  color: var(--ds-cta);
}
