/* RSVPlea public marketing + legal site.
   Self-contained (no external fonts/CDNs) so pages load fast and are never
   blocked by a third party during review. */

:root {
  --bg: #ffffff;
  --fg: #1a1a2e;
  --muted: #5b5b73;
  --brand: #5b4bdb;
  --brand-dark: #4639b0;
  --surface: #f6f5fb;
  --border: #e6e4f0;
  --maxw: 880px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--fg);
  text-decoration: none;
}
.brand .logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #8a7bff);
}
.nav a {
  margin-left: 18px;
  text-decoration: none;
  font-weight: 500;
  color: var(--muted);
}
.nav a:hover { color: var(--brand); }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 16px;
}
.btn:hover { background: var(--brand-dark); color: #fff; }

/* Hero */
.hero {
  text-align: center;
  padding: 72px 0 48px;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.15;
  margin: 0 0 16px;
}
.hero p.lead {
  font-size: 20px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 28px;
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 0 8px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

/* Generic section */
.section { padding: 40px 0; }
.section h2 { font-size: 28px; margin: 0 0 16px; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); }

.steps { counter-reset: step; padding-left: 0; list-style: none; }
.steps li {
  position: relative;
  padding: 8px 0 8px 44px;
  margin: 0;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Legal / long-form pages */
.legal { padding: 48px 0; }
.legal h1 { font-size: 32px; margin: 0 0 6px; }
.legal .effective { color: var(--muted); margin: 0 0 28px; }
.legal h2 { font-size: 22px; margin: 32px 0 10px; }
.legal h3 { font-size: 18px; margin: 22px 0 8px; }
.legal p, .legal li { color: #333; }
.legal a { word-break: break-word; }

/* Contact form */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
.form-row textarea { min-height: 140px; resize: vertical; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 0;
  margin-top: 48px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .links a {
  margin-right: 16px;
  text-decoration: none;
  color: var(--muted);
}
.site-footer .links a:hover { color: var(--brand); }
.site-footer .legal-name { margin-top: 12px; }

@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .nav a { margin-left: 12px; font-size: 14px; }
}

/* Dark mode — follows the OS setting, matching the app (ThemeMode.system).
   Mirrors the app's dark palette (see app/lib/ui/theme/app_colors.dart). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0e17;
    --fg: #eceaf6;
    --muted: #a6a3bc;
    --surface: #1c1a29;
    --border: #2c2a3a;
    /* Brand used as a *surface* that holds white text (buttons, step numbers,
       logo). Kept dark enough for AA-contrast white text. */
    --brand: #6a5ae0;
    --brand-dark: #574ac0;
  }

  /* Links/accents use a brighter violet for contrast against the dark bg. */
  a { color: #a594ff; }
  a:hover { color: #b9acff; }
  .nav a:hover,
  .site-footer .links a:hover { color: #a594ff; }

  /* Long-form legal copy (hard-coded #333 in light mode). */
  .legal p, .legal li { color: #c9c6dc; }

  /* Inputs (hard-coded white fill in light mode). */
  .form-row input,
  .form-row textarea {
    background: #16141f;
    color: var(--fg);
    border-color: var(--border);
  }
}
