/* Rep — site styles.
   One stylesheet for all three pages; it is the only subresource any page fetches.

   Colours are the app's own tokens (app/Rep/Sources/Theme.swift) so the site and the
   app read as one thing. Two deliberate departures, both for contrast: the app's
   `inkTertiary` (#8A8A8A) measures 3.22:1 on #F7F7F7 and so is never used for text
   here — captions use #6B6B6B (4.97:1) instead — and the dark palette is new, because
   the app is light-only (`preferredColorScheme(.light)`) while a page opened from a
   phone at night is not. Measured ratios are recorded in web/README.md.

   Fonts are the system stack. Nothing is loaded from a third party: a page that
   phoned home while hosting Rep's privacy policy would be contradicting it. */

:root {
  --bg: #f7f7f7;
  --card: #ffffff;
  --card-alt: #f9f9f7;
  --ink: #111111;
  --ink-2: #525252;
  --ink-3: #6b6b6b;
  --accent: #436f4c;
  --accent-deep: #324e36;
  --accent-tint: #e8efe9;
  --border: #ebebeb;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 24px rgba(17, 17, 17, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131513;
    --card: #1c1f1c;
    --card-alt: #1c1f1c;
    --ink: #f2f3f1;
    --ink-2: #c3c7c1;
    --ink-3: #a2a7a0;
    --accent: #9cc4a4;
    --accent-deep: #9cc4a4;
    --accent-tint: #232823;
    --border: #2c302c;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 20px gutter matches Theme.inset, so the page's rhythm is the app's. */
.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 20px;
}

/* Keyboard users get a visible target everywhere; :focus-visible keeps it off mouse clicks. */
a:focus-visible,
.skip:focus {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 20px;
  top: 12px;
  z-index: 10;
  position: fixed;
  background: var(--card);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
}

/* ---- header ---- */

.site-head {
  padding: 22px 0 6px;
}
.site-head .wrap {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

/* ---- type ---- */

h1 {
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 28px 0 0;
}
h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
  margin: 2.5rem 0 0.5rem;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.75rem 0 0.35rem;
}
p { margin: 0.75rem 0; }
a { color: var(--accent); }

.lede {
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin-top: 0.75rem;
}
.dateline {
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-top: 0.5rem;
}
.caption { font-size: 0.875rem; color: var(--ink-3); }

ul, ol { margin: 0.75rem 0; padding-left: 1.3rem; }
li { margin: 0.4rem 0; }
li > strong { font-weight: 600; }

/* ---- hero ---- */

.hero { padding: 10px 0 8px; }
.hero h1 { font-size: 2.375rem; margin-top: 18px; }

/* The one claim the whole app rests on, so it gets to be a shape rather than a sentence. */
.stamp {
  display: inline-block;
  margin-top: 18px;
  padding: 7px 15px;
  border-radius: 20px;
  background: var(--accent-tint);
  color: var(--accent-deep);
  font-size: 0.875rem;
  font-weight: 600;
}

/* ---- cards ---- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin: 1rem 0;
}
.card h2, .card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.steps {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin: 1.1rem 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--card);
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .steps > li::before { color: var(--bg); }
}
.steps > li > strong { display: block; }

/* ---- definition-style rows, used for "what is stored" ---- */

.rows {
  margin: 1rem 0;
  border-top: 1px solid var(--border);
}
.rows > div {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}
.rows dt {
  font-weight: 600;
  font-size: 0.9375rem;
}
.rows dd {
  margin: 0.2rem 0 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* ---- contact ---- */

/* `anywhere` rather than `break-all`: a short real address never wraps, and a long one
   breaks only when it has to instead of being chopped mid-word on every line. */
.contact-email {
  font-size: 1.0625rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---- footer ---- */

.site-foot {
  margin-top: 3.5rem;
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.site-foot nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.site-foot a { color: var(--ink-2); }

@media (min-width: 40rem) {
  body { font-size: 18px; }
  h1 { font-size: 2.5rem; }
  .hero h1 { font-size: 3rem; }
  .site-head { padding-top: 32px; }
}
