/* =============================================================================
   TRUST: ROI BANNER — gradient CTA for the ROI calculator
   Block: acf/trust-roi (template-parts/blocks/trust_roi)

   Self-contained. Tokens live on .tr-roi, not :root, and every class is prefixed
   `tr-roi__`, so the block cannot leak into the rest of the theme.
   ============================================================================= */

.tr-roi {
  --tr-brand: #f15f62;
  --tr-primary: #fda26b;
  --tr-white: #ffffff;
  --tr-section-bg: #ffffff;

  --tr-font-titles: "Unbounded", -apple-system, BlinkMacSystemFont, sans-serif;
  --tr-font-text: "SF Pro Display", "SF Pro", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --tr-gradient: linear-gradient(90deg, var(--tr-brand) 0%, var(--tr-primary) 100%);
  --tr-calc: 320px;

  position: relative;
  width: 100%;
  margin: 0;
  padding: 128px 64px;
  background: var(--tr-section-bg);
  font-family: var(--tr-font-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* The root is in the reset too: it carries the section padding, and without
   border-box a 100%-wide section overflows the viewport by that padding. */
.tr-roi,
.tr-roi *,
.tr-roi *::before,
.tr-roi *::after {
  box-sizing: border-box;
}

.tr-roi__inner {
  max-width: 1408px;
  margin-inline: auto;
}

.tr-roi__banner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  background-image: var(--tr-gradient);
}

/* -----------------------------------------------------------------------------
   Copy and button
   -------------------------------------------------------------------------- */
.tr-roi__content {
  display: flex;
  grid-column: span 2;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
  padding: 48px;
}

.tr-roi__txts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  color: var(--tr-white);
}

.tr-roi__title {
  margin: 0;
  font-family: var(--tr-font-titles);
  font-size: 32px;
  font-weight: 500;
  line-height: 1.25;
  color: inherit;
}

.tr-roi__highlight {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.tr-roi__text {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.375;
}

.tr-roi__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 10px rather than the design's 12px: the design's label has no leading, a
     rendered one does, and the button is meant to come out 53px tall. */
  padding: 10px 40px;
  border: 3px solid var(--tr-white);
  background: var(--tr-white);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--tr-brand);
  transition: opacity 0.2s ease;
}

/* The gradient lives on the label, not the button: clipping a background to the
   glyphs would otherwise take the button's own white fill with it. Browsers
   without background-clip keep the solid --tr-brand inherited from .tr-roi__btn. */
.tr-roi__btn-label {
  background-image: var(--tr-gradient);
  -webkit-background-clip: text;
  background-clip: text;
}

@supports (-webkit-background-clip: text) or (background-clip: text) {
  .tr-roi__btn-label {
    color: transparent;
  }
}

.tr-roi__btn:hover,
.tr-roi__btn:focus-visible {
  opacity: 0.85;
}

/* -----------------------------------------------------------------------------
   Calculator artwork — overhangs the band on purpose
   -------------------------------------------------------------------------- */
.tr-roi__art {
  position: relative;
  align-self: stretch;
  padding: 48px;
}

/* calculator.svg is 320x404 with its lettering already outlined, so the only
   thing left to CSS is placing it and casting the design's shadow — a filter
   rather than box-shadow, so the shadow follows the artwork, not a box. */
.tr-roi__calc {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: var(--tr-calc);
  height: auto;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.06));
}

/* -----------------------------------------------------------------------------
   Tablet — the calculator stops fitting its third of the band, so it takes a
   column of its own and the copy gives up the 2:1 split.
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .tr-roi {
    padding-inline: 32px;
  }
}

@media (max-width: 1024px) {
  .tr-roi {
    padding-block: 96px;
  }

  .tr-roi__banner {
    grid-template-columns: minmax(0, 1fr) var(--tr-calc);
  }

  .tr-roi__content {
    grid-column: span 1;
    padding: 32px;
  }

  .tr-roi__art {
    padding: 32px 0;
  }

  .tr-roi__title {
    font-size: 24px;
  }

  .tr-roi__btn {
    font-size: 20px;
    padding-inline: 24px;
  }
}

/* -----------------------------------------------------------------------------
   Mobile — Figma 360: everything stacks, the button goes full width and the
   calculator drops out of the bottom of the band.
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .tr-roi {
    /* Room for the part of the calculator that hangs below the band. */
    padding: 64px 16px 200px;
  }

  .tr-roi__banner {
    display: flex;
    flex-direction: column;
    background-image: linear-gradient(149deg, var(--tr-brand) 0%, var(--tr-primary) 100%);
  }

  .tr-roi__content {
    padding: 48px 16px 24px;
  }

  .tr-roi__title {
    font-size: 24px;
    text-transform: uppercase;
  }

  .tr-roi__btn {
    width: 100%;
    padding-inline: 16px;
    font-size: 24px;
    white-space: normal;
  }

  .tr-roi__art {
    height: 320px;
    /* Same 16px inset as .tr-roi__content, so the calculator lines up with the
       button above it. */
    padding: 24px 16px 48px;
  }

  /* Flush with the button: same left and right edges, same width. The artwork is
     one SVG, so matching the width scales the height with it — the card comes
     out 374px rather than the frame's 404px, and the width is what has to match. */
  .tr-roi__calc {
    position: static;
    width: 100%;
    transform: none;
  }
}
