:root {
  --potion-cream: #f5efe3;
  --potion-cream-2: #ebe1cd;
  --potion-burgundy: #6e1f2e;
  --potion-burgundy-soft: #8b3a4a;
  --potion-gold: #a4824a;
  --potion-gold-soft: #c4a36a;
  --potion-navy: #0f1e3b;
  --potion-ink: #2a1f1a;
  --potion-ink-dim: #6b5a4a;
  --potion-line: rgba(110, 31, 46, 0.18);
  --potion-error: #b5364b;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: 'Iowan Old Style', 'Palatino', Georgia, 'Times New Roman', serif;
  color: var(--potion-ink);
  background-color: var(--potion-cream);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(164, 130, 74, 0.12) 0%, rgba(164, 130, 74, 0) 55%),
    radial-gradient(circle at 80% 90%, rgba(110, 31, 46, 0.10) 0%, rgba(110, 31, 46, 0) 60%),
    linear-gradient(180deg, var(--potion-cream) 0%, var(--potion-cream-2) 100%);
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

.card {
  width: 100%;
  max-width: 440px;
  background: #fffbf3;
  border: 1px solid var(--potion-line);
  border-radius: var(--radius);
  padding: 36px 28px 28px;
  box-shadow:
    0 20px 60px rgba(42, 31, 26, 0.18),
    0 0 0 1px rgba(164, 130, 74, 0.08) inset;
}

.brand { text-align: center; margin-bottom: 28px; }

.logo {
  width: 180px;
  max-width: 70%;
  height: auto;
  object-fit: contain;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.tagline {
  margin: 8px 0 0;
  color: var(--potion-ink-dim);
  font-size: 14px;
  letter-spacing: 0.02em;
  font-style: italic;
}

form { display: flex; flex-direction: column; gap: 10px; }

label {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 12px;
  color: var(--potion-ink-dim);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 4px;
}

input[type=email] {
  appearance: none;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 17px;
  color: var(--potion-ink);
  background: #fffefa;
  border: 1px solid var(--potion-line);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

input[type=email]::placeholder { color: rgba(107, 90, 74, 0.55); }

input[type=email]:focus {
  border-color: var(--potion-burgundy);
  background: #fffefa;
  box-shadow: 0 0 0 4px rgba(110, 31, 46, 0.12);
}

button[type=submit] {
  margin-top: 14px;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: #fffbf3;
  background: linear-gradient(180deg, var(--potion-burgundy-soft) 0%, var(--potion-burgundy) 100%);
  border: 0;
  border-radius: 12px;
  padding: 15px 18px;
  cursor: pointer;
  box-shadow:
    0 8px 20px rgba(110, 31, 46, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 80ms ease, box-shadow 120ms ease, filter 120ms ease;
}

button[type=submit]:hover { filter: brightness(1.05); }
button[type=submit]:active { transform: translateY(1px); }
button[type=submit]:disabled { filter: grayscale(0.4) brightness(0.9); cursor: progress; }

.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 251, 243, 0.35);
  border-top-color: #fffbf3;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: -3px;
  animation: spin 0.7s linear infinite;
}

button.loading .spinner { display: inline-block; }
button.loading .label { opacity: 0.85; }

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

.disclaimer {
  margin: 14px 2px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.55;
  color: var(--potion-ink-dim);
}

.error {
  margin: 12px 2px 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 13px;
  color: var(--potion-error);
}

footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--potion-line);
  text-align: center;
}
footer p {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 11px;
  color: var(--potion-ink-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.success-state form { display: none; }
.success {
  display: none;
  text-align: center;
  padding: 8px 4px 4px;
}
.success-state .success { display: block; }
.success h2 {
  font-family: 'Iowan Old Style', 'Palatino', Georgia, 'Times New Roman', serif;
  font-size: 26px;
  margin: 0 0 6px;
  color: var(--potion-burgundy);
}
.success p {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  color: var(--potion-ink-dim);
  font-size: 14px;
  margin: 0;
}

@media (max-width: 380px) {
  .card { padding: 28px 20px 22px; }
  .logo { width: 150px; }
}
