/* ============================================
   ArcoLanX Wiki — Global Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Gold Brand Palette */
  --gold-50: #FEFCE8;
  --gold-100: #FEF9C3;
  --gold-200: #FEF08A;
  --gold-300: #FDE047;
  --gold-400: #FACC15;
  --gold-500: #EAB308;
  --gold-600: #CA8A04;
  --gold-700: #A16207;
  --gold-800: #854D0E;
  --gold-900: #713F12;

  /* Backgrounds */
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --bg-card: rgba(20, 15, 5, 0.35);
  --bg-card-hover: rgba(30, 25, 10, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #F3F4F6;
  --text-secondary: #9CA3AF;
  --text-tertiary: #6B7280;
  --text-gold: #EAB308;
  --text-gold-light: #FEF08A;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-gold: rgba(234, 179, 8, 0.3);
  --border-gold-hover: rgba(234, 179, 8, 0.6);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 20px rgba(234, 179, 8, 0.15);
  --shadow-gold-lg: 0 0 40px rgba(234, 179, 8, 0.2);
  --glow-gold: 0 0 15px rgba(234, 179, 8, 0.4), 0 0 30px rgba(234, 179, 8, 0.1);

  /* Accent Colors (per-page) */
  --accent-warframe: #D4AF37;
  --accent-cs2: #FF6B00;
  --accent-discord: #5865F2;
  --accent-community: #10B981;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

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

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50px;
  --radius-full: 9999px;

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

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  --navbar-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: var(--navbar-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gold-200);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--border-subtle);
  outline: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

.text-gold {
  color: var(--gold-500);
}

.text-gold-gradient {
  background: linear-gradient(135deg, var(--gold-200), var(--gold-500), var(--gold-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-glow {
  text-shadow: 0 0 10px rgba(234, 179, 8, 0.5), 0 0 20px rgba(234, 179, 8, 0.2);
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-2xl { max-width: var(--container-2xl); }

.section {
  padding: var(--space-4xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
}

.section-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  margin: var(--space-lg) auto;
  border-radius: var(--radius-full);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

.grid {
  display: grid;
  gap: var(--space-xl);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-700), var(--gold-500));
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-400);
}

/* ── Selection ── */
::selection {
  background: rgba(234, 179, 8, 0.3);
  color: var(--text-primary);
}

/* ── Responsive Grid ── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .container {
    padding: 0 var(--space-md);
  }

  .section {
    padding: var(--space-3xl) 0;
  }
}

/* ── Background Effects ── */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(234, 179, 8, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 179, 8, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

@keyframes circuit-flow {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 200; }
}

.circuit-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.circuit-bg.animate-circuit path {
  stroke-dasharray: 10 5;
  animation: circuit-flow 10s linear infinite;
}

.bg-gradient-radial {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(234, 179, 8, 0.08) 0%, transparent 50%);
}

#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.page-content {
  position: relative;
  z-index: 1;
}
