:root {
  --bg: #0e1116;
  --bg-soft: #161b22;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.10);
  --text: #e8eaed;
  --text-dim: #9aa3af;
  --accent: #c9a24b;
  --accent-soft: #e7c878;
  --success: #4ade80;
  --error: #f87171;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  max-width: 120vw;
  background: radial-gradient(circle, rgba(201, 162, 75, 0.18), transparent 65%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.logo {
  width: clamp(96px, 24vw, 128px);
  height: auto;
  filter: drop-shadow(0 6px 24px rgba(201, 162, 75, 0.28));
  margin-bottom: 2px;
}

.badge {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: 999px;
}

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(3rem, 12vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: clamp(1rem, 3.5vw, 1.18rem);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 440px;
}

/* ---------- Form ---------- */
.waitlist-form {
  width: 100%;
  max-width: 460px;
  margin-top: 6px;
}

.field {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field:focus-within {
  border-color: rgba(201, 162, 75, 0.6);
  box-shadow: 0 0 0 4px rgba(201, 162, 75, 0.12);
}

input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  padding: 12px 14px;
  min-width: 0;
}

input[type="email"]::placeholder { color: #6b7280; }

button[type="submit"] {
  position: relative;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  color: #1a1205;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  border-radius: 9px;
  padding: 0 22px;
  min-height: 46px;
  min-width: 116px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, filter 0.2s, opacity 0.2s;
}

button[type="submit"]:hover { filter: brightness(1.05); }
button[type="submit"]:active { transform: scale(0.97); }
button[type="submit"]:disabled { cursor: not-allowed; opacity: 0.75; }

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(26, 18, 5, 0.35);
  border-top-color: #1a1205;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* loading state */
.is-loading .btn-label { display: none; }
.is-loading .btn-spinner { display: block; }

.form-message {
  font-size: 0.9rem;
  margin-top: 12px;
  min-height: 1.2em;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s, transform 0.25s;
}
.form-message.show { opacity: 1; transform: translateY(0); }
.form-message.error { color: var(--error); }
.form-message.success { color: var(--success); }

.reassurance {
  font-size: 0.82rem;
  color: #6b7280;
  margin-top: -8px;
}

/* ---------- Perks ---------- */
.perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  margin-top: 10px;
}

.perks li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.perks span { color: var(--accent); font-size: 0.7rem; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  margin-top: 56px;
  font-size: 0.8rem;
  color: #5b626d;
}

/* ---------- Success state ---------- */
.hero.submitted .waitlist-form,
.hero.submitted .reassurance,
.hero.submitted .tagline,
.hero.submitted .perks,
.hero.submitted .badge {
  display: none;
}

/* ---------- Thank-you confirmation ---------- */
/* Hidden by default; only revealed once the hero has the .submitted class. */
.thank-you {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 440px;
}

.hero.submitted .thank-you {
  display: flex;
  animation: rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.thank-you .check {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #1a1205;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  box-shadow: 0 8px 28px rgba(201, 162, 75, 0.35);
}

.thank-you h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  letter-spacing: -0.01em;
  color: var(--text);
}

.thank-you p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.thank-you-sign {
  color: var(--accent-soft) !important;
  font-weight: 500;
}

@media (max-width: 480px) {
  .field { flex-direction: column; }
  button[type="submit"] { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; }
}
