/* Seeding site, shared base. Colors are the app's Sage & Moss tokens (src/constants/palette.ts).
   The landing page adds home.css on top. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("assets/fonts/nunito-var.woff2") format("woff2-variations"), url("assets/fonts/nunito-var.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --bg: #F4F6F1;
  --surface: #FFFFFF;
  --subtle: #EBEFE6;
  --border: #E1E7DA;
  --fg: #1B2418;
  --body: #3B4638;
  --muted: #637060;
  --primary: #3A7D4C;
  --primary-ink: #2F6A3F;
  --primary-soft: #E2EDDC;
  --on-primary: #FFFFFF;
  --frame: #1B2418;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --emoji: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

/* Dark is the default (data-theme on <html>); the landing page's toggle can save light. The media query only
   matters if the attribute is ever missing */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D120D;
    --surface: #161D16;
    --subtle: #1E271E;
    --border: #253025;
    --fg: #E7EDE3;
    --body: #C2CCBE;
    --muted: #95A391;
    --primary: #7FC48F;
    --primary-ink: #8FD09E;
    --primary-soft: #1C2E20;
    --on-primary: #0D1A10;
    --frame: #2B362B;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0D120D;
  --surface: #161D16;
  --subtle: #1E271E;
  --border: #253025;
  --fg: #E7EDE3;
  --body: #C2CCBE;
  --muted: #95A391;
  --primary: #7FC48F;
  --primary-ink: #8FD09E;
  --primary-soft: #1C2E20;
  --on-primary: #0D1A10;
  --frame: #2B362B;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 1.125rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--primary-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { color: var(--fg); font-weight: 800; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); line-height: 1.04; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); line-height: 1.12; letter-spacing: -0.015em; }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Header and footer */

.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.site-header nav a { font-weight: 600; font-size: 1rem; }

.site-footer { border-top: 1px solid var(--border); margin-top: 96px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; padding-top: 28px; padding-bottom: 40px; font-size: 0.9375rem; color: var(--muted); }
.site-footer .note { flex-basis: 100%; }
.site-footer a { color: var(--body); }

/* Buttons */

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  background: var(--primary); color: var(--on-primary);
  font-weight: 800; font-size: 1.0625rem; text-decoration: none;
  transition: filter 120ms ease;
}
.btn:hover { filter: brightness(1.08); }
.actions .small { font-size: 0.9375rem; color: var(--muted); }

/* Phone frame around real app screenshots */

.phone {
  width: 100%; max-width: 280px;
  padding: 7px; border-radius: 40px;
  background: var(--frame);
  box-shadow: 0 30px 60px -30px rgb(27 36 24 / 0.45);
}
.phone img { width: 100%; border-radius: 33px; aspect-ratio: 9 / 20; object-fit: cover; }

/* Privacy policy page */

.policy .wrap { max-width: 760px; padding-top: 40px; }
.policy h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
.policy .updated { margin-top: 10px; color: var(--muted); font-size: 1rem; }
.policy .summary { margin-top: 32px; padding: 20px 24px; border-radius: 16px; background: var(--primary-soft); color: var(--fg); }
.policy h2 { font-size: 1.5rem; margin-top: 48px; }
.policy h2 + p, .policy h2 + ul { margin-top: 12px; }
.policy p + p, .policy p + ul, .policy ul + p { margin-top: 12px; }
.policy ul { padding-left: 1.25em; margin-bottom: 0; }
.policy li + li { margin-top: 6px; }
.policy strong { color: var(--fg); font-weight: 800; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
}
