/*
 * The stylesheet for privacy.html and terms.html.
 *
 * No longer the only shared file in this directory: `fonts.css` is linked by all three pages,
 * including index.html, and it exists for the reason given below — two legal pages must not
 * drift from each other — extended to the marketing page, because a *face* declared in two
 * places is two URLs that can rot independently. This file remains the one the two legal
 * pages share and index.html does not.
 *
 * Why a file at all, when index.html keeps 1400 lines of CSS inline: there are two legal
 * pages and they must not drift from each other. Inline would mean two copies of the
 * palette maintained by hand, which is how the two would come to disagree about what the
 * page looks like — the exact failure `apps/web/src/brand/brand.test.ts` exists to catch
 * between this directory and the PWA.
 *
 * Why not `packages/ui-theme/theme.css`: this directory has no build step, so nothing can
 * be imported. The palette below is copied from `index.html`'s `:root` and its
 * `html[data-theme="dark"]` block, and it is the third copy in the repository — the same
 * cost `features/042` already accepts for `theme.css`. **Change all of them together.**
 * Only the tokens these two pages actually use are copied; the hero and phone-mockup
 * variables are not, because a token nothing reads is a token that silently rots.
 *
 * Deliberately not linked by index.html. That page is hand-written, self-contained and
 * has no seam this could be pushed through without touching its <head>, and reducing a
 * marketing page's first paint to one extra request buys nothing. `fonts.css` is the one
 * exception and it pays for itself: it *replaced* three requests to two Google hosts with
 * one to this origin, so index.html's head got shorter rather than longer.
 */

:root {
  color-scheme: light;
  --ink: #111528;
  --paper: #f7f5ef;
  --surface: #fff;
  --surface-soft: #fbfaf6;
  --blue: #4b61f4;
  --lime: #6552d6;
  /* Byte-identical to `--cta` in index.html and in packages/ui-theme/theme.css. 5.06:1 as
     text on the worst of this page's backgrounds; see the long note at index.html:78. */
  --cta: #1d5fe2;
  --cta-glow: #1957d2;
  --cta-ink: #fff;
  --muted: #626979;
  --line: rgba(17, 21, 40, .13);
  --hero-bg: #eef1ff;
  --hero-ink: #111528;
  --hero-muted: rgba(17, 21, 40, .67);
  --hero-line: rgba(17, 21, 40, .15);
  --shadow-drift:
    0 1px 0 0 color-mix(in srgb, var(--cta) 22%, transparent),
    0 18px 50px -28px color-mix(in srgb, var(--cta) 55%, transparent);
  /* Byte-identical to index.html's pair. Geist first, then the metric-matched stand-in that
     `/fonts.css` declares — ahead of `-apple-system`, or it would never be reached — then the
     system stack that was here before it. Both pages link `/fonts.css`; this file only names
     the faces, so the two stylesheets can be linked in either order. */
  --sans: "Geist", "Geist Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f6fb;
  --paper: #090e1a;
  --surface: #0f1627;
  --surface-soft: #141d30;
  --blue: #7184ff;
  --lime: #b9a5ff;
  /* Inverted, as everything filled is on this theme: the light blue with a dark label is
     7.1:1, where the mid blue with a near-white label is 3.9:1 and fails. */
  --cta: #50a8ff;
  --cta-glow: #71bcff;
  --cta-ink: #101827;
  --muted: #a4abba;
  --line: rgba(255, 255, 255, .12);
  --hero-bg: #090e1a;
  --hero-ink: #f7f8fc;
  --hero-muted: rgba(247, 248, 252, .66);
  --hero-line: rgba(255, 255, 255, .15);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: color .35s ease, background .35s ease;
}

a { color: var(--blue); }
button, a { -webkit-tap-highlight-color: transparent; }
/* The ring the apps draw (packages/ui-theme/chrome.css): 2px in the link blue, 2px off, a 4px
   radius. `chrome.test.ts` reads this file. */
a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Narrower than index.html's 1180px, and that is the one deliberate departure from it.
   These pages are long-form prose rather than a layout, and a legal document set at the
   marketing page's full width is 150 characters a line — which is where somebody stops
   reading, on the one page where "nobody read it" is the whole risk. */
.wrap { width: min(760px, calc(100% - 48px)); margin-inline: auto; }

/* Navigation. The marketing page's bar minus its links: from here the only place to go is
   back, and a section anchor would point at a page this is not. */
.nav {
  border-bottom: 1px solid var(--line);
  background: var(--hero-bg);
  color: var(--hero-ink);
  transition: background .3s ease, border-color .3s ease;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { text-decoration: none; }
/* The wordmark art is light glyphs meant for a dark background, so in the light theme it
   is flattened to ink rather than shipped as a second asset that could drift. */
.logo-mark { display: block; height: 26px; width: auto; }
html[data-theme="light"] .logo-mark { content: url(ondago-logo-light.png); }
.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links > a:not(.button) {
  color: var(--hero-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .11em;
  text-decoration: none;
  text-transform: uppercase;
}
.nav-links > a:hover { color: var(--hero-ink); }

.theme-toggle {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--hero-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: var(--hero-ink);
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}
.theme-toggle:hover { background: var(--hero-line); transform: rotate(8deg); }
.theme-toggle span { position: absolute; font-size: 16px; line-height: 1; transition: opacity .25s, transform .35s; }
.theme-toggle .moon { opacity: 0; transform: translateY(18px) rotate(-30deg); }
html[data-theme="dark"] .theme-toggle .sun { opacity: 0; transform: translateY(-18px) rotate(30deg); }
html[data-theme="dark"] .theme-toggle .moon { opacity: 1; transform: none; }

/* Type. h1 is a long way down from index.html's clamp(...72px) hero: a document title is
   not a headline, and at the hero's scale "Privacy policy" fills a phone screen. */
main { padding: 56px 0 72px; }
h1, h2, h3, p, ul, ol { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -.04em;
}
h2 {
  margin-top: 44px;
  margin-bottom: 14px;
  font-size: clamp(21px, 2.6vw, 26px);
  line-height: 1.2;
  letter-spacing: -.02em;
}
h3 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: 17px;
  letter-spacing: -.01em;
}
p, li { margin-bottom: 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 8px; }
strong { font-weight: 700; }
code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: .88em;
}

.eyebrow {
  display: block;
  margin: 0 0 18px;
  color: var(--cta);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .22em;
  line-height: 1.3;
  text-transform: uppercase;
}

.lede {
  margin-bottom: 34px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 19px);
}

.updated {
  margin-bottom: 34px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* A callout for the claims that are properties of the design rather than promises about
   behaviour — the paragraphs somebody skimming has to not skim. */
.note {
  margin: 24px 0 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cta);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-drift);
}
.note :last-child { margin-bottom: 0; }

/*
 * An unfilled blank, rendered so it cannot be missed.
 *
 * `[LEGAL ENTITY NAME]` and its two siblings are answers nobody in this repository has, and
 * a placeholder that reads as ordinary prose is one that ships. This makes it loud on the
 * page itself rather than in a comment nobody publishing the page will read.
 */
.todo {
  padding: 1px 6px;
  border: 1px dashed var(--cta);
  border-radius: 5px;
  background: color-mix(in srgb, var(--cta) 12%, transparent);
  color: var(--cta);
  font-family: var(--mono);
  font-size: .85em;
  font-weight: 500;
  white-space: nowrap;
}

/* Contents, kept plain: these documents are long, and a reader arriving from a consent
   screen is usually looking for one section rather than reading the whole thing. */
.toc {
  margin: 0 0 40px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
}
.toc h2 {
  margin: 0 0 10px;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { margin: 0; padding-left: 20px; font-size: 15px; }
.toc li { margin-bottom: 4px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

table {
  width: 100%;
  margin: 0 0 22px;
  border-collapse: collapse;
  font-size: 15px;
}
th, td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  background: var(--surface-soft);
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--cta);
  color: var(--cta-ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-drift);
  transition: background-color .25s ease;
}
.button:hover { background: var(--cta-glow); }

footer { padding: 28px 0 36px; background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  color: var(--muted);
  font: 10px var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.footer-inner a { color: var(--blue); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }
