:root {
  --bg: #FAF9F6;
  --navy: #1B2A4A;
  --coral: #D4654A;
  --coral-hover: #C05A42;
  --slate: #5A6B7F;
  --teal: #3D5A80;
  --success: #3A7D44;
  --error: #C0392B;
  --info: var(--teal);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--navy);
  min-height: 100vh;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* --- Header --- */

header {
  padding: 2.5rem 0 0;
}

.wordmark {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--navy);
  user-select: none;
}

/* --- Main --- */

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
}

h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin-bottom: 3rem;
  max-width: 720px;
}

/* --- Waitlist Form --- */

.waitlist {
  width: 100%;
  max-width: 480px;
}

.form-row {
  display: flex;
  gap: 0;
  border: 2px solid rgba(27, 42, 74, 0.15);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
  background: #fff;
}

.form-row:focus-within {
  border-color: var(--teal);
}

input[type="email"] {
  flex: 1;
  padding: 0.9rem 1.2rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--navy);
  border: none;
  outline: none;
  background: transparent;
  min-width: 0;
}

input[type="email"]::placeholder {
  color: var(--slate);
  opacity: 0.6;
}

button[type="submit"] {
  padding: 0.9rem 1.6rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--coral);
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  position: relative;
}

button[type="submit"]:hover {
  background: var(--coral-hover);
}

button[type="submit"]:active {
  transform: scale(0.98);
}

button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-sending {
  display: none;
}

button.sending .btn-text {
  display: none;
}

button.sending .btn-sending {
  display: inline;
}

/* --- Message --- */

.message {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 1.4em;
  transition: opacity 0.2s ease;
}

.message.success {
  color: var(--success);
}

.message.error {
  color: var(--error);
}

.message.info {
  color: var(--info);
}

/* --- Footer --- */

footer {
  padding: 2rem 0;
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--slate);
  opacity: 0.6;
}

/* --- Responsive --- */

@media (max-width: 540px) {
  .form-row {
    flex-direction: column;
    border-radius: 8px;
  }

  input[type="email"] {
    border-bottom: 1px solid rgba(27, 42, 74, 0.1);
  }

  button[type="submit"] {
    border-radius: 0 0 6px 6px;
  }

  h1 {
    margin-bottom: 2.5rem;
  }
}
