/* SatChat marketing site.
   Light by default with a System/Light/Dark switcher, per the house standard.
   Every colour is a token so the dark palette is a redefinition, never a
   second set of rules. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-raised: #ffffff;
  --border: #e4e7ec;
  --text: #101828;
  --text-secondary: #475467;
  --text-muted: #667085;
  --accent: #1d5a8a;
  --accent-hover: #17486e;
  --accent-contrast: #ffffff;
  --radius: 14px;
  --maxw: 1080px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d1117;
  --surface: #131a23;
  --surface-raised: #172029;
  --border: #24303d;
  --text: #e9eef5;
  --text-secondary: #adb9c7;
  --text-muted: #8595a6;
  --accent: #4d94c9;
  --accent-hover: #6aa8d6;
  --accent-contrast: #08131d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1117;
    --surface: #131a23;
    --surface-raised: #172029;
    --border: #24303d;
    --text: #e9eef5;
    --text-secondary: #adb9c7;
    --text-muted: #8595a6;
    --accent: #4d94c9;
    --accent-hover: #6aa8d6;
    --accent-contrast: #08131d;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.theme-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  background: var(--surface);
}
.theme-switch button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.theme-switch button[aria-pressed="true"] {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}

/* Hero */
.hero { padding: 84px 0 64px; text-align: center; }
.hero img.mark { width: 76px; height: 76px; border-radius: 18px; margin-bottom: 26px; }
h1 {
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--text-secondary); max-width: 620px; margin: 0 auto 32px; }

.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-contrast); text-decoration: none; }
.btn-secondary { border-color: var(--border); color: var(--text); background: var(--surface-raised); }
.btn-secondary:hover { text-decoration: none; border-color: var(--text-muted); }
.btn[aria-disabled="true"] { opacity: .55; cursor: default; pointer-events: none; }

.note { font-size: 14px; color: var(--text-muted); margin-top: 18px; }

/* Sections */
section { padding: 64px 0; }
h2 { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.01em; margin: 0 0 10px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.section-lede { color: var(--text-secondary); max-width: 640px; margin: 0 0 32px; }

.grid { display: grid; gap: 18px; grid-template-columns: 1fr; margin-bottom: 8px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { color: var(--text-secondary); margin: 0; font-size: 15px; }
/* Line icons rather than emoji: emoji render differently on every platform and
   drag in a colour palette nobody chose. */
.card .glyph { display: block; margin-bottom: 14px; color: var(--accent); }
.card .glyph svg { width: 24px; height: 24px; display: block; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.panel + .panel { margin-top: 16px; }
.panel p { color: var(--text-secondary); margin: 0; }
.panel p + p { margin-top: 12px; }

.fine { font-size: 14px; color: var(--text-muted); }

/* Legal pages */
.legal { padding: 56px 0 24px; }
.legal h1 { font-size: clamp(30px, 5vw, 40px); text-align: left; }
.legal h2 { font-size: 21px; margin-top: 36px; }
.legal p, .legal li { color: var(--text-secondary); }
.legal table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 15px; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.legal th { color: var(--text); font-weight: 600; }
.updated { color: var(--text-muted); font-size: 14px; }

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  margin-top: 32px;
}
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; color: var(--text); }
.footer-brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer p { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a, .footer-links button {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.footer-links a:hover, .footer-links button:hover { color: var(--text); text-decoration: underline; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
}

/* Consent banner */
.consent {
  position: fixed;
  inset: auto 16px 16px 16px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .16);
  z-index: 50;
}
.consent[hidden] { display: none; }
.consent p { margin: 0 0 14px; font-size: 14px; color: var(--text-secondary); }
.consent .row { display: flex; gap: 10px; flex-wrap: wrap; }
.consent button {
  border-radius: 999px;
  padding: 9px 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.consent button.accept { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

@media (prefers-reduced-motion: no-preference) {
  a, button { transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
}
