@import url("./tokens.css");

/* ============================================================
   EverLume — legal document pages (privacy.html, terms.html)

   Deliberately NOT styles.css. That sheet is the cinematic
   system: eight full bleed stages, parallax, a WebGL atmosphere
   layer and a canvas network. None of it applies to a document
   somebody reads, and half of it (100svh stages, scroll reveals
   that start at opacity 0) would actively fight one — a legal
   page has to be readable with JavaScript off and printable.

   So this is a second, small sheet on the same tokens. Colour,
   type and spacing all come from tokens.css; nothing is
   hardcoded. Same brand, different job.

   Relative paths only. make-deploy.py rewrites the import above.
   ============================================================ */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  /* A shade off pure white for body copy. Full white on Void at
     17px vibrates; the headings keep the white. */
  color: var(--el-mist);
  -webkit-text-size-adjust: 100%;
}

/* The one piece of the Luminous Grid a document gets: a thin
   line of light across the top of the page. Restraint is the
   brand rule — Lume is light, not decoration. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent, var(--el-lume-40) 18%, var(--el-lume) 50%,
    var(--el-lume-40) 82%, transparent);
  opacity: 0.7;
  z-index: 10;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px; top: 12px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--el-lume);
  color: var(--el-void);
  border-radius: var(--el-radius-pill);
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.lh {
  border-bottom: var(--el-hairline) solid var(--el-slate);
  padding: 22px 0;
}
.lh__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.lh__mark {
  font-size: 17px;
  color: var(--el-white);
  text-decoration: none;
}
.lh__mark:hover { color: var(--el-lume); }
.lh__nav {
  display: flex;
  gap: 18px;
}
.lh__nav a {
  font-family: var(--el-font-data);
  font-size: var(--el-size-label);
  letter-spacing: var(--el-track-label);
  text-transform: uppercase;
  color: var(--el-ash);
  text-decoration: none;
}
.lh__nav a:hover { color: var(--el-white); }
.lh__nav a[aria-current="page"] { color: var(--el-lume); }

/* ---------- document ---------- */

.doc { padding: 64px 0 96px; }

.doc__eyebrow { margin: 0 0 14px; }

.doc h1 {
  font-size: var(--el-size-h1);
  color: var(--el-white);
  margin: 0 0 18px;
}

/* Effective date + operating entity. The one place on the page
   where the mono face carries a fact rather than a label. */
.doc__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 16px 20px;
  margin: 0 0 36px;
  background: var(--el-carbon);
  border: var(--el-hairline) solid var(--el-slate);
  border-left: 2px solid var(--el-lume);
  border-radius: var(--el-radius-card);
}
.doc__meta div { min-width: 0; }
.doc__meta dt {
  font-family: var(--el-font-data);
  font-size: var(--el-size-label);
  letter-spacing: var(--el-track-label);
  text-transform: uppercase;
  color: var(--el-ash);
  margin: 0 0 3px;
}
.doc__meta dd {
  margin: 0;
  font-size: var(--el-size-small);
  color: var(--el-white);
}

.doc__lede {
  font-size: var(--el-size-body-lg);
  color: var(--el-mist);
  margin: 0 0 40px;
}

/* ---------- contents ---------- */

.toc {
  margin: 0 0 48px;
  padding: 22px 24px;
  border: var(--el-hairline) solid var(--el-slate);
  border-radius: var(--el-radius-card);
}
.toc p { margin: 0 0 12px; }
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
}
@media (max-width: 620px) { .toc ol { columns: 1; } }
.toc li {
  break-inside: avoid;
  margin: 0 0 7px;
  font-size: var(--el-size-small);
}
.toc a {
  color: var(--el-mist);
  text-decoration: none;
}
.toc a:hover { color: var(--el-lume); }
/* The numbered override lives after .doc li::before, further down —
   both selectors are one class plus one pseudo, so source order is
   what decides, and the section dot would otherwise win here. */

/* ---------- sections ---------- */

.doc section {
  padding-top: 12px;          /* clears the fixed light bar on anchor jumps */
  margin: 0 0 34px;
  scroll-margin-top: 24px;
}

.doc h2 {
  font-size: var(--el-size-h3);
  color: var(--el-white);
  margin: 0 0 12px;
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.doc h2 .n {
  font-family: var(--el-font-data);
  font-variant-numeric: tabular-nums;
  font-size: var(--el-size-small);
  font-weight: 400;
  letter-spacing: 0;
  color: var(--el-lume);
  flex: none;
}

.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 0; list-style: none; }
.doc li { margin: 0 0 9px; padding-left: 22px; position: relative; }
.doc li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.68em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--el-lume);
  opacity: 0.75;
}
.doc strong { color: var(--el-white); font-weight: 600; }

/* Contents entries are numbered, not dotted — the numbers are how a
   reader gets from "section 12" in a carrier filing or an SMS reply to
   the clause itself. Overrides the two rules directly above. */
.toc li {
  padding-left: 34px;
  font-variant-numeric: tabular-nums;
}
.toc li::before {
  content: counter(list-item, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  width: auto; height: auto;
  border-radius: 0;
  background: none;
  opacity: 1;
  font-family: var(--el-font-data);
  font-size: var(--el-size-small);
  color: var(--el-ash);
}
.toc li:hover::before { color: var(--el-lume); }

.doc a { color: var(--el-lume); text-decoration: underline; text-underline-offset: 2px; }
.doc a:hover { color: var(--el-white); }

/* STOP / HELP and the like. A keyword the reader has to type
   exactly is set in the data face, which is what it is for. */
.kw {
  font-family: var(--el-font-data);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--el-white);
}

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

.lf {
  border-top: var(--el-hairline) solid var(--el-slate);
  padding: 32px 0 56px;
}
.lf__inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.lf__mark { font-size: 15px; color: var(--el-white); }
.lf__nav { display: flex; gap: 18px; }
.lf__nav a {
  font-family: var(--el-font-data);
  font-size: var(--el-size-label);
  letter-spacing: var(--el-track-label);
  text-transform: uppercase;
  color: var(--el-ash);
  text-decoration: none;
}
.lf__nav a:hover { color: var(--el-white); }
.lf__legal p {
  margin: 0 0 10px;
  font-size: var(--el-size-small);
  color: var(--el-ash);
}

/* ---------- print ----------
   A legal page gets saved and printed. Ink on white, no light
   bar, no navigation, and every URL spelled out. */
@media print {
  body { background: #fff; color: #111; }
  body::before, .lh__nav, .lf__nav, .toc, .skip { display: none; }
  .wrap { max-width: none; padding: 0; }
  .doc h1, .doc h2, .doc strong, .lh__mark, .lf__mark { color: #000; }
  .doc h2 .n, .doc li::before { color: #666; background: #666; }
  .doc a { color: #000; }
  .doc a[href^="http"]::after,
  .doc a[href^="mailto"]::after { content: " (" attr(href) ")"; font-size: 11px; }
  .doc__meta { border: 1px solid #ccc; background: #fff; }
  .doc__meta dd, .doc__meta dt { color: #000; }
  .doc section { page-break-inside: avoid; }
}

/* NAP on every public HTML page */
.lf__nap {
  margin: 0 0 12px;
  font-size: var(--el-size-small);
  color: var(--el-mist);
}
.lf__nap a {
  color: var(--el-mist);
  text-decoration: none;
}
.lf__nap a:hover { color: var(--el-lume); }
