/* ═══════════════════════════════════════════════════════
   Whitepaper Modal — NOVARIS Design System
   ═══════════════════════════════════════════════════════ */

/* ── Overlay ── */
.wp-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4, 9, 26, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-overlay.wp-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Modal card ── */
.wp-modal {
  max-width: 480px;
  width: 100%;
  background: linear-gradient(160deg, rgba(18, 34, 68, 0.98), rgba(13, 27, 62, 0.98));
  border: 1px solid rgba(77, 174, 229, 0.2);
  border-radius: 20px;
  padding: 2.25rem 2rem 1.75rem;
  box-shadow:
    0 4px 8px rgba(0,0,0,0.4),
    0 16px 32px rgba(0,0,0,0.35),
    0 40px 80px rgba(0,0,0,0.25),
    0 0 0 1px rgba(77,174,229,0.1) inset,
    0 0 60px rgba(30,86,181,0.12);
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  position: relative;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity  0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wp-overlay.wp-visible .wp-modal {
  transform: scale(1) translateY(0);
}

/* ── Close button ── */
.wp-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  color: rgba(195,215,245,0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.14s ease,
              color 0.14s ease;
}
.wp-close:hover { background: rgba(255,255,255,0.12); color: #fff; transform: scale(1.08); }
.wp-close:active { transform: scale(0.95); }
.wp-close:focus-visible { outline: 2px solid #4DAEE5; outline-offset: 2px; }

/* ── Header ── */
.wp-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30,86,181,0.2), rgba(77,174,229,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.wp-icon svg { width: 24px; height: 24px; }

.wp-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.wp-subtitle {
  font-size: 0.82rem;
  color: rgba(195,215,245,0.6);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ── Form fields ── */
.wp-field {
  margin-bottom: 0.85rem;
}

.wp-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(195,215,245,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.wp-field input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wp-field input::placeholder {
  color: rgba(195,215,245,0.3);
}

.wp-field input:focus {
  border-color: rgba(77,174,229,0.5);
  box-shadow: 0 0 0 3px rgba(77,174,229,0.15);
}

.wp-field input.wp-error {
  border-color: rgba(239,68,68,0.6);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

/* ── Honeypot ── */
.wp-hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* ── DSGVO checkbox ── */
.wp-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 1rem 0 1.25rem;
}

.wp-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: #4DAEE5;
  flex-shrink: 0;
}

.wp-checkbox label {
  font-size: 0.75rem;
  color: rgba(195,215,245,0.6);
  line-height: 1.55;
  cursor: pointer;
}
.wp-checkbox label a {
  color: #4DAEE5;
  text-decoration: none;
}
.wp-checkbox label a:hover { text-decoration: underline; }

/* ── Submit button ── */
.wp-submit {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, #1E56B5, #4DAEE5);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 16px rgba(30,86,181,0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.2s ease,
              opacity 0.15s ease;
}
.wp-submit:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 8px 24px rgba(30,86,181,0.48); }
.wp-submit:active { transform: translateY(0) scale(0.98); opacity: 0.92; }
.wp-submit:focus-visible { outline: 2px solid #4DAEE5; outline-offset: 2px; }
.wp-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Spinner ── */
.wp-spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: wp-spin 0.7s linear infinite;
}
@keyframes wp-spin { to { transform: rotate(360deg); } }

/* ── Success state ── */
.wp-success {
  text-align: center;
  padding: 1rem 0;
}
.wp-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34,197,94,0.2), rgba(34,197,94,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.wp-success-icon svg { width: 28px; height: 28px; }
.wp-success h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.wp-success p {
  font-size: 0.85rem;
  color: rgba(195,215,245,0.7);
  line-height: 1.6;
}

/* ── Error message ── */
.wp-error-msg {
  font-size: 0.78rem;
  color: #f87171;
  margin-top: 0.5rem;
  text-align: center;
}

/* ── Mobile ── */
@media (max-width: 500px) {
  .wp-modal {
    padding: 1.75rem 1.25rem 1.5rem;
    border-radius: 16px;
  }
  .wp-title { font-size: 1.05rem; }
}
