/* ============================================================================
   NOORDEV DESIGN TOKENS
   Source of truth for color, type, spacing, radii, shadow, motion.
   Import this stylesheet into any page that consumes the system.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* --------------------------------------------------------------------------
     COLOR — Core palette
     Primary navy is extracted from the Noordev wordmark.
     Crimson is extracted from the logo's accent dot.
     -------------------------------------------------------------------------- */

  /* Navy (primary brand) — deep, trustworthy, enterprise */
  --navy-50:  #f3f6f9;
  --navy-100: #e3eaf1;
  --navy-200: #c1d0de;
  --navy-300: #92aabf;
  --navy-400: #5d7a94;
  --navy-500: #385a75;
  --navy-600: #264158;
  --navy-700: #1d3244;  /* Wordmark */
  --navy-800: #152432;
  --navy-900: #0e1921;
  --navy-950: #070d13;

  /* Crimson (accent) — used sparingly: the "dot on the i", CTAs, alerts */
  --crimson-50:  #fef2f3;
  --crimson-100: #fde3e6;
  --crimson-200: #fbcbd1;
  --crimson-300: #f7a1ac;
  --crimson-400: #f16f80;
  --crimson-500: #e63b55;
  --crimson-600: #cf1d3b;  /* Accent dot */
  --crimson-700: #af1532;
  --crimson-800: #91152f;
  --crimson-900: #7a162d;

  /* Neutrals — warm cool-gray that sits under the navy */
  --neutral-0:   #ffffff;
  --neutral-50:  #fafafa;
  --neutral-100: #f4f5f6;
  --neutral-200: #e6e8ec;
  --neutral-300: #d2d6dc;
  --neutral-400: #a5abb4;
  --neutral-500: #737a85;
  --neutral-600: #525863;
  --neutral-700: #3b414a;
  --neutral-800: #24282f;
  --neutral-900: #15181d;

  /* Signal colors — used in product surfaces (dashboards, forms) */
  --signal-success:  #0f8a5f;
  --signal-warning:  #b76e00;
  --signal-danger:   var(--crimson-600);
  --signal-info:     #1e6bb8;

  /* --------------------------------------------------------------------------
     SEMANTIC TOKENS — use these in components, not the raw scale above
     -------------------------------------------------------------------------- */

  /* Surface */
  --color-bg:             var(--neutral-0);
  --color-bg-subtle:      var(--neutral-50);
  --color-bg-muted:       var(--neutral-100);
  --color-bg-inverted:    var(--navy-900);

  /* Ink (text) */
  --color-ink:            var(--navy-900);
  --color-ink-muted:      var(--neutral-600);
  --color-ink-subtle:     var(--neutral-500);
  --color-ink-inverted:   var(--neutral-0);
  --color-ink-brand:      var(--navy-700);
  --color-ink-accent:     var(--crimson-600);

  /* Border */
  --color-border:         var(--neutral-200);
  --color-border-strong:  var(--neutral-300);
  --color-border-inverted:#223341;

  /* Interactive */
  --color-action:         var(--navy-700);
  --color-action-hover:   var(--navy-800);
  --color-action-ink:     var(--neutral-0);
  --color-accent:         var(--crimson-600);
  --color-accent-hover:   var(--crimson-700);
  --color-focus-ring:     var(--navy-400);

  /* --------------------------------------------------------------------------
     TYPOGRAPHY
     -------------------------------------------------------------------------- */
  --font-sans:    "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-display: "Instrument Serif", "Georgia", serif;  /* Editorial accents only */

  /* Type scale — modular, major-second ramp tuned for long-form + marketing */
  --text-xs:    0.75rem;    /* 12 */
  --text-sm:    0.875rem;   /* 14 */
  --text-base:  1rem;       /* 16 */
  --text-md:    1.125rem;   /* 18 */
  --text-lg:    1.25rem;    /* 20 */
  --text-xl:    1.5rem;     /* 24 */
  --text-2xl:   1.875rem;   /* 30 */
  --text-3xl:   2.25rem;    /* 36 */
  --text-4xl:   3rem;       /* 48 */
  --text-5xl:   3.75rem;    /* 60 */
  --text-6xl:   4.75rem;    /* 76 */

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

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-label:  0.08em;  /* uppercase eyebrows */

  /* --------------------------------------------------------------------------
     SPACING — 4px base, numbers = pixels for clarity
     -------------------------------------------------------------------------- */
  --space-0:   0;
  --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;
  --space-32:  128px;
  --space-40:  160px;

  /* Layout */
  --container-max:    1200px;
  --container-wide:   1360px;
  --gutter:           clamp(16px, 4vw, 40px);

  /* --------------------------------------------------------------------------
     RADIUS
     -------------------------------------------------------------------------- */
  --radius-none: 0;
  --radius-xs:   2px;
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* --------------------------------------------------------------------------
     SHADOW — restrained, layered, no drama
     -------------------------------------------------------------------------- */
  --shadow-xs:  0 1px 2px rgba(14, 25, 33, 0.04);
  --shadow-sm:  0 1px 2px rgba(14, 25, 33, 0.05), 0 1px 3px rgba(14, 25, 33, 0.05);
  --shadow-md:  0 2px 4px rgba(14, 25, 33, 0.05), 0 4px 12px rgba(14, 25, 33, 0.06);
  --shadow-lg:  0 4px 8px rgba(14, 25, 33, 0.06), 0 12px 32px rgba(14, 25, 33, 0.08);
  --shadow-xl:  0 8px 16px rgba(14, 25, 33, 0.08), 0 24px 56px rgba(14, 25, 33, 0.12);
  --shadow-focus: 0 0 0 3px rgba(56, 90, 117, 0.25);

  /* --------------------------------------------------------------------------
     MOTION
     -------------------------------------------------------------------------- */
  --ease-out:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:      120ms;
  --dur-base:      200ms;
  --dur-slow:      360ms;
}

/* ============================================================================
   GLOBAL RESETS — opt-in via .nd-prose or .nd-page
   ============================================================================ */
.nd-page {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.nd-page *, .nd-page *::before, .nd-page *::after { box-sizing: border-box; }

/* Focus-visible ring for accessibility */
.nd-page :focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
