:root {
  --paper: #f9fcfe;
  --blue: #002fa7;
  --cream: #f1eadb;
  --ink: #181714;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: var(--paper);
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

body.modal-open {
  cursor: default;
}

#experience {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

#stage {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#early-access-link {
  position: fixed;
  z-index: 3;
  display: block;
  pointer-events: none;
  cursor: pointer;
  border-radius: 999px;
  outline-offset: 4px;
  -webkit-tap-highlight-color: transparent;
}

#early-access-link.is-active {
  pointer-events: auto;
}

#early-access-link:focus-visible {
  outline: 2px solid #fff;
}

.waitlist-modal[hidden] {
  display: none;
}

.waitlist-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgb(0 18 75 / 36%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.waitlist-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.waitlist-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow: auto;
  padding: 42px 42px 38px;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid rgb(24 23 20 / 34%);
  box-shadow: 0 28px 90px rgb(0 12 55 / 28%);
  transform: translateY(14px) scale(0.985);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
  -webkit-overflow-scrolling: touch;
}

.waitlist-modal.is-open .waitlist-card {
  transform: translateY(0) scale(1);
}

.waitlist-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: 300 30px/1 Arial, sans-serif;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.waitlist-kicker {
  margin: 0 0 26px;
  font: 500 12px/1.2 Arial, sans-serif;
  letter-spacing: 0.18em;
}

.waitlist-card h1 {
  margin: 0 0 27px;
  max-width: none;
  white-space: nowrap;
  font: 400 clamp(19px, 6.4vw, 42px)/1.02 Georgia, 'Times New Roman', serif;
  letter-spacing: -0.035em;
}

.waitlist-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--ink);
}

.waitlist-field-row input {
  min-width: 0;
  padding: 13px 10px 13px 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  outline: none;
  font: 400 18px/1.3 Georgia, 'Times New Roman', serif;
}

.waitlist-field-row input::placeholder {
  color: rgb(24 23 20 / 48%);
}

.waitlist-field-row button {
  min-width: 58px;
  min-height: 44px;
  padding: 10px 0 10px 18px;
  color: var(--ink);
  background: transparent;
  border: 0;
  font: 500 13px/1 Arial, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.waitlist-field-row button:disabled {
  opacity: 0.45;
  cursor: wait;
}

.waitlist-field-row:focus-within {
  border-bottom-width: 2px;
}

.waitlist-status {
  min-height: 1.35em;
  margin: 16px 0 0;
  font: 400 14px/1.35 Arial, sans-serif;
}

.waitlist-status[data-state='error'] {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 700px), (max-width: 900px) and (orientation: portrait) {
  .waitlist-modal {
    place-items: center;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .waitlist-card {
    width: 100%;
    padding: 34px 20px max(26px, env(safe-area-inset-bottom));
  }

  .waitlist-kicker {
    margin-bottom: 22px;
    font-size: 11px;
  }

  .waitlist-card h1 {
    margin-bottom: 25px;
    font-size: clamp(16px, 5.5vw, 25px);
    line-height: 1.05;
    letter-spacing: -0.03em;
  }

  .waitlist-field-row input {
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 16px;
  }

  .waitlist-field-row button {
    padding-left: 14px;
    font-size: 12px;
  }

  .waitlist-status {
    margin-top: 14px;
    font-size: 13px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .waitlist-card {
    width: min(620px, 94vw);
    padding: 25px 30px 22px;
  }

  .waitlist-kicker {
    margin-bottom: 12px;
  }

  .waitlist-card h1 {
    margin-bottom: 14px;
    font-size: clamp(18px, 4vw, 30px);
  }

  .waitlist-status {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist-modal,
  .waitlist-card {
    transition: none;
  }
}
