/* ==========================================================================
   Merchants & Content Providers page (merchants.html)
   Page-specific styles only. Use .mch-* class names; shared components
   live in css/style.css and must not be redefined here.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Icon badge (payment tiles, CP tiles, switch cards, UA features)
   Plum disc + lime glyph; flips to lime disc on dark surfaces.
   -------------------------------------------------------------------------- */

.mch-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--plum-900);
  color: var(--lime);
}

.mch-icon svg {
  width: 24px;
  height: 24px;
}

.card--plum .mch-icon,
.section-dark .mch-icon {
  background: var(--lime);
  color: var(--plum-900);
}


/* --------------------------------------------------------------------------
   01. Hero
   -------------------------------------------------------------------------- */

/* Three short lines: "Your product." / "Our markets." / "Every payment rail."
   Sized so the highlight line (≈8.9em; ES "Nuestros mercados." ≈9.3em)
   always fits the copy column and never leaves a one-word orphan. */
.mch-hero-title {
  font-size: clamp(46px, calc((100vw - 112px) * 0.057), 64px);
  line-height: 1.04;
}

.mch-hero-title > span {
  display: block;
}

@media (max-width: 959px) {
  .mch-hero-title {
    font-size: clamp(34px, calc((100vw - 48px) * 0.106), 64px);
  }
}

@media (max-width: 480px) {
  .mch-hero-title {
    font-size: calc((100vw - 32px) * 0.106);
  }
}

/* Photo (img/v2/hero-merchants.jpg): the phone sits just left of centre with
   fingers on its left edge, so the three chips run one size smaller here and
   never cover the screen. Narrow panels: DCB top-left, cards and wallets
   stacked bottom-left. Panels 500px+: DCB and cards flank the phone at
   mid-height, one per side, wallets low-left. */
.mch-hero-visual {
  container-type: inline-size;
  background: var(--lime);
}

.mch-hero-visual .float-chip {
  gap: 8px;
  padding: 6px 14px 6px 6px;
  font-size: 12px;
}

.mch-hero-visual .float-chip-icon {
  width: 26px;
  height: 26px;
}

.mch-hero-visual .float-chip-icon svg {
  width: 13px;
  height: 13px;
}

.mch-hero-visual .float-chip small {
  font-size: 11px;
}

.mch-chip--dcb {
  top: 3%;
  left: 4%;
}

.mch-chip--cards {
  bottom: calc(6% + 52px);
  left: 4%;
  animation-delay: -1.5s;
}

.mch-chip--wallets {
  bottom: 6%;
  left: 4%;
  animation-delay: -3s;
}

@container (min-width: 500px) {
  .mch-chip--dcb {
    top: 24%;
    left: 2.5%;
  }

  .mch-chip--cards {
    top: 31%;
    right: 2.5%;
    bottom: auto;
    left: auto;
  }

  .mch-chip--wallets {
    bottom: 22%;
    left: 2.5%;
  }
}


/* --------------------------------------------------------------------------
   02. Audience switch
   -------------------------------------------------------------------------- */

/* Half-height top under the hero; full-height bottom so the pink card and
   the lime panel below (#unbanked, top padding zeroed) sit a full section
   gap apart. */
.mch-switch {
  padding-top: calc(var(--section-y) / 2);
}

.mch-switch-card {
  min-height: 320px;
}

.mch-switch-title {
  margin-top: auto;
  padding-top: 48px;
  margin-bottom: 12px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--fs-h-sm);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.mch-switch-text {
  max-width: 46ch;
  font-size: 17px;
}


/* --------------------------------------------------------------------------
   03. Unbanked statement panel (lime)
   -------------------------------------------------------------------------- */

.mch-unbanked {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: 40px 64px;
  padding: clamp(36px, 6vw, 80px);
  overflow: hidden;
  isolation: isolate;
}

/* Flat circles, echoing the hero panel */
.mch-unbanked::before,
.mch-unbanked::after {
  content: '';
  position: absolute;
  z-index: -1;
  aspect-ratio: 1;
  border-radius: 50%;
}

.mch-unbanked::before {
  top: -30%;
  left: -14%;
  width: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.mch-unbanked::after {
  right: -48px;
  bottom: -84px;
  width: 184px;
  background: var(--lavender);
}

.mch-unbanked-num {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(112px, 15vw, 200px);
  font-weight: 700;
  line-height: 0.84;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mch-unbanked-label {
  max-width: 16ch;
  margin-top: 20px;
  color: var(--fg);
  font-size: var(--fs-sub);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.mch-unbanked-copy .lead {
  margin-top: 20px;
}

.mch-unbanked-tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--fs-sub);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.mch-unbanked-tagline::before {
  content: '';
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fg);
}

@media (max-width: 900px) {
  .mch-unbanked {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .mch-unbanked::after {
    right: -48px;
    bottom: -64px;
    width: 150px;
  }

  .mch-unbanked::before {
    top: -12%;
    left: -24%;
    width: 84%;
  }
}


/* --------------------------------------------------------------------------
   04. Merchants: payment tiles + regions
   -------------------------------------------------------------------------- */

/* Tile: icon, then copy, top-aligned so titles in a row share one line */
.mch-tile {
  min-height: 280px;
}

.mch-tile > .mch-icon {
  margin-bottom: 48px;
}

.mch-tile > .card-tag {
  position: absolute;
  top: var(--card-pad);
  right: var(--card-pad);
  margin: 0;
}

.mch-subhead {
  margin-top: var(--section-y);
}

.mch-region-name {
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--fs-h-sm);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

/* Three across: reserve two lines so the descriptions start level;
   a one-line name sits on the lower line, next to its text. */
@media (min-width: 901px) {
  .mch-region-name {
    display: flex;
    align-items: flex-end;
    min-height: 2.2em;
  }
}


/* --------------------------------------------------------------------------
   05. Content providers: heading, bento + flow
   Desktop: tall pink card left, two tiles right, wide tile below.
   Accent cards never touch: pink | white | plum, then pink | white.
   -------------------------------------------------------------------------- */

.mch-cp-title > span {
  display: block;
}

.mch-cp-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas:
    'launch billing ua'
    'launch reporting reporting';
  gap: var(--grid-gap);
}

/* One corner size across the bento (the tiles keep their own padding) */
.mch-cp-bento > .card {
  border-radius: var(--r-card-lg);
}

.mch-cp-launch { grid-area: launch; }
.mch-cp-billing { grid-area: billing; }
.mch-cp-reporting { grid-area: reporting; }
.mch-cp-ua { grid-area: ua; }

.mch-cp-reporting {
  min-height: 0;
}

.mch-cp-reporting .card-text {
  max-width: 52ch;
}

/* Decorative mini bar chart in the wide reporting tile (desktop only) */
.mch-cp-bars {
  position: absolute;
  right: calc(var(--card-pad) + 8px);
  bottom: var(--card-pad);
  display: none;
  align-items: flex-end;
  gap: 8px;
  height: 128px;
}

.mch-cp-bars span {
  width: 20px;
  border-radius: 6px;
  background: var(--lavender);
}

.mch-cp-bars span:nth-child(1) { height: 28%; }
.mch-cp-bars span:nth-child(2) { height: 42%; }
.mch-cp-bars span:nth-child(3) { height: 36%; }
.mch-cp-bars span:nth-child(4) { height: 58%; }
.mch-cp-bars span:nth-child(5) { height: 50%; }
.mch-cp-bars span:nth-child(6) { height: 74%; }

.mch-cp-bars span:nth-child(7) {
  height: 100%;
  background: var(--violet);
}

@media (min-width: 1025px) {
  .mch-cp-bars {
    display: flex;
  }
}

.mch-cp-stat {
  margin-bottom: auto;
}

.mch-cp-num {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(96px, 10vw, 152px);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}

.mch-cp-num-label {
  max-width: 20ch;
  margin-top: 16px;
  color: var(--fg);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

.mch-cp-launch .card-title {
  margin-top: 56px;
}

.mch-flow {
  margin-top: 96px;
}

.mch-flow-title {
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .mch-cp-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      'launch launch'
      'billing reporting'
      'ua ua';
  }

  .mch-cp-launch .card-title {
    margin-top: 40px;
  }

  .mch-cp-ua {
    min-height: 0;
  }

  .mch-flow {
    margin-top: 72px;
  }
}

/* Tablet: the full-width pink card reads left (number) to right (copy) */
@media (min-width: 641px) and (max-width: 1024px) {
  .mch-cp-launch {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    column-gap: 40px;
  }

  .mch-cp-stat {
    grid-row: 1 / span 2;
    margin-bottom: 0;
  }

  .mch-cp-launch .card-title {
    align-self: end;
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .mch-cp-bento {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
  }

  .mch-cp-bento > * {
    grid-area: auto;
  }
}


/* --------------------------------------------------------------------------
   06. User acquisition (dark band)
   -------------------------------------------------------------------------- */

.mch-ua-grid {
  row-gap: 40px;
}

.mch-ua-item {
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.mch-ua-item .mch-icon {
  margin-bottom: 28px;
}

.mch-ua-item .card-title {
  font-size: 20px;
}


/* --------------------------------------------------------------------------
   07. How it works (editorial numbered list)
   -------------------------------------------------------------------------- */

.mch-how {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
  gap: 48px 64px;
}

.mch-how-head {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  margin-bottom: 0;
}

.mch-how-list {
  border-top: 1px solid var(--hairline);
}

.mch-how-step {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: baseline;
  gap: 24px;
  padding-block: 32px;
  border-bottom: 1px solid var(--hairline);
}

.mch-how-num {
  color: var(--hl);
  font-family: var(--font-display);
  font-size: clamp(36px, 3.6vw, 52px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.mch-how-step .card-title {
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .mch-how {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .mch-how-head {
    position: static;
    margin-bottom: var(--head-gap);
  }
}


/* --------------------------------------------------------------------------
   Small screens: drop tile min-heights, keep a steady icon → copy gap
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .mch-switch-card,
  .mch-tile {
    min-height: 0;
  }

  .mch-switch-title {
    padding-top: 32px;
  }

  .mch-tile > .mch-icon {
    margin-bottom: 28px;
  }

  .mch-tile .mch-icon,
  .mch-ua-item .mch-icon {
    width: 46px;
    height: 46px;
  }

  .mch-icon svg {
    width: 22px;
    height: 22px;
  }

  /* UA features: icon beside the title to keep the dark band compact */
  .mch-ua-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 16px;
    padding-top: 24px;
  }

  .mch-ua-item .mch-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .mch-ua-item .card-title {
    align-self: center;
    margin-bottom: 6px;
  }

  .mch-region-name {
    margin-top: 32px;
  }

  .mch-how-step {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
    padding-block: 24px;
  }
}
