/* NAV */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s var(--ease-out), backdrop-filter 0.3s var(--ease-out);
}
.nav--scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav__inner { display: flex; justify-content: space-between; align-items: center; }
.nav__logo {
  font-family: var(--font-logo);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}
.nav__dot { color: var(--color-accent); }

/* WAITLIST FORM */
.waitlist-form {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius-pill);
  padding: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.waitlist-form__input {
  flex: 1;
  padding: 14px 24px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--color-text-primary);
  outline: none;
}
.waitlist-form__input::placeholder { color: var(--color-text-tertiary); }
.waitlist-form__button {
  padding: 14px 28px;
  background: var(--color-text-primary);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  font-weight: 500;
  transition: background 0.2s var(--ease-out);
}
.waitlist-form__button:hover { background: #1a1a1a; }
.waitlist-form__button:disabled { opacity: 0.6; cursor: wait; }
/* Waitlist form — error state */
.waitlist-form__input--error,
.section-hero__input.waitlist-form__input--error {
  border: 1px solid #DC4B31 !important;
  box-shadow: 0 0 0 2px rgba(220, 75, 49, 0.15);
}
.waitlist-form__button--error,
.section-hero__submit.waitlist-form__button--error {
  background: #DC4B31 !important;
  color: #FFFFFF !important;
}
.waitlist-error {
  margin-top: 12px;
  color: #DC4B31;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}


@media (max-width: 640px) {
  .waitlist-form {
    flex-direction: column;
    background: transparent;
    padding: 0;
    gap: 12px;
  }
  .waitlist-form__input { background: rgba(255,255,255,0.95); border-radius: var(--radius-pill); }
}

/* DIALOG — centred on the viewport on every browser */
.dialog {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 564px;
  width: 90vw;
  background: var(--color-bg);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
.dialog[open] {
  animation: dialog-pop 0.22s var(--ease-out);
}
@keyframes dialog-pop {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 8px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}
.dialog::backdrop {
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.dialog__content { padding: 60px; position: relative; }
.dialog__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  /* Must stack above .dialog__body, which is a later positioned sibling and
     would otherwise paint on top (both have z-index:auto → DOM order wins). */
  z-index: 2;
}
.dialog__close:hover { color: var(--color-text-primary); }
.dialog__title { font-size: 28px; margin-bottom: 12px; }
.dialog__subtitle { font-size: 16px; color: var(--color-text-secondary); margin-bottom: 32px; }
.dialog__field { display: block; margin-bottom: 20px; }
.dialog__field span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.dialog__field input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
}
.dialog__field input:focus { outline: none; border-color: var(--color-text-primary); }
.dialog__radios { border: none; padding: 0; margin-bottom: 32px; }
.dialog__radios legend { font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.radio {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
}
.radio input { margin-top: 4px; flex-shrink: 0; }
.radio__label { display: flex; flex-direction: column; gap: 4px; }
.radio__title { font-size: 15px; font-weight: 500; color: var(--color-text-primary); line-height: 1.3; }
.radio__desc { font-size: 13px; color: var(--color-text-secondary); line-height: 1.4; }
.radio:has(input:checked) { border-color: var(--color-text-primary); background: rgba(0,0,0,0.02); }
.dialog__submit { width: 100%; }

@media (max-width: 640px) {
  .dialog__content { padding: 40px 24px; }
}

/* BTN WHITE PILL (used in vision) */
.btn-white-pill {
  display: inline-flex;
  align-items: center;
  padding: 16px 32px;
  background: #FFFFFF;
  color: var(--color-accent);
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.2s var(--ease-out);
}
.btn-white-pill:hover { transform: translateY(-1px); }

/* ============ DIALOG BODY + SUCCESS STATE (Fix 3b) ============ */

.dialog__body { position: relative; padding: 60px; }

.dialog__body .dialog__content { padding: 0; }

.dialog__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 32px 0 8px;
  text-align: center;
}
.dialog__success[hidden] { display: none; }

.dialog__success-check {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog__success-title {
  font-family: var(--font-sans);
  font-size: 32px;
  font-weight: 500;
  color: #0A0A0A;
  letter-spacing: -0.01em;
  margin: 0;
}

.dialog__success-text {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: #6B6B6B;
  max-width: 360px;
  margin: 0;
}

.dialog__error {
  margin: -4px 0 16px;
  color: #DC4B31;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
}
.dialog__error[hidden] { display: none; }

/* ============ DIALOG INPUT + FIELD LABEL (Fix 5) ============ */

.dialog__input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  color: #0A0A0A;
  background: #FFFFFF;
  border: 1px solid #E5E1D6;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.dialog__input::placeholder { color: #9B9B9B; }

.dialog__input:focus,
.dialog__input:focus-visible {
  border-color: #0A0A0A;
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
  background: #FFFFFF;
}

.dialog__input.waitlist-form__input--error,
.dialog__input[aria-invalid="true"] {
  border-color: #DC4B31;
  box-shadow: 0 0 0 3px rgba(220, 75, 49, 0.12);
  background: #FFFFFF;
}

.dialog__field { display: block; margin-bottom: 18px; }
.dialog__field-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: #0A0A0A;
  margin-bottom: 8px;
}

/* ============ INLINE (HERO / FOOTER) INPUT STATES (Fix 5) ============ */

.section-hero .waitlist-form__input,
.section-hero__input {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.section-hero .waitlist-form__input:focus,
.section-hero .waitlist-form__input:focus-visible,
.section-hero__input:focus,
.section-hero__input:focus-visible {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
  outline: none;
}

.footer .waitlist-form__input {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.footer .waitlist-form__input:focus,
.footer .waitlist-form__input:focus-visible {
  border-color: #0A0A0A;
  box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.08);
  outline: none;
}

.waitlist-form__input--error {
  border-color: #DC4B31 !important;
  box-shadow: 0 0 0 3px rgba(220, 75, 49, 0.15) !important;
}

.waitlist-form__button--error {
  background: #DC4B31 !important;
  color: #FFFFFF !important;
}

.footer .waitlist-error { text-align: left; }

/* ============ INLINE SUCCESS BLOCK (HERO / FOOTER) — plain text, no pill ============ */

.waitlist-success-inline {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 0 0;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  margin: 0;
  color: #0A0A0A;
}

.waitlist-success-inline__check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #0A0A0A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waitlist-success-inline__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.waitlist-success-inline__copy strong {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: #0A0A0A;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.waitlist-success-inline__copy span {
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #6B6B6B;
  line-height: 1.3;
}

/* Footer variant: compact, left-aligned, flush */
.footer .waitlist-success-inline {
  justify-content: flex-start;
  padding: 0;
}

/* Hero variant: centered column, white text on gradient, no pill */
.waitlist-success-inline--hero {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  border-radius: 0;
  padding: 12px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: #FFFFFF;
}
.waitlist-success-inline--hero .waitlist-success-inline__check {
  width: 32px;
  height: 32px;
  color: #FFFFFF;
  margin-bottom: 4px;
}
.waitlist-success-inline--hero .waitlist-success-inline__copy {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.waitlist-success-inline--hero .waitlist-success-inline__copy strong {
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.waitlist-success-inline--hero .waitlist-success-inline__copy span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

/* ============ INLINE ERROR MESSAGE (sibling of hero/footer form) ============ */

.waitlist-error-inline {
  margin: 12px auto 0;
  color: #DC4B31;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
  max-width: 560px;
}

/* Hero: white text inside a small red pill so it reads on the gradient */
.section-hero .waitlist-error-inline {
  color: #FFFFFF;
  background: rgba(220, 75, 49, 0.9);
  padding: 8px 16px;
  border-radius: 100px;
  display: inline-block;
  text-align: center;
}

/* Footer: flush-left, no pill */
.footer .waitlist-error-inline {
  text-align: left;
  margin: 12px 0 0;
  max-width: 100%;
}
