/* brand tokens: generated by ios/scripts/generate_brand.py */
:root { color-scheme: light dark; --pine: #0e3b2e; --cream: #f1f3ec; --spark: #ff7a59; --spark-strong: #ee5a36; --spark-text: #b8330d; --ink: #141416; --paper: #f5f5f2; --indigo-deep: #222858; --indigo-vivid: #9babfc; --indigo-tint: #e7ecfe; --indigo-strong: #4d57b7; --indigo-on-deep: #f5f5f2; --indigo-on-vivid: #141416; --indigo-on-tint: #141416; --amber-deep: #3e2a01; --amber-vivid: #e3a41a; --amber-tint: #f9ebd3; --amber-strong: #815c0b; --amber-on-deep: #f5f5f2; --amber-on-vivid: #141416; --amber-on-tint: #141416; --teal-deep: #033633; --teal-vivid: #13cbc3; --teal-tint: #d3f5f2; --teal-strong: #07726e; --teal-on-deep: #f5f5f2; --teal-on-vivid: #141416; --teal-on-tint: #141416; --orchid-deep: #421c45; --orchid-vivid: #e589ea; --orchid-tint: #f9e5fa; --orchid-strong: #8c3f91; --orchid-on-deep: #f5f5f2; --orchid-on-vivid: #141416; --orchid-on-tint: #141416; --bg: #f5f5f2; --surface: #ffffff; --raised: #ecece7; --line: #dcdcd5; --text: #141416; --muted: #5d5d59; --faint: #6a6a65; --accent: #ee5a36; --on-accent: #141416; --accent-text: #b8330d; --brand-surface: #f1f3ec; --on-brand-surface: #0e3b2e; }
@media (prefers-color-scheme: dark) { :root { --bg: #101012; --surface: #1a1a1d; --raised: #242428; --line: #303035; --text: #f5f5f2; --muted: #a9a9a3; --faint: #8e8e89; --accent: #ff7a59; --on-accent: #141416; --accent-text: #ff7a59; --brand-surface: #0e3b2e; --on-brand-surface: #f1f3ec; } }
/* end brand tokens */

/* Sapiva website (docs/website.md). Card colours follow brand/tokens card_role_surface:
   the sample story is a health story, so it uses the teal family. */
:root {
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --card-quiet: var(--teal-tint);
  --on-card-quiet: var(--teal-on-tint);
  --tech: var(--indigo-strong);
  --finance: var(--amber-strong);
  --health: var(--teal-strong);
  --culture: var(--orchid-strong);
}
@media (prefers-color-scheme: dark) {
  :root {
    --card-quiet: var(--teal-deep);
    --on-card-quiet: var(--teal-on-deep);
    --tech: var(--indigo-vivid);
    --finance: var(--amber-vivid);
    --health: var(--teal-vivid);
    --culture: var(--orchid-vivid);
  }
}
@media (min-width: 48rem) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--sans); }
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
a { color: inherit; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 4px; }
img { display: block; max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding-inline: var(--gutter); }
.site-header { padding-block: 20px 8px; }
.site-header a { display: inline-block; }
.site-header img { height: 32px; width: auto; }

/* Home: the headline, then the sample story across the whole window. */
.hero { padding-block: 24px 72px; }
.hero h1 {
  max-width: 12em;
  font: 600 clamp(2.25rem, 1.6rem + 3vw, 4rem)/1.06 var(--serif);
  letter-spacing: -0.012em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.lead { font-size: 1.1875rem; color: var(--muted); max-width: 32rem; margin: 0 0 28px; }
.button, .soon { display: inline-block; border-radius: 999px; font-weight: 600; padding: 14px 24px; }
.button { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.soon { border: 2px solid var(--line); color: var(--muted); padding: 12px 22px; }
.platform { font-size: 15px; color: var(--muted); margin: 12px 0 0; }

/* The sample story: swipe or scroll through it like in the app, no script needed. */
.story {
  /* The first card lines up with the text column; the strip runs to the window's edge. */
  --edge: max(var(--gutter), (100% - 72rem) / 2 + var(--gutter));
  margin: 48px 0 0;
}
.cards {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 4px var(--edge) 16px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.cards > li {
  flex: 0 0 min(74vw, 17.5rem);
  aspect-ratio: 9 / 14;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  padding: 24px 22px 18px;
}
.card-label { font-size: 14px; font-weight: 600; margin: 18% 0 12px; }
.card-text { font: 600 1.3125rem/1.35 var(--serif); margin: 0; }
.card-count { font-size: 13px; margin: auto 0 0; }
.hook, .result { background: var(--teal-vivid); color: var(--teal-on-vivid); }
.hook .card-text { font-size: 1.875rem; line-height: 1.15; }
.method { background: var(--card-quiet); color: var(--on-card-quiet); }
.result .figure { font: 700 2.75rem/1.1 var(--serif); margin: 0 0 8px; }
.caveat { background: var(--raised); color: var(--text); }
.evidence-card { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.evidence-card .card-text { font-family: var(--sans); }
.evidence-card ul { list-style: none; padding: 0; margin: 16px 0 0; color: var(--muted); }
.story figcaption { font-size: 15px; color: var(--muted); margin-top: 4px; }

.dots { display: inline-flex; gap: 5px; margin-right: 10px; vertical-align: 0.05em; }
.dots span { width: 0.7em; height: 0.7em; border-radius: 50%; border: 1.5px solid currentColor; }
.dots .on { background: currentColor; }

/* Home: what the app does, heading on the left. */
.facts { display: grid; gap: 64px; padding-block: 8px 96px; }
.fact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px 56px; }
@media (min-width: 60rem) { .fact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.fact h2 { font: 600 1.75rem/1.2 var(--serif); margin: 0; text-wrap: balance; }
.fact p { margin: 0 0 12px; max-width: 38rem; }
.topics { list-style: none; padding: 0; margin: 4px 0 16px; display: flex; flex-wrap: wrap; gap: 8px 28px; font-weight: 600; }
.topics li::before {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--topic);
}
.topics .tech { --topic: var(--tech); }
.topics .finance { --topic: var(--finance); }
.topics .health { --topic: var(--health); }
.topics .culture { --topic: var(--culture); }
.strengths { margin: 4px 0 0; }
.strengths div { padding-block: 14px; border-top: 1px solid var(--line); }
.strengths dt { font-weight: 600; }
.strengths dd { margin: 4px 0 0; color: var(--muted); max-width: 38rem; }

/* Legal and support pages. */
.doc { max-width: 44rem; padding-block: 24px 96px; }
.doc h1 { font: 600 clamp(2rem, 1.6rem + 1.8vw, 2.75rem)/1.12 var(--serif); margin: 16px 0 8px; }
.doc h2 { font: 600 1.375rem/1.3 var(--serif); margin: 44px 0 12px; }
.doc h3 { font-size: 1.0625rem; margin: 24px 0 8px; }
.doc p, .doc ul, .doc ol { margin: 0 0 14px; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li { margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.brief { background: var(--surface); border-radius: 18px; padding: 20px 24px 8px; margin: 0 0 8px; box-shadow: inset 0 0 0 1px var(--line); }
.table { overflow-x: auto; margin: 8px 0 20px; }
.doc table { border-collapse: collapse; font-size: 15px; min-width: 32rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; }
.doc details { border-bottom: 1px solid var(--line); padding-block: 14px; }
.doc details:first-of-type { border-top: 1px solid var(--line); }
.doc summary { font-weight: 600; cursor: pointer; }
.doc details p { margin: 10px 0 4px; color: var(--muted); }

/* Footer on the brand ground (pine in both themes, like the launch screen). */
.site-footer { background: var(--pine); color: var(--cream); padding-block: 56px 40px; }
.site-footer :focus-visible { outline-color: var(--cream); }  /* ink fails on pine */
.closing { display: grid; gap: 20px; justify-items: start; padding-bottom: 48px; margin-bottom: 36px; border-bottom: 1px solid color-mix(in srgb, var(--cream) 20%, transparent); }
.closing h2 { font: 600 clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem)/1.15 var(--serif); margin: 0; max-width: 34rem; text-wrap: balance; }
.closing .button { background: var(--spark); color: var(--ink); }
.footer-row { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-start; justify-content: space-between; }
.footer-row img { height: 28px; width: auto; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }
.site-footer small { display: block; margin-top: 28px; font-size: 14px; color: color-mix(in srgb, var(--cream) 75%, transparent); }
