/* ================================================================
  TRANSBANK (shared)
  /transbank/ and its Google Ads copy /transbank-ppc/ (transbank.html,
  transbank-ppc.html). Everything is scoped under .tb-; titles, texts,
  buttons, the create-store form, the checklist and the FAQ come from
  base.css and the shared includes.

  Light page: bright hero (front matter header_theme: light, see the
  HEADER LIGHT block in base.css), bright product cards, the advantages on
  an onyx section with the vs3 hero glows and the dark final CTA.

  Page-level aliases (rule 10): the Webpay logos are coloured artwork, so
  the product cards that hold them are fixed white surfaces (--js-color-white) that must not follow the section
  theme; the advantage icon ring is the accent at 50 %, built from
  --js-color-green-rgb because there is no --color-accent-op*. The
  checkout mockup is a fixed white surface (data-bundle-color="light")
  whose pay button and radio use the Webpay Plus purple, --tb-pay
  (--js-color-indigo, the closest brand secondary).
================================================================ */

/* Hero: centred copy with the Transbank logo as eyebrow. It is as tall as
   its content instead of the 830px / 100vh of .js-hero, and the product
   cards (same bright background) start right below it, so their top shows
   in the first screen, as the store mockup does on /features-tour/. The
   header is fixed over the hero, so the row clears it itself (as
   vs-shopify-v3 does) */
.tb-hero,
.tb-hero .js-hero__content,
.tb-hero .js-hero__row {
  min-height: auto;
  max-height: none;
}

.tb-hero .js-hero__row {
  padding-top: calc(var(--header-height-desktop) + var(--js-padding) * 4);
  padding-bottom: calc(var(--js-padding) * 4);
}

.tb > .js-section.tb-products {
  padding-top: calc(var(--js-padding) * 2);
}

.tb-hero__block {
  gap: calc(var(--js-padding) * 1.5);
  text-align: center;
}

.tb-hero__brand {
  height: 50px;
  width: auto;
}

.tb-hero__title {
  max-width: 820px;
  text-wrap: balance;
}

.tb-hero__text {
  max-width: 640px;
}

.tb-hero__checks {
  justify-content: center;
  margin-top: 0;
}

/* Merchant count under the checks (.js-proof in base.css) */
.tb-hero__proof {
  justify-content: center;
  margin-top: calc(var(--js-padding) * 1);
}

/* Webpay product cards: white cards on the bright section */
.tb-product {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--js-padding);
  padding: calc(var(--js-padding) * 1.75);
  background: var(--js-color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--js-radius-xl);
  transition: var(--js-transition);
}

.tb-product:is(:hover, :focus-within) {
  border-color: var(--color-main-op3);
}

/* Webpay PST is the option the page recommends: accent border, plus the
   "Recomendado" tag */
.tb-product--featured,
.tb-product--featured:is(:hover, :focus-within) {
  border-color: var(--color-accent);
}

/* The three Webpay SVGs share a 400x200 canvas but draw the wordmark at
   different sizes and offsets (the PLUS and .CL suffixes shrink it). Each
   modifier scales its file so the artwork is the same 66px tall and pulls
   the empty canvas out of the box (values measured with magick -trim) */
.tb-product__brand {
  height: 66px;
  overflow: hidden;
}

.tb-product__logo {
  display: block;
  width: auto;
  max-width: none;
  height: var(--tb-logo-h);
  margin: var(--tb-logo-top) 0 0 var(--tb-logo-left);
}

.tb-product__brand--pst { --tb-logo-h: 119px; --tb-logo-top: -27px; --tb-logo-left: -19px; }
.tb-product__brand--plus { --tb-logo-h: 145px; --tb-logo-top: -40px; --tb-logo-left: -10px; }
.tb-product__brand--cl { --tb-logo-h: 136px; --tb-logo-top: -35px; --tb-logo-left: -7px; }

.tb-product__tags {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--js-padding) * 0.5);
}

.tb-product__text {
  flex: 1;
  margin: 0;
}

/* A quiet text link, so the three cards don't compete with the hero form */
.tb-product__link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--js-padding) * 0.5);
  min-height: 44px;
  font-weight: 500;
  color: var(--color-main);
  text-decoration: none;
}

.tb-product__link span {
  text-decoration: underline;
  text-decoration-color: var(--color-main-op3);
  text-underline-offset: 4px;
  transition: text-decoration-color .2s ease;
}

.tb-product__link:hover span {
  text-decoration-color: currentColor;
}

.tb-product__link i {
  transition: transform .2s cubic-bezier(.2, .7, .3, 1);
}

.tb-product__link:hover i {
  transform: translateX(3px);
}

.tb-product__link:focus-visible {
  outline: 2px solid var(--color-main);
  outline-offset: 4px;
  border-radius: var(--js-radius-sm);
}

/* Advantages, on an onyx section with the glows of the vs/shopify-v3 hero
   (.vs3-hero::before): the title and subtext centred across the full row,
   then the three outlined items on the left and the checkout as the
   shopper sees it on the right (stacked at 991px and below) */
.tb-why {
  --tb-glow-emerald: color-mix(in srgb, var(--color-accent) 22%, var(--js-color-teal-light));
  --tb-glow-dim: color-mix(in srgb, var(--color-accent) 30%, var(--js-color-teal-light));
  --tb-glow-blue: var(--js-color-blue-light);
  position: relative;
  overflow: hidden;
}

/* Same three radial glows as .vs3-hero: a dim green behind the items, an
   emerald and a blue behind the checkout. Plain gradients, no blur */
.tb-why::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 55% at 14% 62%, color-mix(in srgb, var(--tb-glow-dim) 32%, transparent), transparent),
    radial-gradient(30% 48% at 76% 52%, color-mix(in srgb, var(--tb-glow-emerald) 95%, transparent), transparent),
    radial-gradient(34% 50% at 88% 86%, color-mix(in srgb, var(--tb-glow-blue) 90%, transparent), transparent);
}

/* Fade the glows out before the section below (as .vs3-hero::after) */
.tb-why::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 180px;
  background: linear-gradient(to bottom, transparent, var(--color-background));
  pointer-events: none;
}

.tb-why > .js-container__content {
  position: relative;
  z-index: 1;
}

.tb-why__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: calc(var(--js-padding) * 4);
}

.tb-why__head {
  margin: 0 auto calc(var(--js-padding) * 3);
}

.tb-why__title {
  text-wrap: balance;
}

.tb-why__text {
  max-width: 600px;
  margin-inline: auto;
}

.tb-why__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--js-padding);
}

.tb-why__item {
  display: flex;
  gap: calc(var(--js-padding) * 1.25);
  padding: calc(var(--js-padding) * 1.5);
  border: 1px solid var(--color-border);
  border-radius: var(--js-radius-xl);
}

.tb-why__item h3 {
  margin-bottom: calc(var(--js-padding) * 0.5);
}

.tb-why__item p {
  margin: 0;
}

.tb-why__icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(var(--js-color-green-rgb), 0.5);
  color: var(--color-accent);
  font-size: calc(var(--font-base-size) * 1.375);
}

/* Checkout mockup: the Webpay Plus payment step of a Jumpseller store,
   drawn in HTML. The card and the seal are white (light theme) on the
   onyx section; the seal sits under the card, overlapping its bottom
   padding, inset from the right edge, so it never covers the button */
.tb-checkout {
  --tb-pay: var(--js-color-indigo);
  margin: 0;
  width: 100%;
  max-width: 460px;
  justify-self: end;
  display: flex;
  flex-direction: column;
}

.tb-checkout__card {
  display: flex;
  flex-direction: column;
  gap: calc(var(--js-padding) * 1.25);
  padding: calc(var(--js-padding) * 1.5) calc(var(--js-padding) * 1.5) calc(var(--js-padding) * 2.5);
  background: var(--color-background);
  color: var(--color-main);
  border-radius: var(--js-radius-xl);
  box-shadow: 0 24px 48px -24px rgba(var(--js-color-black-rgb), 0.6);
}

.tb-checkout__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--js-padding);
}

.tb-checkout__title {
  font-size: calc(var(--font-base-size) * 1.5);
  font-weight: 700;
  line-height: 1;
}

.tb-checkout__secure {
  gap: 6px;
}

.tb-checkout__method {
  border: 1px solid var(--color-main-op2);
  border-radius: var(--js-radius-md);
  overflow: hidden;
}

.tb-checkout__option {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--js-padding) * 0.75);
  padding: var(--js-padding);
}

.tb-checkout__radio {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 5px solid var(--tb-pay);
}

/* webpay_plus.svg draws the wordmark in the middle of a 400x200 canvas
   (373x91 at 14,55, magick -trim): crop it to the wordmark */
.tb-checkout__webpay {
  flex: none;
  width: 98px;
  height: 24px;
  overflow: hidden;
}

.tb-checkout__webpay img {
  display: block;
  width: auto;
  max-width: none;
  height: 53px;
  margin: -14px 0 0 -4px;
}

.tb-checkout__cards {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.tb-checkout__cards img {
  width: 40px;
  height: 26px;
  padding: 4px;
  object-fit: contain;
  background: var(--color-background);
  border: 1px solid var(--color-main-op1);
  border-radius: var(--js-radius-sm);
}

/* mastercard.svg is already a bordered card on a square canvas */
.tb-checkout__cards img[src*="mastercard"] {
  padding: 0;
  border: 0;
  object-fit: cover;
}

.tb-checkout__note {
  margin: 0;
  padding: calc(var(--js-padding) * 0.75) var(--js-padding);
  border-top: 1px solid var(--color-main-op1);
  background: var(--color-main-op05);
  font-size: calc(var(--font-base-size) * 0.8125);
  text-align: center;
  color: var(--color-main-op7);
}

.tb-checkout__pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--js-padding) * 0.5);
  min-height: 52px;
  padding: 0 var(--js-padding);
  border-radius: var(--js-radius-md);
  background: var(--tb-pay);
  color: var(--js-color-white);
  font-weight: 500;
}

.tb-checkout__seal {
  align-self: flex-end;
  width: min(340px, 85%);
  margin: calc(var(--js-padding) * -1.25) calc(var(--js-padding) * 4) 0 0;
  display: flex;
  align-items: flex-start;
  gap: calc(var(--js-padding) * 0.75);
  padding: var(--js-padding);
  background: var(--color-background);
  color: var(--color-main);
  border-radius: var(--js-radius-lg);
  box-shadow: 0 16px 40px -12px rgba(var(--js-color-black-rgb), 0.8);
}

.tb-checkout__seal-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--js-radius-md);
  background: var(--color-accent);
  color: var(--color-accent-contrast);
  font-size: calc(var(--font-base-size) * 1.375);
}

.tb-checkout__seal strong {
  display: block;
  margin-bottom: 2px;
  font-size: calc(var(--font-base-size) * 0.9375);
  font-weight: 600;
}

.tb-checkout__seal span:not(.tb-checkout__seal-icon) {
  display: block;
  font-size: calc(var(--font-base-size) * 0.8125);
  line-height: 1.35;
  color: var(--color-main-op7);
}

/* Final create-store section */
.tb-final .js-section__head {
  margin-bottom: calc(var(--js-padding) * 2);
}

/* Media queries */
@media (max-width: 991px) {
  .tb-why__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: calc(var(--js-padding) * 3);
  }

  .tb-why__list {
    max-width: 640px;
    margin-inline: auto;
  }

  .tb-checkout {
    justify-self: center;
  }

  /* stacked: the glows follow the checkout, now under the items */
  .tb-why::before {
    background:
      radial-gradient(70% 24% at 18% 30%, color-mix(in srgb, var(--tb-glow-dim) 32%, transparent), transparent),
      radial-gradient(60% 22% at 70% 76%, color-mix(in srgb, var(--tb-glow-emerald) 95%, transparent), transparent),
      radial-gradient(60% 20% at 92% 94%, color-mix(in srgb, var(--tb-glow-blue) 90%, transparent), transparent);
  }

  .tb-checkout__seal {
    margin-right: calc(var(--js-padding) * -1);
  }
}

@media (max-width: 767px) {
  .tb-hero .js-hero__row {
    padding-top: calc(var(--header-height-mobile) + var(--js-padding) * 3);
    padding-bottom: var(--js-padding);
  }

  .tb > .js-section.tb-products {
    padding-top: calc(var(--js-padding) * 2);
  }

  /* The icon shares the first row with the title and the text runs the
     full width of the card below (it was squeezed into a 226px column at
     375px). display: contents lifts the title and text into the grid */
  .tb-why__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: var(--js-padding);
    row-gap: calc(var(--js-padding) * 0.75);
    padding: calc(var(--js-padding) * 1.25);
  }

  .tb-why__item > div {
    display: contents;
  }

  .tb-why__item h3 {
    margin: 0;
    font-size: calc(var(--font-base-size) * 1.375);
  }

  .tb-why__item p {
    grid-column: 1 / -1;
  }

  .tb-why__icon {
    width: 40px;
    height: 40px;
    font-size: calc(var(--font-base-size) * 1.125);
  }
}

@media (max-width: 575px) {
  .tb-checkout__card {
    padding: calc(var(--js-padding) * 1.25);
  }

  .tb-checkout__cards {
    margin-left: 0;
  }

  /* The seal spans the card, inset on both sides */
  .tb-checkout__seal {
    align-self: stretch;
    width: auto;
    margin: calc(var(--js-padding) * -0.25) calc(var(--js-padding) * 0.75) 0;
  }

  .tb-hero__brand {
    height: 40px;
  }
}
