html {
  scroll-behavior: smooth;
}

.theme-toggle {
  transition: transform 0.3s ease;
}

.theme-toggle:hover {
  transform: rotate(180deg);
}

/* ── Waitlist form fields ─────────────────────────────────── */
.field {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid #d4d4d8;
  background: #ffffff;
  color: #18181b;
  outline: none;
  font-size: 0.925rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dark .field {
  background: #18181b;
  color: #ffffff;
  border-color: #3f3f46;
}

.field:focus {
  border-color: #ff005a;
  box-shadow: 0 0 0 3px rgba(255, 0, 90, 0.15);
}

.field::placeholder {
  color: #a1a1aa;
}

.dark .field::placeholder {
  color: #71717a;
}

.field.invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #71717a;
  margin-bottom: 0.3rem;
  text-align: left;
  font-weight: 600;
}

.dark .field-label {
  color: #a1a1aa;
}

/* Honeypot: off-screen, no tab stop, invisible to real users. */
.hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* ── Modal ────────────────────────────────────────────────── */
/* Centre the card when it fits, but stay scrollable when it doesn't.
 * `align-items: center` alone would push the top of a tall form above the
 * viewport, where it cannot be scrolled back into view. Anchoring to
 * flex-start and letting `margin: auto` absorb the leftover space gives
 * centring on roomy screens and a reachable top on short ones. */
#waitlistModal:not(.hidden) {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}

#waitlistModal:not(.hidden) > div {
  margin: auto;
}

body.modal-open {
  overflow: hidden;
}

/* ── Status messages ──────────────────────────────────────── */
.status-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-error {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-busy {
  background: rgba(161, 161, 170, 0.12);
  color: #71717a;
  border: 1px solid rgba(161, 161, 170, 0.3);
}
