/* ============================================================
   SPECLEO — Industrial Inspection & Asset Intelligence
   Brand foundations: design tokens
   ------------------------------------------------------------
   Single source of truth for colour, type, space, radius,
   elevation and motion. Prefix: --oe-
   Consume the SEMANTIC tokens in product code. The palette
   primitives exist so the semantic layer can be re-pointed.
   ============================================================ */

:root {
  color-scheme: dark;

  /* ---------- 1. PALETTE PRIMITIVES ---------- */

  /* Specleo Gold — accent paired with the monochrome lion mark (#E0A526) */
  --oe-gold-50: #fdf8ea;
  --oe-gold-100: #faedc6;
  --oe-gold-200: #f4d98c;
  --oe-gold-300: #eec457;
  --oe-gold-400: #e8b33a;
  --oe-gold-500: #e0a526; /* BRAND CORE */
  --oe-gold-600: #c4891a;
  --oe-gold-700: #9c6a14;
  --oe-gold-800: #6f4b0f;
  --oe-gold-900: #432d09;

  /* Charcoal — warm-neutral greyscale, 700 is brand Charcoal Grey */
  --oe-neutral-0: #ffffff;
  --oe-neutral-50: #f5f5f4;
  --oe-neutral-100: #e8e8e6;
  --oe-neutral-200: #cfcfcc;
  --oe-neutral-300: #adadaa;
  --oe-neutral-400: #858583;
  --oe-neutral-500: #636465;
  --oe-neutral-600: #454648;
  --oe-neutral-700: #2a2b2d; /* BRAND CHARCOAL GREY */
  --oe-neutral-800: #1c1d1f;
  --oe-neutral-900: #131416;
  --oe-neutral-950: #0b0b0c; /* BRAND BLACK, applied */

  /* Reserved for the logo only — never a UI surface */
  --oe-logo-black: #000000;

  /* ---------- 2. SEMANTIC COLOUR ---------- */

  --oe-canvas: var(--oe-neutral-950);
  --oe-surface: var(--oe-neutral-800);
  --oe-surface-raised: var(--oe-neutral-700);
  --oe-surface-sunken: #08080a;
  --oe-surface-invert: var(--oe-neutral-0);

  --oe-border: #26272a;
  --oe-border-strong: #3a3b3e;
  --oe-border-accent: rgba(224, 165, 38, 0.42);
  --oe-hairline: rgba(255, 255, 255, 0.07);

  --oe-text: var(--oe-neutral-0);
  --oe-text-muted: var(--oe-neutral-300);
  --oe-text-subtle: var(--oe-neutral-400);
  --oe-text-invert: var(--oe-neutral-950);

  --oe-accent: var(--oe-gold-500);
  --oe-accent-hover: var(--oe-gold-400);
  --oe-accent-press: var(--oe-gold-600);
  --oe-accent-quiet: rgba(224, 165, 38, 0.12);
  --oe-accent-quiet-strong: rgba(224, 165, 38, 0.2);
  /* Label colour on an orange fill. Ink, never white — see a11y notes. */
  --oe-on-accent: var(--oe-neutral-950);
  /* Orange for text on LIGHT surfaces: 500 fails, 700 passes AA */
  --oe-accent-on-light: var(--oe-gold-700);

  --oe-focus: var(--oe-gold-300);

  /* ---------- 3. INSPECTION STATUS ---------- */
  /* The reporting vocabulary. Orange is deliberately reused for
     Attention: in an inspection product the brand colour IS the
     "look here" signal. */

  --oe-pass: #8fb86b;
  --oe-pass-core: #6f9950;
  --oe-pass-quiet: rgba(143, 184, 107, 0.14);

  --oe-attention: var(--oe-gold-500);
  --oe-attention-quiet: rgba(224, 165, 38, 0.14);

  --oe-critical: #e06a55;
  --oe-critical-core: #c2392a;
  --oe-critical-quiet: rgba(224, 106, 85, 0.14);

  --oe-draft: var(--oe-neutral-400);
  --oe-draft-quiet: rgba(133, 133, 131, 0.14);

  /* ---------- 4. TYPOGRAPHY ---------- */

  /* Archivo carries the wordmark's industrial geometry; Hanken
     Grotesk keeps long-form legible; Plex Mono annotates specs. */
  --oe-font-display: "Archivo", "Arial Narrow", sans-serif;
  --oe-font-body: "Hanken Grotesk", "Helvetica Neue", sans-serif;
  --oe-font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --oe-weight-regular: 400;
  --oe-weight-medium: 500;
  --oe-weight-semibold: 600;
  --oe-weight-bold: 700;
  --oe-weight-black: 900;

  /* Fluid scale, 1.25 ratio at the small end */
  --oe-text-2xs: 0.6875rem;
  --oe-text-xs: 0.75rem;
  --oe-text-sm: 0.8125rem;
  --oe-text-base: 0.9375rem;
  --oe-text-md: 1.0625rem;
  --oe-text-lg: clamp(1.125rem, 0.4vw + 1.03rem, 1.3125rem);
  --oe-text-xl: clamp(1.375rem, 0.8vw + 1.19rem, 1.75rem);
  --oe-text-2xl: clamp(1.75rem, 1.6vw + 1.38rem, 2.5rem);
  --oe-text-3xl: clamp(2.25rem, 3vw + 1.55rem, 3.5rem);
  --oe-text-4xl: clamp(2.75rem, 5.4vw + 1.5rem, 5.25rem);
  --oe-text-5xl: clamp(3.25rem, 8vw + 1.4rem, 7.5rem);

  --oe-leading-flat: 0.92;
  --oe-leading-tight: 1.06;
  --oe-leading-snug: 1.28;
  --oe-leading-normal: 1.55;
  --oe-leading-relaxed: 1.72;

  --oe-tracking-tight: -0.03em;
  --oe-tracking-snug: -0.015em;
  --oe-tracking-normal: 0;
  --oe-tracking-wide: 0.06em;
  /* The tagline lock — matches the logo's letterspaced subline */
  --oe-tracking-mark: 0.22em;

  /* ---------- 5. SPACE (4px base) ---------- */

  --oe-space-1: 0.25rem;
  --oe-space-2: 0.5rem;
  --oe-space-3: 0.75rem;
  --oe-space-4: 1rem;
  --oe-space-5: 1.5rem;
  --oe-space-6: 2rem;
  --oe-space-7: 3rem;
  --oe-space-8: 4rem;
  --oe-space-9: 6rem;
  --oe-space-10: 8rem;

  /* ---------- 6. RADIUS & BORDER ---------- */
  /* The mark is built from sharp talon points, so the system
     stays close to square. 2px is the house default. */

  --oe-radius-none: 0;
  --oe-radius-xs: 2px;
  --oe-radius-sm: 3px;
  --oe-radius-md: 5px;
  --oe-radius-lg: 8px;
  --oe-radius-pill: 999px;

  --oe-border-width: 1px;
  --oe-border-width-thick: 2px;

  /* ---------- 7. ELEVATION ---------- */
  /* On dark surfaces lift reads through a light top edge, not blur. */

  --oe-shadow-none: none;
  --oe-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --oe-shadow-md: 0 6px 18px -6px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --oe-shadow-lg: 0 22px 48px -18px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --oe-shadow-accent: 0 10px 30px -12px rgba(224, 165, 38, 0.5);

  /* ---------- 8. MOTION ---------- */

  --oe-duration-instant: 90ms;
  --oe-duration-fast: 160ms;
  --oe-duration-base: 240ms;
  --oe-duration-slow: 420ms;
  --oe-duration-reveal: 680ms;

  --oe-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --oe-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --oe-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* ---------- 9. LAYOUT ---------- */

  --oe-container: 76rem;
  --oe-container-wide: 92rem;
  --oe-gutter: clamp(1.25rem, 4vw, 4rem);
  --oe-rail: 5.5rem; /* left spec rail on the foundations page */
}

/* Inverted context: any block that sits on a light surface.
   Re-points the semantic layer so components need no variants. */
.oe-on-light {
  color-scheme: light;
  /* `color` is inherited, so it must be re-set here or descendants keep
     the dark-context value and go invisible on a light surface. */
  color: var(--oe-text);
  --oe-canvas: var(--oe-neutral-0);
  --oe-surface: var(--oe-neutral-50);
  --oe-surface-raised: var(--oe-neutral-0);
  --oe-surface-sunken: var(--oe-neutral-100);
  --oe-surface-invert: var(--oe-neutral-950);
  --oe-border: var(--oe-neutral-200);
  --oe-border-strong: var(--oe-neutral-300);
  --oe-hairline: rgba(0, 0, 0, 0.09);
  --oe-text: var(--oe-neutral-950);
  --oe-text-muted: var(--oe-neutral-500);
  --oe-text-subtle: var(--oe-neutral-400);
  --oe-text-invert: var(--oe-neutral-0);
  --oe-accent: var(--oe-gold-700);
  --oe-accent-hover: var(--oe-gold-600);
  /* Flipped: ink on orange 700 measures 3.75:1, white measures 5.25:1 */
  --oe-on-accent: var(--oe-neutral-0);
  --oe-pass: var(--oe-pass-core);
  --oe-critical: var(--oe-critical-core);
  --oe-shadow-sm: 0 1px 2px rgba(11, 11, 12, 0.1);
  --oe-shadow-md: 0 8px 20px -8px rgba(11, 11, 12, 0.18);
  --oe-shadow-lg: 0 24px 48px -20px rgba(11, 11, 12, 0.24);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --oe-duration-instant: 1ms;
    --oe-duration-fast: 1ms;
    --oe-duration-base: 1ms;
    --oe-duration-slow: 1ms;
    --oe-duration-reveal: 1ms;
  }
}
