/* circapp.io. One stylesheet, the dashboard's colour tokens and fonts, so
   the site and the product read as one thing. System fonts only: the site
   loads nothing from anyone else (src/index.js → content security policy). */

:root {
  --plane: #f2f4f7;
  --surface: #ffffff;
  --ink: #141820;
  --ink-2: #4a5360;
  --muted: #646d7b;
  --line: #e2e6eb;
  --accent: #256abf;
  --accent-strong: #1c5cab;
  --accent-wash: rgba(37, 106, 191, 0.10);
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 6px;
  --measure: 66ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --plane: #0d1015; --surface: #151920; --ink: #edf0f4; --ink-2: #b9c1cc; --muted: #8f98a6;
    --line: #252b35; --accent: #5598e7; --accent-strong: #86b6ef; --accent-wash: rgba(85, 152, 231, 0.16);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
/* On html too, so the colour reaches past the footer when the page is
   shorter than the window, or the browser overscrolls. */
html, body { background: var(--plane); }
body { color: var(--ink); font-family: var(--font-ui); font-size: 17px; line-height: 1.6; }
a { color: var(--accent-strong); text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
code { font-family: var(--font-mono); font-size: 0.88em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header and footer */
.top { border-bottom: 1px solid var(--line); background: var(--surface); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; }
.brand b { font-family: var(--font-mono); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.brand span { color: var(--muted); font-size: 13px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
.nav a[aria-current="page"] { color: var(--accent-strong); font-weight: 600; }

.foot { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.foot p { margin: 0 0 8px; max-width: var(--measure); }
.foot a { color: var(--ink-2); }
/* Text pages end on their last paragraph, so the footer needs its own gap. */
.page + .foot { margin-top: 72px; }

/* Type */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(34px, 6vw, 54px); margin: 0 0 18px; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3.6vw, 34px); margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lede { font-size: clamp(18px, 2.3vw, 21px); color: var(--ink-2); max-width: 40em; }
.eyebrow { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 14px; }
.intro { color: var(--ink-2); max-width: var(--measure); margin-bottom: 28px; }
/* A text page: lines kept to a readable measure, left-aligned with the header. */
.prose > * { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.prose h2 { margin-top: 44px; }
.prose h3 { margin-top: 28px; }
.muted { color: var(--muted); }

/* Sections: one rhythm for the whole page */
.hero { padding: 64px 0 56px; }
.section { padding: 56px 0; }
@media (min-width: 860px) { .hero { padding: 88px 0 72px; } .section { padding: 80px 0; } }
.section + .section { border-top: 1px solid var(--line); }
/* The privacy section stands apart: a different surface, edge to edge. */
.band { background: var(--surface); border-bottom: 1px solid var(--line); }
.page { padding: 48px 0 0; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 10px 18px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
@media (prefers-color-scheme: dark) { .btn.primary { color: #0d1015; } }
.more { font-weight: 600; text-decoration: none; }
.more::after { content: " →"; }
.more:hover { text-decoration: underline; }
.more-line { margin: 28px 0 0; }

/* The three pillars, straight after the hero: one row, or one column. */
.pillars-section { padding-top: 0; }
.pillars { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 860px) { .pillars { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.pillar { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px 26px; }
.pillar h2 { font-size: 23px; margin: 6px 0 10px; }
.pillar p { color: var(--ink-2); font-size: 16px; }
.pillar .more { margin-top: auto; font-size: 15px; }
.kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

/* The questions: one, two or three across, so six cards always fill their rows. */
.cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 620px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { font-size: 19px; }
.card p { margin: 0; color: var(--ink-2); font-size: 16px; }
.card .opt { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Points: one column, or two of even length. */
.points { display: grid; gap: 4px 48px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .points { grid-template-columns: repeat(2, 1fr); } }
.points li { padding: 12px 0 12px 24px; position: relative; color: var(--ink-2); }
.points li::before { content: ""; position: absolute; left: 0; top: 22px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--accent); }
.points b { color: var(--ink); font-weight: 600; }

/* Dashboard screenshots (scripts/demo/screenshots.js) */
.shot { margin: 0; }
.shot img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 2px rgba(20, 24, 32, 0.06), 0 12px 32px rgba(20, 24, 32, 0.08); }
.shot .zoom { display: block; cursor: zoom-in; border-radius: var(--radius); }
/* Full size over the page, with no script: a screenshot links to its
   overlay's id, and the overlay links away again, so :target shows it. */
.lightbox { display: none; position: fixed; inset: 0; z-index: 10; padding: 24px; align-items: center; justify-content: center; background: rgba(13, 16, 21, 0.85); cursor: zoom-out; }
.lightbox:target { display: flex; }
.lightbox img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 48px); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
.shot figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.hero-shot { margin-top: 48px; }
.hero-shot figcaption, .gallery-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }

/* Which screenshot shows: each has a light and a dark image, and only the
   one shown is downloaded (loading="lazy"). The reader's own theme, unless
   the switch picks one. */
.theme-light { display: block; }
.theme-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .theme-light { display: none; }
  .theme-dark { display: block; }
}
body:has(#shots-light:checked) .theme-light, body:has(#shots-dark:checked) .theme-dark { display: block; }
body:has(#shots-light:checked) .theme-dark, body:has(#shots-dark:checked) .theme-light { display: none; }

/* The switch: three labels for three radio buttons, kept out of sight but
   reachable by keyboard. Fixed in the viewport, because selecting a label
   focuses its button, and a button scrolled out of view would pull the
   page back up to it. */
.theme-inputs { position: fixed; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.theme-pick { display: inline-flex; flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); font-size: 13px; }
.theme-pick label { padding: 3px 11px; cursor: pointer; color: var(--ink-2); }
.theme-pick label + label { border-left: 1px solid var(--line); }
.theme-pick label:hover { color: var(--ink); }
body:has(#shots-auto:checked) label[for="shots-auto"],
body:has(#shots-light:checked) label[for="shots-light"],
body:has(#shots-dark:checked) label[for="shots-dark"] { background: var(--accent-wash); color: var(--accent-strong); font-weight: 600; }
body:has(#shots-auto:focus-visible) label[for="shots-auto"],
body:has(#shots-light:focus-visible) label[for="shots-light"],
body:has(#shots-dark:focus-visible) label[for="shots-dark"] { outline: 2px solid var(--accent); outline-offset: -2px; }
/* A browser without :has() can't follow the switch, so it doesn't see one;
   its screenshots follow the reader's theme. */
@supports not selector(:has(*)) { .theme-pick { display: none; } }
/* The story on the left, the other two stacked beside it; one column on a phone. */
.gallery-head { margin: 56px 0 20px; }
.gallery-head h3 { font-size: 22px; margin: 0; }
.gallery { display: grid; gap: 28px; }
@media (min-width: 860px) {
  .gallery { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .gallery .wide { grid-row: span 2; }
}

/* Steps, with pricing beside them */
.start { display: grid; gap: 32px; }
@media (min-width: 860px) { .start { grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; } }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; position: relative; padding-left: 46px; color: var(--ink-2); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-wash); color: var(--accent-strong); font-weight: 600; display: grid; place-items: center; font-size: 15px; }
.steps b { color: var(--ink); }

.contact { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.contact h2 { font-size: 24px; margin-bottom: 10px; }
.contact p { color: var(--ink-2); margin-bottom: 20px; }
/* Pages that end on the contact box (How it works) need a gap above it. */
.prose .contact { margin-top: 44px; }

/* Data inventory on How it works */
.table-scroll { overflow-x: auto; margin: 0 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { font-weight: 600; color: var(--ink-2); font-size: 14px; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }
