/**
 * LIVZO — "Final CTA" (homepage module 10).
 *
 * The closing panel: copy on the left, one society-on-a-map picture on the right
 * with its living insights floating over it. Light and immersive rather than a dark
 * block — the container carries a lavender wash, and the connector curves are drawn
 * in the artwork's own 640×540 space so they stay locked to the pin.
 *
 * Motion index
 *   reveal-on-scroll → [data-lz-inview] + .is-in (assets/js/societies.js)
 *   ambient          → grid drift, floating pins, card float, dots on the wires
 *   hover            → button lift + glow, arrow nudge, card emphasis
 *
 * No JavaScript: everything here is CSS or the SMIL dots on the wires.
 *
 * Layout
 *   ≥1000px : two columns — copy (left), society picture (right)
 *   <1000px : stacked — copy, then the picture, then the cards as a row
 */

/* ==========================================================================
   1. Shell + background
   ========================================================================== */

.lz-cta {
    position: relative;
    isolation: isolate;
    padding: clamp(56px, 6.4vw, 88px) 0 clamp(64px, 7vw, 96px);
    scroll-margin-top: calc(var(--lz-header-h) + 16px);
}

.lz-cta__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.lz-cta__grid-lines {
    position: absolute;
    inset: -6% -6% 0;
    background-image: linear-gradient(rgba(11, 27, 51, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(11, 27, 51, 0.04) 1px, transparent 1px);
    background-size: 76px 76px;
    -webkit-mask-image: radial-gradient(ellipse 66% 58% at 50% 50%, #000 0%, transparent 74%);
    mask-image: radial-gradient(ellipse 66% 58% at 50% 50%, #000 0%, transparent 74%);
}

.lz-cta__bgpin {
    position: absolute;
    color: var(--lz-accent);
}

.lz-cta__bgpin .lz-icon { width: 100%; height: 100%; }

.lz-cta__bgpin--a {
    top: 16%;
    left: 4%;
    width: 20px;
    opacity: 0.09;
    animation: lzFloat 14s ease-in-out infinite;
}

.lz-cta__bgpin--b {
    right: 5%;
    bottom: 18%;
    width: 15px;
    opacity: 0.07;
    animation: lzFloat 17s ease-in-out infinite reverse;
}

/* ==========================================================================
   2. Panel
   ========================================================================== */

.lz-cta__panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(34px, 4vw, 54px);
    width: 92%;
    margin-inline: auto;
    padding: clamp(28px, 3.4vw, 56px);
    border: 1px solid rgba(109, 74, 255, 0.14);
    border-radius: clamp(24px, 2.6vw, 36px);
    background-image: linear-gradient(135deg, rgba(109, 74, 255, 0.10), rgba(109, 74, 255, 0.02) 54%, rgba(109, 74, 255, 0.07)),
        linear-gradient(180deg, #FBFAFF, #FBFAF8);
    box-shadow: 0 2px 6px rgba(11, 27, 51, 0.04), 0 44px 84px -54px rgba(11, 27, 51, 0.38);
    overflow: hidden;
}

@media (min-width: 1000px) {
    .lz-cta__panel {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
        align-items: center;
        gap: clamp(34px, 3.6vw, 58px);
    }
}

/* ==========================================================================
   3. Copy
   ========================================================================== */

.lz-cta__content { min-width: 0; }

.lz-cta__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--lz-accent);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.lz-cta__eyebrow-ico {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent);
    animation: lzPulse 3.4s var(--lz-ease) infinite;
}

.lz-cta__eyebrow-ico .lz-icon { width: 14px; height: 14px; }

.lz-cta__title {
    margin-top: 14px;
    font-size: clamp(1.86rem, 1.24rem + 1.98vw, 2.8rem);
    letter-spacing: -0.036em;
    line-height: 1.12;
    text-wrap: balance;
}

.lz-cta__title-accent {
    background-image: linear-gradient(100deg, var(--lz-accent-700) 0%, var(--lz-accent) 34%, #9C86FF 62%, var(--lz-accent) 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--lz-accent);
    -webkit-text-fill-color: transparent;
    animation: lzAccentFlow 9s var(--lz-ease) infinite;
}

.lz-cta__lead {
    margin-top: 15px;
    max-width: 44ch;
    color: var(--lz-navy-2);
    font-size: clamp(0.96rem, 0.94rem + 0.2vw, 1.04rem);
    line-height: 1.62;
}

.lz-cta__text {
    margin-top: 11px;
    max-width: 46ch;
    color: var(--lz-body);
    font-size: 0.9rem;
    line-height: 1.66;
}

/* --- Actions -------------------------------------------------------------- */

.lz-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.lz-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 15px;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: -0.012em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.3s var(--lz-ease-out),
        box-shadow 0.3s var(--lz-ease),
        background-color 0.3s var(--lz-ease),
        border-color 0.3s var(--lz-ease),
        color 0.3s var(--lz-ease);
}

.lz-cta__btn--primary {
    background-image: linear-gradient(180deg, var(--lz-accent) 0%, var(--lz-accent-600) 100%);
    color: #fff;
    box-shadow: 0 14px 26px -18px rgba(109, 74, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.lz-cta__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px -18px rgba(109, 74, 255, 0.95), 0 0 0 6px rgba(109, 74, 255, 0.10);
}

.lz-cta__btn--primary:active { transform: translateY(0) scale(0.985); }

.lz-cta__btn-ico {
    width: 17px;
    height: 17px;
    transition: transform 0.3s var(--lz-ease-out);
}

.lz-cta__btn--primary:hover .lz-cta__btn-ico { transform: translateX(3px); }

.lz-cta__btn--secondary {
    border-color: var(--lz-line-2);
    background-color: var(--lz-surface);
    color: var(--lz-navy);
    box-shadow: var(--lz-sh-1);
}

.lz-cta__btn--secondary:hover {
    border-color: rgba(109, 74, 255, 0.34);
    background-color: #FBFAFF;
    color: var(--lz-accent-700);
    transform: translateY(-2px);
    box-shadow: var(--lz-sh-2);
}

.lz-cta__micro {
    margin-top: 20px;
    color: var(--lz-navy-2);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ==========================================================================
   4. Society picture
   ========================================================================== */

.lz-cta__visual {
    position: relative;
    min-width: 0;
}

.lz-cta__glow {
    position: absolute;
    inset: 4% 2%;
    z-index: 0;
    border-radius: 50%;
    background-image: radial-gradient(circle at 52% 48%, rgba(109, 74, 255, 0.24), rgba(109, 74, 255, 0) 66%);
    filter: blur(28px);
    pointer-events: none;
}

.lz-cta__art {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    box-shadow: 0 2px 5px rgba(11, 27, 51, 0.04), 0 28px 54px -40px rgba(11, 27, 51, 0.45);
}

.lz-cta__art-img {
    display: block;
    width: 100%;
    height: auto;
}

.lz-cta__art-fallback {
    display: block;
    aspect-ratio: 640 / 540;
    background-image: linear-gradient(140deg, #F1F3FF, #FBFAF8);
}

/* --- Connectors ----------------------------------------------------------- */

.lz-cta__wires {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.lz-cta__wire {
    stroke: var(--lz-accent);
    stroke-opacity: 0.28;
    stroke-width: 1.6;
    stroke-dasharray: 5 7;
    stroke-linecap: round;
    transition: stroke-opacity 0.35s var(--lz-ease), stroke-width 0.35s var(--lz-ease);
}

.lz-cta__wire.is-linked {
    stroke-opacity: 0.66;
    stroke-width: 2;
}

.lz-cta__dot {
    fill: var(--lz-accent);
    fill-opacity: 0.85;
}

/* --- Pin label ------------------------------------------------------------ */

.lz-cta__pin-label {
    position: absolute;
    left: 51.6%;
    top: 55.6%;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    padding: 6px 13px 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--lz-r-pill);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--lz-sh-2);
    color: var(--lz-navy);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    white-space: nowrap;
    transform: translateX(-50%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lz-cta__pin-label-ico {
    display: grid;
    place-items: center;
    color: var(--lz-accent);
}

.lz-cta__pin-label-ico .lz-icon { width: 13px; height: 13px; }

/* --- Floating cards ------------------------------------------------------- */

.lz-cta__cards {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.lz-cta__card {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px 9px 10px;
    border: 1px solid var(--lz-line);
    border-radius: 16px;
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 2px 5px rgba(11, 27, 51, 0.05), 0 20px 34px -24px rgba(11, 27, 51, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: auto;
    animation: lzCardFloat 9s var(--lz-ease) infinite;
    transition: box-shadow 0.32s var(--lz-ease), border-color 0.32s var(--lz-ease);
}

.lz-cta__card:hover {
    border-color: rgba(109, 74, 255, 0.28);
    box-shadow: 0 2px 5px rgba(11, 27, 51, 0.05), 0 26px 44px -24px rgba(74, 40, 220, 0.55);
}

.lz-cta__card--a { left: 0;  top: 6%; }
.lz-cta__card--b { right: 0; top: 32%; }
.lz-cta__card--c { left: 2%; bottom: 10%; }

.lz-cta__card-ico {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 50%;
    background-color: var(--lz-accent-soft);
    color: var(--lz-accent);
}

.lz-cta__card-ico .lz-icon { width: 16px; height: 16px; }

.lz-cta__card-body { display: grid; gap: 1px; min-width: 0; }

.lz-cta__card-stars { display: flex; }

.lz-cta__card-stars .lz-stars__layer { gap: 2px; }

.lz-cta__card-stars .lz-stars__layer .lz-icon { width: 11px; height: 11px; }

.lz-cta__card-value {
    color: var(--lz-navy);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: -0.022em;
    line-height: 1.2;
}

.lz-cta__card-label {
    color: var(--lz-body);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.lz-cta__note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--lz-body);
    font-size: 0.76rem;
    line-height: 1.5;
    text-align: center;
}

.lz-cta__note-ico {
    display: grid;
    place-items: center;
    flex: none;
    color: var(--lz-accent);
}

.lz-cta__note-ico .lz-icon { width: 14px; height: 14px; }

/* ==========================================================================
   5. Reveal on scroll (scoped copy — the module stays self-contained)
   ========================================================================== */

.has-js .lz-cta [data-lz-inview] {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--lz-ease-out) var(--lz-delay, 0ms),
        transform 0.85s var(--lz-ease-out) var(--lz-delay, 0ms);
    will-change: opacity, transform;
}

.has-js .lz-cta [data-lz-inview].is-in {
    opacity: 1;
    transform: none;
    will-change: auto;
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */

/* Stacked: the cards stop floating and follow the picture as a row, which is the
   order the section reads in anyway. */
@media (max-width: 999px) {
    .lz-cta__cards {
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 16px;
    }

    .lz-cta__card {
        position: static;
        animation: none;
    }

    .lz-cta__card--a,
    .lz-cta__card--b,
    .lz-cta__card--c { left: auto; right: auto; top: auto; bottom: auto; }
}

@media (max-width: 620px) {
    .lz-cta__panel {
        width: 100%;
        border-radius: 22px;
    }

    .lz-cta__actions .lz-cta__btn { width: 100%; }

    .lz-cta__art { border-radius: 18px; }
    .lz-cta__pin-label { font-size: 0.72rem; }
    .lz-cta__card { padding: 8px 13px 8px 9px; border-radius: 14px; }
    .lz-cta__card-value { font-size: 0.82rem; }
}

/* ==========================================================================
   7. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .has-js .lz-cta [data-lz-inview] {
        opacity: 1;
        transform: none;
    }

    /* The travelling dots are SMIL, which CSS cannot pause — hidden instead. */
    .lz-cta__dot { display: none; }

    .lz-cta__title-accent,
    .lz-cta__eyebrow-ico,
    .lz-cta__bgpin,
    .lz-cta__card {
        animation: none;
    }

    .lz-cta__btn,
    .lz-cta__card,
    .lz-cta__btn-ico {
        transition: none;
    }
}
