:root {
  --bg: #eeeee8;
  --paper-strong: rgba(255, 255, 250, 0.94);
  --ink: #070810;
  --muted: #676a62;
  --line: rgba(7, 8, 16, 0.1);
  --blue: #1022ff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Arial, sans-serif;
  font-kerning: normal;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 76% 8%, rgba(16, 34, 255, 0.1), transparent 28rem),
    linear-gradient(180deg, #f4f4ef 0%, var(--bg) 58%, #e7e7e1 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(7, 8, 16, 0.16) 0.55px, transparent 0.55px),
    radial-gradient(rgba(255, 255, 255, 0.82) 0.55px, transparent 0.55px);
  background-position:
    0 0,
    3px 3px;
  background-size: 7px 7px;
  opacity: 0.16;
  mix-blend-mode: multiply;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  position: relative;
  width: min(960px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 40px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1;
}

.brand img {
  width: 46px;
  height: 31px;
  display: block;
  object-fit: contain;
}

.hero {
  min-height: calc(100vh - 110px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0 18px;
  text-align: center;
}

.hero-copy {
  max-width: 760px;
  margin: 0 auto;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(52px, 8vw, 94px);
  line-height: 0.94;
  font-weight: 690;
}

.lede {
  max-width: 680px;
  margin: 24px auto 0;
  color: rgba(7, 8, 16, 0.66);
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.34;
  font-weight: 430;
}

.waitlist {
  width: min(560px, 100%);
  margin: 34px auto 0;
}

.waitlist label {
  display: block;
  margin-bottom: 10px;
  color: rgba(7, 8, 16, 0.82);
  font-size: 14px;
  font-weight: 650;
}

.field-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border: 1px solid rgba(7, 8, 16, 0.11);
  border-radius: 18px;
  background: var(--paper-strong);
  padding: 6px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 18px 46px rgba(7, 8, 16, 0.08);
}

.field-row:focus-within {
  border-color: rgba(16, 34, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 18px 46px rgba(7, 8, 16, 0.08);
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
  font-size: 17px;
}

select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(7, 8, 16, 0.11);
  border-radius: 14px;
  background: rgba(255, 255, 250, 0.78);
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
  font-size: 15px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(7, 8, 16, 0.38);
}

button {
  min-width: 156px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: white;
  padding: 0 20px;
  font-size: 17px;
  font-weight: 650;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

button:hover {
  filter: brightness(1.03);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(16, 34, 255, 0.32);
  outline-offset: 3px;
}

.field-row input:focus-visible {
  outline: 0;
}

.trap-field {
  position: fixed;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
}

#form-note {
  min-height: 38px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(238, 238, 232, 0.78);
  padding: 24px;
  overflow: hidden;
  overscroll-behavior: contain;
  backdrop-filter: blur(18px);
}

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

.modal {
  position: relative;
  width: min(480px, 92vw);
  min-width: 0;
  max-height: min(560px, calc(100svh - 48px));
  overflow: auto;
  overflow-x: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  background: rgba(248, 248, 243, 0.94);
  padding: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 30px 90px rgba(7, 8, 16, 0.18);
  text-align: left;
}

.modal header {
  padding-right: 38px;
  margin-bottom: 24px;
}

.modal h2 {
  margin: 0;
  color: var(--ink);
  font-size: 32px;
  line-height: 1;
  font-weight: 690;
}

.modal-progress {
  width: min(260px, 100%);
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(7, 8, 16, 0.08);
  margin-top: 16px;
}

.modal-progress span {
  display: block;
  width: 16.666%;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.icon-button {
  position: absolute;
  top: 16px;
  right: 16px;
  min-width: 34px;
  min-height: 34px;
  border-radius: 50%;
  background: rgba(7, 8, 16, 0.08);
  color: var(--ink);
  padding: 0;
  font-size: 24px;
  line-height: 1;
  box-shadow: none;
}

.details-form {
  display: grid;
  gap: 22px;
}

.question-step {
  display: none;
  min-height: 150px;
}

.question-step.active {
  display: grid;
  align-content: start;
}

.details-form label {
  display: grid;
  gap: 8px;
  color: rgba(7, 8, 16, 0.8);
}

.details-form label > span {
  color: var(--ink);
  font-size: 19px;
  line-height: 1.15;
  font-weight: 680;
}

.details-form input,
.details-form select,
.details-form textarea {
  min-height: 56px;
  border: 1px solid rgba(7, 8, 16, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 250, 0.9);
  padding: 0 16px;
  color: var(--ink);
  font-size: 17px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -1px 0 rgba(7, 8, 16, 0.03);
}

.details-form textarea {
  min-height: 128px;
  padding: 15px 16px;
  line-height: 1.35;
}

.details-form input:focus,
.details-form select:focus,
.details-form textarea:focus {
  border-color: rgba(16, 34, 255, 0.28);
}

.details-form input:invalid:not(:focus):not(:placeholder-shown),
.details-form textarea:invalid:not(:focus):not(:placeholder-shown),
.details-form select:invalid:not(:focus) {
  border-color: rgba(198, 47, 47, 0.36);
}

.split-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.secondary-button {
  min-width: 112px;
  background: rgba(255, 255, 250, 0.78);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.modal-actions button {
  min-width: 148px;
  min-height: 48px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 16px;
}

.modal-actions .secondary-button {
  min-width: 112px;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

button[hidden] {
  display: none;
}

@media (max-width: 820px) {
  .page {
    width: min(100% - 28px, 620px);
    padding-top: 20px;
  }

  .hero {
    min-height: calc(100svh - 96px);
    padding: 42px 0 28px;
  }

  h1 {
    font-size: clamp(44px, 11.5vw, 62px);
    line-height: 0.96;
  }

  .lede {
    max-width: 520px;
    font-size: 18px;
    line-height: 1.32;
  }

}

@media (max-width: 520px) {
  .page {
    width: min(100% - 24px, 420px);
    padding: 18px 0 28px;
  }

  .nav {
    justify-content: center;
  }

  .brand span {
    font-size: 17px;
  }

  h1 {
    font-size: clamp(40px, 11.2vw, 48px);
  }

  .lede {
    margin-top: 18px;
    font-size: 17px;
  }

  .waitlist {
    margin-top: 28px;
  }

  .field-row {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 8px;
  }

  input {
    min-height: 48px;
  }

  button {
    min-height: 48px;
    width: 100%;
  }

  #form-note {
    max-width: 300px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 12px;
  }

  .modal {
    max-height: calc(100svh - 24px);
    border-radius: 22px;
    padding: 22px;
  }

  .modal h2 {
    font-size: 28px;
  }

  .split-fields,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    display: grid;
  }
}
