:root {
  --paper: #f7f2e9;
  --ink: #1b1815;
  --muted: #625c55;
  --line: #c9c0b5;
  --accent: #1e3157;
  --error: #a33a2d;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  display: grid;
  place-items: center;
  background: #111620;
  color: var(--ink);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.waitlist-shell {
  position: relative;
  display: grid;
  grid-template-rows: 11fr 89fr;
  width: min(100%, 430px);
  height: 100dvh;
  margin: 0 auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 90% 8%, rgb(217 101 75 / 7%), transparent 34%),
    var(--paper);
  border-inline: 1px solid rgb(255 255 255 / 8%);
  box-shadow: 0 0 70px rgb(0 0 0 / 42%);
}

.waitlist-logo {
  position: relative;
  z-index: 5;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -35%, rgb(255 255 255 / 92%), transparent 64%),
    var(--paper);
  border-bottom: 1px solid rgb(31 28 24 / 8%);
}

.waitlist-logo img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: clamp(148px, 47vw, 186px);
  height: auto;
  transform: translate(-50%, -51%);
  filter: contrast(1.08);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.waitlist-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding:
    0 max(22px, env(safe-area-inset-right))
    clamp(54px, 10dvh, 94px)
    max(22px, env(safe-area-inset-left));
}

h1 {
  max-width: 420px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(43px, 13vw, 66px);
  font-weight: 620;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.waitlist-copy > p {
  max-width: 410px;
  margin-top: 22px;
  color: var(--muted);
  font-size: clamp(16px, 4.6vw, 19px);
  line-height: 1.48;
  text-wrap: balance;
}

.waitlist-form {
  margin-top: clamp(34px, 7dvh, 58px);
}

.waitlist-controls {
  display: grid;
  gap: 10px;
}

.waitlist-controls input,
.waitlist-controls button {
  width: 100%;
  min-height: 54px;
  border-radius: 0;
  font: 600 15px/1 "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

.waitlist-controls input {
  border: 0;
  border-bottom: 1.5px solid var(--line);
  background: transparent;
  padding: 13px 2px;
  color: var(--ink);
  outline: none;
}

.waitlist-controls input::placeholder {
  color: #817970;
  opacity: 1;
}

.waitlist-controls input:focus {
  border-bottom-color: var(--accent);
}

.waitlist-controls input[aria-invalid="true"] {
  border-bottom-color: var(--error);
}

.waitlist-controls button {
  border: 0;
  background: var(--accent);
  padding: 15px 20px;
  color: #fff;
  cursor: pointer;
  transition: opacity 140ms ease, transform 140ms ease;
}

.waitlist-controls button:active {
  transform: scale(0.99);
}

.waitlist-controls button:disabled {
  cursor: wait;
  opacity: 0.66;
}

.waitlist-error {
  margin-top: 10px;
  color: var(--error);
  font-size: 13px;
  line-height: 1.35;
}

.waitlist-success {
  margin-top: clamp(34px, 7dvh, 58px);
  color: var(--accent);
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(27px, 8vw, 34px);
  font-weight: 620;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.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;
}

[hidden] {
  display: none !important;
}

@media (min-width: 440px) {
  .waitlist-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .waitlist-controls button {
    width: auto;
    min-width: 166px;
  }
}

@media (max-height: 600px) {
  .waitlist-content {
    padding-bottom: 16px;
  }

  .waitlist-form,
  .waitlist-success {
    margin-top: 24px;
  }
}

@media (min-width: 800px) {
  body {
    padding: clamp(16px, 3vw, 34px);
    background:
      radial-gradient(circle at 50% 18%, rgb(46 63 92 / 72%), transparent 48%),
      #10141d;
  }

  .waitlist-shell {
    grid-template-rows: minmax(94px, 14fr) 86fr;
    width: min(100%, 1180px);
    height: min(100%, 820px);
    max-height: calc(100dvh - clamp(32px, 6vw, 68px));
    min-height: 0;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 12%);
    border-radius: 28px;
    box-shadow: 0 30px 100px rgb(0 0 0 / 46%);
  }

  .waitlist-logo img {
    width: clamp(180px, 16vw, 224px);
  }

  .waitlist-content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
    gap: clamp(48px, 7vw, 96px);
    padding: clamp(44px, 7vw, 94px);
  }

  .waitlist-copy {
    align-self: center;
  }

  h1 {
    max-width: 610px;
    font-size: clamp(64px, 6.2vw, 92px);
    line-height: 0.94;
  }

  .waitlist-copy > p {
    max-width: 520px;
    margin-top: 28px;
    font-size: clamp(18px, 1.65vw, 22px);
    line-height: 1.5;
  }

  .waitlist-action {
    position: relative;
    display: grid;
    align-content: center;
    min-height: 360px;
    padding: clamp(34px, 4vw, 54px);
    border-radius: 24px 24px 24px 8px;
    background:
      radial-gradient(circle at 100% 0%, rgb(255 255 255 / 12%), transparent 42%),
      var(--accent);
    color: #fff;
    box-shadow: 12px 14px 0 rgb(169 71 64 / 92%);
  }

  .waitlist-action::before {
    content: "A difficult choice starts with showing up.";
    max-width: 18ch;
    margin-bottom: 28px;
    font-family: "Fraunces", Georgia, serif;
    font-size: clamp(25px, 2.4vw, 34px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
  }

  .waitlist-form,
  .waitlist-success {
    margin-top: 0;
  }

  .waitlist-controls {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .waitlist-controls input,
  .waitlist-controls button {
    min-height: 60px;
    font-size: 16px;
  }

  .waitlist-controls button {
    width: 100%;
    border: 1.5px solid #fffdf8;
    background: #fffdf8;
    color: var(--accent);
  }

  .waitlist-controls input {
    border: 1.5px solid rgb(255 255 255 / 48%);
    background: rgb(255 255 255 / 9%);
    padding-inline: 16px;
    color: #fff;
  }

  .waitlist-controls input::placeholder { color: rgb(255 255 255 / 68%); }

  .waitlist-controls input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgb(255 255 255 / 14%);
  }

  .waitlist-controls button:hover {
    transform: translateY(-2px);
    box-shadow: 4px 5px 0 rgb(8 19 40 / 28%);
  }

  .waitlist-success {
    max-width: 380px;
    color: #fff;
    font-size: clamp(38px, 4vw, 54px);
  }

  .waitlist-error { color: #ffd6cf; }
}

@media (min-width: 800px) and (max-height: 680px) {
  body { padding-block: 12px; }

  .waitlist-shell {
    grid-template-rows: 82px 1fr;
    max-height: calc(100dvh - 24px);
  }

  .waitlist-content { padding-block: 30px; }
  .waitlist-action { min-height: 290px; }
}
