/**
 * Hello Home — the guarantee box.
 *
 * A dark rounded panel with the money-back promise on one side and the
 * payment security on the other.
 *
 * There is not a single media query in this file, and that is deliberate.
 * The box is meant for a checkout column, which is narrower than the viewport
 * at every width -- a breakpoint keyed to the viewport would describe a space
 * this widget never occupies, which is exactly how the hand-built version
 * came apart. Everything here is sized against the room actually available:
 * the two halves are flex items with a basis they need to read at, so they
 * stack when they no longer fit, and the card row wraps on the same terms.
 */

.hello-guarantee {
  --hello-pad-y: 0;
  --hello-pad-x: 0;
  --hello-guarantee-bg: #0d0d0d;
  --hello-guarantee-radius: 20px;
}

/**
 * The panel, not the section, carries the colour -- so the row behind it can
 * stay whatever the page is, and Style > Background color still works on the
 * band if someone wants both.
 */
.hello-guarantee__box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px clamp(24px, 4vw, 56px);
  padding: clamp(24px, 3vw, 32px) clamp(20px, 3vw, 40px);
  border-radius: var(--hello-guarantee-radius);
  background: var(--hello-guarantee-bg);
  color: #fff;
  text-align: center;
}

.hello-guarantee--light-box .hello-guarantee__box {
  color: #0d0d0d;
}

/**
 * The basis is the point of these two rules.
 *
 * Each half asks for the width it needs to read properly and is allowed to
 * grow into whatever is left over; when the two asks no longer fit side by
 * side, flex-wrap stacks them. No query decides that -- the content does, so
 * it holds at any page width, in any column, including ones nobody tested.
 *
 * Both halves stay centred in either arrangement. Centring is what makes the
 * stacked version look intentional rather than like a collapsed table, and it
 * costs nothing side by side, where each half is centred in its own column.
 */
.hello-guarantee__promise {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hello-guarantee__trust {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ---- the promise -------------------------------------------------------- */

.hello-guarantee__lead {
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.2;
  font-weight: 700;
}

.hello-guarantee__word {
  font-size: clamp(26px, 2.8vw, 36px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ---- the security line -------------------------------------------------- */

.hello-guarantee__secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(16px, 1.3vw, 20px);
  line-height: 1.4;
}

/* flex-shrink: 0 or the padlock squashes before the words wrap. */
.hello-guarantee__lock {
  flex: 0 0 auto;
  width: 15px;
  height: 20px;
}

/* ---- the card logos ----------------------------------------------------- */

/**
 * A wrapping flex row rather than four fixed images: the logos shrink to fit
 * the space before they wrap, and wrap before they ever overlap or push the
 * panel wider than its column. This is the part that broke before.
 */
.hello-guarantee__cards {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hello-guarantee__card {
  /* Shrink down to 44px before wrapping -- below that the wordmarks stop
     being readable and a wrapped row is the better answer. */
  flex: 0 1 60px;
  min-width: 44px;
  margin: 0;
}

.hello-guarantee__card img {
  display: block;
  width: 100%;
  height: auto;
  /* The theme rounds images in post content; these carry their own corners. */
  border-radius: 0;
}
