/* =============================================================================
   NEWSLETTER SYSTEM — STYLE.CSS
   Shared frontend / popup / hero / form styling
   Premium SaaS aesthetic — orange accent (#ff6b3d) + cool grays
   ============================================================================= */

/* -------------------------------------------------------------------------- *
   1. RESET + ROOT
 * -------------------------------------------------------------------------- */
:root {
  --nl-bg:           #f5f7fa;
  --nl-card:         #ffffff;
  --nl-text:         #0f172a;
  --nl-text-2:       #475569;
  --nl-text-muted:   #94a3b8;
  --nl-border:       #e2e8f0;
  --nl-border-2:     #f1f5f9;

  --nl-accent:       #ff6b3d;
  --nl-accent-dark:  #e85a2e;
  --nl-accent-light: #fff1ec;

  --nl-success:      #10b981;
  --nl-success-bg:   #ecfdf5;
  --nl-danger:       #ef4444;
  --nl-danger-bg:    #fef2f2;
  --nl-warning:      #f59e0b;
  --nl-warning-bg:   #fffbeb;
  --nl-info:         #3b82f6;
  --nl-info-bg:      #eff6ff;

  --nl-shadow-sm:    0 1px 2px rgba(15, 23, 42, .04);
  --nl-shadow:       0 4px 12px rgba(15, 23, 42, .06);
  --nl-shadow-md:    0 8px 24px rgba(15, 23, 42, .08);
  --nl-shadow-lg:    0 20px 48px -8px rgba(15, 23, 42, .15);

  --nl-radius:       14px;
  --nl-radius-sm:    10px;
  --nl-radius-lg:    20px;

  --nl-trans:        .25s cubic-bezier(.4, 0, .2, 1);

  --nl-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

.nl-page {
  font-family: var(--nl-font);
  background: var(--nl-bg);
  color: var(--nl-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
}

.nl-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nl-text-accent { color: var(--nl-accent); }

/* -------------------------------------------------------------------------- *
   2. HERO
 * -------------------------------------------------------------------------- */
.nl-hero {
  position: relative;
  padding: 80px 0 60px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 107, 61, .12), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 107, 61, .08), transparent 50%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--nl-border-2);
}

.nl-hero__shapes { position: absolute; inset: 0; pointer-events: none; }

.nl-shape {
  position: absolute;
  background: linear-gradient(135deg, var(--nl-accent), #ff9968);
  opacity: .15;
  border-radius: 50%;
  filter: blur(30px);
  animation: nlFloat 7s ease-in-out infinite;
}

.nl-shape--1 { width: 200px; height: 200px; top: 10%;  left: -50px; animation-delay: 0s; }
.nl-shape--2 { width: 140px; height: 140px; top: 60%;  right: 8%;   animation-delay: 1.5s; }
.nl-shape--3 { width: 80px;  height: 80px;  top: 20%;  right: 25%;  animation-delay: 3s; }
.nl-shape--4 { width: 120px; height: 120px; bottom: -40px; left: 50%; animation-delay: 4.5s; }

@keyframes nlFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-20px) scale(1.05); }
}

.nl-hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.nl-breadcrumb {
  font-size: 13px;
  color: var(--nl-text-muted);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nl-breadcrumb a { color: var(--nl-text-2); text-decoration: none; transition: color var(--nl-trans); }
.nl-breadcrumb a:hover { color: var(--nl-accent); }
.nl-breadcrumb [aria-current="page"] { color: var(--nl-accent); font-weight: 500; }

.nl-hero__title {
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -1.5px;
  margin: 0 0 18px;
  color: var(--nl-text);
}

.nl-hero__subtitle {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--nl-text-2);
  margin: 0 0 28px;
  max-width: 540px;
  line-height: 1.65;
}

.nl-hero__perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}
.nl-hero__perks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--nl-text-2);
  font-size: 14px;
  font-weight: 500;
}
.nl-hero__perks i {
  color: var(--nl-accent);
  width: 18px;
  text-align: center;
}

.nl-illustration { position: relative; }
.nl-illustration svg {
  width: 100%;
  height: auto;
  max-width: 460px;
  margin: 0 auto;
  display: block;
  animation: nlBob 4s ease-in-out infinite;
}
@keyframes nlBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* -------------------------------------------------------------------------- *
   3. MAIN / CARDS
 * -------------------------------------------------------------------------- */
.nl-main { padding: 60px 24px; }

.nl-card {
  background: var(--nl-card);
  border: 1px solid var(--nl-border-2);
  border-radius: var(--nl-radius-lg);
  box-shadow: var(--nl-shadow);
  transition: box-shadow var(--nl-trans), transform var(--nl-trans);
}

.nl-subscribe-card {
  max-width: 560px;
  margin: -40px auto 0;
  padding: 48px 40px 40px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.nl-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--nl-accent-light);
  color: var(--nl-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 20px;
  box-shadow: 0 8px 20px -6px rgba(255, 107, 61, .35);
}

.nl-card__title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.5px;
  margin: 0 0 6px;
  color: var(--nl-text);
}
.nl-card__sub {
  color: var(--nl-text-2);
  font-size: 15px;
  margin: 0 0 28px;
}

/* -------------------------------------------------------------------------- *
   4. FORM
 * -------------------------------------------------------------------------- */
.nl-form { text-align: left; }

.nl-field { margin-bottom: 18px; position: relative; }

.nl-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--nl-text);
  margin-bottom: 8px;
}

.nl-input-wrap { position: relative; }

.nl-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--nl-text-muted);
  font-size: 14px;
  pointer-events: none;
  transition: color var(--nl-trans);
}

.nl-input,
.nl-textarea {
  width: 100%;
  height: 52px;
  padding: 0 16px 0 44px;
  border: 1.5px solid var(--nl-border);
  border-radius: var(--nl-radius-sm);
  background: #fff;
  color: var(--nl-text);
  font-size: 14.5px;
  font-family: inherit;
  transition: all var(--nl-trans);
  outline: none;
}
.nl-input::placeholder { color: var(--nl-text-muted); }
.nl-input:focus,
.nl-textarea:focus {
  border-color: var(--nl-accent);
  box-shadow: 0 0 0 4px rgba(255, 107, 61, .12);
}
.nl-input:focus + .nl-input-icon,
.nl-input-wrap:focus-within .nl-input-icon { color: var(--nl-accent); }

.nl-input.is-error {
  border-color: var(--nl-danger);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .1);
}
.nl-error {
  display: block;
  font-size: 12.5px;
  color: var(--nl-danger);
  margin-top: 6px;
  min-height: 16px;
}

/* select/textarea overrides */
.nl-textarea {
  height: auto;
  padding: 14px 16px;
  resize: vertical;
  line-height: 1.6;
}
select.nl-input { padding-left: 16px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12L6 8z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }

.nl-fineprint {
  font-size: 12.5px;
  color: var(--nl-text-muted);
  text-align: center;
  margin: 18px 0 0;
  line-height: 1.5;
}
.nl-fineprint a { color: var(--nl-text-2); text-decoration: underline; cursor: help; }

/* -------------------------------------------------------------------------- *
   5. BUTTONS
 * -------------------------------------------------------------------------- */
.nl-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: var(--nl-radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--nl-trans);
  white-space: nowrap;
}
.nl-btn--block { width: 100%; }
.nl-btn--sm    { height: 38px; padding: 0 14px; font-size: 13px; gap: 6px; }

.nl-btn--primary {
  background: linear-gradient(135deg, var(--nl-accent) 0%, #ff8553 100%);
  color: #fff;
  box-shadow: 0 8px 20px -4px rgba(255, 107, 61, .4);
}
.nl-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px rgba(255, 107, 61, .55);
}
.nl-btn--primary:active { transform: translateY(0); }

.nl-btn--ghost {
  background: #fff;
  color: var(--nl-text);
  border: 1.5px solid var(--nl-border);
}
.nl-btn--ghost:hover { border-color: var(--nl-accent); color: var(--nl-accent); }

.nl-btn--danger {
  background: var(--nl-danger);
  color: #fff;
}
.nl-btn--danger:hover { background: #dc2626; }
.nl-btn--danger:disabled { opacity: .5; cursor: not-allowed; }

.nl-btn__arrow { transition: transform var(--nl-trans); }
.nl-btn:hover .nl-btn__arrow { transform: translateX(3px); }

.nl-btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nlSpin .8s linear infinite;
}
.nl-btn.is-loading .nl-btn__spinner { display: inline-block; }
.nl-btn.is-loading .nl-btn__label,
.nl-btn.is-loading .nl-btn__arrow { opacity: .55; }
.nl-btn.is-loading { pointer-events: none; }

@keyframes nlSpin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------------------- *
   6. SUCCESS STATE
 * -------------------------------------------------------------------------- */
.nl-success {
  text-align: center;
  padding: 24px 0 8px;
  animation: nlPop .4s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes nlPop {
  0%   { opacity: 0; transform: scale(.9); }
  100% { opacity: 1; transform: scale(1);  }
}
.nl-success__icon { width: 80px; height: 80px; margin: 0 auto 20px; }
.nl-success__icon svg { width: 100%; height: 100%; }
.nl-success__icon path { stroke-dasharray: 100; stroke-dashoffset: 100; animation: nlCheck .8s .15s forwards; }
@keyframes nlCheck { to { stroke-dashoffset: 0; } }
.nl-success h3 { margin: 0 0 8px; font-size: 24px; color: var(--nl-text); }
.nl-success p  { margin: 0 0 20px; color: var(--nl-text-2); }

/* -------------------------------------------------------------------------- *
   7. FEATURES STRIP
 * -------------------------------------------------------------------------- */
.nl-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 56px auto 0;
  max-width: 1000px;
}

.nl-feature {
  background: #fff;
  border: 1px solid var(--nl-border-2);
  border-radius: var(--nl-radius);
  padding: 28px 24px;
  transition: all var(--nl-trans);
}
.nl-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--nl-shadow-md);
  border-color: var(--nl-accent-light);
}
.nl-feature__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--nl-accent-light);
  color: var(--nl-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.nl-feature h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--nl-text); }
.nl-feature p  { margin: 0; color: var(--nl-text-2); font-size: 13.5px; line-height: 1.55; }

/* -------------------------------------------------------------------------- *
   8. TOAST
 * -------------------------------------------------------------------------- */
.nl-toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.nl-toast {
  pointer-events: auto;
  background: #fff;
  border: 1px solid var(--nl-border);
  border-left: 4px solid var(--nl-info);
  border-radius: 12px;
  padding: 14px 18px 14px 16px;
  box-shadow: var(--nl-shadow-md);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  font-size: 14px;
  color: var(--nl-text);
  transform: translateX(420px);
  opacity: 0;
  transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
}
.nl-toast.is-show { transform: translateX(0); opacity: 1; }
.nl-toast--success { border-left-color: var(--nl-success); }
.nl-toast--success .nl-toast__icon { color: var(--nl-success); }
.nl-toast--error   { border-left-color: var(--nl-danger);  }
.nl-toast--error   .nl-toast__icon { color: var(--nl-danger); }
.nl-toast--info    .nl-toast__icon { color: var(--nl-info); }

.nl-toast__icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1.2;
}
.nl-toast__body { flex: 1; line-height: 1.5; }
.nl-toast__close {
  background: none; border: 0; cursor: pointer;
  color: var(--nl-text-muted); padding: 0; font-size: 16px;
}
.nl-toast__close:hover { color: var(--nl-text); }

/* -------------------------------------------------------------------------- *
   9. RESPONSIVE
 * -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .nl-hero { padding: 60px 0 40px; }
  .nl-hero__inner { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .nl-hero__subtitle { max-width: none; margin-left: auto; margin-right: auto; }
  .nl-hero__perks { justify-content: center; }
  .nl-illustration svg { max-width: 320px; }
}
@media (max-width: 560px) {
  .nl-container { padding: 0 16px; }
  .nl-main { padding: 40px 16px; }
  .nl-subscribe-card { padding: 36px 22px 28px; }
  .nl-hero__title { font-size: 32px; }
  .nl-toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .nl-toast { max-width: none; min-width: 0; }
}
