/* =========================================================
   Datajay Design System — Colors + Type
   Source of truth for color tokens, type scale, radii, shadows.
   ========================================================= */

/* ---------- Webfonts ---------- */
/* Display serif: Instrument Serif — editorial, warm, trust (from Google Fonts) */
/* Mono: Geist Mono — tabular numbers (from Google Fonts) */
/* UI / Body / Display sans: Inter (brand-supplied, 18pt / 24pt / 28pt optical sizes) */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist+Mono:wght@400;500;600&display=swap');

/* Inter 18pt — optimized for UI / body / small type (≤20px) */
@font-face { font-family: 'Inter'; font-weight: 200; font-style: normal;  src: url('fonts/Inter_18pt-ExtraLight.ttf')       format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 200; font-style: italic;  src: url('fonts/Inter_18pt-ExtraLightItalic.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 300; font-style: normal;  src: url('fonts/Inter_18pt-Light.ttf')            format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 300; font-style: italic;  src: url('fonts/Inter_18pt-LightItalic.ttf')      format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal;  src: url('fonts/Inter_18pt-Regular.ttf')          format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 400; font-style: italic;  src: url('fonts/Inter_18pt-Italic.ttf')           format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal;  src: url('fonts/Inter_18pt-Medium.ttf')           format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: italic;  src: url('fonts/Inter_18pt-MediumItalic.ttf')     format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal;  src: url('fonts/Inter_18pt-SemiBold.ttf')         format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: italic;  src: url('fonts/Inter_18pt-SemiBoldItalic.ttf')   format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal;  src: url('fonts/Inter_18pt-Bold.ttf')             format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: italic;  src: url('fonts/Inter_18pt-BoldItalic.ttf')       format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 800; font-style: normal;  src: url('fonts/Inter_18pt-ExtraBold.ttf')        format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter'; font-weight: 900; font-style: normal;  src: url('fonts/Inter_18pt-Black.ttf')            format('truetype'); font-display: swap; }

/* Inter 24pt — optimized for headlines / medium display (20–40px) */
@font-face { font-family: 'Inter Display'; font-weight: 400; font-style: normal; src: url('fonts/Inter_24pt-Regular.ttf')   format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Display'; font-weight: 500; font-style: normal; src: url('fonts/Inter_24pt-Medium.ttf')    format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Display'; font-weight: 600; font-style: normal; src: url('fonts/Inter_24pt-SemiBold.ttf')  format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Display'; font-weight: 700; font-style: normal; src: url('fonts/Inter_24pt-Bold.ttf')      format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Display'; font-weight: 800; font-style: normal; src: url('fonts/Inter_24pt-ExtraBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Display'; font-weight: 900; font-style: normal; src: url('fonts/Inter_24pt-Black.ttf')     format('truetype'); font-display: swap; }

/* Inter 28pt — optimized for large display (>40px) */
@font-face { font-family: 'Inter Hero'; font-weight: 400; font-style: normal; src: url('fonts/Inter_28pt-Regular.ttf')   format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Hero'; font-weight: 600; font-style: normal; src: url('fonts/Inter_28pt-SemiBold.ttf')  format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Hero'; font-weight: 700; font-style: normal; src: url('fonts/Inter_28pt-Bold.ttf')      format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Hero'; font-weight: 800; font-style: normal; src: url('fonts/Inter_28pt-ExtraBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter Hero'; font-weight: 900; font-style: normal; src: url('fonts/Inter_28pt-Black.ttf')     format('truetype'); font-display: swap; }

:root {
  /* =========================================================
     BRAND COLORS (from palette PDF)
     ========================================================= */
  --dj-navy:        #1B2238;   /* primary ink / outlines   */
  --dj-blue:        #00A3E0;   /* accent — electric jay blue */
  --dj-orange:      #E5915E;   /* warm primary             */
  --dj-peach:       #EEB581;   /* soft accent / highlight  */
  --dj-cream:       #FEF9F1;   /* paper / canvas           */

  /* =========================================================
     EXTENDED SCALE
     Derived from brand for UI density. Keep grays cool (lean navy).
     ========================================================= */
  --dj-navy-900:    #0F1425;
  --dj-navy-800:    #1B2238;   /* = brand navy */
  --dj-navy-700:    #2A3356;
  --dj-navy-600:    #3D4770;
  --dj-navy-500:    #5A6489;
  --dj-navy-400:    #8890AE;
  --dj-navy-300:    #B8BECF;
  --dj-navy-200:    #DCDFE8;
  --dj-navy-100:    #ECEEF3;
  --dj-navy-50:     #F5F6F9;

  --dj-blue-700:    #0079A8;
  --dj-blue-600:    #008CC1;
  --dj-blue-500:    #00A3E0;   /* = brand blue */
  --dj-blue-400:    #3DB8E8;
  --dj-blue-300:    #7ACDEF;
  --dj-blue-200:    #B8E2F7;
  --dj-blue-100:    #E0F2FB;

  --dj-orange-700: #B9692F;
  --dj-orange-600: #D17C43;
  --dj-orange-500: #E5915E;   /* = brand orange */
  --dj-orange-400: #EAA374;
  --dj-orange-300: #EEB581;   /* = brand peach */
  --dj-orange-200: #F5CFAC;
  --dj-orange-100: #FBE7D3;

  --dj-cream-100:   #FEF9F1;   /* = brand cream */
  --dj-cream-200:   #F8EFDD;
  --dj-cream-300:   #F0E2C6;

  /* Semantic */
  --dj-success:     #2E8B6B;
  --dj-success-bg:  #E5F3ED;
  --dj-warn:        #C98A1E;
  --dj-warn-bg:     #FBF1DC;
  --dj-danger:      #C04B3E;
  --dj-danger-bg:   #FAE6E2;
  --dj-info:        #00A3E0;
  --dj-info-bg:     #E0F2FB;

  /* =========================================================
     FOREGROUND / BACKGROUND SEMANTIC TOKENS
     ========================================================= */
  --fg-1:           var(--dj-navy-900);   /* primary text      */
  --fg-2:           var(--dj-navy-700);   /* secondary text    */
  --fg-3:           var(--dj-navy-500);   /* muted / meta      */
  --fg-4:           var(--dj-navy-400);   /* placeholder       */
  --fg-inverse:     var(--dj-cream-100);

  --bg-1:           var(--dj-cream-100);  /* canvas            */
  --bg-2:           #FFFFFF;              /* surface / card    */
  --bg-3:           var(--dj-navy-50);    /* raised / input    */
  --bg-4:           var(--dj-navy-100);   /* hover / selected  */
  --bg-inverse:     var(--dj-navy-900);

  --border-1:       var(--dj-navy-200);   /* default border    */
  --border-2:       var(--dj-navy-100);   /* subtle border     */
  --border-strong:  var(--dj-navy-800);   /* outline / focus   */

  --accent:         var(--dj-blue-500);
  --accent-hover:   var(--dj-blue-600);
  --accent-fg:      #FFFFFF;

  --brand:          var(--dj-navy-800);
  --brand-warm:     var(--dj-orange-500);

  /* =========================================================
     TYPE — FAMILIES
     ========================================================= */
  --font-display:   'Instrument Serif', 'Times New Roman', serif;
  --font-ui:        'Inter', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --font-headline:  'Inter Display', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-hero:      'Inter Hero', 'Inter Display', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono:      'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-heavy:     'Inter Hero', 'Inter', ui-sans-serif, system-ui, sans-serif;

  /* =========================================================
     TYPE — SCALE (desktop; scale down ~0.875x on mobile)
     ========================================================= */
  --text-xs:        12px;
  --text-sm:        13px;
  --text-base:      15px;
  --text-md:        17px;
  --text-lg:        20px;
  --text-xl:        24px;
  --text-2xl:       32px;
  --text-3xl:       44px;
  --text-4xl:       60px;
  --text-5xl:       84px;

  --leading-tight:  1.1;
  --leading-snug:   1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide:  0.04em;
  --tracking-caps:  0.08em;

  /* =========================================================
     SPACING (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;
  --space-24:  96px;

  /* =========================================================
     RADII
     ========================================================= */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* =========================================================
     SHADOWS — lean navy-tinted, restrained
     ========================================================= */
  --shadow-xs:  0 1px 2px rgba(27, 34, 56, 0.06);
  --shadow-sm:  0 1px 3px rgba(27, 34, 56, 0.08), 0 1px 2px rgba(27, 34, 56, 0.04);
  --shadow-md:  0 4px 12px rgba(27, 34, 56, 0.08), 0 2px 4px rgba(27, 34, 56, 0.04);
  --shadow-lg:  0 12px 32px rgba(27, 34, 56, 0.10), 0 4px 8px rgba(27, 34, 56, 0.05);
  --shadow-xl:  0 24px 56px rgba(27, 34, 56, 0.14), 0 8px 16px rgba(27, 34, 56, 0.06);
  --shadow-focus: 0 0 0 3px rgba(0, 163, 224, 0.28);

  /* Inner highlights — for raised chips, glossy effect on orange */
  --shadow-inner-hi: inset 0 1px 0 rgba(255,255,255,0.5);

  /* =========================================================
     MOTION
     ========================================================= */
  --ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-emphasis: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:   120ms;
  --dur-base:   200ms;
  --dur-slow:   320ms;
}

/* =========================================================
   SEMANTIC TYPE CLASSES
   Use these in preference to raw font-size props.
   ========================================================= */

.dj-display-xl {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-5xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
}
.dj-display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-4xl);
  line-height: 1.05;
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
}
.dj-display em, .dj-display-xl em {
  font-style: italic;
  color: var(--dj-orange-500);
}

.dj-h1 {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-1);
}
.dj-h2 {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
  letter-spacing: -0.015em;
  color: var(--fg-1);
}
.dj-h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--fg-1);
}
.dj-h4 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: var(--text-lg);
  line-height: 1.3;
  color: var(--fg-1);
}
.dj-eyebrow {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--fg-3);
}
.dj-body-lg {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--fg-2);
}
.dj-body {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg-2);
}
.dj-body-sm {
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--fg-2);
}
.dj-meta {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--fg-3);
}
.dj-mono, .dj-number {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1, "cv06" 1;
  letter-spacing: -0.01em;
}
.dj-number-display {
  font-family: var(--font-mono);
  font-weight: 500;
  font-feature-settings: "tnum" 1;
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
  color: var(--fg-1);
}

/* Base element styles — opt-in via .dj class on a root element. */
.dj {
  font-family: var(--font-ui);
  color: var(--fg-1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.dj h1 { @extend .dj-h1; }
.dj h2 { @extend .dj-h2; }
.dj h3 { @extend .dj-h3; }
.dj p  { @extend .dj-body; }
.dj code { font-family: var(--font-mono); font-size: 0.92em; background: var(--bg-3); padding: 2px 6px; border-radius: var(--radius-xs); }
