/* CapPo's web pages: one stylesheet, no web fonts, no scripts, nothing loaded from anywhere else. */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1b1a19;
  --muted: #5f5b57;
  --line: #e4e0db;
  --accent: #8c2a2a;
  --accent-soft: #f6ecea;
  --code-bg: #f1eeea;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --surface: #1f1e1c;
    --text: #ecebe9;
    --muted: #a8a39e;
    --line: #34312e;
    --accent: #e39a92;
    --accent-soft: #2c2120;
    --code-bg: #2a2826;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

code {
  font: 0.9em/1.4 "Cascadia Mono", Consolas, ui-monospace, monospace;
  background: var(--code-bg);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* Header and footer */

.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 56px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px;
}
.brand img { width: 28px; height: 28px; }
.site-header nav { display: flex; gap: 20px; font-size: 15px; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0 40px;
  color: var(--muted); font-size: 14px;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer a { color: var(--muted); }
.site-footer .motto { font-style: italic; }

/* Logo that follows the theme: black on light, white on dark. */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: inline; }
}

/* Landing page */

.hero { padding: 56px 0 24px; text-align: center; }
.hero img { width: 120px; height: 120px; }
.hero h1 { font-size: 44px; line-height: 1.1; margin: 8px 0 4px; letter-spacing: -0.5px; }
.hero .opener { font-size: 20px; font-style: italic; color: var(--muted); margin: 0 0 20px; }
.hero .pitch { font-size: 22px; line-height: 1.45; margin: 0 auto 28px; max-width: 600px; }
.hero .places { color: var(--muted); white-space: nowrap; }

/* CapPo, and the "Cap" and "Po" in Captive Portals: where the name comes from. Semibold, to stand out from the
   text around it without shouting. */
.cp { font-weight: 600; }

.buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-block; padding: 10px 20px; border-radius: 8px;
  font-weight: 600; text-decoration: none; border: 1px solid var(--accent);
}
.button.primary { background: var(--accent); color: var(--bg); }
.button.secondary { color: var(--accent); }
.button.soon { border-color: var(--line); color: var(--muted); cursor: default; }
.button.soon small { font-weight: 400; }

section { margin-top: 48px; }
h2 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; letter-spacing: -0.2px; }
h3 { font-size: 18px; margin: 24px 0 4px; }

.choices { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 10px; }
.choices li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px;
}
.choices strong { display: block; }

.callout {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0;
}

.points { padding-left: 20px; }
.points li { margin: 8px 0; }

.table-scroll { overflow-x: auto; margin: 16px 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }
thead th { border-bottom: 2px solid var(--line); }

/* Text pages (privacy, support) */

.page h1 { font-size: 34px; line-height: 1.2; margin: 48px 0 4px; }
.page .updated { color: var(--muted); margin: 0 0 24px; }
.page h2 { margin-top: 36px; font-size: 22px; }
.page li { margin: 6px 0; }

.faq dt { font-weight: 600; margin-top: 18px; }
.faq dd { margin: 4px 0 0; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 36px; }
  .hero .pitch { font-size: 19px; }
  .hero .places { white-space: normal; }
  .site-header nav { gap: 14px; }
}
