:root {
  --cream: #fbf3ea;
  --card: #fffaf5;
  --ink: #3f2a24;
  --ink-soft: #7a5f55;
  --peach: #f2b48f;
  --clay: #e8744a;
  --clay-dark: #c85a33;
  --night: #2e3a86;
  --night-soft: #5864b8;
  --line: #ecd9c9;
  --ok: #3f7d4f;
  --err: #b4412b;
  --radius: 22px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--clay-dark); }
img { display: block; max-width: 100%; }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero picture img {
  width: 100%;
  height: auto;
  aspect-ratio: 780 / 1320;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 62%, transparent 100%);
}
.hero-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 24px 8px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 245, 0.78);
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
h1 {
  margin: 0;
  font-size: clamp(40px, 11vw, 76px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tagline {
  margin: 10px auto 0;
  max-width: 30ch;
  font-size: clamp(19px, 5vw, 24px);
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- content ---------- */
main { padding: 0 16px 48px; }
.wrap { max-width: 640px; margin: 0 auto; }

.card {
  margin: 28px auto 0;
  padding: 24px 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px -18px rgba(90, 50, 30, 0.35);
}
.card h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.card p.sub { margin: 0 0 16px; color: var(--ink-soft); font-size: 16px; }

form.waitlist { display: flex; flex-direction: column; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 10px; }
input[type="email"] {
  width: 100%;
  padding: 15px 16px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.15s;
}
input[type="email"]:focus { border-color: var(--peach); }
button {
  appearance: none;
  border: 0;
  padding: 15px 22px;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(180deg, var(--clay) 0%, var(--clay-dark) 100%);
  border-radius: 14px;
  box-shadow: 0 4px 0 #a9472a, 0 8px 18px -8px rgba(200, 90, 51, 0.7);
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s, opacity 0.15s;
}
button:active { transform: translateY(3px); box-shadow: 0 1px 0 #a9472a; }
button[disabled] { opacity: 0.65; cursor: default; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { min-height: 1.4em; margin: 2px 0 0; font-size: 15px; font-weight: 600; }
.msg.err { color: var(--err); }
.fine { margin: 8px 0 0; font-size: 13px; color: var(--ink-soft); }

.done { display: none; text-align: center; padding: 6px 0 2px; }
.done img.big { margin: 0 auto 10px; border-radius: 50%; box-shadow: 0 6px 18px -8px rgba(90, 60, 160, 0.6); }
.done h2 { margin-bottom: 6px; }
.card.joined form.waitlist, .card.joined .before { display: none; }
.card.joined .done { display: block; }

.beats { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 14px; }
.beats li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 16px;
  background: rgba(255, 250, 245, 0.7);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.dot {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 22px;
  background: linear-gradient(135deg, #ffd9bf 0%, #ffd9bf 50%, #c9ccf2 50%, #c9ccf2 100%);
}
.beats h3 { margin: 0 0 2px; font-size: 18px; font-weight: 800; }
.beats p { margin: 0; color: var(--ink-soft); font-size: 16px; }

.closing { margin: 36px 0 0; text-align: center; color: var(--ink-soft); font-size: 16px; }

footer {
  padding: 24px 16px 40px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
}
footer a { color: var(--ink-soft); margin: 0 8px; }

/* ---------- plain pages (privacy, terms, invite, 404) ---------- */
.plain header { padding: 22px 16px 0; }
.plain header a { text-decoration: none; color: var(--ink); font-weight: 800; font-size: 18px; }
.plain header img { display: inline-block; width: 28px; height: 28px; border-radius: 8px; vertical-align: -7px; margin-right: 8px; }
.prose { max-width: 680px; margin: 0 auto; padding: 8px 4px 0; }
.prose h1 { font-size: clamp(32px, 8vw, 44px); margin: 18px 0 6px; }
.prose h2 { font-size: 20px; margin: 28px 0 6px; }
.prose .card h2 { margin-top: 0; }
.prose p, .prose li { color: var(--ink); }
.prose .updated { color: var(--ink-soft); font-size: 15px; margin-top: 0; }
.prose .note {
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.code {
  display: inline-block;
  margin: 6px 0 0;
  padding: 8px 16px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.18em;
  background: #fff;
  border: 2px dashed var(--peach);
  border-radius: 14px;
}

/* ---------- wider screens ---------- */
@media (min-width: 720px) {
  .hero { max-width: 1200px; margin: 0 auto; padding: 20px 20px 0; }
  .hero picture img {
    aspect-ratio: 1440 / 730;
    border-radius: 28px;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
  }
  .hero-text { padding-bottom: 0; }
  .field { flex-direction: row; }
  .field input { flex: 1; }
  .card { padding: 28px 28px 24px; }
  .beats { grid-template-columns: repeat(3, 1fr); }
  .beats li { grid-template-columns: 1fr; }
}

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