/* ─────────────────────────────────────────────────────────────────
   RoohBrew — waitlist landing page
   Warm, quiet, unhurried. Handmade-note energy. Mobile-first.
   (Legal pages use style.css — this file is only for index.html.)
   ───────────────────────────────────────────────────────────────── */

:root {
  --cream:            #FDFAF7;  /* base */
  --stone:            #4A4A4A;  /* body text */
  --stone-muted:      #6f6a64;  /* signature, quiet details */
  --terracotta:       #B8884D;  /* accent */
  --terracotta-dark:  #9d7038;  /* button hover */
  --line:             #ece3da;  /* subtle borders */
  --placeholder:      #b3aaa0;
  --invalid:          #c0562f;

  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--stone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

/* ── 1. Wordmark + tagline ─────────────────────────────────────── */
.brand {
  text-align: center;
  margin-bottom: 56px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--stone);
}
.tagline {
  margin: 12px 0 0;
  color: var(--terracotta);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
}

/* ── 2. Hero line ──────────────────────────────────────────────── */
.hero {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.35;
  margin: 0 0 40px;
}

/* ── 3 & 5. Body prose (wish + frame) ──────────────────────────── */
.wish,
.frame { margin: 0; }
.frame { margin-bottom: 44px; }
.wish p,
.frame p { margin: 0 0 20px; }
.wish p:last-child,
.frame p:last-child { margin-bottom: 0; }

/* ── 4. Animated sentence — the emotional center ───────────────── */
.animated-sentence {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 25px;
  line-height: 1.45;
  color: var(--stone);
  text-align: center;
  margin: 80px 0;
}
.as-line { display: block; }
.phrase-slot {
  display: block;
  position: relative;
  min-height: 1.45em;   /* reserve one line so nothing jumps */
}
/* Phrases are stacked and fade sequentially (out, then in — no overlap).
   Same font/size/weight as the sentence; colored terracotta (the tagline
   accent) so the changing word reads as intentional. */
.phrase {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  white-space: nowrap;
  color: var(--terracotta);
  opacity: 0;
  transition: opacity 420ms ease-in-out;
}
.phrase.is-active { opacity: 1; }

/* ── 6. Waitlist form ──────────────────────────────────────────── */
.waitlist { margin: 0; }
.form-header {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  color: var(--stone);
}
.form-subhead {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--stone-muted);
}
#waitlist-form { margin: 0; }

.email-input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 16px;              /* >=16px avoids iOS zoom-on-focus */
  color: var(--stone);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 150ms ease;
}
.email-input::placeholder { color: var(--placeholder); }
.email-input:focus {
  outline: none;
  border-color: var(--terracotta);
}
.email-input.invalid { border-color: var(--invalid); }

.host-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 22px;
  font-size: 15px;
  color: var(--stone);
  cursor: pointer;
}
.host-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--terracotta);
  cursor: pointer;
}

button[type="submit"] {
  width: 100%;                  /* full-width on mobile */
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--cream);
  background: var(--terracotta);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 150ms ease;
}
button[type="submit"]:hover { background: var(--terracotta-dark); }

.confirmation {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.5;
  color: var(--stone);
}
/* Focused programmatically for screen readers (aria-live announces it);
   it's a status message, not a control, so no visible focus ring. */
.confirmation:focus { outline: none; }

/* ── 7. Founder signature ──────────────────────────────────────── */
.signature {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 72px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--stone-muted);
}
.founder-photo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  /* placeholder look (flat, no gradient) */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #efe3d5;
  color: var(--terracotta);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
}
.sig-text .name { color: var(--stone); font-weight: 500; }
.signature a {
  color: var(--terracotta);
  text-decoration: none;
  white-space: nowrap;
}
.signature a:hover { text-decoration: underline; }

/* ── Accessibility helper ──────────────────────────────────────── */
.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;
}

/* No animation for users who prefer reduced motion (JS also honors this) */
@media (prefers-reduced-motion: reduce) {
  .phrase { transition: none; }
}

/* ── Desktop ───────────────────────────────────────────────────── */
@media (min-width: 700px) {
  .page { padding: 96px 24px; }
  .wordmark { font-size: 52px; }
  .hero { font-size: 30px; }
  .animated-sentence { font-size: 32px; margin: 104px 0; }
  button[type="submit"] { width: auto; min-width: 180px; }
}
