/* The Sovereign Academy: Parent Brand Tokens & Components
   The neutral parent above Bitcoin Sovereign Academy and Financially
   Sovereign Academy. Same editorial grammar as the family (Playfair
   Display + Inter + JetBrains Mono, sharp 2px radius, fade-as-signature),
   but chromatically NEUTRAL: dark graphite surfaces, warm ivory text, a
   near-monochrome silver accent, and a metallic silver fade.

   Principle: color belongs to the children, neutral belongs to the parent.
   Orange/yellow (BSA) and emerald/mint (FSA) appear ONLY as small
   wayfinding accents (the .fade-b / .fade-f word helpers and child cards).
   The parent's own chrome never uses a hue.

   Date: 2026-06-24.
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,900;1,500;1,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* PR3 token-adoption bridge: pull the shared source-of-truth tokens first, then
   re-point the --tsa-* / --color-* names below at them. @import must precede all
   non-@import rules, so these stay at the top. Load order: shared tokens -> this. */
@import url('tsa-design-tokens.css');
@import url('tsa-platform-variants.css');

:root {
  /* ---- Surfaces: dark graphite, neutral ----
     PR3: re-pointed to the shared neutral scale (identical values, differently
     named -> non-self-referential). */
  --tsa-bg:        var(--n-bg);            /* was #121316 */
  --tsa-surface:   var(--n-surface);       /* was #191B1F */
  --tsa-elevated:  var(--n-elevated);      /* was #212429 */
  --tsa-deepest:   var(--n-deepest);       /* was #0C0D0F */
  --tsa-border:    var(--n-border);        /* was #2C2F36 */
  --tsa-border-strong: var(--n-border-strong); /* was #3C4047 */

  /* ---- Text: warm ivory / silver-gray ---- (PR3: shared neutral scale) */
  --tsa-ink:        var(--n-ink);          /* was #ECECE6 */
  --tsa-ink-strong: var(--n-ink-strong);   /* was #FBFBF7 */
  --tsa-muted:      var(--n-muted);         /* was #A7ABB3 */
  --tsa-faint:      var(--n-faint);         /* was #6E727A */

  /* ---- Accent: near-monochrome silver (no hue) ----
     KEPT LITERAL: the shared file uses the SAME names (--tsa-silver/-platinum/
     -pewter/-fade), so re-pointing would be self-referential. No differently
     named shared equivalent exists; values match the shared file exactly. */
  --tsa-silver:   #C7CCD1;    /* primary accent: rules, key lines, hover */
  --tsa-platinum: #E5E7E9;    /* bright accent emphasis */
  --tsa-pewter:   #8A9098;    /* muted steel, secondary */

  /* ---- The metallic signature fade (parent) ---- (KEPT LITERAL: same-name in shared) */
  --tsa-fade:   linear-gradient(135deg, #8A9098 0%, #C7CCD1 50%, #ECECE6 100%);
  --tsa-fade-h: linear-gradient(90deg,  #8A9098 0%, #C7CCD1 50%, #ECECE6 100%);

  /* ---- Child-brand fades (wayfinding accents ONLY) ---- (KEPT LITERAL: same-name in shared) */
  --bsa-fade: linear-gradient(135deg, #FF7A00 0%, #FF9A00 45%, #FFD400 100%);
  --fsa-fade: linear-gradient(135deg, #10B981 0%, #34D399 50%, #6EE7B7 100%);
  --bsa-solid: #FF9A00;   /* solid fallback for the orange word accent */
  --fsa-solid: #34D399;   /* solid fallback for the emerald word accent */

  /* ---- Status (solid, rare) ----
     PR3: re-pointed to shared --success/--warning/--error (differently named,
     identical values -> non-self-referential). */
  --tsa-success: var(--success);   /* was #34D399 */
  --tsa-warning: var(--warning);   /* was #F4B740 */
  --tsa-error:   var(--error);     /* was #F87171 */

  /* ---- Typography ---- */
  --font-serif: 'Playfair Display', Georgia, serif;   /* h1, h2 */
  --font-sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; /* body, UI, h3/h4 */
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', monospace; /* eyebrows, labels, data */

  --fs-h1: clamp(2.3rem, 5.2vw, 3.8rem);
  --fs-h2: clamp(1.7rem, 3.4vw, 2.5rem);
  --fs-h3: 1.15rem;
  --fs-lede: 1.2rem;
  --fs-eyebrow: 0.7rem;

  /* ---- Spacing (4px base) ---- */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-8: 32px; --space-12: 48px; --space-16: 64px;
  --space-section: clamp(2.75rem, 5vw, 4rem);

  /* ---- Layout ---- */
  --width-prose: 680px;
  --width-default: 1100px;
  --width-wide: 1280px;

  /* ---- Radius (sharp editorial) ---- */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  /* ---- Shadows (deep, for dark surfaces) ---- */
  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.40);
  --shadow-2: 0 10px 26px rgba(0, 0, 0, 0.50);

  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--tsa-bg);
  color: var(--tsa-ink);
  line-height: 1.6;
  font-size: 17px;
  min-height: 100vh;
}
a { color: var(--tsa-silver); text-decoration: none; }
a:hover { color: var(--tsa-platinum); }

/* ============================================================
   Layout helpers
   ============================================================ */
.tsa-wrap { max-width: var(--width-default); margin: 0 auto; padding: 0 1.6rem; }
.tsa-wrap--prose { max-width: var(--width-prose); }

.tsa-section { padding: var(--space-section) 0; border-bottom: 1px solid var(--tsa-border); }
.tsa-section--alt { background: var(--tsa-surface); }
.tsa-section--deep { background: var(--tsa-deepest); position: relative; overflow: hidden; }
/* single restrained silver "lit from within" glow for hero / CTA */
.tsa-section--glow::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 72% 30%, rgba(199, 204, 209, 0.06) 0%, transparent 58%);
  pointer-events: none;
}
.tsa-section--glow > * { position: relative; }

/* metallic hairline divider (the parent's quiet signature) */
.tsa-hr-fade { height: 1px; background: var(--tsa-fade-h); opacity: 0.5; border: 0; }
.tsa-divider { border: 0; border-top: 1px solid var(--tsa-border); }

/* ============================================================
   Typography
   ============================================================ */
.tsa-h1, h1.tsa {
  font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-h1);
  line-height: 1.06; letter-spacing: -0.015em; color: var(--tsa-ink-strong);
}
.tsa-h2, h2.tsa {
  font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-h2);
  line-height: 1.12; letter-spacing: -0.01em; color: var(--tsa-ink-strong);
}
.tsa-h3, h3.tsa {
  font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-h3);
  color: var(--tsa-ink-strong);
}

/* Parent headline accent: the silver metallic fade on the italic emphasis */
.tsa-h1 em, h1.tsa em, .tsa-h2 em, h2.tsa em, .tsa-accent {
  font-style: italic; color: var(--tsa-silver); /* fallback */
  background: var(--tsa-fade);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.tsa-lede { font-size: var(--fs-lede); color: var(--tsa-muted); max-width: var(--width-prose); line-height: 1.6; }

.tsa-eyebrow {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.22em;
  font-size: var(--fs-eyebrow); font-weight: 600; color: var(--tsa-pewter);
}

/* Section tag: mono chip with a silver diamond */
.tsa-section-tag {
  display: flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--tsa-muted);
}
.tsa-section-tag::before { content: '\25C6'; font-size: 8px; color: var(--tsa-silver); }

/* ----- Child-brand WORD accents (sporadic, meaningful color) -----
   Use on the word that names a child. Solid fallback prevents an
   invisible-text rectangle where background-clip:text is unsupported. */
.fade-b { font-weight: 700; color: var(--bsa-solid);
  background: var(--bsa-fade); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.fade-f { font-weight: 700; color: var(--fsa-solid);
  background: var(--fsa-fade); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ============================================================
   Buttons: silver gradient OUTLINE, ivory text, never hue-filled.
   On non-bg surfaces override --btn-bg so the inner matches the surface.
   ============================================================ */
.tsa-btn {
  --btn-bg: var(--tsa-bg);
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.7rem; border-radius: var(--radius-sm);
  border: 1.6px solid transparent; color: var(--tsa-ink);
  text-decoration: none; cursor: pointer; min-height: 44px; transition: var(--transition-base);
}
.tsa-btn--primary {
  background: linear-gradient(var(--btn-bg), var(--btn-bg)) padding-box, var(--tsa-fade) border-box;
  color: var(--tsa-ink-strong);
}
.tsa-btn--primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.tsa-btn--secondary { border: 1.5px solid var(--tsa-border-strong); color: var(--tsa-ink); }
.tsa-btn--secondary:hover { border-color: var(--tsa-silver); color: var(--tsa-platinum); }
.tsa-btn--lg { padding: 1rem 2rem; font-size: 1rem; }
.tsa-section--alt .tsa-btn { --btn-bg: var(--tsa-surface); }
.tsa-section--deep .tsa-btn { --btn-bg: var(--tsa-deepest); }

/* ============================================================
   Cards
   ============================================================ */
.tsa-card {
  background: var(--tsa-elevated); border: 1px solid var(--tsa-border);
  border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-1);
  transition: var(--transition-base);
}
.tsa-card--hover:hover { transform: translateY(-3px); border-color: var(--tsa-border-strong); }

/* Child property cards: neutral surface; color lands on the title word and
   the card's own button outline. --btn-bg matches the card surface. */
.tsa-card .tsa-btn { --btn-bg: var(--tsa-elevated); }
.tsa-card--bsa .tsa-btn--primary { background: linear-gradient(var(--tsa-elevated), var(--tsa-elevated)) padding-box, var(--bsa-fade) border-box; }
.tsa-card--fsa .tsa-btn--primary { background: linear-gradient(var(--tsa-elevated), var(--tsa-elevated)) padding-box, var(--fsa-fade) border-box; }

/* Mono chip / badge */
.tsa-badge {
  display: inline-flex; align-items: center; font-family: var(--font-mono);
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  color: var(--tsa-muted); background: var(--tsa-surface);
  border: 1px solid var(--tsa-border); padding: 0.35rem 0.8rem; border-radius: var(--radius-pill);
}
.tsa-status { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tsa-muted); }
.tsa-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tsa-silver); display: inline-block; }
.tsa-dot--later { background: var(--tsa-faint); }

/* ============================================================
   Accessibility
   ============================================================ */
*:focus-visible { outline: 2px solid var(--tsa-silver); outline-offset: 3px; }
.tsa-btn, a { }
.tsa-btn { min-height: 44px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.tsa-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.tsa-skip-link { position: absolute; top: -40px; left: 0; background: var(--tsa-silver); color: var(--tsa-deepest); padding: 8px 12px; z-index: 100; font-family: var(--font-sans); font-weight: 600; }
.tsa-skip-link:focus { top: 0; }

@media print { body { background: #fff; color: #000; } .tsa-no-print { display: none !important; } }

/* ============================================================================
   PR3 · LEGACY --color-* ALIAS BLOCK
   Maps the old semantic names (consumed by legacy pages + the inline homepage
   bridge) onto the shared parent tokens, from ONE place. Because tsa-brand.css
   loads AFTER brand.css / tokens.css, these override the old orange definitions
   wherever tsa-brand.css is linked (currently only index.html + styleguide.html;
   styleguide uses --tsa-* not --color-*, so this is a no-op there, and index.html
   already applies the same mapping via its inline bridge -> visually identical).
   Names below are NOT defined in the shared file, so none are self-referential.
   The inline homepage bridge is intentionally LEFT in place for now.
   ========================================================================== */
:root {
  /* accent + gradient -> parent silver / metallic fade (neutralize legacy orange) */
  --color-brand:          var(--brand);
  --color-accent:         var(--brand);
  --color-orange:         var(--brand);
  --color-orange-hot:     var(--brand);
  --color-orange-bright:  var(--brand);
  --color-orange-deep:    var(--brand);
  --color-yellow:         var(--brand);
  --color-gold:           var(--brand);
  --brand-gradient:       var(--brand-fade);
  --gradient-orange:      var(--brand-fade);

  /* surfaces + text -> shared neutral scale */
  --color-bg:              var(--bg);
  --color-surface:         var(--surface);
  --color-panel:           var(--elevated);
  --color-surface-deepest: var(--deepest);
  --color-border:          var(--border);
  --color-border-strong:   var(--border-strong);
  --color-text:            var(--ink);
  --color-text-strong:     var(--ink-strong);
  --color-muted:           var(--muted);

  /* NOTE: cream/paper (--color-cream*, --color-ink-on-cream), graph/node
     (--color-node-*, --color-line-*), and alert (--color-danger*/-success*/
     -warning/-info) families are intentionally NOT aliased here — they are kept
     on their existing definitions until the pages that use them migrate. */
}
