/* ============================================================
   ANALYTIKA SYSTEMS — Design Token System
   Precision Editorial aesthetic
   Version: 2.0
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Color Tokens ─────────────────────────────────────────── */
:root {

  /* Brand – Deep Violet (matches logo) */
  --violet-50:  #F3F0FF;
  --violet-100: #E5DEFF;
  --violet-200: #C9BAFD;
  --violet-300: #A78BFA;
  --violet-400: #8B5CF6;
  --violet-500: #7C3AED;
  --violet-600: #6D28D9;
  --violet-700: #5B21B6;   /* primary brand */
  --violet-800: #4C1D95;
  --violet-900: #2E1065;

  /* Warm Cream — surfaces */
  --cream-50:   #FDFCF9;
  --cream-100:  #FAF9F5;
  --cream-200:  #F4F1EA;
  --cream-300:  #EAE5D8;
  --cream-400:  #D6CEB8;
  --cream-500:  #B8AD96;

  /* Charcoal — dark sections */
  --charcoal-900: #0F0E0C;
  --charcoal-800: #1A1916;
  --charcoal-700: #252420;
  --charcoal-600: #32312C;
  --charcoal-500: #4A4843;

  /* Teal — accent A */
  --teal-50:  #F0FDFB;
  --teal-100: #CCFBF1;
  --teal-200: #99F6E4;
  --teal-400: #2DD4BF;
  --teal-500: #14B8A6;
  --teal-600: #0D9488;
  --teal-700: #0F766E;
  --teal-800: #115E59;

  /* Amber — accent B */
  --amber-50:  #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-300: #FCD34D;
  --amber-400: #FBBF24;
  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-700: #B45309;

  /* Semantic */
  --color-success:  #059669;
  --color-warning:  #D97706;
  --color-error:    #DC2626;

  /* ── Semantic Design Tokens ───────────────────────────── */

  /* Surfaces */
  --surface-primary:    var(--cream-100);   /* page bg */
  --surface-secondary:  var(--cream-200);   /* subtle bg */
  --surface-tertiary:   var(--cream-300);   /* borders, dividers */
  --surface-dark:       var(--charcoal-800); /* dark sections */
  --surface-darker:     var(--charcoal-900); /* footer */
  --surface-card:       var(--cream-50);    /* card bg */

  /* Text */
  --text-primary:   #1A1916;               /* near-black on cream */
  --text-secondary: #4A4843;               /* muted */
  --text-tertiary:  #7A7870;               /* hints */
  --text-inverse:   #FAF9F5;               /* on dark bg */
  --text-inverse-muted: rgba(250,249,245,.65);

  /* Brand */
  --brand:          var(--violet-700);
  --brand-light:    var(--violet-500);
  --brand-dark:     var(--violet-800);
  --brand-surface:  var(--violet-50);
  --brand-subtle:   var(--violet-100);

  /* Accents */
  --accent-teal:    var(--teal-600);
  --accent-amber:   var(--amber-600);

  /* Borders */
  --border-light:   rgba(26,25,22,.08);
  --border-medium:  rgba(26,25,22,.15);
  --border-strong:  rgba(26,25,22,.25);
  --border-brand:   rgba(92,33,182,.3);

  /* ── Typography ──────────────────────────────────────── */
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Type scale */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */
  --text-6xl:  3.75rem;    /* 60px */
  --text-7xl:  4.5rem;     /* 72px */

  /* Line heights */
  --leading-tight:  1.15;
  --leading-snug:   1.3;
  --leading-normal: 1.6;
  --leading-relaxed:1.75;

  /* Letter spacing */
  --tracking-tight:  -0.03em;
  --tracking-normal: -0.01em;
  --tracking-wide:   0.05em;
  --tracking-wider:  0.1em;
  --tracking-widest: 0.15em;

  /* ── Spacing ─────────────────────────────────────────── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Section padding */
  --section-py: clamp(4rem, 8vw, 7rem);
  --section-px: clamp(1.25rem, 5vw, 2rem);

  /* ── Layout ──────────────────────────────────────────── */
  --container-max:  1200px;
  --container-wide: 1400px;
  --container-narrow: 780px;

  /* ── Radii ───────────────────────────────────────────── */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  18px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ── Shadows ─────────────────────────────────────────── */
  --shadow-sm:  0 1px 3px rgba(15,14,12,.06), 0 1px 2px rgba(15,14,12,.04);
  --shadow-md:  0 4px 12px rgba(15,14,12,.08), 0 2px 6px rgba(15,14,12,.05);
  --shadow-lg:  0 12px 32px rgba(15,14,12,.10), 0 4px 12px rgba(15,14,12,.06);
  --shadow-xl:  0 24px 48px rgba(15,14,12,.12), 0 8px 20px rgba(15,14,12,.07);
  --shadow-brand: 0 8px 24px rgba(92,33,182,.22);
  --shadow-brand-lg: 0 16px 40px rgba(92,33,182,.28);

  /* ── Transitions ─────────────────────────────────────── */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-base:   250ms;
  --duration-slow:   400ms;
  --duration-slower: 600ms;

  /* ── Z-index scale ───────────────────────────────────── */
  --z-below:   -1;
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;

  /* ── Nav ─────────────────────────────────────────────── */
  --nav-height: 68px;
}
