/* ==========================================================================
   Leafturn — site styles
   All look-and-feel lives in the tokens below. When the design system
   arrives, restyle by editing this block (and the fonts) only.
   ========================================================================== */

:root {
  /* Colour */
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #1f2a24;
  --muted: #5c6b62;
  --accent: #2e7d4f;
  --accent-contrast: #ffffff;
  --border: #e3e1da;

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font-body);

  /* Shape & rhythm */
  --radius: 12px;
  --content-width: 42rem;
  --wide-width: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a17;
    --surface: #1e2420;
    --text: #e8ece9;
    --muted: #9aa8a0;
    --accent: #5fbf8a;
    --accent-contrast: #10241a;
    --border: #2c342f;
  }
}

/* --- Base ----------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: 1.5rem; margin-top: 2.5em; }
h3 { font-size: 1.125rem; margin-top: 1.75em; }

p { margin: 0 0 1em; }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

ul { padding-left: 1.25rem; }
li { margin-bottom: 0.35em; }

/* --- Layout --------------------------------------------------------------- */

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--wide {
  max-width: var(--wide-width);
}

/* --- Header & footer ------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.wordmark {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.wordmark:hover { text-decoration: none; }

.site-nav a {
  color: var(--muted);
  margin-left: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 5rem;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* --- Marketing blocks ------------------------------------------------------ */

.hero {
  padding: 5rem 0 3rem;
  text-align: center;
}

.hero p.lede {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto 2rem;
}

.badge {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.section {
  padding: 3rem 0 0;
}

.section > h2 {
  text-align: center;
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 { margin-top: 0; }
.card p { margin-bottom: 0; color: var(--muted); font-size: 0.95rem; }

.card .step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.privacy-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 3rem;
  text-align: center;
}

.privacy-callout p {
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto;
}

.privacy-callout p:first-of-type { margin-bottom: 0.5em; }

/* --- Prose pages (support, privacy, terms) --------------------------------- */

.prose {
  padding: 3rem 0 0;
}

.prose .page-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: -0.5rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1em 0;
}

.prose th, .prose td {
  text-align: left;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.prose th { color: var(--muted); font-weight: 600; }
