/* =============================================================================
   AIToolsay — Newsletter subscription page (premium redesign)
   Mobile-first (9:16) blue design system. Dedicated to index.php only, so the
   shared style.css (admin/unsubscribe) is untouched.
   JS hooks preserved: #nlSubscribeForm, .nl-field, .nl-error, .nl-btn.is-loading,
   #nlSuccessState, .nl-toast*, [data-counter].
   ============================================================================= */

:root {
    --nl-primary: #2563eb;
    --nl-primary-600: #1d4ed8;
    --nl-primary-700: #1e40af;
    --nl-grad: linear-gradient(135deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
    --nl-ring: rgba(37, 99, 235, .16);
    --nl-ink: #0f1b33;
    --nl-body: #51607b;
    --nl-muted: #8a99b3;
    --nl-card: #ffffff;
    --nl-border: #e8edf7;
    --nl-field-bg: #f7f9fd;
    --nl-field-border: #e3e9f3;
    --nl-shadow: 0 24px 60px -22px rgba(28, 51, 110, .28);
    --nl-shadow-sm: 0 8px 24px -12px rgba(28, 51, 110, .22);
    --nl-radius: 22px;
    --nl-radius-sm: 13px;
    --nl-ok: #16a34a;
    --nl-danger: #e11d48;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.nl-page {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--nl-body);
    background:
        radial-gradient(55% 40% at 85% 0%, rgba(96, 145, 255, .16), transparent 60%),
        radial-gradient(45% 35% at 5% 25%, rgba(120, 160, 255, .12), transparent 60%),
        linear-gradient(180deg, #f4f8ff 0%, #eef3fc 38%, #ffffff 100%);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    overflow-x: hidden;
}

.nl-container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }
a { color: var(--nl-primary); text-decoration: none; }

/* ===== Top bar ===== */
.nl-topbar {
    position: relative; z-index: 3;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding-block: 18px; flex-wrap: wrap;
}
.nl-brand { display: inline-flex; align-items: center; gap: 9px; }
.nl-brand__logo { height: 30px; width: auto; display: block; }
.nl-breadcrumb { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--nl-muted); font-weight: 500; }
.nl-breadcrumb a { color: var(--nl-body); }
.nl-breadcrumb a:hover { color: var(--nl-primary); }
.nl-breadcrumb [aria-current] { color: var(--nl-primary); font-weight: 600; }
.nl-breadcrumb .nl-sep { color: #c2cce0; }

/* ===== Hero ===== */
.nl-hero { position: relative; padding-block: 26px 8px; overflow: hidden; }
.nl-hero__shapes { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.nl-hero__shapes span {
    position: absolute; border-radius: 50%; filter: blur(46px); opacity: .5;
    background: radial-gradient(circle, rgba(59, 130, 246, .4), transparent 70%);
}
.nl-hero__shapes span:nth-child(1) { width: 280px; height: 280px; top: -90px; right: -40px; }
.nl-hero__shapes span:nth-child(2) { width: 220px; height: 220px; bottom: -120px; left: -70px; background: radial-gradient(circle, rgba(129, 170, 255, .4), transparent 70%); }
.nl-hero__shapes span:nth-child(3) { width: 120px; height: 120px; top: 40%; left: 42%; opacity: .25; }

.nl-hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
.nl-hero__left { max-width: 560px; }

.nl-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--nl-primary-600); background: #fff; border: 1px solid var(--nl-border);
    box-shadow: var(--nl-shadow-sm); margin-bottom: 18px;
}
.nl-badge i, .nl-badge svg { color: var(--nl-primary); width: 15px; height: 15px; }

.nl-hero__title { margin: 0 0 14px; font-size: clamp(34px, 8vw, 54px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; color: var(--nl-ink); }
.nl-text-accent { color: var(--nl-primary); display: block; }
.nl-hero__subtitle { margin: 0 0 24px; font-size: clamp(15px, 4vw, 17px); line-height: 1.6; color: var(--nl-body); max-width: 440px; }

.nl-hero__perks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 22px; }
.nl-hero__perks li { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 500; color: var(--nl-ink); }
.nl-hero__perks i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #eaf1ff; color: var(--nl-primary); font-size: 13px; }

.nl-hero__right { display: flex; justify-content: center; }
.nl-illustration { width: 100%; max-width: 440px; }
.nl-illustration svg { width: 100%; height: auto; display: block; }

/* ===== Subscribe card ===== */
.nl-main { position: relative; z-index: 2; padding-block: 30px 8px; }
.nl-card { background: var(--nl-card); border: 1px solid var(--nl-border); border-radius: var(--nl-radius); box-shadow: var(--nl-shadow); }
.nl-subscribe-card { max-width: 600px; margin-inline: auto; margin-top: 30px; padding: 44px clamp(22px, 5vw, 46px) 34px; text-align: center; position: relative; }
.nl-card__icon {
    position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
    width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center;
    background: var(--nl-grad); color: #fff; font-size: 21px; box-shadow: 0 14px 26px -8px rgba(37, 99, 235, .6);
}
.nl-card__icon svg { width: 24px; height: 24px; }
.nl-card__title { margin: 8px 0 6px; font-size: clamp(22px, 5vw, 27px); font-weight: 800; letter-spacing: -.01em; color: var(--nl-ink); }
.nl-card__title .nl-count { color: var(--nl-primary); }
.nl-card__sub { margin: 0 0 26px; font-size: 14.5px; color: var(--nl-muted); }

.nl-form { text-align: left; }
.nl-field { margin-bottom: 18px; }
.nl-label { display: block; font-size: 13.5px; font-weight: 600; color: var(--nl-ink); margin-bottom: 8px; }
.nl-input-wrap {
    display: flex; align-items: center; gap: 10px;
    background: var(--nl-field-bg); border: 1.5px solid var(--nl-field-border);
    border-radius: var(--nl-radius-sm); padding-inline: 15px; min-height: 52px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.nl-input-wrap:focus-within { border-color: var(--nl-primary); background: #fff; box-shadow: 0 0 0 4px var(--nl-ring); }
.nl-field:has(.nl-input.is-error) .nl-input-wrap { border-color: var(--nl-danger); }
.nl-input-icon { color: var(--nl-muted); font-size: 15px; flex: 0 0 auto; }
.nl-input { flex: 1 1 auto; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--nl-ink); min-width: 0; height: 48px; font-family: inherit; }
.nl-input::placeholder { color: #aab4c8; }
.nl-error { display: none; margin-top: 7px; font-size: 12.5px; color: var(--nl-danger); font-weight: 500; }

.nl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: var(--nl-radius-sm); cursor: pointer; font-family: inherit; font-size: 15.5px; font-weight: 700; line-height: 1; transition: transform .12s ease, box-shadow .15s ease, filter .15s ease; }
.nl-btn--primary { background: var(--nl-grad); color: #fff; box-shadow: 0 14px 28px -12px rgba(37, 99, 235, .7); }
.nl-btn--primary:hover { filter: brightness(1.05); box-shadow: 0 18px 34px -12px rgba(37, 99, 235, .8); }
.nl-btn--primary:active { transform: translateY(1px); }
.nl-btn--block { width: 100%; min-height: 54px; }
.nl-btn--ghost { background: #fff; color: var(--nl-primary); border: 1.5px solid var(--nl-field-border); min-height: 46px; padding-inline: 20px; }
.nl-btn--ghost:hover { border-color: var(--nl-primary); }
.nl-btn__arrow { font-size: 13px; transition: transform .15s ease; }
.nl-btn--primary:hover .nl-btn__arrow { transform: translateX(3px); }
.nl-btn__spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: nl-spin .7s linear infinite; }
.nl-btn.is-loading { cursor: progress; }
.nl-btn.is-loading .nl-btn__label, .nl-btn.is-loading .nl-btn__arrow { display: none; }
.nl-btn.is-loading .nl-btn__spinner { display: inline-block; }
@keyframes nl-spin { to { transform: rotate(360deg); } }

.nl-fineprint { margin: 18px 0 0; font-size: 12.8px; line-height: 1.55; color: var(--nl-muted); text-align: center; }
.nl-fineprint i { color: var(--nl-primary); margin-right: 4px; }
.nl-fineprint a { color: var(--nl-primary); font-weight: 600; border-bottom: 1px dotted currentColor; }

.nl-success { text-align: center; padding: 8px 0 4px; }
.nl-success__icon { width: 66px; height: 66px; margin: 0 auto 14px; }
.nl-success__icon svg { width: 100%; height: 100%; }
.nl-success h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: var(--nl-ink); }
.nl-success p { margin: 0 0 18px; font-size: 14.5px; color: var(--nl-body); }

/* ===== Why subscribe ===== */
.nl-why { padding-block: 54px 8px; text-align: center; }
.nl-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--nl-primary); background: #eaf1ff; padding: 6px 13px; border-radius: 999px; margin-bottom: 14px; }
.nl-section-title { margin: 0 auto; font-size: clamp(24px, 6vw, 34px); font-weight: 800; letter-spacing: -.01em; color: var(--nl-ink); }
.nl-section-title::after { content: ""; display: block; width: 46px; height: 4px; border-radius: 4px; background: var(--nl-grad); margin: 14px auto 0; }

.nl-features { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 36px; }
.nl-feature { background: #fff; border: 1px solid var(--nl-border); border-radius: var(--nl-radius); padding: 26px 24px; box-shadow: var(--nl-shadow-sm); transition: transform .15s ease, box-shadow .15s ease; text-align: center; }
.nl-feature:hover { transform: translateY(-3px); box-shadow: var(--nl-shadow); }
.nl-feature__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 16px; font-size: 21px; background: #eaf1ff; color: var(--nl-primary); }
.nl-feature__icon svg { width: 24px; height: 24px; }
.nl-feature--teal .nl-feature__icon { background: #e3f7f0; color: #0f9b76; }
.nl-feature--violet .nl-feature__icon { background: #efeafe; color: #7c5cf0; }
.nl-feature h4 { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--nl-ink); }
.nl-feature p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--nl-body); }

/* ===== CTA banner ===== */
.nl-cta { padding-block: 44px 10px; }
.nl-cta__panel {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: 1fr; gap: 22px; align-items: center;
    padding: 30px clamp(22px, 4vw, 40px); border-radius: var(--nl-radius);
    background: radial-gradient(60% 120% at 12% 20%, rgba(59, 130, 246, .14), transparent 60%), linear-gradient(180deg, #eef4ff, #f6f9ff);
    border: 1px solid var(--nl-border); text-align: center;
}
.nl-cta__art { width: 130px; height: 130px; margin-inline: auto; flex: 0 0 auto; }
.nl-cta__art svg { width: 100%; height: 100%; }
.nl-cta__title { margin: 0 0 8px; font-size: clamp(20px, 5vw, 26px); font-weight: 800; letter-spacing: -.01em; color: var(--nl-ink); line-height: 1.2; }
.nl-cta__title span { color: var(--nl-primary); }
.nl-cta__text { margin: 0 0 18px; font-size: 14.5px; line-height: 1.6; color: var(--nl-body); }
.nl-cta__btn { display: inline-flex; }

/* ===== Footer ===== */
.nl-footer { padding-block: 40px 34px; text-align: center; margin-top: 24px; border-top: 1px solid var(--nl-border); }
.nl-socials { display: flex; justify-content: center; gap: 12px; margin-bottom: 18px; }
.nl-socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--nl-primary); color: #fff; font-size: 16px; transition: transform .15s ease, background .15s ease; }
.nl-socials a:hover { transform: translateY(-2px); background: var(--nl-primary-700); }
.nl-socials a.nl-soc--dark { background: #0f1b33; }
.nl-foot-copy { margin: 0; font-size: 13px; color: var(--nl-muted); }
.nl-foot-copy + .nl-foot-copy { margin-top: 4px; }

/* ===== Toasts (created by main.js) ===== */
.nl-toast-wrap { position: fixed; z-index: 60; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.nl-toast { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; background: #fff; border: 1px solid var(--nl-border); border-radius: 13px; box-shadow: var(--nl-shadow); transform: translateY(14px); opacity: 0; transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .35s ease; border-left: 4px solid var(--nl-primary); }
.nl-toast.is-show { transform: translateY(0); opacity: 1; }
.nl-toast__icon { font-size: 17px; margin-top: 1px; color: var(--nl-primary); }
.nl-toast__body { flex: 1; font-size: 13.5px; color: var(--nl-ink); line-height: 1.45; }
.nl-toast__close { border: 0; background: transparent; font-size: 19px; line-height: 1; color: var(--nl-muted); cursor: pointer; padding: 0 2px; }
.nl-toast--success { border-left-color: var(--nl-ok); } .nl-toast--success .nl-toast__icon { color: var(--nl-ok); }
.nl-toast--error { border-left-color: var(--nl-danger); } .nl-toast--error .nl-toast__icon { color: var(--nl-danger); }
.nl-toast--warning { border-left-color: #f59e0b; } .nl-toast--warning .nl-toast__icon { color: #f59e0b; }

/* ===== Responsive ===== */
@media (min-width: 768px) {
    .nl-container { padding-inline: 28px; }
    .nl-features { grid-template-columns: repeat(3, 1fr); gap: 22px; }
    .nl-cta__panel { grid-template-columns: auto 1fr auto; text-align: left; gap: 28px; }
    .nl-cta__art { margin-inline: 0; width: 140px; height: 140px; }
    .nl-cta__btn { justify-self: end; }
}
@media (min-width: 992px) {
    .nl-hero { padding-block: 40px 20px; }
    .nl-hero__inner { grid-template-columns: 1.05fr .95fr; gap: 50px; }
    .nl-hero__left { max-width: none; }
    .nl-illustration { max-width: 460px; }
    .nl-subscribe-card { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
