/**
 * CTA Banner block (block type `cta_banner`).
 *
 * Full-bleed band: heading + copy on the left, buttons on the right.
 * Background colour is chosen per block; the button colours follow it.
 */

.cta-banner {
    --cta-bg: var(--phi-dark-600);
    --cta-accent: var(--phi-green);

    background: var(--cta-bg);
    color: #fff;
    padding: 3.5rem 0;
}

.cta-banner--green {
    --cta-bg: var(--phi-green);
    /* On a green band the filled button needs to read as a separate surface. */
    --cta-accent: var(--phi-dark-600);
}

.cta-banner--orange {
    --cta-bg: var(--phi-orange);
    --cta-accent: var(--phi-dark-600);
}

/* The dark band with an orange filled button instead of the default green.
   Only the accent changes; the band is the same as .cta-banner--dark, which
   other banners still use with green.

   Rounded, unlike the other variants. This one is placed inside a container so
   it has visible side edges for a radius to read against; the banners on the
   service pages run full bleed, where a radius would only clip the corners of a
   band that has no edges. If a full-width block is ever given this variant the
   radius will not show, which is the right outcome rather than a bug. */
.cta-banner--dark-orange {
    --cta-bg: var(--phi-dark-600);
    --cta-accent: var(--phi-orange);

    border-radius: 1rem;
}

.cta-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

.cta-banner__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.cta-banner__heading {
    margin: 0 0 0.9rem;
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.cta-banner__body,
.cta-banner__body p {
    margin: 0;
    max-width: 46ch;
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}

.cta-banner__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.cta-banner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    /* The theme underlines links inside content regions. */
    border-bottom-style: solid;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* The `a.` qualifier is load-bearing: the theme sets `.region-content a` to
   #333 (0,1,1), which outranks a bare class. */
.cta-banner a.cta-banner__btn--outline {
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: transparent;
}

.cta-banner a.cta-banner__btn--outline:hover,
.cta-banner a.cta-banner__btn--outline:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.cta-banner a.cta-banner__btn--primary {
    border: 1px solid var(--cta-accent);
    background: var(--cta-accent);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* No arrow rule here on purpose. The trailing arrow comes from the shared
   `.rightarrow` class, which the template adds to the primary button — same SVG
   mask as every other button on the site, and it inherits the hover nudge too.
   This file used to draw its own with `content: "\2192"`, the Unicode glyph,
   which rendered in the body font and did not match the others. */

.cta-banner a.cta-banner__btn--primary:hover,
.cta-banner a.cta-banner__btn--primary:focus {
    filter: brightness(1.15);
    color: #fff;
}

/* --- No band: just the button row on the page --------------------------- */

/* The products mockup is the three buttons on the page itself, so this variant
   drops the band entirely: no background, no vertical padding, and the outline
   buttons flip from white-on-dark to dark-on-white. */
.cta-banner--none {
    /* Orange, not the green the coloured bands use: on a white page the site's
       primary accent is orange, and the products mockup shows it that way. */
    --cta-accent: var(--phi-orange);
    background: none;
    padding: 0;
    color: inherit;
}

/* Left-aligned, and flush with the column rather than indented: this variant
   sits inside a Layout Builder column that already has its own gutter, so the
   block's inner .container would add a second one and push the row 24px off
   the text above it. */
.cta-banner--none > .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

.cta-banner--none .cta-banner__inner {
    justify-content: flex-start;
}

.cta-banner--none .cta-banner__actions {
    flex: 0 1 auto;
    justify-content: flex-start;
}

.cta-banner--none a.cta-banner__btn--outline {
    border-color: var(--phi-gray-200);
    color: var(--phi-dark);
    background: #fff;
}

.cta-banner--none a.cta-banner__btn--outline:hover,
.cta-banner--none a.cta-banner__btn--outline:focus {
    border-color: var(--phi-orange);
    background: #fff;
    color: var(--phi-orange);
}

/* Outline buttons here are sentence case, matching the mockup; only the
   primary stays uppercase. */
.cta-banner--none .cta-banner__btn--outline {
    text-transform: none;
    font-size: 0.95rem;
}

/* --- Button icon -------------------------------------------------------- */

.cta-banner__icon {
    width: 1.05em;
    height: 1.05em;
    flex-shrink: 0;
    display: block;
}

/* --- Tablet: buttons drop under the copy -------------------------------- */

@media (max-width: 992px) {
    .cta-banner { padding: 3rem 0; }
    .cta-banner__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.75rem;
    }
    .cta-banner__heading { font-size: 1.85rem; }
    .cta-banner__body,
    .cta-banner__body p { max-width: none; }
}

/* --- Phone: full-width stacked buttons ---------------------------------- */

@media (max-width: 650px) {
    .cta-banner { padding: 2.5rem 0; }
    .cta-banner__heading { font-size: 1.5rem; }

    .cta-banner__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .cta-banner__btn { width: 100%; }
}
