/*
 * BarcoderX design tokens - P4 Software
 * Light theme only. Plain CSS custom properties; no build step, no external fonts.
 * Every contrast ratio quoted in comments was computed with the WCAG 2.x relative-luminance formula.
 */
:root {
  /* ---- Colour: Good-read green (primary) -------------------------------------------------
     Named after the green "good read" beep/LED on a scanner. 500 is the logo green.      */
  --bx-green-50:  #E6F2EE;
  --bx-green-100: #CEE5DD;
  --bx-green-200: #9DCBBB;
  --bx-green-300: #6CB19A;
  --bx-green-400: #3B9778;
  --bx-green-500: #0A7D56;   /* brand primary: 5.15:1 on white, white text on it passes AA */
  --bx-green-600: #08684A;   /* hover / pressed / green text on tinted surfaces: 6.80:1 on white */
  --bx-green-700: #0B4C36;
  --bx-green-800: #0C3427;

  /* ---- Colour: Ink (dark) and neutrals. Green-tinted greys so they sit with the primary. - */
  --bx-ink:       #0C1C17;   /* 17.59:1 on white. Headlines, body text, dark surfaces */
  --bx-gray-700:  #33443E;   /* 10.31:1 on white */
  --bx-gray-600:  #4F605A;   /*  6.66:1 on white. Secondary text */
  --bx-gray-500:  #5B6B65;   /*  5.62:1 on white. Smallest allowed text grey (captions, placeholders) */
  --bx-gray-400:  #9AA8A3;   /* Borders on dark surfaces, disabled glyphs. NOT for text on white */
  --bx-gray-300:  #C9D3CF;   /* Input borders */
  --bx-gray-200:  #E1E8E5;   /* Hairlines, dividers */
  --bx-gray-100:  #EEF3F0;   /* Subtle fills */
  --bx-gray-50:   #F6F9F7;   /* Page canvas */
  --bx-white:     #FFFFFF;

  /* ---- Colour: Spark lime (accent). A FILL colour: never lime text on a light surface. ---- */
  --bx-lime-500:  #C6F135;   /* 13.43:1 against ink; fills, highlights, focus on dark */
  --bx-lime-200:  #E3F79A;
  --bx-lime-100:  #F1FBCF;
  --bx-lime-ink:  #3F5A00;   /* the only lime-family text colour: 7.85:1 on white */

  /* ---- Colour: status (UI only, never in the logo) ---- */
  --bx-danger:      #B42318;   /* 6.57:1 on white */
  --bx-danger-100:  #FDE8E6;
  --bx-warning-ink: #7A4400;
  --bx-warning-100: #FFF1D6;

  /* ---- Semantic aliases: components should use these, not the raw scale ---- */
  --bx-primary:        var(--bx-green-500);
  --bx-primary-hover:  var(--bx-green-600);
  --bx-accent:         var(--bx-lime-500);
  --bx-text:           var(--bx-ink);
  --bx-text-muted:     var(--bx-gray-600);
  --bx-text-subtle:    var(--bx-gray-500);
  --bx-surface:        var(--bx-white);
  --bx-canvas:         var(--bx-gray-50);
  --bx-border:         var(--bx-gray-200);
  --bx-border-strong:  var(--bx-gray-300);
  --bx-focus-ring:     #0A7D56;   /* 3:1+ against white and the canvas */

  /* ---- Typography ----------------------------------------------------------------------
     Intended brand typefaces: Inter (headings + text) and JetBrains Mono (code, labels).
     Neither is bundled so the kit works offline; the stacks below fall back to the best
     system face on Windows, macOS, Android and Linux.                                      */
  --bx-font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --bx-font-display: "Inter Tight", "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --bx-font-mono: "JetBrains Mono", "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, "SF Mono", Menlo, "Liberation Mono", monospace;

  /* Fluid type scale: min at 360px viewport, max at 1280px */
  --bx-text-xs:  0.75rem;
  --bx-text-sm:  0.875rem;
  --bx-text-md:  1rem;
  --bx-text-lg:  clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  --bx-text-xl:  clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --bx-text-2xl: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --bx-text-3xl: clamp(1.875rem, 1.4rem + 1.9vw, 2.75rem);
  --bx-text-4xl: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --bx-leading-tight: 1.15;
  --bx-leading-snug:  1.35;
  --bx-leading-body:  1.6;
  --bx-measure: 68ch;

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

  /* ---- Radius: small and engineered, echoing the mark's hard 45-degree cuts ---- */
  --bx-radius-sm: 4px;
  --bx-radius-md: 8px;
  --bx-radius-lg: 12px;
  --bx-radius-pill: 999px;

  /* ---- Shadow: ink-tinted, low and tight ---- */
  --bx-shadow-sm: 0 1px 2px rgba(12, 28, 23, 0.08);
  --bx-shadow-md: 0 4px 12px rgba(12, 28, 23, 0.08), 0 1px 3px rgba(12, 28, 23, 0.06);
  --bx-shadow-lg: 0 16px 40px rgba(12, 28, 23, 0.12), 0 2px 6px rgba(12, 28, 23, 0.06);

  /* ---- Motion ---- */
  --bx-ease: cubic-bezier(0.2, 0, 0, 1);
  --bx-duration-fast: 120ms;
  --bx-duration: 200ms;

  /* ---- Layout ---- */
  --bx-gutter: 1rem;          /* 16px on phones */
  --bx-container: 72rem;
  --bx-touch-target: 44px;
}

@media (min-width: 48rem) {
  :root { --bx-gutter: 2rem; }
}
