/* ============================================================================
   Inscribed Void — Design Tokens (Main Site)
   Shared primitive layer for thepulsegoeson.com.
   Sub-sites (trichotology, pulse-music) inherit and extend these values.
   ============================================================================ */

:root {
  color-scheme: dark;

  /* 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);
  --gold-wash:    rgba(201,168,76,0.20);
  --gold-pulse:   rgba(201,168,76,0.25);

  /* Void backdrops (for overlays, sticky headers) */
  --void-backdrop: rgba(10,10,15,0.90);

  /* Text spectrum */
  --text-primary: #f5f5f0;
  --text-body:    #d4c5a0;
  --text-muted:   #8b7d69;
  --text-faint:   #5a5245; /* Decoration only — never for readable text (2.57:1 fails AA) */

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

  /* Size scale — positional names (legacy) */
  --size-hero:    clamp(3rem, 2rem + 4vw, 5rem);
  --size-section: clamp(1.8rem, 1.2rem + 1.8vw, 2.6rem);
  --size-sub:     clamp(1.3rem, 1rem + 0.8vw, 1.7rem);
  --size-body:    clamp(1.15rem, 1.2rem + 0.4vw, 1.35rem);
  --size-label:   clamp(0.8rem, 0.6rem + 0.4vw, 0.95rem);
  --size-small:   clamp(0.85rem, 0.7rem + 0.3vw, 1rem);

  /* Size scale — structural aliases (match sub-sites) */
  --size-h1:      var(--size-section);
  --size-h2:      var(--size-sub);
  --size-lead:    clamp(1.1rem, 1rem + 0.3vw, 1.3rem);

  /* Line heights */
  --line-body:    1.75;
  --line-heading: 1.2;

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

  /* Motion */
  --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;
}

/* ============================================================================
   Base reset — applied once via tokens.css
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  background-color: var(--void);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--line-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 200ms ease;
}
a:hover { color: var(--gold-bright); }
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--gold);
  color: var(--void);
  padding: 8px 16px;
  font-family: var(--font-label);
  font-size: var(--size-label);
  letter-spacing: 0.12em;
  z-index: 9999;
  transition: top 200ms;
}
.skip-link:focus { top: 16px; color: var(--void); }

/* Grain overlay */
.grain {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 400;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
