/* Call to action band — reusable. Split (text + image) or overlay (full-bleed image + colour panel).
   Generalised from the former careers_cta. */
.cta-band {
  padding-block: var(--section-y);
  --em-color: var(--color-clay);
  --cta-panel: var(--color-clay);
  position: relative;
  height: 100vh;
  background-color: var(--color-alabaster);
}

/* ---- Split style (default) — text column + image column ---- */
.cta-band__grid {
  align-items: center;
  position: relative;
}
.cta-band__text {
  grid-column: 2 / span 5;
}

.cta-band--discover .cta-band--split .cta-band__heading {
  width: 80%;
}


.cta-band__media {
  grid-column: 7 / span 5;
}
.cta-band__heading {
  margin: 0 0 var(--sp-2xl);
}
.cta-band--split .cta-band__heading {
  margin-bottom: var(--sp-2xl);
}
.cta-band__body {
  font-size: var(--text-body-main);
  font-weight: 400;
}
.cta-band__link {
  margin-top: 1.5rem;
}
.cta-band__img {
  width: 100%;
  height: auto;
  display: block;
}
/* Motif is a wrapper holding 1+ dot-motifs (count via `motif_count`, default 4). The
   base places it bottom-right in steel; the split design below recolours + clusters it. */
.cta-band__motif {
  position: absolute;
  right: 0;
  bottom: -1rem;
  color: var(--color-steel);
  display: flex;
}

/* New-design split arrangement (drives the home + projects "careers" CTAs): heading
   pinned to the top, copy + link centred below it and indented, contained image right,
   white 2×2 dot-motif cluster bottom-right. */
.cta-band--split {
  min-height: 100svh;
  height: auto;
}
.cta-band--split .cta-band__grid {
  align-items: stretch;
}
.cta-band--split .cta-band__text {
  display: flex;
  flex-direction: column;
  /* padding-block: clamp(2rem, 7vh, 5.5rem); */
  --cta-copy-indent: 24%; /* indent of body/link from the heading — tune to taste */
      grid-column: 2 / span 6;
}

.cta-band--split .cta-band__body {
  margin-top: auto;
  margin-inline-start: var(--cta-copy-indent);
  font-size: var(--text-h6);
}
.cta-band--split .cta-band__link {
  margin-bottom: auto;
  margin-inline-start: var(--cta-copy-indent);
}
.cta-band--split .cta-band__media {
  grid-column: 8 / span 4;
  align-self: center;
  aspect-ratio: 1 / 1;
  width: 30rem;
}
.cta-band--discover .cta-band--split .cta-band__media {
  aspect-ratio: 65/46;
  height: auto;
  align-self: end;
}
/* Faint horizontal dot-motif strip on the cream band (mirrors .testimonials__motif). */
.cta-band--split .cta-band__motif {
  right: var(--gutter);
  color: var(--color-white);
  transform: translateY(calc(100% + var(--sp-sm)));
}
/* Size is set on the SVG itself (not the wrapper) so it overrides the .dot-motif base
   of 64px; the shared .dot-motif rule already derives width/height from --motif-size. */
.cta-band--split .cta-band__motif .dot-motif {
  --motif-size: clamp(3.75rem, 3.1432rem + 2.589vw, 6.25rem)
}


/* Vertical alignment (ACF "Motif alignment") — pin the strip to a band edge. */
.cta-band__motif--bottom {
  top: auto;
  bottom: 0;
}
.cta-band__motif--top {
  top: var(--section-y);
  bottom: auto;
}

/* ---- Overlay style — full-bleed image + solid colour panel (left) ---- */
.cta-band--overlay {
  padding-block: 0;
  min-height: clamp(520px, 70vh, 760px);
  display: grid;
  align-content: center;
  overflow: clip;
  isolation: isolate;
}
.cta-band--overlay .cta-band__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.cta-band--overlay .cta-band__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Dark tint over the bg image. */
.cta-band--overlay .cta-band__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}
/* Faint technical grid overlay (TTW motif) — now drawn column-accurate by
   ttw_grid_guides() (.grid-guides in the markup), so its verticals sit on the real
   12-col .container.grid instead of a fixed 80px pitch. Colour + row pitch tuned here. */
.cta-band--overlay .grid-guides {
  z-index: 2;
  --grid-guides-line: rgba(255, 255, 255, 0.12);
}
.cta-band--overlay .cta-band__panel {
  align-self: center;
  background: color-mix(in srgb, var(--cta-panel) 80%, transparent);
  color: var(--c-inverse);
  padding: clamp(2rem, 4vw, 3.5rem);
  z-index: 3;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  grid-column: 1 / 6;
}
.cta-band--overlay .cta-band__heading {
  color: var(--c-inverse);
  margin: 0 0 var(--sp-xl);
}
.cta-band--overlay .cta-band__link {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .cta-band__text,
  .cta-band__media {
    grid-column: 1 / -1;
  }
  .cta-band__motif,
  .cta-band--split .cta-band__motif {
    display: none;
  }
  .cta-band--split .cta-band__body {
    margin-top: 1.5rem;
    margin-inline-start: 0;
  }
  .cta-band--split .cta-band__link {
    margin-bottom: 0;
    margin-inline-start: 0;
  }
  .cta-band--overlay .cta-band__panel {
    grid-column: 1 / -1;
  }
}
