:root {
  --blue: #BFD8FB;
  --brown: #401505;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--blue);
}

body {
  font-family: 'Outfit', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(44px, 8vh, 84px);
  padding: 24px 24px calc(24px + 10vh);
}

/* Brand */

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(26px, 4.5vh, 44px);
}

.wordmark {
  width: clamp(180px, 46vw, 400px);
  height: auto;
  display: block;
  animation: riseIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tagline {
  margin: 0;
  font-weight: 300;
  font-size: clamp(17px, 2.7vw, 23px);
  color: var(--brown);
  text-align: center;
  letter-spacing: 0.005em;
  animation: riseIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

/* Form — shared */

.waitlist-form {
  animation: riseIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.email-input {
  border: none;
  border-bottom: 1px solid rgba(64, 21, 5, 0.55);
  border-radius: 0;
  background: transparent;
  color: var(--brown);
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.email-input::placeholder {
  color: rgba(64, 21, 5, 0.4);
}

.email-input:focus {
  outline: none;
  border-bottom: 1px solid var(--brown);
}

/* Desktop form */

.waitlist-form--desktop {
  display: flex;
  align-items: stretch;
  gap: 18px;
  width: min(440px, 86vw);
}

.waitlist-form--desktop .email-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 2px;
  font-size: clamp(15px, 2.2vw, 17px);
}

.submit-button {
  height: 48px;
  padding: 0 22px;
  border: 1px solid var(--brown);
  border-radius: 2px;
  background: transparent;
  color: var(--brown);
  font-size: clamp(14px, 2.1vw, 16px);
  font-weight: 400;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s ease, color 0.3s ease, opacity 0.3s ease;
}

.submit-button:hover {
  background: var(--brown);
  color: var(--blue);
}

.submit-button:active {
  opacity: 0.85;
}

.submit-button:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Mobile form */

.waitlist-form--mobile {
  position: relative;
  width: min(72vw, 340px);
}

.waitlist-form--mobile .email-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 2px;
  font-size: 16px;
}

.arrow-button {
  position: absolute;
  top: 0;
  right: 0;
  height: 48px;
  width: 40px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--brown);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.arrow-button:hover {
  transform: translateX(3px);
}

.arrow-button:active {
  opacity: 0.7;
}

.arrow-button:disabled {
  opacity: 0.7;
  cursor: default;
}

/* Incentive */

.incentive {
  margin: -22px 0 0 0;
  font-size: clamp(12px, 1.7vw, 14px);
  font-weight: 400;
  color: rgba(64, 21, 5, 0.58);
  text-align: center;
  max-width: 34ch;
  line-height: 1.6;
  animation: riseIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

/* Success */

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  animation: fadeIn 0.8s ease both;
}

.success[hidden] {
  display: none;
}

.success-title {
  margin: 0;
  font-size: clamp(16px, 2.6vw, 19px);
  color: var(--brown);
  letter-spacing: 0.01em;
}

.success-subtitle {
  margin: 0;
  font-weight: 300;
  font-size: clamp(12px, 2vw, 14px);
  color: rgba(64, 21, 5, 0.6);
}

/* Error */

.error {
  margin: -18px 0 0 0;
  font-size: 13px;
  color: rgba(64, 21, 5, 0.7);
  animation: fadeIn 0.4s ease both;
}

/* Responsive: swap desktop/mobile form + scale up the wordmark */

.waitlist-form--mobile {
  display: none;
}

@media (max-width: 600px) {
  .wordmark {
    width: min(80vw, 400px);
  }

  .waitlist-form--desktop {
    display: none;
  }

  .waitlist-form--mobile {
    display: block;
  }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
