/* louisbrown.space visual identity — shared tokens and the handful of
   components every "house" app carries. Loaded before each app's own
   stylesheet; apps alias these tokens to their local names where needed.

   The rules (settled 2026-10, see CLAUDE.md "Visual identity"):
   - Round or square, nothing in between. Circles, pills and the sun are
     round; every container, input, chip and tile has zero radius.
   - Rules, not boxes. One page surface; content is contained by hairlines.
     The only second surface is a sheet (overlays: modals, bottom sheets,
     popovers), which gets --sheet plus a 1px edge.
   - A section rule is an orbit: dashed hairline with a single amber dot
     sitting on it, inset from the left. Row dividers are plain solid
     hairlines.
   - Fraunces carries its WONK and SOFT axes everywhere it is used.
   - Checkboxes are circles that fill sage when ticked.
   - Loading is a slowly turning dashed ring, never a spinner.
   - Every brand name carries the orbit mark.
   - The backdrop is the nebula with a sparse star field. */

:root {
  --bg: #0F0E0C;
  --surface: #1A1814;
  --sheet: #1F1C17;
  --text: #E8E0D0;
  --text-2: #C9C1AF;
  --muted: #A99F8C;
  --line: #2C2721;
  --line-strong: #4A4337;
  --accent: #96A86E;
  --accent-hover: #A8BC80;
  --accent-ink: #0F0E0C;
  --highlight: #D4A574;
  --sun: #F4C233;
  --danger: #E09A8B;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Newsreader', Georgia, serif;
  --font-ui: 'Inter', system-ui, sans-serif;
  --wonk: "WONK" 1, "SOFT" 40;
  --r-pill: 999px;
  --orbit-dash: 1px dashed var(--line-strong);
}

/* ---------- backdrop: nebula + sparse stars (one fixed layer) ----------
   Intensity is settled (v1.28.3), so keep it: the nebula washes sit at
   14-18% (purple, teal) and 7-9% (amber, the centre), enough to read as a
   glow on a phone without competing with the page (30% was too much, 5-9%
   was plain black). The stars are two repeating tiles, seven 2px stars at
   70-95% on 420x380 and seven 1.4px at 50-60% on 560x470, so a phone shows
   a few dozen; 1px specks under 55% could not be seen at all. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    /* bright stars: 2px, one 420x380 tile */
    radial-gradient(2px 2px at 12% 18%, rgba(232, 224, 208, 0.95) 50%, transparent 51%),
    radial-gradient(2px 2px at 68% 9%,  rgba(232, 224, 208, 0.80) 50%, transparent 51%),
    radial-gradient(2px 2px at 86% 41%, rgba(232, 224, 208, 0.90) 50%, transparent 51%),
    radial-gradient(2px 2px at 31% 57%, rgba(232, 224, 208, 0.75) 50%, transparent 51%),
    radial-gradient(2px 2px at 53% 78%, rgba(232, 224, 208, 0.85) 50%, transparent 51%),
    radial-gradient(2px 2px at 77% 69%, rgba(212, 165, 116, 0.90) 50%, transparent 51%),
    radial-gradient(2px 2px at 23% 4%,  rgba(232, 224, 208, 0.70) 50%, transparent 51%),
    /* faint stars: 1.4px, a 560x470 tile so the two never line up */
    radial-gradient(1.4px 1.4px at 9% 88%,  rgba(232, 224, 208, 0.60) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 42% 33%, rgba(232, 224, 208, 0.55) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 95% 92%, rgba(232, 224, 208, 0.60) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 61% 51%, rgba(232, 224, 208, 0.50) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 27% 74%, rgba(212, 165, 116, 0.60) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 80% 22%, rgba(232, 224, 208, 0.55) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 48% 96%, rgba(232, 224, 208, 0.50) 50%, transparent 51%),
    radial-gradient(ellipse 70% 46% at 18% 18%, rgba(96, 70, 170, 0.18)  0%, transparent 70%),
    radial-gradient(ellipse 72% 50% at 85% 80%, rgba(52, 140, 150, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 36% at 76% 26%, rgba(212, 165, 116, 0.08) 0%, transparent 65%),
    radial-gradient(ellipse 76% 50% at 24% 84%, rgba(120, 80, 180, 0.14)  0%, transparent 72%),
    radial-gradient(ellipse 44% 30% at 55% 52%, rgba(70, 130, 150, 0.07) 0%, transparent 60%);
  background-size:
    420px 380px, 420px 380px, 420px 380px, 420px 380px, 420px 380px, 420px 380px, 420px 380px,
    560px 470px, 560px 470px, 560px 470px, 560px 470px, 560px 470px, 560px 470px, 560px 470px,
    100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, repeat,
    repeat, repeat, repeat, repeat, repeat, repeat, repeat,
    no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
}

/* ---------- orbit mark: the dashed orbit + sun that sits by every brand name ---------- */
.orbit-mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
  margin-right: 0.4em;
  flex: none;
}
.orbit-mark .orbit-mark__ring { fill: none; stroke: currentColor; stroke-width: 1; stroke-dasharray: 2 2; opacity: 0.8; }
.orbit-mark .orbit-mark__sun { fill: var(--sun); }

/* ---------- orbit rule: a section boundary ---------- */
.orbit-rule {
  position: relative;
  border-top: var(--orbit-dash);
}
.orbit-rule::before {
  content: '';
  position: absolute;
  left: 14px;
  top: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sun);
}

/* ---------- ring loader ---------- */
.orbit-loader {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px dashed currentColor;
  animation: orbit-spin 2.4s linear infinite;
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* ---------- circle tick ---------- */
.orbit-tick {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
  flex: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.orbit-tick:checked { background: var(--accent); border-color: var(--accent); }
.orbit-tick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Fraunces with its wonk axes, everywhere it is used ---------- */
h1, h2, h3, .display { font-variation-settings: var(--wonk); }

@media (prefers-reduced-motion: reduce) {
  .orbit-loader { animation: none; }
}
