/* ══════════════════════════════════════════
   TitanMC Design System — tokens.css
   Single source of truth for brand identity
   ══════════════════════════════════════════ */

:root {
  /* Brand Colors */
  --titan-primary: #D4A017;
  --titan-primary-light: #E8B838;
  --titan-primary-dark: #A07A10;
  --titan-gold: #FFD700;
  --titan-gold-dark: #B8860B;
  --titan-red: #FF4444;
  --titan-green: #55FF55;
  --titan-cyan: #55FFFF;
  --titan-blue: #3498DB;

  /* Background */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --bg-glass: rgba(26, 26, 46, 0.85);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #b0b0cc;
  --text-muted: #6b6b8a;
  --text-accent: var(--titan-primary);

  /* Borders */
  --border-subtle: rgba(212, 160, 23, 0.1);
  --border-glow: rgba(212, 160, 23, 0.3);
  --border-active: var(--titan-primary);

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-heading: 'Orbitron', 'Rajdhani Fallback', sans-serif;
  --font-body: 'Rajdhani', 'Rajdhani Fallback', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-mc: 'Minecraft', monospace;

  /* Font Sizes — fluid clamp() typography (mobile → desktop) */
  --text-xs: clamp(0.7rem, 0.66rem + 0.2vw, 0.75rem);
  --text-sm: clamp(0.8rem, 0.76rem + 0.2vw, 0.875rem);
  --text-base: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --text-lg: clamp(1rem, 0.93rem + 0.35vw, 1.125rem);
  --text-xl: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);
  --text-2xl: clamp(1.25rem, 1.05rem + 1vw, 1.5rem);
  --text-3xl: clamp(1.5rem, 1.1rem + 2vw, 2rem);
  --text-4xl: clamp(1.75rem, 1.1rem + 3vw, 2.5rem);
  --text-5xl: clamp(2rem, 1rem + 4vw, 3.5rem);

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(212, 160, 23, 0.15);
  --shadow-glow-strong: 0 0 40px rgba(212, 160, 23, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-local: 10;
  --z-sticky: 100;
  --z-floating: 900;
  --z-nav: 1000;
  --z-nav-controls: 1100;
  --z-cookie: 1500;
  --z-modal: 2000;
  --z-toast: 2500;
  --z-overlay: 3000;
  --z-top: 10000;

  /* Breakpoints (for reference in JS, CSS uses @media) */
  --bp-mobile: 375px;
  --bp-tablet: 768px;
  --bp-desktop: 1024px;
  --bp-wide: 1440px;
  --bp-ultrawide: 2560px;
}

/* Skeleton Loading Animation — Shimmer */
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 37%, var(--bg-card) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-sm);
  color: transparent;
  pointer-events: none;
  user-select: none;
}

.skeleton-text {
  height: 1em;
  margin-bottom: 0.5em;
  border-radius: var(--radius-sm);
}

.skeleton-text-sm { height: 0.75em; width: 60%; }
.skeleton-text-lg { height: 1.5em; width: 80%; }

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-card {
  height: 200px;
  border-radius: var(--radius-md);
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.skeleton-row .skeleton-avatar { flex-shrink: 0; }
.skeleton-row .skeleton-text { flex: 1; margin-bottom: 0; }

/* Toast Animations */
@keyframes toast-in {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* Utility: Glow border */
.glow-border {
  border: 1px solid var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.glow-border:hover {
  border-color: var(--border-active);
  box-shadow: var(--shadow-glow-strong);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
