/* ══════════════════════════════════
   Modals — Waitlist + Book a Demo
   ══════════════════════════════════ */

/* ── Shared overlay ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.modal-overlay.active {
  opacity: 1; visibility: visible;
}

/* ── Shared modal card ── */
.modal-card {
  position: relative;
  width: 571px; max-width: 100%;
  border: 1px solid #a5a5a5;
  border-radius: 12px;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

/* ── Close button row ── */
.modal-close-row {
  display: flex; justify-content: flex-end;
  padding: 32px 32px 0 0;
}
.modal-close {
  width: 24px; height: 24px;
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; transition: opacity 0.2s;
}
.modal-close:hover { opacity: 0.6 }
.modal-close svg { width: 14px; height: 14px }

/* ── Content area ── */
.modal-content {
  padding: 10px 49px 48px;
  display: flex; flex-direction: column; gap: 24px;
}

/* ── Copy ── */
.modal-heading {
  font-family: 'Petrona', serif;
  font-size: 40px; font-weight: 400;
  line-height: 48px; letter-spacing: -0.4px;
  margin: 0;
}
.modal-subtext {
  font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 400;
  line-height: 24px; letter-spacing: -0.16px;
  margin: 4px 0 0;
}

/* ── Form ── */
.modal-form {
  display: flex; flex-direction: column; gap: 16px;
}
.modal-field {
  display: flex; flex-direction: column; gap: 4px;
}
.modal-label {
  font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 400;
  line-height: 22px;
  padding-left: 2px;
}
.modal-input,
.modal-select {
  height: 48px; padding: 13px;
  background: #242526;
  border: 1px solid #383838;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 400;
  color: #fffdfa;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.modal-input::placeholder { color: rgba(255, 253, 250, 0.4) }
.modal-input:focus,
.modal-select:focus { border-color: #666 }

/* Select styling */
.modal-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23fffdfa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
  cursor: pointer;
}
.modal-select option { background: #242526; color: #fffdfa }

/* ── Submit button area ── */
.modal-submit-row {
  padding-top: 16px;
}
.modal-submit {
  width: 100%;
  padding: 24px 48px;
  border-radius: 114px;
  font-family: 'Inter', sans-serif;
  font-size: 20px; font-weight: 700;
  line-height: 24px; letter-spacing: -0.2px;
  text-align: center;
  border: none; cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s;
}
.modal-submit:hover {
  transform: translateY(-2px);
}

/* ── Waitlist modal — light theme ── */
.modal-waitlist .modal-card {
  background: #fdfdfd;
}
.modal-waitlist .modal-close svg { stroke: #373737 }
.modal-waitlist .modal-heading { color: #373737 }
.modal-waitlist .modal-subtext { color: #373737 }
.modal-waitlist .modal-label { color: #373737 }
.modal-waitlist .modal-input {
  background: #f2f2f2; border-color: #d4d4d4; color: #373737;
}
.modal-waitlist .modal-input::placeholder { color: rgba(55, 55, 55, 0.4) }
.modal-waitlist .modal-input:focus { border-color: #999 }
.modal-waitlist .modal-input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #f2f2f2 inset !important;
  -webkit-text-fill-color: #373737 !important;
  caret-color: #373737;
}
.modal-waitlist .modal-submit {
  background: #767DFB; color: #1B1B1B;
}
.modal-waitlist .modal-submit:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ── Demo modal — dark theme ── */
.modal-demo .modal-card {
  background: #383838;
}
.modal-demo .modal-close svg { stroke: #fff }
.modal-demo .modal-heading { color: #fff }
.modal-demo .modal-subtext { color: #fff }
.modal-demo .modal-label { color: #fffdfa }
.modal-demo .modal-input,
.modal-demo .modal-select {
  background: #242526; border-color: #383838; color: #fffdfa;
}
.modal-demo .modal-input::placeholder { color: rgba(255,253,250,0.4) }
.modal-demo .modal-input:-webkit-autofill,
.modal-demo .modal-select:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px #242526 inset !important;
  -webkit-text-fill-color: #fffdfa !important;
  caret-color: #fffdfa;
}
.modal-demo .modal-submit {
  background: linear-gradient(136deg, #767DFB 29%, #858BF6 92%);
  color: #1b1b1b;
}
.modal-demo .modal-submit:hover {
  box-shadow: 0 8px 24px rgba(255, 191, 30, 0.3);
}

/* ── Success state ── */
.modal-success {
  text-align: center;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  padding: 0 49px 48px;
  min-height: 400px;
}
.modal-success.show { display: flex }
.modal-success .modal-success-close { display: none }
.modal-success-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.modal-waitlist .modal-success-icon { background: #242526 }
.modal-demo .modal-success-icon { background: #ffbf1e }
.modal-success-icon svg { width: 24px; height: 24px }
.modal-success h3 {
  font-family: 'Petrona', serif;
  font-size: 32px; font-weight: 400;
  line-height: 1.2;
}
.modal-waitlist .modal-success h3 { color: #373737 }
.modal-demo .modal-success h3 { color: #fff }
.modal-success p {
  font-family: 'Inter', sans-serif;
  font-size: 16px; line-height: 24px;
}
.modal-waitlist .modal-success p { color: #666 }
.modal-demo .modal-success p { color: rgba(255,255,255,0.7) }

/* ── Responsive ── */
@media (max-width: 640px) {
  .modal-card { width: 100% }
  .modal-content { padding: 10px 24px 36px }
  .modal-heading { font-size: 32px; line-height: 38px }
  .modal-submit { padding: 20px 32px; font-size: 18px }
}