/* Shared styles for stowandscan.com (every page links this). Colors come
   from the app icon: deep blue, bin orange, scan teal. */
:root {
  --bg: #f6f8fa;
  --surface: #ffffff;
  --fg: #16212b;
  --muted: #55636f;
  --line: #dde3e8;
  --accent: #0d7a68;
  --accent-fg: #ffffff;
  --orange: #e8791e;
  --hero-from: #24607f;
  --hero-to: #162840;
  --hero-fg: #ffffff;
  --hero-muted: #cfe2ec;
  --code-bg: #eef2f5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f151b;
    --surface: #17212a;
    --fg: #e5ebf0;
    --muted: #9aa8b3;
    --line: #2a3640;
    --accent: #4fd1b5;
    --accent-fg: #0b1a17;
    --orange: #f59a4a;
    --code-bg: #1f2b35;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f151b;
  --surface: #17212a;
  --fg: #e5ebf0;
  --muted: #9aa8b3;
  --line: #2a3640;
  --accent: #4fd1b5;
  --accent-fg: #0b1a17;
  --orange: #f59a4a;
  --code-bg: #1f2b35;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 700px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 650; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 10px 10px; border-radius: 8px; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); background: var(--code-bg); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); color: var(--hero-fg); }
.hero .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 16px; }
.hero p { color: var(--hero-muted); font-size: 1.15rem; margin: 0 0 24px; }
.hero img { border-radius: 28px; box-shadow: 0 20px 50px rgb(0 0 0 / .35); justify-self: center; width: min(320px, 100%); }
@media (max-width: 720px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 40px; }
  .hero img { width: 180px; grid-row: 1; justify-self: start; border-radius: 22px; }
}

.button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-weight: 600; text-decoration: none; border: 0; font-size: 1rem; cursor: pointer; }
.button.light { background: #fff; color: #162840; }
.button.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.button[aria-disabled="true"] { opacity: .75; cursor: default; }
.buttons { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.small { font-size: .9rem; }
.hero .small { color: var(--hero-muted); margin-top: 12px; }

/* Sections */
main { display: block; }
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--line); }
h1, h2, h3 { line-height: 1.25; }
h2 { font-size: 1.6rem; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.card h3 { margin: 12px 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }
.step { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 700; }
.icon { width: 40px; height: 40px; color: var(--accent); }

/* Text pages (help, privacy, terms, delete account) */
.page { padding: 40px 0 56px; }
.page h1 { font-size: 1.9rem; margin: 0 0 4px; }
.page h2 { font-size: 1.2rem; margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.page li { margin: .35rem 0; }
.muted { color: var(--muted); }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 20px; }
.toc ul { margin: 0; padding-left: 18px; }
.note { background: var(--code-bg); border-radius: 12px; padding: 12px 16px; }
kbd, code { background: var(--code-bg); border-radius: 6px; padding: 1px 6px; font-size: .95em; }

/* Join page */
.code-box { font: 700 clamp(1.8rem, 9vw, 2.6rem) ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .18em; background: var(--surface); border: 2px dashed var(--accent); border-radius: 16px; padding: 16px 20px; display: inline-block; margin: 8px 0 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .92rem; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }
