@import url('/assets/css/bomforge-brand.css?v=20261011t');

/**
 * BOMAtlas Design Tokens
 * Unified design system variables for brand consistency
 * Include before all other CSS files
 *
 * Philosophy: Bloomberg Terminal-inspired premium data intelligence
 * Primary: Gold #aca9a3 | 8px spacing grid | Modular 1.25 scale
 */

:root {
  /* ===========================================
       COLOR SYSTEM
       Primary: Gold (Premium, Bloomberg-inspired)
       Secondary: Blue (accents, links)
       Elite: Amber (premium features, badges)
       =========================================== */

  /* Gold Scale - Full spectrum for flexibility */
  --gold-50: #fefbf4;
  --gold-100: #f9f6ef;
  --gold-200: #f0ece6;
  --gold-300: #e2dfd9;
  --gold-400: #d4d1cb;
  --gold-500: #bfbcb6;
  --gold-600: #aca9a3;
  --gold-700: #928f8a;
  --gold-800: #5e5b56;
  --gold-900: #4e4b46;

  /* Primary Gold - Professional, enterprise feel */
  --color-primary: #aca9a3;
  --color-primary-hover: #c1beb8;
  --color-primary-dark: #928f8a;
  --color-primary-light: #cdcac4;
  --color-primary-alpha-10: rgba(172, 169, 163, 0.1);
  --color-primary-alpha-15: rgba(172, 169, 163, 0.15);
  --color-primary-alpha-20: rgba(172, 169, 163, 0.2);
  --color-primary-alpha-40: rgba(172, 169, 163, 0.4);

  /* Semantic Gold Applications */
  --color-primary-subtle: rgba(172, 169, 163, 0.08);
  --color-primary-muted: rgba(172, 169, 163, 0.15);
  --color-primary-glow: rgba(172, 169, 163, 0.4);

  /* Secondary Blue - Stronger saturation */
  --color-secondary: #9f9c96;
  --color-secondary-hover: #827f79;
  --color-secondary-light: #b5b2ac;
  --color-secondary-alpha-10: rgba(159, 156, 150, 0.1);
  --color-secondary-alpha-20: rgba(159, 156, 150, 0.2);
  --color-secondary-alpha-40: rgba(159, 156, 150, 0.4);

  /* Elite Accent - For premium badges, verified status */
  --color-elite: #c1beb8;
  --color-elite-hover: #aeaba5;
  --color-elite-light: #d9d6d0;

  /* Semantic Colors */
  --color-success: #a8a59f;
  --color-success-hover: #8b8882;
  --color-warning: #b6b3ad;
  --color-warning-hover: #96948e;
  --color-error: #ec4654;
  --color-error-hover: #d72f43;
  --color-info: #d7d4ce;
  /* --color-info is also used as TEXT on dark surfaces, where it has to stay
     light, so it cannot simply be darkened. As a filled-button background
     under a white label it measured 3.68:1, below AA. These two derive the
     button case from it and leave the text case alone. */
  --color-info-fill: color-mix(in srgb, var(--color-info) 86%, #000);
  --color-info-fill-hover: color-mix(in srgb, var(--color-info) 76%, #000);

  /* ===========================================
       BACKGROUNDS (Dark Theme)
       Layered scale from void to elevated
       =========================================== */
  /* Core background scale */
  --bg-void: #0e0c08;
  --bg-base: #100e0a;
  --bg-surface: #171510;
  --bg-elevated: #1e1c17;
  --bg-overlay-subtle: #25231e;

  /* Legacy aliases (for compatibility) */
  --bg-primary: #15130f;
  --bg-secondary: #211f1a;
  --bg-tertiary: #282521;
  --bg-card: #2b2924;
  --bg-hover: #302e29;
  --bg-surface-alpha: rgba(68, 66, 61, 0.3);
  --bg-overlay: rgba(0, 0, 0, 0.7);
  --bg-modal: rgba(22, 19, 15, 0.95);

  /* ===========================================
       TEXT COLORS
       Note: --text-secondary updated from #999690 to #a5a29c
       for WCAG AA compliance (~5.5:1 contrast vs ~4.5:1)
       =========================================== */
  --text-primary: #ebe8e2;
  --text-secondary: #a5a29c;
  --text-muted: #77756f;
  --text-disabled: #64615c;
  --text-inverse: #15130f;

  /* ===========================================
       BORDERS
       =========================================== */
  /* Border scale */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-gold: rgba(172, 169, 163, 0.3);
  --border-gold-strong: rgba(172, 169, 163, 0.5);

  /* Legacy aliases */
  --border-color: #44423d;
  --border-light: rgba(68, 66, 61, 0.5);
  --border-focus: var(--color-primary);
  --border-error: var(--color-error);

  /* ===========================================
       GRADIENTS
       =========================================== */
  --gradient-primary: linear-gradient(135deg, #928f8a 0%, #aca9a3 50%, #c1beb8 100%);
  --gradient-secondary: linear-gradient(135deg, #827f79 0%, #9f9c96 50%, #b5b2ac 100%);
  --gradient-dark: linear-gradient(135deg, #100e09 0%, #1a1813 100%);
  --gradient-card: linear-gradient(135deg, #1a1813 0%, #100e09 100%);
  --gradient-gold-subtle: linear-gradient(
    135deg,
    rgba(172, 169, 163, 0.05) 0%,
    rgba(172, 169, 163, 0.1) 100%
  );

  /* Premium Button Gradients */
  --gradient-btn-gold: linear-gradient(135deg, #928f8a 0%, #aca9a3 35%, #c1beb8 70%, #aca9a3 100%);
  --gradient-btn-gold-hover: linear-gradient(
    135deg,
    #aca9a3 0%,
    #c1beb8 35%,
    #cdcac4 70%,
    #c1beb8 100%
  );

  /* Hero Overlay Gradients */
  --gradient-hero-top: linear-gradient(180deg, rgba(16, 14, 10, 0.4) 0%, transparent 30%);
  --gradient-hero-center: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    transparent 0%,
    rgba(16, 14, 10, 0.3) 70%
  );
  --gradient-hero-bottom: linear-gradient(
    180deg,
    transparent 60%,
    rgba(16, 14, 10, 0.8) 80%,
    rgba(16, 14, 10, 1) 100%
  );

  /* ===========================================
       TYPOGRAPHY
       =========================================== */
  --font-family:
    'Geist', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;

  /* Data display font - for stats, numbers, terminal-style elements */
  --font-data: var(--font-mono);

  /* Font Sizes - Base scale */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;

  /* Display Typography - Hero headlines */
  --text-display-xl: clamp(56px, 8vw, 80px);
  --text-display-lg: clamp(40px, 6vw, 56px);
  --text-display-md: clamp(32px, 5vw, 44px);

  /* Data Typography - Stats, metrics */
  --text-data-xl: 56px;
  --text-data-lg: 48px;
  --text-data-md: 36px;
  --text-data-sm: 24px;

  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Line Heights */
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Letter Spacing */
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.05em;

  /* ===========================================
       SPACING (8px Grid)
       =========================================== */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-14: 56px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ===========================================
       LAYOUT
       =========================================== */
  --sidebar-width: 380px;
  --sidebar-width-collapsed: 60px;
  --header-height: 48px;
  --footer-height: 48px;
  --max-content-width: 1200px;
  --max-form-width: 500px;

  /* ===========================================
       BORDER RADIUS
       =========================================== */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;

  /* ===========================================
       SHADOWS
       =========================================== */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.4);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.5);

  /* Gold Glow Shadows */
  --glow-gold-sm: 0 0 8px rgba(172, 169, 163, 0.3);
  --glow-gold-md: 0 0 16px rgba(172, 169, 163, 0.4);
  --glow-gold-lg: 0 0 24px rgba(172, 169, 163, 0.5);
  --shadow-glow: 0 0 20px var(--color-primary-alpha-40);
  --shadow-glow-secondary: 0 0 20px var(--color-secondary-alpha-20);

  /* Premium Button Shadows */
  --shadow-btn-primary: 0 4px 16px rgba(172, 169, 163, 0.3), 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-btn-primary-hover: 0 8px 24px rgba(172, 169, 163, 0.4), 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-btn-secondary: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-btn-secondary-hover: 0 4px 16px rgba(0, 0, 0, 0.3);

  /* ===========================================
       TRANSITIONS
       =========================================== */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-modal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Easing */
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ===========================================
       Z-INDEX SCALE
       =========================================== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  --z-toast: 800;

  /* ===========================================
       TOUCH TARGETS
       =========================================== */
  --touch-target-min: 44px;
  --touch-target-comfortable: 48px;
}

/* ===========================================
   FOCUS STYLES (Accessibility)
   =========================================== */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ===========================================
   SKELETON LOADING
   =========================================== */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface) 25%,
    var(--bg-hover) 50%,
    var(--bg-surface) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
}

.skeleton-text:last-child {
  width: 70%;
}

.skeleton-card {
  height: 120px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===========================================
     REDUCED MOTION (Global)
     Applies to all elements using transitions/animations
     =========================================== */
@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;
  }
}
