@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=Bebas+Neue&family=DM+Mono:wght@400;500&display=swap');

#newsletter-popup-overlay,
#newsletter-popup-overlay *,
#newsletter-popup-overlay *::before,
#newsletter-popup-overlay *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#newsletter-popup-overlay {
  --bg-page: #010101;
  --bg-popup: #0c0c0c;
  --bg-field: #161616;
  --bg-field-f: #1e1e1e;
  --s1-accent: #4f46e5;
  --s1-dim: #4338ca;
  --s1-glow: rgba(79, 70, 229, 0.25);
  --s1-tint: rgba(79, 70, 229, 0.08);
  --s1-border: rgba(79, 70, 229, 0.28);
  --s2-accent: #5865f2;
  --s2-dim: #4752c4;
  --s2-glow: rgba(88, 101, 242, 0.22);
  --s2-tint: rgba(88, 101, 242, 0.08);
  --s2-border: rgba(88, 101, 242, 0.25);
  --tx-hi: #f2f2f2;
  --tx-mid: #888;
  --tx-lo: #444;
  --b-base: rgba(255, 255, 255, 0.07);
  --b-subtle: rgba(255, 255, 255, 0.04);
  --r-popup: 20px;
  --r-field: 11px;
  --r-btn: 50px;
  --spring: cubic-bezier(.34, 1.4, .64, 1);
  --ease: cubic-bezier(.4, 0, .2, 1);
  font-family: 'DM Sans', sans-serif;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px) saturate(1.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

body.npup-open > *:not(#newsletter-popup-overlay) {
  filter: blur(4px);
  transition: filter 0.3s var(--ease);
}

body > *:not(#newsletter-popup-overlay) {
  transition: filter 0.3s var(--ease);
}

#newsletter-popup-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

#newsletter-popup {
  width: 100%;
  max-width: 460px;
  background: var(--bg-popup);
  border-radius: var(--r-popup);
  border: 1px solid var(--b-base);
  box-shadow: 0 60px 140px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
  position: relative;
  transform: translateY(32px) scale(0.96);
  opacity: 0;
  transition: transform 0.38s var(--spring), opacity 0.28s var(--ease);
}

#newsletter-popup-overlay.visible #newsletter-popup {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#newsletter-popup button,
#newsletter-popup input {
  font-family: 'DM Sans', sans-serif;
  -webkit-appearance: none;
  appearance: none;
}

#newsletter-popup .popup-bar {
  height: 3px;
  transition: background 0.55s var(--ease);
}

#newsletter-popup[data-step="1"] .popup-bar {
  background: linear-gradient(90deg, var(--s1-accent) 0%, #818cf8 50%, transparent 100%);
}

#newsletter-popup[data-step="2"] .popup-bar {
  background: linear-gradient(90deg, var(--s2-accent) 0%, #818cf8 50%, transparent 100%);
}

#newsletter-popup .popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--b-base);
  color: var(--tx-mid);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  z-index: 2;
  line-height: 1;
}

#newsletter-popup[data-step="1"] .popup-close:hover {
  background: rgba(79, 70, 229, 0.12);
  border-color: var(--s1-accent);
  color: var(--s1-accent);
}

#newsletter-popup[data-step="2"] .popup-close:hover {
  background: rgba(88, 101, 242, 0.12);
  border-color: var(--s2-accent);
  color: var(--s2-accent);
}

#newsletter-popup .popup-close:focus-visible {
  outline: 2px solid var(--s1-accent);
  outline-offset: 2px;
}

#newsletter-popup .popup-step {
  display: none;
  padding: 32px 32px 30px;
}

#newsletter-popup .popup-step.active {
  display: block;
}

#newsletter-popup .popup-step.entering {
  animation: popStepIn 0.32s var(--spring) forwards;
}

#newsletter-popup .popup-step.leaving {
  position: absolute;
  inset: 0;
  padding: 32px 32px 30px;
  animation: popStepOut 0.2s var(--ease) forwards;
  pointer-events: none;
}

@keyframes popStepIn {
  from {
    opacity: 0;
    transform: translateX(28px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes popStepOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-22px);
  }
}

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

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

#newsletter-popup .s1-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--s1-tint);
  border: 1px solid var(--s1-border);
  border-radius: 50px;
  padding: 4px 12px 4px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--s1-accent);
  margin-bottom: 20px;
}

#newsletter-popup .s1-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--s1-accent);
  position: relative;
}

#newsletter-popup .s1-eyebrow-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--s1-accent);
  animation: pulse-ring 1.4s ease-out infinite;
}

#newsletter-popup .s1-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--tx-hi);
  margin-bottom: 10px;
}

#newsletter-popup .s1-headline em {
  font-style: normal;
  background: linear-gradient(110deg, var(--s1-accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#newsletter-popup .s1-sub {
  font-size: 14px;
  color: var(--tx-mid);
  line-height: 1.65;
  margin-bottom: 26px;
  max-width: 360px;
}

#newsletter-popup .s1-sub strong {
  color: var(--tx-hi);
  font-weight: 500;
}

#newsletter-popup .s1-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

#newsletter-popup .s1-avatars {
  display: flex;
  margin-right: 8px;
}

#newsletter-popup .s1-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--bg-popup);
  margin-right: -8px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

#newsletter-popup .s1-avatar:nth-child(1) {
  background: #e53e3e;
}

#newsletter-popup .s1-avatar:nth-child(2) {
  background: #3182ce;
}

#newsletter-popup .s1-avatar:nth-child(3) {
  background: #38a169;
}

#newsletter-popup .s1-avatar:nth-child(4) {
  background: #d69e2e;
}

#newsletter-popup .s1-proof-text {
  font-size: 12px;
  color: var(--tx-mid);
  line-height: 1.4;
}

#newsletter-popup .s1-proof-text strong {
  color: var(--tx-hi);
  font-weight: 600;
}

#newsletter-popup .s1-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#newsletter-popup .s1-input-row {
  display: flex;
  gap: 8px;
}

#newsletter-popup .s1-input {
  flex: 1;
  background: var(--bg-field);
  border: 1px solid var(--b-base);
  border-radius: var(--r-field);
  color: var(--tx-hi);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 13px 16px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

#newsletter-popup .s1-input::placeholder {
  color: var(--tx-lo);
}

#newsletter-popup .s1-input:focus {
  border-color: var(--s1-accent);
  background: var(--bg-field-f);
  box-shadow: 0 0 0 3px var(--s1-glow);
}

#newsletter-popup .s1-input.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

#newsletter-popup .s1-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  background: var(--s1-accent);
  color: #fff;
  border: none;
  border-radius: var(--r-btn);
  cursor: pointer;
  padding: 13px 22px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px var(--s1-glow);
  transition: background 0.18s, transform 0.14s, box-shadow 0.18s;
  letter-spacing: 0.01em;
}

#newsletter-popup .s1-btn:hover {
  background: #4338ca;
  box-shadow: 0 6px 26px rgba(79, 70, 229, 0.45);
}

#newsletter-popup .s1-btn:active {
  transform: scale(0.96);
}

#newsletter-popup .s1-btn:focus-visible {
  outline: 2px solid var(--s1-accent);
  outline-offset: 3px;
}

#newsletter-popup .s1-btn .spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

#newsletter-popup .s1-btn.loading .spinner {
  display: block;
}

#newsletter-popup .s1-btn.loading .btn-arrow {
  display: none;
}

#newsletter-popup .s1-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

#newsletter-popup .s1-error {
  font-size: 11.5px;
  color: #f87171;
  display: none;
  padding-left: 2px;
}

#newsletter-popup .s1-error.show {
  display: block;
}

#newsletter-popup .s1-disclaimer {
  font-size: 11px;
  color: var(--tx-lo);
  text-align: center;
  line-height: 1.5;
}

#newsletter-popup .s1-disclaimer a {
  color: var(--tx-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#newsletter-popup .s1-skip {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--tx-lo);
  text-align: center;
  display: block;
  width: 100%;
  padding: 6px 0 0;
  margin-top: 2px;
  transition: color 0.15s;
}

#newsletter-popup .s1-skip:hover {
  color: var(--tx-mid);
}

#newsletter-popup .s2-glow-bg {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

#newsletter-popup .s2-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--s2-tint);
  border: 1.5px solid var(--s2-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  animation: float 3.5s ease-in-out infinite;
}

#newsletter-popup .s2-icon svg {
  color: var(--s2-accent);
}

#newsletter-popup .s2-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--s2-accent);
  margin-bottom: 10px;
}

#newsletter-popup .s2-eyebrow-line {
  width: 22px;
  height: 1.5px;
  background: var(--s2-accent);
  border-radius: 2px;
}

#newsletter-popup .s2-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 40px;
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--tx-hi);
  margin-bottom: 10px;
}

#newsletter-popup .s2-headline em {
  font-style: normal;
  background: linear-gradient(110deg, var(--s2-accent), #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#newsletter-popup .s2-sub {
  font-size: 13.5px;
  color: var(--tx-mid);
  line-height: 1.65;
  margin-bottom: 22px;
}

#newsletter-popup .s2-sub strong {
  color: var(--tx-hi);
  font-weight: 500;
}

#newsletter-popup .s2-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

#newsletter-popup .s2-benefit {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-field);
  border: 1px solid var(--b-subtle);
  border-radius: 11px;
  padding: 11px 14px;
  transition: background 0.18s, border-color 0.18s;
}

#newsletter-popup .s2-benefit:hover {
  background: var(--s2-tint);
  border-color: var(--s2-border);
}

#newsletter-popup .s2-benefit-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  background: var(--s2-tint);
  border: 1px solid var(--s2-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

#newsletter-popup .s2-benefit-icon svg {
  color: var(--s2-accent);
}

#newsletter-popup .s2-benefit-text {
  font-size: 13px;
  color: var(--tx-mid);
  line-height: 1.45;
}

#newsletter-popup .s2-benefit-text strong {
  color: var(--tx-hi);
  font-weight: 500;
  display: block;
  margin-bottom: 1px;
}

#newsletter-popup .s2-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  background: var(--s2-accent);
  color: #fff;
  border: none;
  border-radius: var(--r-btn);
  cursor: pointer;
  padding: 14px 28px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 5px 22px var(--s2-glow);
  transition: background 0.18s, transform 0.14s, box-shadow 0.18s;
  letter-spacing: 0.01em;
}

#newsletter-popup .s2-btn:hover {
  background: #6872f3;
  box-shadow: 0 8px 28px rgba(88, 101, 242, 0.45);
}

#newsletter-popup .s2-btn:active {
  transform: scale(0.96);
}

#newsletter-popup .s2-btn:focus-visible {
  outline: 2px solid var(--s2-accent);
  outline-offset: 3px;
}

#newsletter-popup .s2-later {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--tx-lo);
  text-align: center;
  display: block;
  width: 100%;
  padding: 10px 0 0;
  margin-top: 2px;
  transition: color 0.15s;
}

#newsletter-popup .s2-later:hover {
  color: var(--tx-mid);
}

#newsletter-popup-overlay ::-webkit-scrollbar {
  width: 5px;
}

#newsletter-popup-overlay ::-webkit-scrollbar-track {
  background: transparent;
}

#newsletter-popup-overlay ::-webkit-scrollbar-thumb {
  background: #252525;
  border-radius: 3px;
}
