/* ════════════════════════════════════════════════════════════════════
   theme.css — the per-profile "themology" token layer for an Amanuensis
   author page. Mirrors the VQ platform theme system (project_theme_system.md):
   ONE canonical --ic-* custom-property layer, defaults byte-identical to the
   original hand-built look, driven PER-PROFILE by a baked
   <style id="ic-theme-vars"> block (generated by build-theme.mjs from
   data/profile.json) so every VISITOR sees the OWNER's chosen look.

   The signed-in owner live-previews via js/owner-tools.js, which writes the
   same vars with document.documentElement.style.setProperty() — a DOM-API
   mutation that is CSP-clean (does NOT need style-src 'unsafe-inline'),
   exactly the mechanism VQ uses (vuln #16 discipline).

   LOAD ORDER: link this BEFORE style.css. The :root defaults here are the
   single source of truth; every value also carries an inline literal
   fallback in style.css/site-nav.css/holographic.css, so the page renders
   identically even if this file ever fails to load (non-regression).
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* — Font stacks. --ic-font selects one; the panel/preset swaps it. — */
  --ic-font-system: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'Fira Sans', Ubuntu, Oxygen, 'Oxygen Sans', Cantarell, 'Droid Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Lucida Grande', Helvetica, Arial, sans-serif;
  --ic-font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
  --ic-font-rounded: ui-rounded, 'SF Pro Rounded', 'Hiragino Maru Gothic ProN', 'Segoe UI', system-ui, sans-serif;
  --ic-font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  --ic-font: var(--ic-font-system);

  /* — Surfaces + text (defaults = original style.css literals) — */
  --ic-bg: #0d1117;
  --ic-bg-deep: #090c12;
  --ic-surface: #1d2226;
  --ic-surface-img: #0b1422;
  --ic-glass-bg: rgba(26, 31, 40, 0.66);
  --ic-glass-edge: rgba(255, 255, 255, 0.14);
  --ic-border: rgba(255, 255, 255, 0.10);
  --ic-text: rgba(255, 255, 255, 0.92);
  --ic-text-soft: rgba(255, 255, 255, 0.72);
  --ic-text-muted: rgba(255, 255, 255, 0.62);
  --ic-text-faint: rgba(255, 255, 255, 0.55);

  /* — Accent: links, active nav, focus rings, hover treatments. — */
  --ic-accent: #70b5f9;
  --ic-accent-rgb: 112, 181, 249;
  --ic-accent-hover: #a8d2fb;

  /* — Brightness: 0 = full brightness, up to ~0.55 dims the page. Pure CSS
       so visitors inherit it from the baked vars with no JS + no flash. — */
  --ic-dim: 0;
}

/* ── Brightness scrim — a fixed, click-through, no-JS dim layer. ──────── */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  background: #000;
  opacity: var(--ic-dim, 0);
  transition: opacity 0.2s ease;
}

/* ── Animations toggle. data-motion="off" (baked on <html> per profile, or
      flipped live by the owner panel) freezes every holographic animation
      while keeping the colour — the same approach as VQ's strobe gate. ── */
:root[data-motion="off"] .card::before,
:root[data-motion="off"] .profile-photo-wrapper::before,
:root[data-motion="off"] .site-nav::after,
:root[data-motion="off"] .section-header,
:root[data-motion="off"] .activity-title,
:root[data-motion="off"] .article-title,
:root[data-motion="off"] .article-body h2,
:root[data-motion="off"] .post-block-title,
:root[data-motion="off"] .rail-card-header,
:root[data-motion="off"] .profile-name,
:root[data-motion="off"] .holo-pill--spectrum,
:root[data-motion="off"] .banner-dot--active,
:root[data-motion="off"] .followers-count:hover,
:root[data-motion="off"] .post-block:hover .post-block-cta,
:root[data-motion="off"] .article-feed-footer .nav-link:hover {
  animation: none !important;
}
:root[data-motion="off"] .banner-image { transition: none !important; }

/* ── Owner-only chrome. The composer/posting modal is for the account
      owner alone (requirement: "the only one who sees the posting features
      with modal"). Hidden for every visitor; revealed when owner-tools.js
      marks the document with data-owner="true" after an owner session.
      Per-VIEWER (JS), never baked, so it never leaks into a visitor's page. */
html:not([data-owner="true"]) .composer-pill { display: none !important; }

/* Appearance/theme editing lives in the Amanuensis dashboard
   (theamanuensis.com/dash → "Your Website"), which saves the chosen theme
   into data/profile.json and re-bakes the <style id="ic-theme-vars"> block
   above. This page only RENDERS that baked theme. */
