:root {
  /* Calm palette — soft sage, warm paper, muted ink */
  --paper: #f4f1ea;
  --paper-2: #ece7dc;
  --sage: #6f8f7d;
  --sage-deep: #4f6f5e;
  --ink: #2e3a35;
  --ink-soft: #5c6b63;
  --line: #ddd6c7;
  --accent: #8aa698;
  --danger: #b06a5e;
  --shadow: 0 18px 50px -28px rgba(46, 58, 53, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% -10%, #fbf8f1 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 120%, #e7efe9 0%, transparent 55%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Ambient aurora — slow-drifting blurred sage blobs behind the card.
   Purely decorative; uses only existing palette tones. No text, no theme change. */
.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aura .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}

.aura .blob-1 {
  width: 46vmax; height: 46vmax;
  top: -12vmax; left: -8vmax;
  background: radial-gradient(circle at 30% 30%, var(--sage), transparent 70%);
  animation: drift-1 26s ease-in-out infinite;
}

.aura .blob-2 {
  width: 40vmax; height: 40vmax;
  bottom: -14vmax; right: -10vmax;
  background: radial-gradient(circle at 60% 40%, var(--accent), transparent 70%);
  animation: drift-2 32s ease-in-out infinite;
}

.aura .blob-3 {
  width: 34vmax; height: 34vmax;
  top: 30%; left: 45%;
  background: radial-gradient(circle at 50% 50%, var(--sage-deep), transparent 70%);
  opacity: 0.35;
  animation: drift-3 38s ease-in-out infinite;
}

@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(6vmax, 4vmax) scale(1.12); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-7vmax, -5vmax) scale(1.08); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-5vmax, 6vmax) scale(1.15); }
}

/* Keep the card and footer above the aura. */
.stage { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .aura .blob { animation: none; }
}

.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 36px;
}

.card {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 56px 48px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-align: center;
  animation: rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-deep);
  background: rgba(111, 143, 125, 0.12);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.12;
  margin: 0 0 20px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.lede {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0 auto 34px;
  max-width: 44ch;
}

.form {
  display: flex;
  gap: 10px;
  margin: 0 auto 14px;
  max-width: 440px;
}

.form input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form input::placeholder { color: #a7a394; }

.form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(138, 166, 152, 0.18);
}

.form button {
  flex: 0 0 auto;
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  color: #fff;
  background: var(--sage-deep);
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
}

.form button:hover { background: #425e4f; }
.form button:active { transform: translateY(1px); }
.form button:disabled { opacity: 0.6; cursor: default; }

.status {
  font-size: 14px;
  min-height: 20px;
  margin: 4px auto 18px;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.status.ok { color: var(--sage-deep); }
.status.err { color: var(--danger); }

.assurances {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #8a938b;
}

.assurances li::before {
  content: "·";
  color: var(--accent);
  margin-right: 8px;
}

/* Success state — replaces the form after a signup. */
.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  margin-top: 6px;
  animation: success-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.success[hidden] { display: none; }

@keyframes success-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.success .check {
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
}

.check-circle {
  stroke: var(--sage-deep);
  stroke-width: 3;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.check-mark {
  stroke: var(--sage-deep);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

/* Drawn only when the panel is shown (.play), so it animates each time. */
.success.play .check-circle {
  animation: draw-circle 0.6s ease-out forwards;
}
.success.play .check-mark {
  animation: draw-mark 0.35s 0.5s ease-out forwards;
}

@keyframes draw-circle {
  to { stroke-dashoffset: 0; }
}
@keyframes draw-mark {
  to { stroke-dashoffset: 0; }
}

.success-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-size: 26px;
  color: var(--ink);
  margin: 0;
}

.success-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 36ch;
  margin: 6px 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .success { animation: none; }
  .success.play .check-circle,
  .success.play .check-mark { animation: none; stroke-dashoffset: 0; }
}

.footer {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 540px;
  text-align: center;
}

.footer .mark {
  font-family: "Fraunces", serif;
  font-size: 15px;
  color: var(--ink);
}

.footer .dot { color: var(--accent); }

.footer .copy {
  flex-basis: 100%;
  margin-top: 6px;
  font-size: 12px;
  color: #9aa39b;
  letter-spacing: 0.02em;
}

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

@media (max-width: 480px) {
  .card { padding: 44px 28px; }
  .form { flex-direction: column; }
  .form button { width: 100%; }
}