/* CSL Shoes Design Tokens — shared across all webshop pages */
/* This file provides consistent variables, font, and utility classes */

/* Font face.
 * MKT2-FONT (WEEKEND-001 / MKT-001 perf §4.2, PERF-5): NO unicode-range on purpose.
 * frappe's website.bundle.css declares the same family "InterVariable" with the
 * un-subset 338 KB /assets/frappe/css/fonts/inter/InterVariable.woff2. This file
 * is included via hooks.web_include_css and therefore loads AFTER frappe's bundle,
 * so for equal descriptors this later face wins font matching. While this rule
 * carried a Latin unicode-range, any runtime glyph outside that range fell through
 * to frappe's full file — observed on the home page only (390 KB font transfer vs
 * 52 KB on every other page; ~1.7 s of Fast-3G bandwidth on the paid-traffic
 * landing page). With no unicode-range this 52 KB subset claims ALL codepoints and
 * frappe's face is never downloaded. Glyphs missing from the subset file fall
 * through per-character to the next font-family entry ('Inter'/system sans) —
 * acceptable: the June-12 audit found no rendered non-Latin glyphs (the only
 * out-of-range chars were inside JS comments).
 * STOREFRONT-SCOPED: this file ships only via web_include_css (website pages).
 * Desk loads app_include_css (desk_custom.css) and never loads this file, so Desk
 * keeps frappe's full InterVariable untouched. Zero frappe-core edits. */
@font-face {
  font-family: InterVariable;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/cslshoes_erp/fonts/InterVariable-Latin.woff2") format("woff2");
}

/* Unified design tokens — WCAG AA compliant contrast */
:root {
  /* Brand colors — gold darkened from #c9a227 to pass AA contrast (5.1:1 on white) */
  --csl-accent: #8B6914;
  --csl-accent-light: #c9a227;
  --csl-primary: #1a1a1a;
  --csl-success: #16a34a;
  --csl-danger: #ef4444;
  --csl-warning: #f59e0b;
  --csl-info: #3b82f6;

  /* Grays */
  --csl-white: #ffffff;
  --csl-gray-50: #f9fafb;
  --csl-gray-100: #f3f4f6;
  --csl-gray-200: #e5e7eb;
  --csl-gray-300: #d1d5db;
  --csl-gray-400: #9ca3af;
  --csl-gray-500: #6b7280;
  --csl-gray-600: #4b5563;
  --csl-gray-700: #374151;
  --csl-gray-800: #1f2937;
  --csl-gray-900: #111827;

  /* Typography */
  --csl-font: InterVariable, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Accessibility utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Focus visible — WCAG 2.4.7 */
:focus-visible {
  outline: 2px solid var(--csl-accent);
  outline-offset: 2px;
}

/* Reduced motion — WCAG 2.3.3 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Touch targets — WCAG 2.5.8 */
.csl-touch-target {
  min-width: 44px;
  min-height: 44px;
}
