/* Nularo — the frosted-ember system, adapted for the website.

   Every value below is copied verbatim from src/constants/theme.ts, the
   app's single source of truth for colour and type. Nothing here is
   invented or eyeballed — see docs/02-design-system.md for the four laws
   this is built from: pure black canvas, gradients that traverse hue AND
   value, real frosted glass, deep and saturated (never milky). If a colour
   in this file can't be traced back to theme.ts, it's a bug.

   Layout convention (nav/footer as full-width bars, body copy in a
   constrained reading column) is generic web practice, not sampled from
   any one product. */

:root {
  --canvas: #000000;

  --body-vivid: #8e7bff;
  --body-lifted: #7f76cc;
  --body-mid: #513f8f;
  --body-deep: #381d57;
  --body-crushed: #200b26;

  --ember-hot: #ffb073;
  --ember-core: #fa6f41;
  --ember-deep: #a32d1d;
  --ember-crushed: #4c0d0b;

  --teal: #1f7a8f;
  --teal-vivid: #2fb6d6;
  --teal-deep: #0c3040;
  --rose: #852a4b;
  --rose-lit: #b8305f;
  --rose-vivid: #e33d86;

  --text-light: #efedfa;
  --text-mute: #89859e;
  --text-faint: #565266;
  --hairline: #251830;
  --scrim: #0d060f;

  /* the indicator — her ember. the thing that says "look here". */
  --indicator: var(--ember-core);

  --font: "Helvetica Neue", -apple-system, BlinkMacSystemFont, Arial, sans-serif;

  /* two widths: bars go edge to edge, reading copy stays narrow */
  --bar-width: 900px;
  --read-width: 680px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text-light);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* law 4 companion: real texture, never a flat colour field. one grain
   layer for the whole page rather than per-card — a cheaper, honest
   equivalent of the FractalNoise pass the app renders per tile. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ── topbar — full width, edge to edge ──────────────────────────── */

.topbar {
  width: 100%;
  border-bottom: 1px solid var(--hairline);
}

.topbar-inner {
  max-width: var(--bar-width);
  margin: 0 auto;
  padding: 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--ember-core);
  text-decoration: none;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-mute);
  text-decoration: none;
}

.back:hover {
  color: var(--ember-core);
}

/* ── main content ────────────────────────────────────────────────── */

main {
  flex: 1;
}

.wrap {
  max-width: var(--read-width);
  margin: 0 auto;
  padding: 56px 24px 96px;
  position: relative;
}

.doc-head {
  margin-bottom: 40px;
}

h1 {
  margin: 0 0 8px;
  font-weight: 500;
  letter-spacing: -0.5px;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.12;
  color: var(--text-light);
}

.updated {
  margin: 0;
  font-size: 14px;
  color: var(--text-faint);
}

.lede {
  font-size: 19px;
  color: var(--text-light);
}

p, li {
  color: var(--text-mute);
}

li {
  margin-bottom: 8px;
}

strong {
  color: var(--text-light);
  font-weight: 600;
}

a {
  color: var(--ember-core);
  text-decoration-color: rgba(250, 111, 65, 0.4);
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-color: var(--ember-core);
}

h2 {
  margin: 52px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-light);
}

h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

h3 {
  margin: 30px 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-light);
}

/* ── the pane — a card of her translucent body, frosted glass on
   black. approximated in flat CSS from the layered Skia recipe in
   AuraTile.tsx: an interior lift, a glow blooming low-left then dying
   out, a top hairline that catches light. ───────────────────────── */

.pane {
  position: relative;
  border-radius: 20px;
  padding: 22px 24px;
  margin: 28px 0;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 6% 112%, var(--tint, var(--body-vivid)) 0%, transparent 58%),
    radial-gradient(55% 65% at -4% 120%, var(--tint, var(--body-vivid)) 0%, transparent 62%),
    #07050b;
  box-shadow:
    inset 0 1px 0 rgba(239, 237, 250, 0.14),
    inset 0 0 0 1px rgba(239, 237, 250, 0.05);
}

.pane :is(p, li) {
  color: rgba(239, 237, 250, 0.82);
}

.pane p:first-child {
  margin-top: 0;
}

.pane p:last-child {
  margin-bottom: 0;
}

/* her four lights — cycle these the way the app cycles pane tints */
.pane--violet { --tint: var(--body-vivid); }
.pane--teal { --tint: var(--teal-vivid); }
.pane--rose { --tint: var(--rose-vivid); }
.pane--ember { --tint: var(--ember-core); }

/* ── tables — used for the subprocessor list. The wrapper scrolls, not
   the page: a wide table must never push the body sideways on a
   phone. ────────────────────────────────────────────────────────── */

.table-scroll {
  margin: 24px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15px;
  line-height: 1.55;
}

th {
  text-align: left;
  padding: 0 18px 10px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ember-core);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}

td {
  padding: 14px 18px 14px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
  color: rgba(239, 237, 250, 0.72);
}

td:first-child {
  white-space: nowrap;
  color: var(--text-light);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ── hero (index only) ──────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 24px 0 8px;
}

.hero-art {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
}

/* her halo — 10-15% opacity, tight radius, behind her only (law: when
   in doubt, darker, subtler) */
.hero-art::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    closest-side,
    rgba(142, 123, 255, 0.26),
    rgba(250, 111, 65, 0.13) 55%,
    transparent 72%
  );
  filter: blur(30px);
}

.hero-art img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero h1 {
  font-size: clamp(32px, 8vw, 54px);
  max-width: 620px;
  margin: 30px auto 12px;
}

.hero .lede {
  max-width: 460px;
  margin: 0 auto;
  color: var(--text-mute);
  font-size: 18px;
}

.hero .tagline {
  color: var(--text-faint);
  font-size: 13px;
  letter-spacing: 0.3px;
  margin: 12px 0 0;
}

/* ── the info band (index) — legal + support side by side on desktop,
   a full-width bar with the two-up content inside ─────────────────── */

.band {
  width: 100%;
  border-top: 1px solid var(--hairline);
  margin-top: 32px;
}

.band-inner {
  max-width: var(--bar-width);
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
}

.band-inner h2 {
  margin: 0 0 16px;
  padding-top: 0;
  border-top: none;
}

@media (max-width: 700px) {
  .band-inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 24px;
  }
}

/* ── legal link list ─────────────────────────────────────────────── */

.legal-links {
  display: grid;
  gap: 10px;
  margin: 0;
  list-style: none;
  padding: 0;
}

.legal-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(239, 237, 250, 0.03);
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--text-light);
  font-size: 15px;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.legal-links a:hover {
  background: rgba(239, 237, 250, 0.06);
  box-shadow: inset 0 0 0 1px rgba(250, 111, 65, 0.45);
}

.legal-links a::after {
  content: "→";
  color: var(--ember-core);
  margin-left: 12px;
  flex-shrink: 0;
}

/* ── footer — full width, edge to edge ──────────────────────────── */

.sitefoot {
  width: 100%;
  border-top: 1px solid var(--hairline);
}

.sitefoot-inner {
  max-width: var(--bar-width);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--text-faint);
}

.sitefoot-inner a {
  color: var(--text-mute);
}

.sitefoot-inner .spacer {
  flex: 1;
}

@media (max-width: 480px) {
  h1 { font-size: 28px; }
  body { font-size: 16px; }
  .wrap { padding: 40px 20px 72px; }
  .hero-art { width: 220px; height: 220px; }
  .topbar-inner { padding: 18px 20px; }
}
