/* =====================================================================
   Downloads — inventory-file download link list.
   Centred stack (mirrors redeem-cta): optional H2 (Axiforma Medium 32/45),
   optional small label (Axiforma Regular 14, muted), then a wrapping row of
   bordered "chip" links. Each chip carries a small download arrow — the
   arrow-right.svg glyph rotated 90deg to point down and tinted via CSS mask
   (the header price-bar__arrow technique) so it inherits the link colour.
   Content locked to the 1240 area via .container. Tokens only; BEM.
   ===================================================================== */

.downloads {
  padding-block: var(--redeem-cta-pad-y);
}

.downloads__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--redeem-stack-gap);
}

/* ---- Heading (Axiforma Medium 32/45 — OG Desktop H2) ---- */
.downloads__heading {
  margin: 0;
  font-weight: var(--fw-medium);
  font-size: var(--fs-32);
  line-height: var(--lh-45);
  color: var(--gray-8);
  text-align: center;
  word-break: break-word;
}

/* ---- Small label (Axiforma Regular 14, muted) ---- */
.downloads__label {
  margin: 0;
  font-weight: var(--fw-regular);
  font-size: var(--fs-14);
  line-height: normal;
  color: var(--color-text-muted);
  text-align: center;
  word-break: break-word;
}

/* ---- Row of chips: centred, wraps onto multiple rows ---- */
.downloads__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--redeem-cta-gap);
  width: 100%;
}
.downloads__item {
  display: inline-flex;
  min-width: 0;
}

/* ---- Bordered chip link ---- */
.downloads__link {
  display: inline-flex;
  align-items: center;
  gap: var(--btn-gap);
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border: var(--redeem-rule-w) solid var(--color-border-soft);
  border-radius: var(--radius-8);
  background: var(--gray-0);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-weight: var(--fw-medium);
  font-size: var(--fs-16);
  line-height: normal;
  text-decoration: none;
  word-break: break-word;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.downloads__link:hover,
.downloads__link:focus-visible {
  border-color: var(--og-blue);
  color: var(--og-blue);
}

.downloads__link-label {
  word-break: break-word;
}

/* ---- Download arrow: arrow-right.svg rotated to point down, tinted via mask
   so it follows the link colour (price-bar__arrow technique). ---- */
.downloads__link-arrow {
  flex: none;
  width: var(--btn-icon);
  height: var(--btn-icon);
  background-color: currentColor;
  -webkit-mask: url("../../img/arrow-right.svg") no-repeat center / contain;
          mask: url("../../img/arrow-right.svg") no-repeat center / contain;
  transform: rotate(90deg); /* point the glyph downward (download) */
}

/* ---- Tablet: step heading size down ---- */
@media (max-width: 1023.98px) {
  .downloads__heading {
    font-size: var(--fs-28);
    line-height: var(--lh-36);
  }
}

/* ---- Mobile (<=767.98px): chips stack full-width, heading scales down ---- */
@media (max-width: 767.98px) {
  .downloads__heading {
    font-size: clamp(24px, 6.4vw, var(--fs-32));
    line-height: 1.3;
  }
  .downloads__list {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--redeem-stack-gap);
  }
  .downloads__item {
    width: 100%;
  }
  .downloads__link {
    width: 100%;
    justify-content: space-between;
  }
}
