/* ==========================================================================
   Leafturn — site styles
   Look-and-feel follows the Leafturn design system ("Ember" palette).
   Tokens below mirror the design system's tokens/*.css; restyle by editing
   this block (and the fonts) only.
   ========================================================================== */

/* Cabinet Grotesk — the brand face, used for headings and the wordmark only.
   Self-hosted (fonts/, licence in fonts/FFL.txt); only weight 800 is used. */
@font-face {
  font-family: "Cabinet Grotesk";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("fonts/CabinetGrotesk-Extrabold.woff2") format("woff2");
}

:root {
  /* Ember palette */
  --lt-deep: #3D2817;      /* espresso ink */
  --lt-rust: #B5471D;      /* primary brand colour */
  --lt-amber: #E9A23B;     /* accent / CTA */
  --lt-parchment: #F2DFC0; /* soft fill */
  --lt-paper: #FAF3E7;     /* app background */
  --lt-ink-rgb: 61, 40, 23;

  /* Colour */
  --bg: var(--lt-paper);
  --surface: #ffffff;
  --surface-soft: var(--lt-parchment);
  --text: var(--lt-deep);
  --muted: rgba(var(--lt-ink-rgb), 0.60);
  --accent: var(--lt-rust);
  --accent-contrast: var(--lt-paper);
  --cta: var(--lt-amber);
  --cta-contrast: var(--lt-deep);
  --border: rgba(var(--lt-ink-rgb), 0.10);

  /* Elevation — warm-tinted, never pure black */
  --shadow-card: 0 6px 18px -10px rgba(60, 35, 15, 0.30);
  --shadow-icon: 0 10px 22px rgba(60, 35, 15, 0.25);

  /* Type */
  --font-body: -apple-system, BlinkMacSystemFont, system-ui,
    "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Cabinet Grotesk", var(--font-body);

  /* Shape & rhythm */
  --radius: 18px;      /* cards */
  --radius-xl: 22px;   /* banners */
  --radius-pill: 999px;
  --content-width: 42rem;
  --wide-width: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lt-paper-rgb: 250, 243, 231;
    --bg: color-mix(in oklab, var(--lt-deep) 72%, black);
    --surface: color-mix(in oklab, var(--lt-deep) 94%, var(--lt-paper));
    --surface-soft: color-mix(in oklab, var(--lt-deep) 80%, var(--lt-paper));
    --text: var(--lt-paper);
    --muted: rgba(var(--lt-paper-rgb), 0.62);
    --accent: color-mix(in oklab, var(--lt-rust) 55%, var(--lt-amber));
    --accent-contrast: var(--lt-deep);
    --border: rgba(var(--lt-paper-rgb), 0.10);
    --shadow-card: 0 6px 18px -10px rgba(0, 0, 0, 0.55);
    --shadow-icon: 0 10px 22px rgba(0, 0, 0, 0.5);
  }
}

/* --- 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);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.03em; }
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-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.wordmark:hover { text-decoration: none; color: var(--text); }

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

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

.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;
}

/* The app icon, shown at App Store fidelity — squircle is baked into the
   SVG, so the shadow follows its alpha via drop-shadow. */
.hero .app-icon {
  width: 96px;
  height: 96px;
  filter: drop-shadow(var(--shadow-icon));
  margin-bottom: 1.75rem;
}

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

.badge {
  display: inline-block;
  background: var(--surface-soft);
  border-radius: var(--radius-pill);
  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-radius: var(--radius);
  box-shadow: var(--shadow-card);
  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(--cta);
  color: var(--cta-contrast);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.privacy-callout {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  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; }
