/* Grabpaper – shared styles. Mobile-first, system fonts, one accent colour. */

:root {
  --accent: #0f766e;
  --accent-hover: #0b5d57;
  --accent-soft: #e6f2f1;
  --text: #1a1a1a;
  --muted: #5b6370;
  --bg: #ffffff;
  --surface: #f6f7f8;
  --border: #e2e5e9;
  --radius: 10px;
  --max: 960px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.wordmark {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  min-height: 44px;
}

.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn-small { padding: 8px 14px; min-height: 36px; font-size: 0.9rem; }

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0 64px;
  text-align: left;
}

.hero h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.subhead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 36em;
}

.note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 12px;
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- Sections ---------- */

section { padding: 56px 0; }

section.alt { background: var(--surface); }

h2 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.section-lead {
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 40em;
}

/* ---------- How it works ---------- */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  counter-reset: step;
}

.steps li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 12px;
}

.steps h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.steps p { margin: 0; color: var(--muted); }

/* ---------- Audience cards ---------- */

.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); }

/* ---------- Waitlist form ---------- */

.waitlist {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 28px 20px;
}

.waitlist h2 { margin-bottom: 8px; }

form.waitlist-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.field { display: grid; gap: 6px; }

.field label {
  font-weight: 600;
  font-size: 0.95rem;
}

.field input {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #c5ccd4;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  min-height: 44px;
  width: 100%;
}

.field input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(15, 118, 110, 0.2);
  outline-offset: 0;
}

.form-fine {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  font-size: 0.95rem;
  color: var(--muted);
}

.site-footer .container { display: grid; gap: 16px; }

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer p { margin: 0; }

/* ---------- Legal pages ---------- */

.legal {
  padding: 40px 0 64px;
}

.legal h1 {
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.legal .updated { color: var(--muted); margin: 0 0 32px; }

.legal h2 {
  font-size: 1.2rem;
  margin: 36px 0 10px;
}

.legal p, .legal li { max-width: 44em; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }

.back-link { display: inline-block; margin-bottom: 24px; font-size: 0.95rem; }

/* ---------- Wider screens ---------- */

@media (min-width: 640px) {
  .hero { padding: 88px 0 96px; }
  .hero h1 { font-size: 2.8rem; }
  .subhead { font-size: 1.2rem; }
  h2 { font-size: 2rem; }
  .steps, .cards { grid-template-columns: repeat(3, 1fr); }
  .waitlist { padding: 40px; }
  form.waitlist-form { grid-template-columns: 1fr 1fr; }
  form.waitlist-form .field-full,
  form.waitlist-form .btn,
  form.waitlist-form .form-fine { grid-column: 1 / -1; }
  .legal h1 { font-size: 2.2rem; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}

/* ---------- Motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Dark mode ---------- */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-soft: #0f2d2b;
    --text: #e8eaed;
    --muted: #9aa3ae;
    --bg: #0f1113;
    --surface: #171a1d;
    --border: #2a2f35;
  }
  :root:not([data-theme="light"]) .btn { color: #0f1113; }
  :root:not([data-theme="light"]) .btn:hover { color: #0f1113; }
  :root:not([data-theme="light"]) .field input { background: #0f1113; border-color: #3a4048; }
  :root:not([data-theme="light"]) .step-num { color: #0f1113; }
}

:root[data-theme="dark"] {
  --accent: #2dd4bf;
  --accent-hover: #5eead4;
  --accent-soft: #0f2d2b;
  --text: #e8eaed;
  --muted: #9aa3ae;
  --bg: #0f1113;
  --surface: #171a1d;
  --border: #2a2f35;
}
:root[data-theme="dark"] .btn,
:root[data-theme="dark"] .btn:hover { color: #0f1113; }
:root[data-theme="dark"] .field input { background: #0f1113; border-color: #3a4048; }
:root[data-theme="dark"] .step-num { color: #0f1113; }
