/* =====================================================================
   "Here's How It Works" — numbered header bar + dusty-blue pip flow.
   Number + icon share a header row; a solid navy pip with a white chevron
   replaces the old faint tick. Tokens only; navy shadows use the house
   rgba(31,57,84,a) convention (matches header.css / price-chart.css).
   Works for 3-step (redeem/limit/switch) and 6-step (how-it-works) pages.
   ===================================================================== */

.redeem-steps {
  background: #071f39; /* deep navy band (Figma Secondary/Deep Blue) */
  padding-block: var(--redeem-band-pad-y);
}

.redeem-steps__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--redeem-adv-stack-gap, 36px);
}

/* ---- Heading (Axiforma Medium 32/45 — OG Desktop H2) ---- */
.redeem-steps__heading {
  margin: 0;
  font-weight: var(--fw-medium);
  font-size: var(--fs-32);
  line-height: var(--lh-45);
  color: var(--gray-0); /* white on the deep-navy band */
  text-align: center;
  word-break: break-word;
}

/* ---- Step grid: balanced cards, auto-numbered ---- */
.redeem-steps__list {
  counter-reset: step;                 /* counter root stays on the list */
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2vw, 32px);         /* slightly wider gutter to seat the pips */
  align-items: stretch;
}

.redeem-steps__step {
  counter-increment: step;             /* numbering driver, unchanged */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;                /* header spans full card width */
  gap: 12px;
  text-align: left;
  background: var(--gray-0);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-10);
  padding: clamp(22px, 2.2vw, 30px);
  box-shadow: 0 1px 2px rgba(31, 57, 84, 0.04), 0 12px 32px rgba(31, 57, 84, 0.06);
  transition: transform .35s cubic-bezier(.22,1,.36,1),
              box-shadow .35s cubic-bezier(.22,1,.36,1),
              border-color .35s cubic-bezier(.22,1,.36,1);
}
.redeem-steps__step:hover {
  transform: translateY(-2px);
  border-color: var(--dusty-blue);
  box-shadow: 0 2px 4px rgba(31, 57, 84, 0.06), 0 14px 32px rgba(31, 57, 84, 0.12);
}

/* ---- Header row: number (left) + icon (right), hairline under ---- */
.redeem-steps__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}
/* number badge — the relocated CSS counter */
.redeem-steps__head::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  background: var(--dusty-blue);
  color: var(--gray-0);
  font-size: var(--fs-18);
  font-weight: var(--fw-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Icon: right-aligned, unified to one optical HEIGHT regardless of glyph width
   (real glyphs are landscape ~49-76px wide, ~55px tall -> height is the unifier) */
.redeem-steps__icon {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 40px;
  flex: none;
}
.redeem-steps__icon img {
  width: auto;
  height: 100%;
  max-width: 80px;        /* guards the widest (76px) glyph without distortion */
  object-fit: contain;
}

/* ---- Title + copy ---- */
.redeem-steps__title {
  margin: 0;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-20);
  line-height: 1.3;
  color: var(--gray-8);
}
.redeem-steps__copy {
  margin: 0;
  font-weight: var(--fw-regular);
  font-size: var(--fs-16);
  line-height: 1.55;
  color: var(--color-text-muted, var(--gray-7));
  word-break: break-word;
}
.redeem-steps__copy strong,
.redeem-steps__copy b {
  font-weight: var(--fw-bold);
  color: var(--gray-8);
}

/* Connector pips removed per design — content:none suppresses the pseudo-
   element entirely (the responsive display toggles below become inert). */
.redeem-steps__step::after {
  content: none;
  position: absolute;
  top: 50%;
  right: -16px;                          /* sits in the gutter, straddling cards */
  width: 32px;
  height: 32px;
  transform: translateY(-50%);
  border-radius: 50%;
  /* brighter OneGold blue so the flow pip contrasts the navy number badges */
  background-color: var(--og-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 6 15 12 9 18'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  /* float above cards: crisp white ring + soft navy shadow (house rgba) */
  box-shadow: 0 0 0 3px var(--gray-0), 0 4px 10px rgba(31, 57, 84, 0.30);
  z-index: 2;
}
.redeem-steps__step:last-child::after { display: none; }

/* ===== Responsive — pip hides at each row's true end; points down at 1-up ===== */

/* Bespoke: ≥901px — 3-col layout with row-end pip hides (leave; bespoke value) */
@media (min-width: 901px) {
  .redeem-steps__step:nth-child(3n)::after { display: none; }
}
/* Bespoke: 561–900px — 2-col mid-range (leave; bespoke range) */
@media (min-width: 561px) and (max-width: 900px) {
  .redeem-steps__list { grid-template-columns: repeat(2, 1fr); }
  .redeem-steps__step:nth-child(2n)::after { display: none; }
}

/* ---- Tablet (≤1023.98): 3→2 columns — placed after bespoke min-width blocks
   so it wins the cascade at 901–1023.98 where both ranges fire ---- */
@media (max-width: 1023.98px) {
  .redeem-steps__list { grid-template-columns: repeat(2, 1fr); }
  .redeem-steps__step:nth-child(2n)::after { display: none; }
  .redeem-steps__step:nth-child(3n)::after { display: block; }
  .redeem-steps__step:last-child::after { display: none; }
}

/* ---- Large-mobile (≤767.98): smaller heading (merged from 767px) ---- */
@media (max-width: 767.98px) {
  .redeem-steps__heading {
    font-size: clamp(24px, 6.4vw, var(--fs-32));
    line-height: 1.3;
  }
}
/* Bespoke: ≤560px — single column (sub-599; leave at bespoke value per Rule 1) */
@media (max-width: 560px) {
  .redeem-steps__list { grid-template-columns: 1fr; }
  /* single column: pip recenters under the card and chevron points DOWN */
  .redeem-steps__step::after {
    top: auto;
    right: 50%;
    bottom: -16px;
    transform: translateX(50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  }
  /* reset desktop/tablet row-end hides so every non-last card shows the down pip */
  .redeem-steps__step:nth-child(3n)::after,
  .redeem-steps__step:nth-child(2n)::after { display: block; }
  .redeem-steps__step:last-child::after { display: none; }
}

/* Respect reduced-motion: no transform/shadow animation */
@media (prefers-reduced-motion: reduce) {
  .redeem-steps__step { transition: none; }
  .redeem-steps__step:hover { transform: none; }
}
