/* ============================================================
   Helena Portfolio: Design tokens
   Single source of truth for color, type, space, shape and motion.
   styles.css consumes these; nothing here is component-specific.
   ============================================================ */
/* ---- Fonts: self-hosted from media/fonts ----
   Hedvig Letters Serif: Google Fonts, SIL Open Font License.
   Switzer: Fontshare (Indian Type Foundry), ITF Free Font License. */
@font-face { font-family: 'Hedvig Letters Serif'; src: url('media/fonts/hedvig-letters-serif.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('media/fonts/switzer-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('media/fonts/switzer-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('media/fonts/switzer-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('media/fonts/switzer-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Switzer'; src: url('media/fonts/switzer-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* ---- Primitives: raw values, no meaning. Never use in components. ---- */

  /* Brand scale (sparse on purpose: only steps in use today) */
  --brand-50:       #f9f6fe;
  --brand-100:      #f1ecfd;
  --brand-200:      #e6dcf9;
  --brand-300:      #dacef7;
  --brand-700:      #3f189a;
  --brand-900:      #150340;

  /* Neutral scale */
  --neutral-0:      #ffffff;
  --neutral-50:     #f7f7f7;
  --neutral-100:    #f0f0f0;
  --neutral-200:    #e3e3e3;
  --neutral-300:    #d6d6d6;
  --neutral-400:    #b3b3b3;
  --neutral-500:    #8c8c8c;   /* 3.4:1 on white: decorative only */
  --neutral-600:    #6b6b6b;   /* 5.3:1 */
  --neutral-700:    #525252;   /* 7.8:1 */
  --neutral-800:    #383838;
  --neutral-900:    #1d1d1d;
  --neutral-1000:   #000000;

  /* ---- Semantic: roles. Components and pages consume only these. ---- */

  /* Color: brand and surfaces */
  --primary:        var(--brand-900);
  --action:         var(--brand-700);
  --hero-accent:    var(--brand-300);
  --hero-bg:        radial-gradient(ellipse at center, var(--neutral-0) 36%, var(--brand-300) 100%);
  --surface:        var(--neutral-0);
  --surface-soft:   var(--brand-50);
  --surface-dark:   var(--neutral-900);
  --surface-black:  var(--neutral-1000);
  --surface-muted:  var(--neutral-100);
  --surface-tint:   var(--brand-100);
  --surface-accent: var(--brand-200);
  --surface-selected: var(--brand-300);

  /* Color: text and lines */
  --text-dark:      var(--neutral-900);
  --text-strong:    var(--neutral-1000);
  --text-inverse:   var(--neutral-0);
  --text-on-action: var(--brand-100);
  --text-body:      var(--neutral-700);   /* paragraphs, table cells */
  --text-secondary: var(--neutral-600);   /* meta, dates, small text, captions */
  --text-muted:     var(--neutral-500);   /* decorative hints only, never text to read */
  --border:         rgba(0, 0, 0, 0.1);
  --badge-bg:       var(--neutral-200);   /* NDA badges: one step darker than --tag-bg */
  --tag-bg:         rgba(0, 0, 0, 0.05);

  /* Type: families */
  --font:           'Switzer', system-ui, sans-serif;
  --font-display:   'Hedvig Letters Serif', Georgia, serif;

  /* Type: size scale (primitive, px). Only steps in use. */
  --font-size-12: 12px;  --font-size-13: 13px;  --font-size-14: 14px;
  --font-size-16: 16px;  --font-size-17: 17px;  --font-size-18: 18px;
  --font-size-20: 20px;  --font-size-24: 24px;  --font-size-26: 26px;
  --font-size-32: 32px;  --font-size-34: 34px;  --font-size-40: 40px;
  --font-size-44: 44px;  --font-size-56: 56px;

  /* Type: roles. Each role = family, size, weight, leading, tracking.
     Mobile sizes (<=767px) are set at the end of this file.
     Apply with:  font: var(--type-X-weight) var(--type-X-size)/var(--type-X-leading) var(--type-X-family);
                  letter-spacing: var(--type-X-tracking);                                   */
  --type-display-family: var(--font-display); --type-display-size: var(--font-size-56); --type-display-weight: 400; --type-display-leading: 1.05; --type-display-tracking: -0.025em;
  --type-h1-family:      var(--font-display); --type-h1-size:      var(--font-size-44); --type-h1-weight:      400; --type-h1-leading:      1.1;  --type-h1-tracking:      -0.025em;
  --type-h2-family:      var(--font-display); --type-h2-size:      var(--font-size-32); --type-h2-weight:      400; --type-h2-leading:      1.15; --type-h2-tracking:      -0.02em;
  --type-card-title-family: var(--font);      --type-card-title-size: var(--font-size-24); --type-card-title-weight: 600; --type-card-title-leading: 1.2; --type-card-title-tracking: -0.02em;
  --type-h3-family:      var(--font);         --type-h3-size:      var(--font-size-20); --type-h3-weight:      500; --type-h3-leading:      1.35; --type-h3-tracking:      -0.01em;
  --type-h4-family:      var(--font);         --type-h4-size:      var(--font-size-16); --type-h4-weight:      600; --type-h4-leading:      1.4;  --type-h4-tracking:      -0.005em;
  --type-lead-family:    var(--font);         --type-lead-size:    var(--font-size-18); --type-lead-weight:    400; --type-lead-leading:    1.55; --type-lead-tracking:    -0.005em;
  --type-body-family:    var(--font);         --type-body-size:    var(--font-size-16); --type-body-weight:    400; --type-body-leading:    1.6;  --type-body-tracking:    0;
  --type-small-family:   var(--font);         --type-small-size:   var(--font-size-14); --type-small-weight:   400; --type-small-leading:   1.5;  --type-small-tracking:   0;
  --type-label-family:   var(--font);         --type-label-size:   var(--font-size-13); --type-label-weight:   600; --type-label-leading:   1.3;  --type-label-tracking:   0;
  --type-tag-family:     var(--font);         --type-tag-size:     var(--font-size-12); --type-tag-weight:     500; --type-tag-leading:     1.3;  --type-tag-tracking:     0;

  /* Space: 4px grid */
  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;  --space-4: 16px;
  --space-5: 20px;  --space-6: 24px;  --space-8: 32px;  --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px;

  /* Shape */
  --btn-radius:     9999px;
  --radius-xs:      4px;
  --card-radius:    16px;
  --radius-sm:      8px;
  --radius-md:      12px;

  /* Layout */
  --nav-h:          80px;
  --pad:            64px;

  /* Motion */
  --ease-out:       cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:       150ms;
  --dur-med:        300ms;
  --dur-slow:       600ms;
}

/* Type roles: mobile sizes */
@media (max-width: 767px) {
  :root {
    --type-display-size:    var(--font-size-40);
    --type-h1-size:         var(--font-size-34);
    --type-h2-size:         var(--font-size-26);
    --type-card-title-size: var(--font-size-20);
    --type-h3-size:         var(--font-size-18);
    --type-lead-size:       var(--font-size-17);
  }
}

/* Respect the user's motion setting everywhere */
@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0.01ms; --dur-med: 0.01ms; --dur-slow: 0.01ms; }
  html { scroll-behavior: auto; }
}
