/* itbuilder/cta-closer */

{#
  module.css only supports a very limited subset of HubL (module_asset_url()
  only — no theme.* access), so the {% set %} calls this file used to have
  here never actually resolved. Fixed colours now come from the
  --theme-*-color custom properties published in theme-overrides.css's :root
  (which does have full theme.* access) instead of interpolating theme
  values directly in this file. Per-instance accent colours still come
  through --cta-accent, set inline in module.html.
#}

.cta-closer {
  color: #fff;
}

/* Centered layout (fallback mode — full-width background, no photo split) */

.cta-closer--centered {
  background-color: var(--theme-primary-color);
  padding: var(--space-8, 80px) 0;
  text-align: center;
}

.cta-closer--centered.cta-closer--gradient {
  background-image: linear-gradient(135deg, var(--theme-primary-color) 0%, var(--theme-accent-color) 100%);
}

.cta-closer--centered.cta-closer--photographic {
  background-position: center;
  background-size: cover;
  position: relative;
}

.cta-closer--centered.cta-closer--photographic::before {
  background: linear-gradient(180deg, rgba(25, 39, 50, 0.55) 0%, rgba(25, 39, 50, 0.85) 100%);
  content: "";
  inset: 0;
  position: absolute;
}

.cta-closer--centered.cta-closer--photographic .cta-closer__inner {
  position: relative;
}

.cta-closer--centered .cta-closer__inner {
  margin: 0 auto;
  max-width: 720px;
}

/* Split layout — Aug 2026 Figma mockups: photo fills one half, a solid dark
   panel with the heading/copy/buttons fills the other half (same pattern as
   hero-photographic.module's split layout).

   Aug 2026 client feedback ("A senior conversation..." — Section I on the
   Homepage): the mockup shows this full-bleed pane sitting between two
   bands of the site's light header-bar colour, top and bottom, rather than
   butting straight up against the sections above/below it. The custom
   property used below (see theme-overrides.css :root) supplies that
   colour; the padding on the section itself (not the grid) is what creates
   the visible band, while the grid/panel/photo stay full width inside it. */

.cta-closer--split {
  background-color: var(--theme-header-bg-color, #dce4ea);
  padding: var(--space-6, 48px) 0;
}

/* Sept 2026 client feedback (Pillar template): off-white band + a touch
   more breathing room above/below the photo+panel, opted in per instance
   via split_band_color (see fields.json help_text) rather than changed on
   the rule above, which every other template's closing CTA still relies
   on. Reuses the same --theme-secondary-color off-white token as
   .pillar-section--off-white in theme-overrides.css. */

.cta-closer--split.cta-closer--band-off-white {
  background-color: var(--theme-secondary-color, #f8fafc);
  padding: var(--space-7, 64px) 0;
}

.cta-closer--split .cta-closer__grid {
  display: grid;
  grid-template-columns: 1fr;
}

.cta-closer--split .cta-closer__media {
  min-height: 240px;
  overflow: hidden;
  position: relative;
}

.cta-closer--split .cta-closer__image {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  width: 100%;
}

.cta-closer--split .cta-closer__panel {
  align-items: center;
  background-color: var(--theme-primary-color);
  display: flex;
}

.cta-closer--split .cta-closer__inner {
  padding: var(--space-7, 64px) var(--grid-gutter, 24px);
  text-align: left;
  width: 100%;
}

@media (min-width: 1024px) {
  .cta-closer--split .cta-closer__grid {
    grid-template-columns: 1fr 1fr;
    min-height: 480px;
  }

  .cta-closer--split .cta-closer__media {
    min-height: 0;
  }

  .cta-closer--split.cta-closer--image-right .cta-closer__media {
    order: 2;
  }

  .cta-closer--split.cta-closer--image-right .cta-closer__panel {
    order: 1;
  }

  .cta-closer--split .cta-closer__inner {
    padding: var(--space-8, 80px) var(--space-7, 64px);
  }

  .cta-closer--split .cta-closer__actions {
    justify-content: flex-start;
  }
}

.cta-closer__heading {
  color: #fff;
}

.cta-closer__body {
  opacity: 0.9;
}

/* Accent colour — split layout tints the heading + primary button per
   instance (same mechanism/rationale as hero-photographic.module). */

.cta-closer--split .cta-closer__heading {
  color: var(--cta-accent, var(--color-pillar-current, var(--theme-accent-color)));
}

.cta-closer--split .cta-closer__primary,
.cta-closer--centered .cta-closer__primary {
  background-color: var(--cta-accent, var(--color-pillar-current, var(--theme-accent-color)));
  border-color: transparent;
  color: #fff;
}

.cta-closer--split .cta-closer__primary:hover,
.cta-closer--split .cta-closer__primary:focus-visible,
.cta-closer--centered .cta-closer__primary:hover,
.cta-closer--centered .cta-closer__primary:focus-visible {
  background-color: var(--cta-accent, var(--color-pillar-current, var(--theme-accent-color)));
  filter: brightness(0.85);
}

/* Inset-card layout — Homepage "Our engagement promise" mockup: a photo
   banner with a white card floating on top, centred text, accent heading +
   accent button, navy body copy instead of the dark-panel white copy. */

.cta-closer--inset-card {
  overflow: hidden;
  padding: var(--space-8, 80px) 0;
  position: relative;
}

.cta-closer__inset-bg {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.cta-closer__inset-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* Sept 2026 fix: squared the corners off (was var(--radius-md, 8px)) to
   match the sitewide no-radius convention — same fix as the secondary/
   tertiary CTA buttons above. */

.cta-closer__inner--card {
  background: #fff;
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  color: var(--theme-primary-color);
  max-width: 800px;
  padding: var(--space-6, 48px) var(--space-7, 64px);
  text-align: center;
}

.cta-closer--inset-card .cta-closer__heading {
  color: var(--cta-accent, var(--color-pillar-current, var(--theme-accent-color)));
}

.cta-closer--inset-card .cta-closer__body {
  color: var(--theme-primary-color);
  opacity: 0.85;
}

.cta-closer--inset-card .cta-closer__primary {
  background-color: var(--cta-accent, var(--color-pillar-current, var(--theme-accent-color)));
  border-color: transparent;
  color: #fff;
}

.cta-closer--inset-card .cta-closer__primary:hover,
.cta-closer--inset-card .cta-closer__primary:focus-visible {
  filter: brightness(0.85);
}

.cta-closer--inset-card .cta-closer__actions {
  justify-content: center;
}

.cta-closer--inset-card .cta-closer__secondary {
  border-color: rgba(25, 39, 50, 0.3);
  color: var(--theme-primary-color);
}

.cta-closer--inset-card .cta-closer__secondary:hover,
.cta-closer--inset-card .cta-closer__secondary:focus-visible {
  background-color: rgba(25, 39, 50, 0.05);
  border-color: var(--theme-primary-color);
}

.cta-closer__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4, 24px);
  justify-content: center;
  margin-top: var(--space-5, 32px);
}

.cta-closer--split .cta-closer__actions {
  justify-content: flex-start;
}

/* Mockups show secondary/tertiary CTAs as outlined box buttons, not
   underlined text links (same treatment as hero-photographic__secondary).
   Both the secondary_cta and tertiary_cta fields render with this same
   class (see cta_content() in module.html), so this one rule covers both.

   Sept 2026 fix: squared the corners off (border-radius: 0) to match the
   sitewide no-radius button convention — same fix and same reasoning as
   hero-photographic__secondary. */

.cta-closer__secondary {
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 0;
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  text-decoration: none;
  transition: border-color var(--duration-fast, 150ms) var(--ease-standard, ease),
    background-color var(--duration-fast, 150ms) var(--ease-standard, ease);
}

.cta-closer__secondary:hover,
.cta-closer__secondary:focus-visible {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}
