/*
  Reverim site styles.

  Shared across every page. No CDN, no web fonts, no third-party anything — a
  site selling a tool that sends nothing anywhere should not itself phone home,
  and a data lead who views source will check.
*/

:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --fg: #16181d;
  --muted: #5b6270;
  /* 4.61:1 on --bg. The lighter grey this replaced measured 3.18:1, which is
     below AA for normal text — and --faint carries the download hint, the
     checksum labels, the section eyebrows and the footer, all at 0.78–0.87rem,
     so none of it qualifies as "large" text. */
  --faint: #6b7382;
  --line: #e6e6e3;
  --accent: #2f5d50;
  --accent-fg: #ffffff;
  --warn-bg: #fdf6e7;
  --warn-line: #e8d9ae;
  --warn-fg: #6b5417;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --surface: #16191e;
    --fg: #e9ebee;
    --muted: #a2a9b6;
    /* 4.66:1 on --bg; the previous value missed AA at 4.47:1. */
    --faint: #767e8c;
    --line: #262a31;
    --accent: #6fbfa4;
    --accent-fg: #0e1013;
    --warn-bg: #201c12;
    --warn-line: #3d3320;
    --warn-fg: #d9c48a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.5rem; }
a { color: var(--accent); }

/* Skip link. Off-screen until focused, then a normal-looking control — a
   keyboard user should not have to tab through the header on every page. */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-fg);
  padding: .7rem 1.1rem; border-radius: 0 0 .5rem 0;
  text-decoration: none; font-size: .9rem; font-weight: 600; z-index: 10;
}
.skip:focus { left: 0; }

/* ── Header ───────────────────────────────────────────────────────── */
header { padding: 4.5rem 0 0; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: .95rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  margin: 0 0 2.5rem; text-decoration: none;
}
/* Mark I, at the size it was drawn to survive. The rim is ink in both themes;
   only the interior event carries the accent. */
.brand svg { width: 22px; height: 22px; display: block; flex: none; }
.brand .rim { stroke: var(--fg); }
.brand .drift { stroke: var(--accent); }
.brand .event { fill: var(--accent); }
h1 {
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.12; letter-spacing: -.022em;
  font-weight: 600; margin: 0 0 1.1rem; text-wrap: balance;
}
.page-title { font-size: clamp(1.8rem, 4vw, 2.3rem); margin-bottom: .5rem; }
.lede { font-size: 1.15rem; color: var(--muted); margin: 0 0 2.5rem; max-width: 34rem; }
.updated { font-size: .85rem; color: var(--faint); margin: 0 0 2.5rem; }

/* ── Download ─────────────────────────────────────────────────────── */
.downloads { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--accent); color: var(--accent-fg);
  border: 1px solid transparent; border-radius: .55rem;
  padding: .8rem 1.35rem; font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  /* Inherited, because .btn is worn by both <a> and <button>, and a button
     would otherwise fall back to the platform UI font. */
  font-family: inherit; line-height: inherit;
  transition: opacity .15s ease, transform .15s ease;
}
.btn:hover:not(:disabled) { opacity: .88; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-note { font-size: .85rem; color: var(--faint); margin: .9rem 0 0; }
/* SHA-256 lines. Each is 64 characters and there are two of them, so they get
   a line each and a label, and the hash may break anywhere it needs to. */
.checksums { margin: .7rem 0 0; display: flex; flex-direction: column; gap: .25rem; }
.sum { display: flex; flex-wrap: wrap; gap: .45rem; align-items: baseline; font-size: .78rem; }
.sum-label { color: var(--faint); white-space: nowrap; }
.sum code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted); word-break: break-all; min-width: 0;
}

.callout {
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  color: var(--warn-fg); border-radius: .55rem;
  padding: .85rem 1rem; font-size: .9rem; line-height: 1.55;
  margin: 1.6rem 0 0;
}

/* ── Sections ─────────────────────────────────────────────────────── */
section { padding: 4rem 0 0; }
h2 {
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
  margin: 0 0 2rem; padding-bottom: .8rem; border-bottom: 1px solid var(--line);
}
.feature { margin: 0 0 2.4rem; }
.feature h3 { font-size: 1.22rem; font-weight: 600; letter-spacing: -.012em; margin: 0 0 .5rem; }
.feature p { margin: 0; color: var(--muted); }
.feature p + p { margin-top: .7rem; }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li {
  padding: .65rem 0; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: .97rem;
}
ul.plain li:last-child { border-bottom: 0; }
ul.plain strong { color: var(--fg); font-weight: 600; }

/* ── FAQ ──────────────────────────────────────────────────────────── */
details {
  border-bottom: 1px solid var(--line);
  padding: .2rem 0;
}
details summary {
  cursor: pointer; list-style: none;
  padding: .95rem 2rem .95rem 0; position: relative;
  font-weight: 600; font-size: 1.02rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; position: absolute; right: .25rem; top: .8rem;
  font-weight: 400; font-size: 1.3rem; color: var(--faint);
  transition: transform .15s ease;
}
details[open] summary::after { content: "\2212"; }
details summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details .answer { padding: 0 0 1.1rem; color: var(--muted); }
details .answer p { margin: 0 0 .7rem; }
details .answer p:last-child { margin-bottom: 0; }

/* ── Long-form legal copy ─────────────────────────────────────────── */
/* Long-form headings are h2, not h3: these pages have no section eyebrow above
   them, so an h3 left a level skipped straight from the page h1. They therefore
   need the eyebrow styling of the global h2 undone. */
.prose h2 {
  font-size: 1.08rem; font-weight: 600; margin: 2.2rem 0 .6rem;
  letter-spacing: -.008em; text-transform: none; color: var(--fg);
  border-bottom: 0; padding-bottom: 0;
}
.prose h2:first-of-type { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose p { margin: 0 0 .9rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 .9rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--fg); }

/* ── Footer ───────────────────────────────────────────────────────── */
footer {
  margin-top: 5rem; padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--line);
  font-size: .87rem; color: var(--faint);
}
footer p { margin: 0 0 .8rem; }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: .2rem 1.4rem;
  /* Pulled up by the padding the links now carry, so the visual rhythm is
     unchanged even though the targets grew. */
  margin: -.4rem 0 1.3rem; padding: 0; list-style: none;
}
/* 24px minimum target height (WCAG 2.5.8). At .87rem the text box alone was
   19px, which is a small thing to hit on a phone. */
.footer-nav a {
  display: inline-block; padding: .4rem 0; min-height: 24px;
  color: var(--muted); text-decoration: none;
}
.footer-nav a:hover { color: var(--fg); text-decoration: underline; }
.footer-legal { font-size: .82rem; }

/* Respect a stated preference for less motion. Nothing here animates much —
   button hover and the FAQ marker — but "not much" is not the user's call to
   make on their behalf. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
