/* ============================================================================
   Waitlist page — /demo/
   ----------------------------------------------------------------------------
   Pre-launch signup. Centered hero, paper-card form, inline confirmation
   state. Uses Netlify Forms for the backend (form submits via fetch to
   the page itself; Netlify intercepts and stores).
   ========================================================================== */
.hp-waitlist {
  padding-block: var(--s-9) var(--s-10);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* Soft cream gradient backdrop, like all the other section heads. */
.hp-waitlist::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 12%, rgba(211, 151, 52, 0.08), transparent 70%),
    radial-gradient(ellipse 60% 40% at 14% 86%, rgba(130, 32, 74, 0.06), transparent 70%);
  pointer-events: none;
}

.hp-waitlist__head {
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--s-8);
  position: relative;
  z-index: 1;
}

.hp-waitlist__title {
  margin: var(--s-4) 0 var(--s-5);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 1.02;
}

.hp-waitlist__lede {
  max-width: 44ch;
  margin-inline: auto;
  color: var(--text-soft);
}

.hp-waitlist__lede em.italic {
  color: var(--text);
  display: block;
  margin-bottom: var(--s-3);
}

/* ---- Card containing the form + confirmation state ---------------------- */
.hp-waitlist__card {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-inline: auto;
  padding: clamp(24px, 4vw, 48px);
  background: var(--paper, #FAF5E8);
  border: 1px solid rgba(42, 35, 29, 0.12);
  border-radius: var(--r-lg);
  box-shadow:
    0 38px 80px -32px rgba(20, 17, 14, 0.32),
    0 8px 18px -10px rgba(20, 17, 14, 0.10);
}

/* ---- Form ---------------------------------------------------------------- */
.hp-waitlist__form {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
}

.hp-waitlist__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.hp-waitlist__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}

.hp-waitlist__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-waitlist__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hp-waitlist__optional {
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 10px;
  color: var(--text-wash);
  font-style: italic;
}

/* All form controls share the same paper-card-friendly look — light
   inset bg, hairline border, marquee-tinted focus ring. */
.hp-waitlist__field input,
.hp-waitlist__field select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(42, 35, 29, 0.18);
  border-radius: var(--r-md);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
  font-variant-numeric: tabular-nums;
}

.hp-waitlist__field select {
  appearance: none;
  -webkit-appearance: none;
  /* Custom dropdown chevron rendered as inline SVG so it picks up the
     espresso text color and stays crisp at any DPR. */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%232A231D' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='1,1 5,5 9,1'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.hp-waitlist__field input::placeholder {
  color: var(--text-wash);
  font-style: italic;
}

.hp-waitlist__field input:focus,
.hp-waitlist__field select:focus {
  outline: none;
  border-color: var(--marquee);
  box-shadow: 0 0 0 3px rgba(130, 32, 74, 0.16);
  background: #fff;
}

.hp-waitlist__submit {
  align-self: flex-start;
  margin-top: var(--s-2);
}

.hp-waitlist__submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.hp-waitlist__fineprint {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-wash);
  font-style: italic;
}

/* Inline error message — light red wash, espresso text. */
.hp-waitlist__error {
  margin: 0;
  padding: 10px 14px;
  background: rgba(180, 53, 70, 0.08);
  border-left: 3px solid #b43546;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  border-radius: var(--r-sm);
}

.hp-waitlist__error a {
  color: var(--marquee);
  text-decoration: underline;
}

/* ---- Confirmation state ------------------------------------------------- */
.hp-waitlist__confirm {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  text-align: center;
  padding: var(--s-4) 0;
}

.hp-waitlist__confirm[hidden] {
  display: none;
}

.hp-waitlist__confirmEyebrow {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.hp-waitlist__confirmTitle {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.01em;
  color: var(--text);
}

.hp-waitlist__confirmBody {
  margin: var(--s-2) auto 0;
  max-width: 44ch;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.55;
  color: var(--text-soft);
}

.hp-waitlist__confirmBack {
  margin-top: var(--s-5);
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ---- Mobile -------------------------------------------------------------- */
@media (max-width: 720px) {
  .hp-waitlist {
    padding-block: var(--s-7) var(--s-8);
  }
  .hp-waitlist__row {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .hp-waitlist__title {
    font-size: clamp(40px, 11vw, 64px);
  }
  .hp-waitlist__card {
    padding: var(--s-5);
  }
  .hp-waitlist__submit {
    align-self: stretch;
  }
}
