@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/public-sans-variable.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ink: #10271e;
  --cream: #f5f2da;
  --cream-22: rgb(245 242 218 / 22%);
  --cream-40: rgb(245 242 218 / 40%);
  --cream-50: rgb(245 242 218 / 50%);
  --cream-55: rgb(245 242 218 / 55%);
  --danger: #ffb4ab;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--cream);
  font-family: "Public Sans", system-ui, sans-serif;
}

button,
input {
  font: inherit;
}

.page-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 5vw, 64px);
  padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 72px);
}

.intro {
  width: min(94vw, 880px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.intro h1 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(32px, 4.8vw, 60px);
  font-weight: 600;
  letter-spacing: -0.032em;
  line-height: 1.08;
  text-wrap: balance;
}

.intro p {
  max-width: 46ch;
  margin: 0;
  color: var(--cream-55);
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 400;
  line-height: 1.6;
  text-wrap: pretty;
}

.signup-form {
  width: min(94vw, 880px);
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.4vw, 40px);
}

.signup-form[hidden] {
  display: none;
}

.email-row {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
}

.email-field {
  min-width: 0;
  flex: 1 1 240px;
}

.email-field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--cream-22);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--cream);
  padding: 0 12px;
  transition: border-color 150ms ease;
}

.email-field input::placeholder {
  color: var(--cream-40);
  opacity: 1;
}

.email-field input:hover {
  border-color: var(--cream-40);
}

.email-field input:focus {
  border-color: var(--cream);
}

.email-field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.submit-button {
  min-width: 150px;
  height: 46px;
  border: 1px solid var(--cream);
  border-radius: 0;
  background: var(--cream);
  color: var(--ink);
  padding: 0 22px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.submit-button:hover:not(:disabled) {
  border-color: #ebe7c6;
  background: #ebe7c6;
}

.submit-button:active:not(:disabled) {
  transform: translateY(1px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.question {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.question-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--cream-55);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

.question-prompt small {
  color: var(--cream-50);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.question > .tag-list {
  margin-top: 24px;
}

.tag {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.tag input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.tag span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--cream-22);
  border-radius: 0;
  background: transparent;
  color: rgb(245 242 218 / 80%);
  padding: 9px 16px;
  font-size: 15px;
  line-height: 1.2;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}

.tag:hover span {
  border-color: var(--cream-40);
  background: rgb(245 242 218 / 6%);
}

.tag input:checked + span {
  border-color: var(--cream);
  background: var(--cream);
  color: var(--ink);
}

.tag input:focus-visible + span,
.submit-button:focus-visible,
.success-state:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

.question[data-invalid="true"] .tag span {
  border-color: rgb(255 180 171 / 70%);
}

.field-error,
.question-error,
.form-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.field-error {
  display: block;
  min-height: 18px;
  padding-top: 4px;
}

.question-error {
  margin-top: 10px;
  text-align: center;
}

.question-error:empty {
  display: none;
}

.form-error {
  min-height: 20px;
  margin: -16px auto 0;
  text-align: center;
}

.success-state {
  width: min(94vw, 560px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  outline: none;
}

.success-state[hidden] {
  display: none;
}

.success-state > span {
  font-size: 19px;
  font-weight: 500;
}

.success-state p {
  margin: 0;
  color: var(--cream-55);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}

footer {
  color: var(--cream-50);
  font-size: 14px;
}

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

@media (max-width: 520px) {
  .page-shell {
    justify-content: flex-start;
  }

  .email-row {
    align-items: stretch;
  }

  .email-field,
  .submit-button {
    flex-basis: 100%;
    width: 100%;
  }

  .tag span {
    padding-inline: 13px;
    font-size: 14px;
  }

  .question > .tag-list {
    margin-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
