/* ============================================================
   WEARABLE ART — CORE SYSTEM TOKENS (M3)
   Loads after tokens-foundation.css.
   ============================================================ */

:root {

  /* ---------- TYPOGRAPHY ---------- */
  --bs-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --bs-font-mono: 'Martian Mono', ui-monospace, monospace;

  /* Scale — size / line-height / letter-spacing */
  --bs-display-xl:      56px;  --bs-display-xl-lh:   0.98;  --bs-display-xl-ls:  -2.0px;
  --bs-display-l:       40px;  --bs-display-l-lh:    1.00;  --bs-display-l-ls:   -1.3px;
  --bs-h1:              32px;  --bs-h1-lh:           1.08;  --bs-h1-ls:          -0.9px;
  --bs-h2:              26px;  --bs-h2-lh:           1.18;  --bs-h2-ls:          -0.6px;
  --bs-h3:              20px;  --bs-h3-lh:           1.28;  --bs-h3-ls:          -0.3px;
  --bs-body-l:          18px;  --bs-body-l-lh:       1.60;  --bs-body-l-ls:       0;
  --bs-body:            16px;  --bs-body-lh:         1.60;  --bs-body-ls:         0;
  --bs-body-s:          14px;  --bs-body-s-lh:       1.55;  --bs-body-s-ls:       0;
  --bs-label:           12px;  --bs-label-lh:        1.30;  --bs-label-ls:       +2.5px;  /* MONO, uppercase */
  --bs-caption:         12px;  --bs-caption-lh:      1.45;  --bs-caption-ls:      0;

  /* Weights — nothing below 400; thin strokes undercut the brand's energy */
  --bs-w-regular: 400;
  --bs-w-medium:  500;
  --bs-w-semi:    600;
  --bs-w-bold:    700;
  --bs-w-extra:   800;

  /* ---------- SPACING · 4px base ---------- */
  --bs-space-1:   4px;
  --bs-space-2:   8px;
  --bs-space-3:  12px;
  --bs-space-4:  16px;
  --bs-space-5:  24px;   /* workhorse: card padding, grid gutter */
  --bs-space-6:  32px;
  /* 7-10 are layout spacing (section padding, big gutters). Fluid since 1.3.3
     so desktop and phone never get oversized gaps. */
  --bs-space-7:  clamp(28px, 2.8vw, 40px);
  --bs-space-8:  clamp(36px, 3.4vw, 48px);
  --bs-space-9:  clamp(48px, 4.5vw, 64px);
  --bs-space-10: clamp(64px, 6vw, 88px);

  /* ---------- RADII ---------- */
  --bs-radius-none: 0;
  --bs-radius-sm:   6px;    /* chips, tags */
  --bs-radius-md:   8px;    /* buttons, inputs */
  --bs-radius-lg:  12px;    /* cards, panels */
  --bs-radius-xl:  20px;    /* modals, hero blocks */
  --bs-radius-pill: 999px;  /* badges, filter pills */
  /* Nesting rule: inner radius = outer radius − padding. */

  /* ---------- ELEVATION · charcoal-tinted, never pure black ---------- */
  --bs-elev-0: none;
  --bs-elev-1: 0 1px 2px rgba(58,34,48,.06),  0 1px 3px rgba(58,34,48,.08);
  --bs-elev-2: 0 2px 4px rgba(58,34,48,.06),  0 4px 8px rgba(58,34,48,.08);
  --bs-elev-3: 0 4px 8px rgba(58,34,48,.06),  0 8px 16px rgba(58,34,48,.10);
  --bs-elev-4: 0 8px 16px rgba(58,34,48,.08), 0 16px 32px rgba(58,34,48,.12);
  --bs-elev-5: 0 16px 32px rgba(58,34,48,.10),0 32px 64px rgba(58,34,48,.14);
  /* On Jet Charcoal surfaces shadows do not read — use a 1px #3C3C3C border. */
  --bs-border-on-dark: 1px solid #E3CFC2;

  /* ---------- MOTION ---------- */
  --bs-dur-instant:    0ms;
  --bs-dur-fast:     120ms;   /* hover, color */
  --bs-dur-base:     180ms;   /* default */
  --bs-dur-slow:     240ms;   /* cards, reveals */
  --bs-dur-deliberate:320ms;  /* modals, drawers */
  --bs-ease-standard: cubic-bezier(.2,0,.2,1);
  --bs-ease-entrance: cubic-bezier(0,0,.2,1);
  --bs-ease-exit:     cubic-bezier(.4,0,1,1);

  /* ---------- GRID ---------- */
  --bs-grid-columns: 12;
  --bs-grid-gutter:  24px;
  --bs-content-max: 1440px;
  --bs-margin-mobile:  16px;
  --bs-margin-tablet:  32px;
  --bs-margin-desktop: 48px;
  --bs-margin-wide:    64px;
  --bs-bp-tablet:   768px;
  --bs-bp-desktop: 1024px;
  --bs-bp-wide:    1440px;

  /* ---------- STROKES & FOCUS ---------- */
  --bs-stroke-hairline: 1px;
  --bs-stroke-emphasis: 3px;
  --bs-focus-ring: 3px solid #02A5AC;   /* clears both Cloud White and Jet Charcoal */
  --bs-focus-offset: 2px;

  /* ---------- ICONOGRAPHY ---------- */
  --bs-icon-grid: 24px;
  --bs-icon-stroke: 2px;       /* 2.4px at 16px size */
  --bs-icon-linecap: round;    /* echoes the logo's capsule ribbons */
  --bs-icon-sm: 16px;
  --bs-icon-md: 20px;
  --bs-icon-base: 24px;
  --bs-icon-lg: 32px;

  /* ---------- STATUS COLORS ----------
     Error is deliberately a deeper, cooler red than Ignition Orange
     so an error state can never be mistaken for a call to action. */
  --bs-success:        #108052;  /* 4.59:1 on Cloud White */
  --bs-success-bg:     #E7F6F0;
  --bs-success-on-dark:#12A66A;
  --bs-warning:        #926813;  /* 4.57:1 */
  --bs-warning-bg:     #FDF6E8;
  --bs-warning-on-dark:#E8A317;
  --bs-error:          #C62828;  /* 5.17:1 */
  --bs-error-bg:       #FAEAEA;
  --bs-error-on-dark:  #E45643;
  --bs-info:           #057D82;  /* 4.53:1 */
  --bs-info-bg:        #E6F9FA;
  --bs-info-on-dark:   #00C2CB;

  /* ---------- COMPONENT SIZING ---------- */
  --bs-btn-h-lg: 48px;  --bs-btn-pad-lg: 0 26px;  --bs-btn-fs-lg: 15px;
  --bs-btn-h-md: 44px;  --bs-btn-pad-md: 0 22px;  --bs-btn-fs-md: 14.5px;
  --bs-btn-h-sm: 36px;  --bs-btn-pad-sm: 0 16px;  --bs-btn-fs-sm: 13px;
  --bs-field-h: 44px;
  --bs-tap-min: 44px;
  --bs-nav-h-desktop: 72px;
  --bs-nav-h-mobile:  56px;
  --bs-measure-max: 68ch;
}

/* ============================================================
   COMPONENT RULES
   ============================================================ */

/* Primary button — charcoal on orange. White on orange is 3.32:1
   and fails at label size. This is not a stylistic preference. */
.bs-btn--primary {
  background: var(--bs-orange);
  color: var(--bs-charcoal);
  font-weight: var(--bs-w-bold);
  border-radius: var(--bs-radius-md);
  transition: background var(--bs-dur-fast) var(--bs-ease-standard);
}
.bs-btn--primary:hover  { background: var(--bs-orange-600); }
.bs-btn--primary:active { background: var(--bs-orange-700); }
.bs-btn--primary:focus-visible {
  outline: var(--bs-focus-ring);
  outline-offset: var(--bs-focus-offset);
}
.bs-btn--primary:disabled { background: var(--bs-neutral-200); color: var(--bs-neutral-400); }

/* Secondary and ghost */
.bs-btn--secondary { background: var(--bs-charcoal); color: var(--bs-cloud); }
.bs-btn--ghost     { background: transparent; color: var(--bs-charcoal); border: 1.5px solid var(--bs-mist); }
.bs-btn--ghost:hover { border-color: var(--bs-charcoal); }

/* Cards */
.bs-card {
  background: var(--bs-white);
  border: 1px solid #E6E2DC;
  border-radius: var(--bs-radius-lg);
  padding: var(--bs-space-5);
  box-shadow: var(--bs-elev-1);
  transition: box-shadow var(--bs-dur-slow) var(--bs-ease-standard),
              transform  var(--bs-dur-slow) var(--bs-ease-standard);
}
.bs-card--interactive:hover { box-shadow: var(--bs-elev-3); transform: translateY(-2px); }
.bs-card--on-dark { background: var(--bs-charcoal); border: var(--bs-border-on-dark); box-shadow: none; }

/* Fields */
.bs-field {
  height: var(--bs-field-h);
  border: 1.5px solid var(--bs-mist);
  border-radius: var(--bs-radius-md);
  padding: 0 14px;
  font-size: var(--bs-body-s);
}
.bs-field:focus-visible { border-color: #02A5AC; outline: var(--bs-focus-ring); }
.bs-field--error { border-color: var(--bs-error); }

/* Accessibility floor: honor reduced motion everywhere. */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
