/* Better Beta — waitlist landing
   Palette + type mirror the app's "cream/topo" theme (src/theme/tokens.ts). */
:root {
  --paper: #f4ecd8;
  --paper-warm: #ead9b8;
  --sheet: #faf3e1;
  --topo: #c4a878;
  --topo-strong: #8d7048;
  --ink: #3a2e1f;
  --ink-dim: #7e6a48;
  --rust: #b85a2c;
  --rust-deep: #86311a;
  --olive: #7a8c5a;

  --display: "Alfa Slab One", Georgia, serif;
  --body: "Public Sans", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
}

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

html, body { height: 100%; }

body {
  font-family: var(--body);
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 80% -10%, var(--sheet) 0%, var(--paper) 55%, var(--paper-warm) 100%);
  min-height: 100dvh;
  display: flex;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Topo backdrop */
.topo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--topo-strong);
  opacity: 0.14;
  z-index: 0;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  margin: auto;
  width: 100%;
  max-width: 720px;
  padding: clamp(28px, 6vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 6vh, 56px);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: clamp(44px, 8vw, 56px);
  height: auto;
  display: block;
  border-radius: 22%;
  border: 1px solid var(--topo);
}
.brand-name {
  font-family: var(--body);
  font-weight: 800;
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1;
  letter-spacing: -0.4px;
}
.brand-name .b-better { color: var(--ink); }
.brand-name .b-beta { color: var(--rust); }

/* Hero */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(42px, 9vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}
h1 .accent { color: var(--rust); }

.lede {
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 46ch;
  margin-bottom: 32px;
}

/* Form */
.form { margin-bottom: 36px; }

.field {
  display: flex;
  gap: 10px;
  background: var(--sheet);
  border: 1.5px solid var(--topo);
  border-radius: 99px;
  padding: 6px 6px 6px 20px;
  max-width: 480px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field:focus-within {
  border-color: var(--rust);
  box-shadow: 0 0 0 4px rgba(184, 90, 44, 0.12);
}

#email {
  flex: 1;
  border: 0;
  background: transparent;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  min-width: 0;
}
#email::placeholder { color: var(--topo-strong); }
#email:focus { outline: none; }

#submit-btn {
  border: 0;
  cursor: pointer;
  background: var(--rust);
  color: var(--sheet);
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.2px;
  padding: 0 22px;
  height: 46px;
  border-radius: 99px;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.06s ease;
}
#submit-btn:hover { background: var(--rust-deep); }
#submit-btn:active { transform: translateY(1px); }
#submit-btn:disabled { opacity: 0.6; cursor: default; }

.msg {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.4;
  margin-top: 14px;
  min-height: 18px;
  padding-left: 4px;
}
.msg.ok { color: var(--olive); }
.msg.err { color: var(--rust-deep); }

/* Perks */
.perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}
.perks li {
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.perks b {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--rust);
  letter-spacing: 1px;
}

/* Footer */
.foot {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.foot-dot { color: var(--topo); }
.foot a {
  color: var(--rust);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.foot a:hover { border-bottom-color: var(--rust); }

/* Success state */
body.done .field { border-color: var(--olive); }
body.done #submit-btn { background: var(--olive); }

@media (max-width: 480px) {
  .field { flex-direction: column; padding: 14px; border-radius: 18px; }
  #email { padding: 4px 6px; }
  #submit-btn { width: 100%; height: 48px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero { animation: rise 0.5s ease both; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
  }
}
