/**
 * AXIOM — LYFEWORK DESIGN TOKENS — v4.0
 * ─────────────────────────────────────────────────────────────
 * Single source of truth for all Lyfework design tokens.
 * Import at the root of every Lyfework property / internal project.
 *
 * v4 REBRAND (2026-05-26): flat, white-default, geometric, "infrastructure-grade"
 * (benchmarks: Linear / Stripe). Supersedes v3.1 (dark glass + orange→red gradient).
 *   · Core:     White / Electric Lava #FF5418 / Black
 *   · Type:     Geist (was Manrope) · Geist Mono (was JetBrains Mono)
 *   · Theme:    LIGHT is default · DARK is first-class via [data-theme="dark"]
 *   · Spectrum: 9 Axiom accent colors retained for data / status / verticals / logo coverage
 *   · Mark:     recolorable — emblem is one path on currentColor
 *   · NO gradients · NO glassmorphism · NO glow. Flat surfaces, thin borders, whitespace.
 *
 * CANONICAL NAMES are non-prefixed:  var(--bg) var(--text) var(--lava) var(--sans)
 * LEGACY --lyf-* + gradient/glass NAMES are kept at the bottom, remapped to flat v4
 * values so older consumers don't break before their own migration pass.
 *
 * Import order:  1. tokens.css (this file)   2. components.css
 * ─────────────────────────────────────────────────────────────
 */

@import url("https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500&display=swap");
/* PRODUCTION: replace with self-hosted WOFF2 via next/font (npm: geist) */

:root {
  /* ═════════════════════════════════════════
     AXIOM SPECTRUM — 9 accent colors
     Fixed hues (do NOT change per theme). Used for data, status,
     vertical identity, and multi-color logo coverage.
  ═════════════════════════════════════════ */
  --lava: #ff5418;   /* Electric Lava — primary accent */
  --ember: #ff642a;  /* legacy v3 orange, retained */
  --red: #ff0301;
  --green: #10e996;
  --blue: #4a9eff;
  --yellow: #ffd63a;
  --purple: #a855f7;
  --cyan: #22d3ee;
  --pink: #ec4899;

  /* Neutral ramp — cool grays (fixed) */
  --graphite: #6e7180;
  --space: #9da2b3;
  --steel: #bcbfcc;
  --smoke: #d3d6e0;
  --cloud: #edeff7;

  --white: #ffffff;
  --black: #000000;

  /* ═════════════════════════════════════════
     SEMANTIC TOKENS — LIGHT THEME (default)
  ═════════════════════════════════════════ */

  /* ─── Canvas ─── */
  --bg: #ffffff;
  --surface: #ffffff;       /* cards (paired with --border) */
  --panel: #f4f5f8;         /* subtle section background */
  --elev-1: #fbfbfc;
  --elev-2: #f4f5f8;
  --elev-3: #edeff7;

  /* ─── Borders ─── */
  --border: #e2e4ec;
  --border-strong: #d3d6e0; /* Smoke */
  --border-subtle: #eff1f6;

  /* ─── Text ─── */
  --text: #0a0a0a;
  --text-muted: #6e7180;    /* body copy — Graphite */
  --text-dim: #9da2b3;      /* labels / eyebrows — Space */
  --text-faint: #bcbfcc;    /* captions / meta — Steel */

  /* ─── Brand / accent ─── */
  --orange: var(--lava);    /* canonical accent (name kept for back-compat) */
  --accent: var(--lava);
  --accent-ink: #ffffff;    /* text/fill on top of accent */
  --accent-soft: rgba(255, 84, 24, 0.10); /* tinted accent surface */

  /* ─── Status (semantic → spectrum) ─── */
  --success: var(--green);
  --warning: var(--yellow);
  --danger: var(--red);
  --info: var(--blue);

  /* ─── Logo mark (recolorable) ─── */
  --mark: currentColor;        /* standalone emblem inherits text color */
  --mark-emblem: var(--lava);  /* lockup: emblem fill */
  --mark-word: var(--text);    /* lockup: wordmark fill */

  /* ─── Shadows (flat / minimal — no glow) ─── */
  --shadow-sm: 0 1px 2px rgba(10, 10, 15, 0.05);
  --shadow-md: 0 4px 14px rgba(10, 10, 15, 0.07);
  --shadow-lg: 0 12px 32px rgba(10, 10, 15, 0.10);

  /* ─── Typography ─── */
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Tracking (tight on display/headings per brand book) */
  --track-display: -0.03em;
  --track-heading: -0.03em;
  --track-body: -0.02em;
  --track-flat: 0;

  /* ─── Spacing (multiples of 4) ─── */
  --sp-0: 0;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;
  --sp-32: 128px;

  /* ─── Radii ─── */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 18px;   /* canonical card radius */
  --r-2xl: 24px;  /* featured panels */
  --r-pill: 999px;
  --r-btn: 8px;   /* buttons = sharp rectangle (NOT pill) */
  --r-card: var(--r-xl);

  /* ─── Motion ─── */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --dur-fast: 150ms;
  --dur-base: 200ms;
  --dur-med: 300ms;
  --dur-slow: 600ms;
  --dur-enter: 800ms;

  /* ─── Layout ─── */
  --container-max: 1120px;
  --container-mkt: 1200px;
  --container-narrow: 720px;
  --gutter-x: 24px;

  /* ═════════════════════════════════════════
     DEPRECATED — flat fallbacks (do NOT use in new code)
     Kept so v3 consumers degrade gracefully instead of breaking.
     Gradients/glass are removed in v4 → these resolve to flat values.
  ═════════════════════════════════════════ */
  --gradient-primary: var(--lava);
  --gradient-90: var(--lava);
  --gradient-180: var(--lava);
  --glass-bg: var(--surface);
  --glass-border: var(--border);
  --glass-blur: 0px;
  --lift: var(--shadow-md);
  --lift-hero: var(--shadow-lg);
  --lift-flat: var(--shadow-sm);

  /* ═════════════════════════════════════════
     LEGACY --lyf-* ALIASES — remapped forward to v4
     Backward-compat shims only. Prefer canonical names.
  ═════════════════════════════════════════ */

  /* Brand */
  --lyf-orange: var(--lava);
  --lyf-red: var(--red);
  --lyf-white: #ffffff;
  --lyf-near-black: #0a0a0a;
  --lyf-dark-gray: var(--graphite);
  --lyf-surface: var(--panel);
  --lyf-gradient: var(--lava);
  --lyf-gradient-90: var(--lava);
  --lyf-gradient-180: var(--lava);

  /* Backgrounds */
  --lyf-bg-primary: var(--bg);
  --lyf-bg-surface: var(--panel);
  --lyf-bg-panel: var(--surface);
  --lyf-bg-card: var(--surface);
  --lyf-bg-card-hover: var(--panel);
  --lyf-bg-input: var(--bg);
  --lyf-bg-input-focus: var(--bg);
  --lyf-bg-ghost: transparent;
  --lyf-bg-ghost-hover: var(--panel);
  --lyf-bg-success: rgba(16, 233, 150, 0.12);
  --lyf-bg-warning: rgba(255, 214, 58, 0.16);
  --lyf-bg-error: rgba(255, 3, 1, 0.10);
  --lyf-bg-error-deep: rgba(255, 3, 1, 0.16);
  --lyf-bg-info: rgba(74, 158, 255, 0.12);

  /* Text */
  --lyf-text-primary: var(--text);
  --lyf-text-secondary: var(--text-muted);
  --lyf-text-tertiary: var(--text-dim);
  --lyf-text-muted: var(--text-faint);
  --lyf-text-disabled: var(--text-faint);
  --lyf-text-label: var(--text-dim);
  --lyf-text-accent: var(--lava);
  --lyf-text-on-light: #0a0a0a;
  --lyf-text-on-light-secondary: #374151;
  --lyf-text-success: #0c9b66;
  --lyf-text-warning: #9a7b00;
  --lyf-text-error: #d11414;

  /* Borders */
  --lyf-border-default: var(--border);
  --lyf-border-subtle: var(--border-subtle);
  --lyf-border-hover: var(--border-strong);
  --lyf-border-active: var(--text-dim);
  --lyf-border-divider: var(--border-subtle);
  --lyf-border-input: var(--border-strong);
  --lyf-border-focus: var(--lava);
  --lyf-border-success: rgba(16, 233, 150, 0.40);
  --lyf-border-warning: rgba(255, 214, 58, 0.50);
  --lyf-border-error: rgba(255, 3, 1, 0.40);
  --lyf-border-accent: rgba(255, 84, 24, 0.40);

  /* Typography aliases */
  --lyf-font: var(--sans);
  --lyf-font-weight-regular: 400;
  --lyf-font-weight-semibold: 600;
  --lyf-font-weight-bold: 700;
  --lyf-font-weight-extrabold: 800;
  --lyf-text-hero: clamp(40px, 6vw, 96px);
  --lyf-text-section: clamp(28px, 4vw, 48px);
  --lyf-text-card: 18px;
  --lyf-text-body: 16px;
  --lyf-text-body-sm: 14px;
  --lyf-text-button: 15px;
  --lyf-text-caption: 13px;
  --lyf-text-eyebrow: 13px;
  --lyf-leading-hero: 1.0;
  --lyf-leading-heading: 1.05;
  --lyf-leading-card: 1.25;
  --lyf-leading-body: 1.55;
  --lyf-leading-label: 1;
  --lyf-tracking-hero: var(--track-display);
  --lyf-tracking-heading: var(--track-heading);
  --lyf-tracking-card: -0.01em;
  --lyf-tracking-wordmark: -0.02em;
  --lyf-tracking-button: 0;
  --lyf-tracking-eyebrow: 0;
  --lyf-tracking-label: 0;
  --lyf-tracking-caption: 0;

  /* Spacing aliases */
  --lyf-space-1: var(--sp-1);
  --lyf-space-2: var(--sp-2);
  --lyf-space-3: var(--sp-3);
  --lyf-space-4: var(--sp-4);
  --lyf-space-5: var(--sp-5);
  --lyf-space-6: var(--sp-6);
  --lyf-space-8: var(--sp-8);
  --lyf-space-10: var(--sp-10);
  --lyf-space-12: var(--sp-12);
  --lyf-space-16: var(--sp-16);
  --lyf-space-20: var(--sp-20);
  --lyf-gap-card: var(--sp-3);
  --lyf-pad-card-lg: var(--sp-8);
  --lyf-pad-card: var(--sp-6);
  --lyf-pad-card-sm: var(--sp-5);
  --lyf-pad-section: var(--sp-20);
  --lyf-pad-page: var(--sp-6);
  --lyf-gap-lockup: 0.32em; /* emblem ↔ wordmark — proportional */

  /* Radius aliases */
  --lyf-radius-xs: var(--r-xs);
  --lyf-radius-sm: var(--r-sm);
  --lyf-radius-md: var(--r-md);
  --lyf-radius-lg: var(--r-lg);
  --lyf-radius-xl: var(--r-xl);
  --lyf-radius-2xl: var(--r-2xl);
  --lyf-radius-pill: var(--r-pill);
  --lyf-radius-card: var(--r-card);
  --lyf-radius-card-lg: var(--r-2xl);
  --lyf-radius-card-sm: var(--r-lg);
  --lyf-radius-button: var(--r-btn); /* v4: sharp rectangle (was pill) */
  --lyf-radius-tag: var(--r-sm);
  --lyf-radius-input: 10px;
  --lyf-radius-icon-80: 22px;
  --lyf-radius-icon-60: 16px;
  --lyf-radius-icon-44: 12px;
  --lyf-radius-icon-32: 9px;

  /* Glass aliases (flattened — v4 has no glass) */
  --lyf-blur-glass: 0px;
  --lyf-blur-glass-sm: 0px;
  --lyf-blur-glass-lg: 0px;
  --lyf-blur-glow: 0px;
  --lyf-blur-glow-lg: 0px;
  --lyf-highlight-top: none;

  /* Motion aliases */
  --lyf-transition: all 200ms ease;
  --lyf-transition-fast: all 150ms ease;
  --lyf-transition-med: all 300ms ease;
  --lyf-transition-slow: all 300ms ease;
  --lyf-transition-color:
    background 200ms ease, border-color 200ms ease, color 200ms ease;
  --lyf-ease-spring: var(--ease-spring);
  --lyf-hover-lift: translateY(-2px);
  --lyf-hover-lift-sm: translateY(-1px);

  /* Z-index */
  --lyf-z-bg: -1;
  --lyf-z-base: 0;
  --lyf-z-card: 1;
  --lyf-z-overlay: 10;
  --lyf-z-nav: 100;
  --lyf-z-toast: 200;

  /* Layout aliases */
  --lyf-container-max: var(--container-max);
  --lyf-container-narrow-max: var(--container-narrow);

  /* Score colors */
  --lyf-score-good: var(--green);
  --lyf-score-medium: var(--yellow);
  --lyf-score-poor: var(--red);
}

/* ═════════════════════════════════════════
   DARK THEME — first-class (apps, NEXUS, marketing fields)
   Set <html data-theme="dark"> or on any container.
   Spectrum + neutral ramp hues stay fixed; only semantics flip.
═════════════════════════════════════════ */
[data-theme="dark"] {
  --bg: #000000;
  --surface: #0e0e11;
  --panel: #0a0a0c;
  --elev-1: #141417;
  --elev-2: #1a1a1e;
  --elev-3: #222227;

  --border: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.20);
  --border-subtle: rgba(255, 255, 255, 0.07);

  --text: #ffffff;
  --text-muted: #9da2b3;   /* Space */
  --text-dim: #6e7180;     /* Graphite */
  --text-faint: rgba(255, 255, 255, 0.32);

  --accent-ink: #ffffff;
  --mark-word: #ffffff;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);

  /* legacy surfaces that assumed dark */
  --lyf-bg-card: var(--surface);
  --lyf-bg-card-hover: var(--elev-2);
  --lyf-bg-ghost-hover: rgba(255, 255, 255, 0.06);
  --lyf-text-on-light: #ffffff;
  --lyf-text-success: var(--green);
  --lyf-text-warning: var(--yellow);
  --lyf-text-error: #ff6b6b;
}

/* ─────────────────────────────────────────
   GLOBAL BASE
───────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

img, svg, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: transparent; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(255, 84, 24, 0.22); color: inherit; }

/* ─────────────────────────────────────────
   ACCENT TEXT  (v4: solid lava — NO gradient)
   .grad-text / .lyf-gradient-text kept as flat fallbacks.
───────────────────────────────────────── */
.accent-text,
.grad-text,
.lyf-gradient-text,
.lyf-accent {
  color: var(--lava);
  -webkit-text-fill-color: var(--lava);
}

/* ─────────────────────────────────────────
   CONTAINERS
───────────────────────────────────────── */
.lyf-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter-x);
}
.lyf-container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--gutter-x);
}

/* ─────────────────────────────────────────
   SECTION BACKGROUNDS
───────────────────────────────────────── */
.section-base { background: var(--bg); }
.section-panel,
.section-surface { background: var(--panel); }
.section-ink { background: #000; color: #fff; }
.section-accent { background: var(--lava); color: #fff; }
/* legacy: v3 "dark" sections map to base canvas in v4 */
.section-dark { background: var(--bg); }

/* ─────────────────────────────────────────
   GLOW UTILITIES — removed in v4 (no-op shims)
───────────────────────────────────────── */
.lyf-bg-glow-tr,
.lyf-bg-glow-bl { display: none; }

/* ─────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 768px) {
  .lyf-container,
  .lyf-container-narrow { padding: 0 var(--sp-4); }
}
@media (max-width: 480px) {
  .lyf-container,
  .lyf-container-narrow { padding: 0 var(--sp-3); }
}
