/*
 * FP CTA Section — frontend + editor styles.
 *
 * Replicates the firstpromoter.com "Bottom-CTA" card (.framer-bb87h9):
 *   - 1240px black rounded card (40px radius), 80px/40px padding
 *   - A layered glow background (NOT a single cover image), matching the
 *     Framer original:
 *       · .fpr-cta-section__aurora — the aurora PNG (assets/cta-bg.png) drawn
 *         with mix-blend-mode: screen at ~0.6 opacity so the image's black
 *         areas drop out and only the glow adds onto the black card. It bleeds
 *         past the card edges and sits low/bottom-biased.
 *       · .fpr-cta-section__lights — a rotated cluster of solid-colour circles
 *         with heavy filter: blur(), giving the soft multicolour haze in the
 *         lower-left. No image needed.
 *   - Centered Inter heading (54px/600) + subtitle (24px/400)
 *   - Blue primary button (var(--wp--preset--color--primary)) + outlined secondary + muted note
 *
 * The default aurora url() is relative to this stylesheet, so it resolves in
 * both the front end and the editor without any PHP. A custom uploaded
 * background (backgroundUrl) is applied inline to the aurora layer by
 * render.php/edit.js and overrides the default. Padding is driven by CSS vars.
 *
 * isolation: isolate keeps the screen blend contained to the card's own layers
 * instead of blending against whatever sits behind the card on the page.
 *
 * Mobile-first; scales up at md (≥768px) and lg (≥1024px).
 */

/* ── Card (the block root) ───────────────────────────────────────────────── */
.fpr-cta-section__card {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    max-width: 1240px;
    width: 100%;
    margin-inline: auto;
    padding: var(--fpr-cta-card-mobile, 48px 24px);
    border-radius: 40px;
    overflow: hidden;
    background-color: var(--fpr-cta-card-bg, var(--wp--preset--color--overlay));
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Aurora glow layer (screen-blended image) ────────────────────────────── */
.fpr-cta-section__aurora {
    position: absolute;
    /* Bleed past the card edges, biased toward the bottom, like the original. */
    inset: 0 -32px -45% -32px;
    z-index: 0;
    background-image: url(./assets/cta-bg.png);
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: 0.59;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* ── Blurred multicolour lights ──────────────────────────────────────────── */
.fpr-cta-section__lights {
    position: absolute;
    left: -8%;
    bottom: -48%;
    width: 68%;
    aspect-ratio: 1 / 1;
    z-index: 0;
    transform: rotate(-60deg);
    opacity: 0.3;
    pointer-events: none;
}

.fpr-cta-section__light {
    position: absolute;
    border-radius: 50%;
    /* Blur radii scale a touch with the card so the haze stays soft at any size. */
    --blur: clamp(48px, 7vw, 79px);
    filter: blur(var(--blur));
}

/* Blue — largest, back layer */
.fpr-cta-section__light--blue {
    width: 62%;
    aspect-ratio: 1 / 1;
    left: -6%;
    top: 2%;
    background-color: #2497f3;
    opacity: 0.7;
    filter: blur(clamp(64px, 9vw, 103px));
}

/* Periwinkle */
.fpr-cta-section__light--periwinkle {
    width: 46%;
    aspect-ratio: 1 / 1;
    left: 4%;
    top: 24%;
    background-color: #c4cef7;
    opacity: 1;
}

/* Pale green */
.fpr-cta-section__light--green {
    width: 30%;
    aspect-ratio: 1 / 1;
    left: 10%;
    top: 44%;
    background-color: #ebf5e8;
    opacity: 0.7;
}

/* White highlight */
.fpr-cta-section__light--white {
    width: 40%;
    aspect-ratio: 1 / 1;
    left: 26%;
    top: 30%;
    background-color: #ffffff;
    opacity: 0.5;
}

/* Faint warm orange */
.fpr-cta-section__light--orange {
    width: 40%;
    aspect-ratio: 1 / 1;
    left: 30%;
    top: 12%;
    background-color: #ff9d0a;
    opacity: 0.02;
}

/* ── Inner content column ────────────────────────────────────────────────── */
.fpr-cta-section__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    text-align: center;
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.fpr-cta-section__title {
    margin: 0;
    color: var(--fpr-cta-title, var(--wp--preset--color--background));
    font-size: 2.125rem; /* 34px mobile */
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: normal;
    text-align: center;
}

/* ── Subtitle ────────────────────────────────────────────────────────────── */
.fpr-cta-section__subtitle {
    margin: 0;
    color: var(--fpr-cta-subtitle, var(--wp--preset--color--background));
    font-size: 1.125rem; /* 18px mobile */
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    max-width: 720px;
}

/* ── Button row ──────────────────────────────────────────────────────────── */
.fpr-cta-section__buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.fpr-cta-section__btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 56px;
    padding: 0 48px;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 500;
    font-size: 20px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fpr-cta-section__btn--primary {
    background-color: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--background);
}

.fpr-cta-section__btn--primary:hover {
    background-color: var(--wp--preset--color--primary-active);
}

.fpr-cta-section__btn--secondary {
    background-color: transparent;
    color: var(--wp--preset--color--background);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 18px;
}

.fpr-cta-section__btn--secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ── Note ────────────────────────────────────────────────────────────────── */
.fpr-cta-section__note {
    margin: 24px 0 0;
    color: var(--fpr-cta-note, var(--wp--preset--color--muted));
    font-size: 1rem; /* 16px */
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
}

/* ── Desktop ≥768px ──────────────────────────────────────────────────────── */
@media (min-width: 768px) {
    .fpr-cta-section__card {
        padding: var(--fpr-cta-card-desktop, 80px 40px);
    }

    .fpr-cta-section__title {
        font-size: 2.6875rem; /* 43px */
    }

    .fpr-cta-section__subtitle {
        font-size: 1.5rem; /* 24px */
    }

    .fpr-cta-section__buttons {
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        margin-top: 40px;
        width: auto;
    }
}

/* ── Large desktop ≥1024px ───────────────────────────────────────────────── */
@media (min-width: 1024px) {
    .fpr-cta-section__title {
        font-size: 3.375rem; /* 54px */
    }
}

/* ── Editor-specific: RichText placeholder legibility on dark backgrounds ── */
.fpr-cta-section__title[contenteditable]:empty::before,
.fpr-cta-section__subtitle[contenteditable]:empty::before,
.fpr-cta-section__note[contenteditable]:empty::before {
    color: rgba(255, 255, 255, 0.35);
}
