/* Extracted from ui/templates/components/cta_banner/cta_banner.html. Linked via sekizai so a page loads it once,
   however many instances it renders. */

.cta-btn {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 280px;
    height: 58px;
    padding: 0 28px;
    font-family: "NYU Perstare", sans-serif;
    font-size: 18px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: -0.04em;
    text-transform: none;
    border: 2px solid #F2F2F2;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    color: #F2F2F2;
    background: transparent;
    transition:
        color 220ms ease,
        background-color 220ms ease,
        border-color 220ms ease;
}

.cta-btn span {
    position: relative;
    z-index: 1;
}

.cta-btn:hover,
.cta-btn:focus-visible {
    color: #57068C;
    background: #F2F2F2;
    border-color: #F2F2F2;
    outline: none;
}

.cta-btn-ghost,
.cta-btn-solid {
    color: #F2F2F2;
    background: transparent;
    border-color: #F2F2F2;
}

.cta-btn-ghost:hover,
.cta-btn-ghost:focus-visible,
.cta-btn-solid:hover,
.cta-btn-solid:focus-visible {
    color: #57068C;
    background: #F2F2F2;
    border-color: #F2F2F2;
}

.courant-cta {
    --cta-overlay: rgba(64, 0, 101, 0.68);
    position: relative;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: #d9d9d9;
    font-family: "NYU Perstare", sans-serif;
}

.courant-cta__bg,
.courant-cta__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.courant-cta__bg {
    z-index: -2;
    object-fit: cover;
    object-position: center center;
}

.courant-cta__shade {
    z-index: -1;
    background: var(--cta-overlay);
}

.courant-cta__inner {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1728px;
    margin: 0 auto;
}

.courant-cta__heading,
.courant-cta__subheading {
    margin: 0;
    color: #fff;
    font-family: "NYU Perstare", sans-serif;
    font-style: normal;
}

.courant-cta__heading {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.courant-cta__subheading {
    font-weight: 400;
}

.courant-cta__actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.courant-cta__copy,
.courant-cta__actions {
    z-index: 1;
}

.courant-cta__corner {
    position: absolute;
    width: 75px;
    height: 72px;
    color: rgba(255, 255, 255, 0.60);
    pointer-events: none;
}

.courant-cta__corner svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* =========================
   TALL CTA — 1728 × 653
   ========================= */

.courant-cta--tall .courant-cta__row {
    display: contents;
}

.courant-cta--tall {
    height: 653px;
    max-height: 653px;
}

.courant-cta--tall .courant-cta__bg {
    object-position: center 40%;
}

.courant-cta--tall .courant-cta__copy {
    position: absolute;
    top: 244px;
    left: 50%;
    width: min(980px, calc(100% - 48px));
    transform: translateX(-50%);
    text-align: center;
}

.courant-cta--tall .courant-cta__heading {
    font-size: 60px;
    line-height: 77px;
    text-align: center;
    white-space: nowrap;
}

.courant-cta--tall .courant-cta__subheading {
    margin-top: -3px;
    font-size: 30px;
    line-height: 38px;
    text-align: center;
}

.courant-cta--tall .courant-cta__actions {
    position: absolute;
    top: 423px;
    left: 50%;
    width: 580px;
    justify-content: center;
    transform: translateX(-50%);
}

.courant-cta--tall .courant-cta__corner--tr {
    top: 117px;
    right: clamp(140px, 14vw, 287px);
}

.courant-cta--tall .courant-cta__corner--bl {
    bottom: 87px;
    left: clamp(140px, 14vw, 287px);
}

/* =========================
   SHORT CTA — solid violet band above the footer
   ========================= */

.courant-cta--short {
    /* Height comes from the row's own padding, not a fixed band. */
    height: auto;
    max-height: none;
    /* Solid fill, matched to .site-footer so the two read as one block. */
    background: #57068C;
}

.courant-cta--short .courant-cta__inner {
    display: flex;
    flex-direction: column;
    /* Same horizontal rhythm as .site-header__inner / .site-footer__inner. */
    padding: 0 clamp(32px, 5.8vw, 100px);
}

.courant-cta--short .courant-cta__row {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 3.2vw, 56px);
    min-width: 0;
    /* Space above the row, and above the rule below it. */
    padding: 44px 0 36px;
}

.courant-cta--short .courant-cta__logo {
    display: block;
    flex: 0 0 auto;
    width: clamp(220px, 21.4vw, 340px);
    height: auto;
    /* Logo ships in violet/gray; render it white on the violet band. */
    filter: brightness(0) invert(1);
}

.courant-cta--short .courant-cta__copy {
    min-width: 0;
    text-align: left;
}

.courant-cta--short .courant-cta__heading {
    font-size: 32px;
    line-height: 41px;
    text-align: left;
    white-space: nowrap;
}

.courant-cta--short .courant-cta__subheading {
    margin-top: 6px;
    font-size: 21px;
    line-height: 27px;
    text-align: left;
}

.courant-cta--short .courant-cta__actions {
    flex: 0 0 auto;
    gap: 24px;
    justify-content: flex-end;
}

/* Buttons size to their label here, so the wrapper must not stretch. */
.courant-cta--short .courant-cta__actions .button-component__wrapper {
    flex: 0 0 auto;
    width: auto;
}

/* Divider sits on the content width, not the full bleed. */
.courant-cta--short .courant-cta__rule {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
}

/* Inline layout gets tight before it stacks: pull the type and gaps in. */
@media (max-width: 1500px) {
    .courant-cta--short .courant-cta__row {
        gap: clamp(20px, 2.6vw, 40px);
    }

    .courant-cta--short .courant-cta__heading {
        font-size: 28px;
        line-height: 36px;
        /* Safety net — wrap rather than run into the buttons. */
        white-space: normal;
    }

    .courant-cta--short .courant-cta__subheading {
        font-size: 19px;
        line-height: 25px;
    }
}

@media (max-width: 1400px) {
    .courant-cta--short .courant-cta__inner {
        padding: 0 clamp(24px, 5.8vw, 100px);
    }

    .courant-cta--short .courant-cta__row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        /* Keep the rule off the buttons once things stack. */
        padding: 36px 0 32px;
        text-align: center;
    }

    .courant-cta--short .courant-cta__copy,
    .courant-cta--short .courant-cta__actions {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .courant-cta--short .courant-cta__heading,
    .courant-cta--short .courant-cta__subheading {
        text-align: center;
    }

    .courant-cta--short .courant-cta__heading {
        white-space: normal;
    }
}

@media (max-width: 1280px) {
    .courant-cta--tall .courant-cta__corner--tr {
        right: 8%;
    }

    .courant-cta--tall .courant-cta__corner--bl {
        left: 8%;
    }
}

@media (max-width: 980px) {
    .courant-cta--tall .courant-cta__heading {
        font-size: 48px;
        line-height: 58px;
        white-space: normal;
    }

    .courant-cta--tall .courant-cta__subheading {
        margin-top: 8px;
        font-size: 26px;
        line-height: 34px;
    }
}

@media (max-width: 767px) {
    .courant-cta--tall {
        height: auto;
        max-height: none;
        min-height: 560px;
    }

    .courant-cta--tall .courant-cta__inner {
        display: flex;
        min-height: 560px;
        padding: 72px 24px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 44px;
    }

    .courant-cta--tall .courant-cta__copy,
    .courant-cta--tall .courant-cta__actions {
        position: static;
        width: 100%;
        transform: none;
    }

    .courant-cta--tall .courant-cta__heading {
        font-size: 42px;
        line-height: 1.08;
        white-space: normal;
    }

    .courant-cta--tall .courant-cta__subheading {
        font-size: 23px;
        line-height: 30px;
    }

    .courant-cta__corner {
        display: none;
    }

    .courant-cta__actions {
        flex-direction: column;
        gap: 16px;
        align-items: center;
        justify-content: center;
    }

    .courant-cta__actions .button-component__wrapper {
        width: 100%;
        justify-content: center;
    }

    .courant-cta__actions .button-component {
        width: min(280px, 100%);
    }

    .courant-cta__actions .courant-cta__button--visit {
        --button-bg: transparent !important;
        --button-text: #FFFFFF !important;
        --button-border: #FFFFFF !important;
        --button-hover-bg: #FFFFFF !important;
        --button-hover-text: #57068C !important;
        --button-hover-border: #FFFFFF !important;
    }

    .courant-cta__actions .courant-cta__button--apply {
        --button-bg: #FFFFFF !important;
        --button-text: #57068C !important;
        --button-border: #FFFFFF !important;
        --button-hover-bg: #F2F2F2 !important;
        --button-hover-text: #57068C !important;
        --button-hover-border: #F2F2F2 !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cta-btn {
        transition: none;
    }
}
