/* The site's page layout (it-340): the container, sections, section heads and the flexible rows every section is laid
 * out with. Rows wrap by flex-basis rather than breakpoints, so each block stacks when it no longer fits — at phone
 * width everything is one column and nothing scrolls sideways.
 */

.mkt-container {
  max-width: var(--mkt-container);
  margin: 0 auto;
  padding-inline: var(--mkt-gutter);
}

.mkt-section {
  padding-block: var(--mkt-section-y);
  background: var(--mkt-surface);
}

.mkt-section--tint {
  background: var(--mkt-tint);
}

.mkt-section--dark {
  background: var(--mkt-dark);
  color: var(--mkt-on-dark);
}

.mkt-section--flush {
  padding-top: 0;
}

/* A thin band under the hero (the industries strip). */
.mkt-section--strip {
  padding-top: 0;
  padding-bottom: var(--mkt-strip-y);
}

.mkt-section--dark .mkt-eyebrow {
  color: var(--mkt-lilac-on-dark);
}

.mkt-section--dark .mkt-eyebrow::before {
  background: var(--mkt-orchid);
}

.mkt-section--dark .mkt-body,
.mkt-section--dark .mkt-body-lg {
  color: var(--mkt-on-dark-muted);
}

/* A section's head: the title on the left, a paragraph on the right, bottoms aligned; stacks when narrow. */
.mkt-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mkt-space-6) var(--mkt-space-16);
  align-items: flex-end;
  justify-content: space-between;
}

.mkt-head__title {
  flex: 1 1 var(--mkt-basis-4xl);
  min-width: 0;
}

.mkt-head__aside {
  flex: 1 1 var(--mkt-basis-lg);
  min-width: 0;
}

/* A head that is one column: eyebrow, title, paragraph. */
.mkt-head--stack {
  display: block;
  max-width: var(--mkt-measure-xl);
}

.mkt-head--stack .mkt-body-lg {
  margin-top: var(--mkt-space-5-5);
}

/* What follows a head. */
.mkt-after-head {
  margin-top: var(--mkt-after-head);
}

/* Two columns that stack: copy and a picture. */
.mkt-split {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mkt-space-12) var(--mkt-space-18);
  align-items: center;
}

.mkt-split--top {
  align-items: flex-start;
}

.mkt-split__copy {
  flex: 1 1 var(--mkt-basis-xl);
  min-width: 0;
}

.mkt-split__picture {
  flex: 1 1 var(--mkt-basis-2xl);
  min-width: 0;
}

/* A section picture: a PNG of a drawing in the styleguide's sources (bin/site-shots), never wider than it was drawn. A
 * card keeps the card's corners and lift (the PNG has none: its corners are see-through). */
.mkt-picture {
  display: block;
  width: 100%;
  max-width: var(--mkt-picture-width);
  height: auto;
  margin-inline: auto;
}

.mkt-picture--card {
  border-radius: var(--mkt-radius-2xl);
  box-shadow: var(--mkt-shadow-xl);
}

.mkt-split__copy .mkt-body-lg {
  margin-top: var(--mkt-space-5-5);
}

/* A wrapping row of blocks. Each block grows from its basis; the basis is the block's narrowest comfortable width. */
.mkt-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mkt-space-5);
}

.mkt-row > * {
  flex: 1 1 var(--mkt-basis-md);
  min-width: 0;
}

.mkt-row > .mkt-row__wide {
  flex-basis: var(--mkt-basis-4xl);
}

.mkt-row > .mkt-row__md {
  flex-basis: var(--mkt-basis-xl);
}

.mkt-row > .mkt-row__sm {
  flex-basis: var(--mkt-basis-sm);
}

.mkt-row > .mkt-row__xs {
  flex-basis: var(--mkt-basis-xs);
}

.mkt-row > .mkt-row__full {
  flex-basis: 100%;
}

.mkt-row--loose {
  gap: var(--mkt-space-8) var(--mkt-space-12);
}

.mkt-row--tight {
  gap: var(--mkt-space-3-5);
}


/* A grid of features that is two columns until it can't be. */
.mkt-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--mkt-basis-xs)), 1fr));
  gap: var(--mkt-space-8) var(--mkt-space-7);
}

/* ── The hero ────────────────────────────────────────────────────────────────────────────────────────────────── */

.mkt-hero {
  position: relative;
  overflow: hidden;
  padding: var(--mkt-hero-top) 0 var(--mkt-hero-bottom);
  background: var(--mkt-surface);
}

.mkt-hero__copy {
  position: relative;
  z-index: var(--mkt-layer-copy);
  max-width: var(--mkt-measure-2xl);
}

.mkt-hero__copy .mkt-lead {
  margin-top: var(--mkt-space-7);
}

/* The hero's screens run the page's full width (the carousel's neighbors show past the column); the big purple dot sits
 * on a backdrop that is the page's column, behind them. */
.mkt-hero__stage {
  position: relative;
  margin-top: var(--mkt-after-head);
}

.mkt-hero__backdrop {
  position: absolute;
  inset-block: 0;
  inset-inline: max(var(--mkt-gutter), calc((100% - var(--mkt-container)) / 2 + var(--mkt-gutter)));
  z-index: var(--mkt-layer-base);
  pointer-events: none;
}

/* The big purple dot the product sits in front of. */
.mkt-hero__dot {
  position: absolute;
  z-index: var(--mkt-layer-base);
  width: var(--mkt-hero-dot);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--mkt-purple);
  right: var(--mkt-hero-dot-right);
  top: var(--mkt-hero-dot-top);
}

.mkt-hero__stage > :not(.mkt-hero__backdrop) {
  position: relative;
  z-index: var(--mkt-layer-raised);
}

/* The hero's pill: a dot and a line. */
.mkt-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--mkt-space-2-5);
  margin-bottom: var(--mkt-space-6);
  padding: var(--mkt-space-2) var(--mkt-space-3-5) var(--mkt-space-2) var(--mkt-space-2-5);
  border-radius: var(--mkt-radius-pill);
  background: var(--mkt-tint);
  font-size: var(--mkt-size-sm);
  font-weight: var(--mkt-weight-semibold);
  color: var(--mkt-purple-ink);
}

.mkt-badge::before {
  content: '';
  width: var(--mkt-dot);
  height: var(--mkt-dot);
  border-radius: 50%;
  background: var(--mkt-purple);
  flex: none;
}

/* The mortgage hero's calls to action with the partner line centered under them: as wide as the buttons (or the window,
 * when they wrap), each centered in it. */
.mkt-hero__cta {
  display: grid;
  justify-items: center;
  width: fit-content;
  max-width: 100%;
}

/* Where the two buttons no longer fit side by side, they stack at one width — the partner line centered under them. */
@media (max-width: 559px) {
  .mkt-hero__cta .mkt-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* The mortgage hero's partner line, under its calls to action: ICE's mark, a hairline, then the partnership in the
 * brand's ink with ICE's name under it — a name visitors know, above the fold. Plain, not a chip: under the buttons a
 * chip would read as a third one. */
.mkt-partner {
  display: inline-flex;
  align-items: center;
  gap: var(--mkt-space-3);
  margin-top: var(--mkt-space-8);
}

.mkt-partner__logo {
  flex: none;
  width: var(--mkt-icon-box);
  height: var(--mkt-icon-box);
}

.mkt-partner__words {
  display: flex;
  flex-direction: column;
  gap: var(--mkt-space-0-5);
  padding-left: var(--mkt-space-3);
  box-shadow: inset var(--mkt-line) 0 0 var(--mkt-hairline);
}

.mkt-partner__name {
  font-size: var(--mkt-size-md);
  font-weight: var(--mkt-weight-semibold);
  line-height: var(--mkt-leading-compact);
  color: var(--mkt-ink);
}

.mkt-partner__by {
  font-size: var(--mkt-size-xs);
  line-height: var(--mkt-leading-compact);
  color: var(--mkt-muted);
}

/* A row of calls to action. */
.mkt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mkt-space-3);
  margin-top: var(--mkt-space-9);
}

.mkt-actions__note {
  padding-left: var(--mkt-space-1-5);
  font-size: var(--mkt-size-sm);
  color: var(--mkt-muted);
}

/* Short of a wide window (the menu folds and the carousel's caption drops under its screen at the same width), a
 * hero's calls to action center in the window: the homepage's buttons with their note on its own line under them, the
 * mortgage page's buttons with the partner line. The headline and lead stay left. */
@media (max-width: 959px) {
  .mkt-hero .mkt-actions {
    justify-content: center;
  }

  .mkt-hero .mkt-actions__note {
    flex-basis: 100%;
    padding-left: 0;
    text-align: center;
  }

  .mkt-hero__cta {
    margin-inline: auto;
  }
}

/* ── The closing call to action ──────────────────────────────────────────────────────────────────────────────── */

.mkt-cta {
  position: relative;
  overflow: hidden;
  padding: var(--mkt-cta-y) 0;
  background: var(--mkt-dark);
  color: var(--mkt-surface);
}

.mkt-cta__dot {
  position: absolute;
  width: var(--mkt-cta-dot);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--mkt-purple);
  right: var(--mkt-cta-dot-right);
  top: 50%;
  transform: translateY(-50%);
}

.mkt-cta__copy {
  position: relative;
  max-width: var(--mkt-measure-lg);
}

.mkt-cta__copy .mkt-body-lg {
  margin-top: var(--mkt-space-5-5);
  font-size: var(--mkt-size-body-xl);
  color: var(--mkt-on-dark-lead);
}
