/* The home page (pages.js homePage). Colors match the app's theme. */
:root {
  --bg: #f4f6f5; --card: #fff; --text: #191c1b; --muted: #57615b; --brand: #1b6b4f; --brand-soft: #d6efe2;
  --on-brand: #fff; --line: #dde4df; --band: #e9f1ec;
}
/* Dark: chosen with the theme button (data-theme), otherwise when the device is set to dark. */
:root[data-theme="dark"] {
    --bg: #101412; --card: #19201c; --text: #e2e8e4; --muted: #9ba79f; --brand: #7fd8b0; --brand-soft: #1f3a2e;
    --on-brand: #06231a; --line: #2a332e; --band: #151c18;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101412; --card: #19201c; --text: #e2e8e4; --muted: #9ba79f; --brand: #7fd8b0; --brand-soft: #1f3a2e;
    --on-brand: #06231a; --line: #2a332e; --band: #151c18;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 19px; text-decoration: none; margin-right: auto; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-weight: 800; }
.top nav { display: flex; align-items: center; gap: 8px; }
.top nav .link { color: var(--text); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.top nav .link:hover { background: var(--band); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--brand); }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.secondary { color: var(--brand); background: transparent; }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, .link:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 20px; }
.hero .lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .signin { margin: 16px 0 0; color: var(--muted); font-size: 15px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: 15px; }
.trust li::before { content: "✓"; color: var(--brand); font-weight: 800; margin-right: 6px; }

/* Phone frame around a screenshot (taken from demo mode) */
.phone { width: min(330px, 100%); margin: 0 auto; padding: 10px; border-radius: 44px; background: #0f1311; box-shadow: 0 30px 60px -20px rgba(16, 40, 30, 0.35); }
.phone img { border-radius: 34px; width: 100%; height: auto; }

/* Sections */
section.block { padding: 72px 0; }
section.band { background: var(--band); }
.head { max-width: 640px; margin: 0 0 40px; }
.head h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 12px; }
.head p { color: var(--muted); margin: 0; font-size: 18px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.card h3 { font-size: 19px; margin: 14px 0 6px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.icon svg { width: 24px; height: 24px; }

.split .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.flip .text { order: 2; }
.split h2 { font-size: clamp(28px, 3.6vw, 38px); line-height: 1.15; margin: 0 0 14px; }
.split p { color: var(--muted); font-size: 18px; margin: 0 0 12px; }
.split ul { padding-left: 20px; color: var(--muted); margin: 0; }

.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.cta { text-align: center; }
.cta h2 { font-size: clamp(28px, 3.6vw, 38px); margin: 0 0 12px; }
.cta p { color: var(--muted); margin: 0 0 28px; font-size: 18px; }
.cta .actions { justify-content: center; }

footer.foot { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 15px; }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; }
footer.foot .wrap span { margin-right: auto; }

@media (max-width: 860px) {
  .hero .wrap, .split .wrap { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .split.flip .text { order: 0; }
  .grid { grid-template-columns: 1fr; }
  .points { grid-template-columns: 1fr; }
  section.block { padding: 56px 0; }
}
@media (max-width: 420px) {
  .top nav .link { padding: 8px; }
  .hero .lead { font-size: 18px; }
  .actions .btn { flex: 1 1 100%; }
}

/* The light/dark button in the top bar (shown once home.js is running). */
.theme { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; color: var(--text); cursor: pointer; }
.theme:hover { background: var(--band); }
.theme svg { width: 22px; height: 22px; }
.theme:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
