/* ============================================================
   NYSF — Lead-capture modal (Waitlist / Book / Tour)
   Used by: index.html, all studios/*.html, membership.html
   Drop in via: <link rel="stylesheet" href="../shared/lead-modal.css">
   Markup: see /website/shared/lead-modal.html
   Behavior: see /website/shared/lead-modal.js
   ============================================================ */

.pw-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pw-modal[hidden] { display: none; }

.pw-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: pwFadeIn 220ms var(--ease, cubic-bezier(.2,.7,.2,1));
}

.pw-card {
  position: relative;
  width: min(580px, 100%);
  max-height: calc(100vh - 48px);
  background: var(--cream, #FAF3EC);
  color: var(--ink, #1A1A1A);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  overflow-y: auto;
  padding: 40px;
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  animation: pwSlideIn 280ms var(--ease, cubic-bezier(.2,.7,.2,1));
  border: 1px solid rgba(26, 26, 26, 0.08);
}

@keyframes pwFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pwSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pw-x {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted, #6B6B6B);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.pw-x:hover {
  background: rgba(26, 26, 26, 0.06);
  color: var(--ink, #1A1A1A);
  border-color: rgba(26, 26, 26, 0.1);
}

.pw-eye {
  font-family: var(--eye, 'Jost', sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold, #C9A435);
  margin-bottom: 14px;
}

.pw-card h3 {
  font-family: var(--display, 'Fraunces', serif);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-variation-settings: "opsz" 144;
}
.pw-card h3 em {
  font-style: italic;
  color: var(--forest, #4A6741);
  font-weight: 400;
}

.pw-lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted, #6B6B6B);
  margin: 0 0 28px;
}

.pw-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}
.pw-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pw-row.pw-row-full { grid-column: 1 / -1; }

.pw-row label {
  font-family: var(--eye, 'Jost', sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted, #6B6B6B);
}

.pw-row input,
.pw-row select,
.pw-row textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26, 26, 26, 0.18);
  padding: 8px 0 10px;
  font-family: var(--display, 'Fraunces', serif);
  font-weight: 400;
  font-size: 17px;
  color: var(--ink, #1A1A1A);
  border-radius: 0;
  resize: none;
  transition: border-color 0.18s var(--ease);
}
.pw-row textarea {
  font-family: var(--body, 'Nunito Sans', sans-serif);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid rgba(26, 26, 26, 0.18);
  border-radius: 4px;
  padding: 10px 12px;
}
.pw-row input:focus,
.pw-row select:focus,
.pw-row textarea:focus {
  outline: none;
  border-color: var(--gold, #C9A435);
  border-bottom-color: var(--gold, #C9A435);
}
.pw-row select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%231A1A1A' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 20px;
}

.pw-foot {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(26, 26, 26, 0.08);
}
.pw-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted, #6B6B6B);
}
.pw-submit {
  background: var(--ink, #1A1A1A);
  color: var(--cream, #FAF3EC);
  border: 1px solid var(--ink, #1A1A1A);
  font-family: var(--eye, 'Jost', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 24px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
  white-space: nowrap;
}
.pw-submit:hover {
  background: var(--forest, #4A6741);
  border-color: var(--forest, #4A6741);
}

/* Confirmation state */
.pw-done {
  text-align: center;
  padding: 24px 0 8px;
}
.pw-done[hidden] { display: none; }
.pw-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--forest, #4A6741);
  color: var(--cream, #FAF3EC);
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.pw-done h4 {
  font-family: var(--display, 'Fraunces', serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.pw-done p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted, #6B6B6B);
  margin: 0 0 22px;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* When the form is hidden after submit, the .pw-submit close-button
   should still look full-width inside .pw-done */
.pw-done .pw-submit { margin: 0 auto; display: inline-flex; }

@media (max-width: 560px) {
  .pw-modal { padding: 12px; align-items: flex-end; }
  .pw-card { padding: 32px 22px 22px; max-height: 92vh; }
  .pw-card h3 { font-size: 26px; }
  .pw-form { grid-template-columns: 1fr; gap: 16px; }
  .pw-foot { flex-direction: column-reverse; }
  .pw-submit { width: 100%; padding: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .pw-backdrop, .pw-card { animation: none; }
}
