/* ============================================================================
   Trichotology — Design Tokens
   Inherits from thepulsegoeson.com (parent) Inscribed Void system.
   Clinical translation register: cooler accents, same structural rhythm.
   ============================================================================ */

:root {
  color-scheme: dark;

  /* -------------------------------------------------------------------------
     INHERITED from parent — do not diverge without coordination
     ------------------------------------------------------------------------- */

  /* Void spectrum */
  --void:         #0a0a0f;
  --void-raised:  #0d0d14;
  --void-overlay: #12121a;

  /* Gold spectrum */
  --gold:         #c9a84c;
  --gold-dim:     #a08838;
  --gold-bright:  #d4af37;
  --gold-glow:    rgba(201,168,76,0.15);
  --gold-ghost:   rgba(201,168,76,0.06);
  --gold-line:    rgba(201,168,76,0.12);
  --gold-soft:    rgba(201, 168, 76, 0.18);

  /* Text spectrum */
  --text-primary: #f5f5f0;
  --text-body:    #d4c5a0;
  --text-muted:   #8b7d69;
  --text-faint:   #5a5245;

  /* Accents */
  --accent-green: #6bbf8a;
  --accent-amber: #bf9a5b;
  --accent-red:   #bf6b6b;

  /* Lines and dividers */
  --line:         rgba(234, 228, 218, 0.08);

  /* Typography families */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body:    "Spectral", Georgia, serif;
  --font-label:   "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Size scale — clamp ranges match parent */
  --size-label:   clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
  --size-small:   clamp(0.85rem, 0.8rem + 0.2vw, 0.95rem);
  --size-body:    clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
  --size-lead:    clamp(1.1rem, 1rem + 0.3vw, 1.3rem);
  --size-h3:      clamp(1.3rem, 1.2rem + 0.5vw, 1.7rem);
  --size-h2:      clamp(1.7rem, 1.5rem + 1vw, 2.4rem);
  --size-h1:      clamp(2.2rem, 1.8rem + 2vw, 3.4rem);
  --size-hero:    clamp(2.6rem, 2rem + 3vw, 4.8rem);

  /* Spacing */
  --content-max:    720px;
  --content-wide:   960px;
  --section-gap:    clamp(48px, 7vh, 96px);
  --page-padding-x: clamp(20px, 4vw, 40px);

  /* Motion — inherited base */
  --ease-reveal:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-breathe: cubic-bezier(0.37, 0, 0.63, 1);
  --dur-reveal:   800ms;

  /* -------------------------------------------------------------------------
     EXTENDED for Trichotology — clinical register
     Clinical surfaces use a slightly cooler tone than the parent's gold,
     signaling translation without breaking continuity.
     ------------------------------------------------------------------------- */

  /* Clinical accent — a cooler, more silvered gold for the clinical register */
  --clinical:       #b8a87a;
  --clinical-dim:   #9a8e6e;
  --clinical-line:  rgba(184, 168, 122, 0.14);
  --clinical-glow:  rgba(184, 168, 122, 0.12);

  /* Disclaimer surface — slightly warmer void for caution panels */
  --surface-caution:      #0f0e12;
  --surface-caution-edge: rgba(191, 154, 91, 0.22);

  /* Claim-shape tags — epistemic action taxonomy */
  --claim-asserts:          var(--gold);
  --claim-contraindicates:  var(--accent-red);
  --claim-mixed:            var(--accent-green);
  --claim-disputes:         #7a9ec2;

  /* Framework-term inline treatment */
  --term-color:    var(--gold-dim);
  --term-size:     0.92em;
  --term-tracking: 0.04em;

  /* Transition — slightly more restrained than music site */
  --ease-clinical: cubic-bezier(0.25, 0.1, 0.25, 1);
  --dur-clinical:  200ms;
}

/* ============================================================================
   Reduced-motion overrides
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-reveal:   0ms;
    --dur-clinical: 0ms;
  }
}

/* ============================================================================
   Base reset and root defaults — matches parent site
   ============================================================================ */

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

html {
  background: var(--void);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--text-body);
  font: 400 var(--size-body)/1.75 var(--font-body);
}

/* Grain overlay — inherited from parent */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--gold);
  color: var(--void);
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  font-family: var(--font-label);
  font-size: var(--size-label);
}
.skip-link:focus { top: 0; }

/* Focus state */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Selection */
::selection {
  background: var(--gold-soft);
  color: var(--text-primary);
}
