/* ============================================================================
   PRAVAHA TOKENS — FITCO Design System v4
   Version 4.1.0 | 2026-07-07 | Split from pravaha.css (v70 -> v71 breakaway)
   This file carries ONLY custom-property definitions (plus ::selection).
   It is enqueued globally and is inert: token definitions cannot collide
   with any page bundle. All color truth lives HERE and only here.

   Rule-level layers moved to:
   - css/pravaha-components.css  (.p-* component library, conditional)
   - css/fud-editorial.css       (.fud-v1 + knowledge home scopes, conditional)
   Hard rule: no hex codes outside this file. Pages consume var(--p-*).
   ============================================================================ */

/* ════════════════════════ 01 · TOKENS ════════════════════════ */
:root {
  /* Deep Trust Blue */
  --p-blue-50:  #F2F7FB;
  --p-blue-100: #E1EDF5;
  --p-blue-200: #C3DBEA;
  --p-blue-300: #97C0DA;
  --p-blue-400: #62A0C4;
  --p-blue-500: #3B82AC;
  --p-blue-600: #266992;
  --p-blue-700: #1D5578;
  --p-blue-800: #16435E;
  --p-blue-900: #123349;

  /* Prosperity Green */
  --p-green-50:  #F0F9F4;
  --p-green-100: #DCF2E5;
  --p-green-200: #B5E3C9;
  --p-green-300: #82CDA4;
  --p-green-400: #4FB07D;
  --p-green-500: #2E9560;
  --p-green-600: #1F7D4E;
  --p-green-700: #196740;
  --p-green-800: #155434;
  --p-green-900: #104227;

  /* Auspicious Gold */
  --p-gold-50:  #FBF7EE;
  --p-gold-100: #F6EDD8;
  --p-gold-200: #EDDBB0;
  --p-gold-300: #DFC07C;
  --p-gold-400: #CFA452;
  --p-gold-500: #BC8A33;
  --p-gold-600: #9F7226;
  --p-gold-700: #835D1F;
  --p-gold-800: #6A4B1B;
  --p-gold-900: #523A15;

  /* Saffron — emphatic, rare */
  --p-saffron-600: #B5541F;
  --p-saffron-700: #97431A;

  /* Surface tints — intentionally flat white right now. This is the ONE place to
     reintroduce Pravaha's warm sandstone: set the three values below to e.g.
     #FBFAF7 / #F7F5F0 / #EFEBE3 and every surface warms up site-wide. */
  --p-ivory:       var(--p-white);
  --p-sand-50:     var(--p-white);
  --p-sand-100:    var(--p-white);
  --p-line:        #E4E1D9;
  --p-line-strong: #C8C2B4;

  /* Ink — warm blue-black */
  --p-ink:    #0E1B26;
  --p-ink-2:  #16242F;
  --p-muted:  #51626F;
  --p-white:  #FFFFFF;
  --p-navy:   #0C2238;   /* deep navy — secondary section surface */

  /* Functional */
  --p-error:        #B3402E;   /* forms only */
  --p-error-border: #D3543F;

  /* Semantic aliases */
  --p-primary:        var(--p-blue-600);
  --p-primary-strong: var(--p-blue-700);
  --p-primary-soft:   var(--p-blue-50);
  --p-success:        var(--p-green-600);
  --p-accent:         var(--p-gold-500);
  --p-text:           var(--p-ink);
  --p-text-muted:     var(--p-muted);
  --p-bg:             var(--p-ivory);
  --p-surface:        var(--p-white);

  /* Typography */
  --p-font-display: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --p-font-text:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --p-font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Type scale — Major Third, fluid display sizes */
  --p-text-xs:   0.75rem;
  --p-text-sm:   0.875rem;
  --p-text-base: 1rem;
  --p-text-md:   1.0625rem;
  --p-text-lg:   1.125rem;
  --p-text-xl:   1.25rem;
  --p-text-2xl:  1.5625rem;
  --p-text-3xl:  clamp(1.75rem, 1.45rem + 1vw, 1.953rem);
  --p-text-4xl:  clamp(2.05rem, 1.55rem + 1.7vw, 2.441rem);
  --p-text-5xl:  clamp(2.45rem, 1.8rem + 2.4vw, 3.052rem);
  --p-text-6xl:  clamp(2.55rem, 1.85rem + 2.9vw, 3.815rem);
  --p-text-7xl:  clamp(2.8rem, 1.95rem + 3.6vw, 4.5rem);

  /* Weights — only these four are loaded */
  --p-regular: 400;
  --p-semibold: 600;
  --p-bold: 700;
  --p-extrabold: 800;

  /* Spacing — 4px base */
  --p-space-1: 0.25rem;
  --p-space-2: 0.5rem;
  --p-space-3: 0.75rem;
  --p-space-4: 1rem;
  --p-space-5: 1.25rem;
  --p-space-6: 1.5rem;
  --p-space-8: 2rem;
  --p-space-10: 2.5rem;
  --p-space-12: 3rem;
  --p-space-14: 3.5rem;
  --p-space-16: 4rem;
  --p-space-20: 5rem;
  --p-space-24: 6rem;

  /* Radii */
  --p-radius-sm: 4px;
  --p-radius:    8px;
  --p-radius-lg: 14px;
  --p-radius-full: 999px;

  /* Elevation — daylight from the north-east */
  --p-shadow-sm: 0 1px 2px rgba(14, 27, 38, 0.06);
  --p-shadow:    0 1px 2px rgba(14, 27, 38, 0.05), 0 8px 24px -12px rgba(14, 27, 38, 0.12);
  --p-shadow-lg: 0 2px 4px rgba(14, 27, 38, 0.05), 0 24px 48px -16px rgba(14, 27, 38, 0.18);

  /* Motion */
  --p-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --p-fast: 160ms;
  --p-normal: 260ms;

  /* Layout */
  --p-container: 1180px;
  --p-container-wide: 1360px;
  --p-header-offset: 96px;

  /* Z-scale — every layer has a named home. No raw z-index in new work. */
  --p-z-raised: 10;
  --p-z-sticky: 100;
  --p-z-header: 1000;
  --p-z-dropdown: 1100;
  --p-z-fab: 1200;
  --p-z-overlay: 1300;
  --p-z-modal: 1400;
  --p-z-skiplink: 1600;
}

/* Brand text selection — quiet gold, everywhere */
::selection { background: var(--p-blue-100); color: var(--p-ink); }

/* ════════════════ 02 · LEGACY TOKEN ALIASES (deprecated) ════════════════ */
/* Older templates referenced these names. They now resolve to Pravaha.
   Do not use in new work. */
:root {
  --fitco-accent-700: var(--p-blue-700);
  --fitco-accent-600: var(--p-blue-500);
  --fitco-accent-500: var(--p-blue-300);
  --fds-blue-600: var(--p-blue-600);
  --fds-blue-700: var(--p-blue-700);
  --fds-gold-500: var(--p-gold-500);
  --fds-green-600: var(--p-green-600);
  --fds-ivory: var(--p-ivory);
  --fds-sand-50: var(--p-sand-50);
  --fds-line: var(--p-line);
  --fds-ink: var(--p-ink);
  --fds-muted: var(--p-muted);
}

/* ═══════ YANTRA tokens (instrument language) ═══════ */
:root {
  /* needle-settle: tiny overshoot, then rest */
  --p-ease-settle: cubic-bezier(0.30, 1.25, 0.45, 1);
  /* scale-marking rule: hairline with ticks every 24px */
  --p-rule-ticks: repeating-linear-gradient(90deg,
      var(--p-line-strong) 0 1px, transparent 1px 24px),
    linear-gradient(var(--p-line) 0 0);
}
