/* ==========================================================================
   Newsletter Popup — spotlight modal
   Standalone file (enqueued directly in admin/enqueue.php). Colours are
   injected per-instance via CSS custom properties from ACF Theme Options.
   ========================================================================== */

.np-overlay {
    --np-accent: #ff7043;
    --np-accent2: #72a938;
    --np-bg: #14141a;
    --np-text: #ffffff;

    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 8, 12, 0.62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .45s ease, visibility .45s ease;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.np-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ---- Card ---- */
.np-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: 48px 40px 40px;
    border-radius: 24px;
    background: var(--np-bg);
    color: var(--np-text);
    text-align: center;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7),
                0 0 0 1px rgba(255, 255, 255, .06) inset;
    transform: translateY(24px) scale(.96);
    opacity: 0;
    transition: transform .55s cubic-bezier(.16, 1, .3, 1), opacity .45s ease;
}

.np-overlay.is-open .np-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ---- Spotlight glow ---- */
.np-glow {
    position: absolute;
    top: -45%;
    left: 50%;
    width: 130%;
    height: 130%;
    transform: translateX(-50%);
    background: radial-gradient(closest-side,
                var(--np-accent) 0%,
                rgba(255, 255, 255, 0) 70%);
    opacity: .28;
    pointer-events: none;
    filter: blur(10px);
    animation: np-glow-pulse 6s ease-in-out infinite;
}

@keyframes np-glow-pulse {
    0%, 100% { opacity: .22; transform: translateX(-50%) scale(1); }
    50%      { opacity: .34; transform: translateX(-50%) scale(1.08); }
}

/* ---- Close ---- */
.np-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--np-text);
    background: rgba(255, 255, 255, .08);
    opacity: .7;
    cursor: pointer;
    transition: opacity .2s ease, background .2s ease, transform .2s ease;
}

.np-close:hover { opacity: 1; background: rgba(255, 255, 255, .16); transform: rotate(90deg); }

/* ---- Body / states ---- */
.np-body { position: relative; z-index: 1; }

.np-overlay.is-open .np-eyebrow,
.np-overlay.is-open .np-heading,
.np-overlay.is-open .np-text,
.np-overlay.is-open .np-form,
.np-overlay.is-open .np-fineprint {
    animation: np-rise .6s cubic-bezier(.16, 1, .3, 1) both;
}
.np-overlay.is-open .np-heading   { animation-delay: .06s; }
.np-overlay.is-open .np-text      { animation-delay: .12s; }
.np-overlay.is-open .np-form      { animation-delay: .18s; }
.np-overlay.is-open .np-fineprint { animation-delay: .24s; }

@keyframes np-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.np-eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    border-radius: 100px;
    color: var(--np-text);
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset;
}

.np-heading {
    margin: 0 0 14px;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--np-text);
}

.np-highlight {
    background: linear-gradient(100deg, var(--np-accent), var(--np-accent2), var(--np-accent));
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: np-shine 5s linear infinite;
}

@keyframes np-shine {
    to { background-position: -220% 0; }
}

.np-text {
    margin: 0 auto 26px;
    max-width: 340px;
    font-size: 16px;
    line-height: 1.55;
    opacity: .72;
    color: var(--np-text);
}

/* ---- Form ---- */
.np-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 100px;
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset;
    transition: box-shadow .25s ease, background .25s ease;
}

.np-field.is-focused {
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 0 0 1px var(--np-accent) inset,
                0 0 0 4px rgba(255, 112, 67, .18);
}

.np-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 8px 0 18px;
    border: 0;
    background: transparent;
    color: var(--np-text);
    font-size: 15px;
    outline: none;
    direction: ltr;
}
.np-input::placeholder { color: var(--np-text); opacity: .45; }

.np-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 100px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(120deg, var(--np-accent), var(--np-accent2));
    background-size: 160% 100%;
    background-position: 0 0;
    transition: background-position .4s ease, transform .15s ease, box-shadow .25s ease;
    box-shadow: 0 8px 24px -8px var(--np-accent);
}
.np-btn:hover { background-position: 100% 0; transform: translateY(-1px); }
.np-btn:active { transform: translateY(0); }
.np-btn__arrow { transition: transform .25s ease; }
.np-btn:hover .np-btn__arrow { transform: translateX(3px); }

.np-btn.is-loading { pointer-events: none; opacity: .8; }
.np-btn.is-loading .np-btn__label { opacity: .6; }
.np-btn.is-loading .np-btn__arrow { animation: np-spin .7s linear infinite; }
@keyframes np-spin { to { transform: rotate(360deg); } }

.np-error {
    margin: 10px 0 0;
    font-size: 13px;
    color: #ff8a80;
}

.np-fineprint {
    margin: 16px 0 0;
    font-size: 12.5px;
    opacity: .5;
    color: var(--np-text);
}

/* ---- Success ---- */
.np-body--success { padding: 8px 0; }

.np-check { display: inline-block; margin-bottom: 6px; }
.np-check__circle {
    stroke: var(--np-accent2);
    stroke-width: 2;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: np-stroke .6s cubic-bezier(.65, 0, .45, 1) forwards;
}
.np-check__mark {
    stroke: var(--np-accent2);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: np-stroke .35s cubic-bezier(.65, 0, .45, 1) .5s forwards;
}
@keyframes np-stroke { to { stroke-dashoffset: 0; } }

/* ---- Responsive ---- */
@media (max-width: 575px) {
    .np-card    { padding: 40px 22px 30px; border-radius: 20px; }
    .np-heading { font-size: 26px; }
    .np-text    { font-size: 15px; }
    .np-field   { flex-direction: column; gap: 8px; padding: 8px; border-radius: 18px; }
    .np-input   { width: 100%; text-align: center; padding: 0 12px; }
    .np-btn     { width: 100%; justify-content: center; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .np-overlay, .np-card, .np-glow, .np-highlight,
    .np-check__circle, .np-check__mark,
    .np-overlay.is-open .np-eyebrow,
    .np-overlay.is-open .np-heading,
    .np-overlay.is-open .np-text,
    .np-overlay.is-open .np-form,
    .np-overlay.is-open .np-fineprint {
        animation: none !important;
        transition-duration: .01ms !important;
    }
}
