/* ============================================
   VoltDev Global Design System
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0a0f1e;
  --bg-secondary: #0d1328;
  --bg-tertiary: #111936;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(0, 163, 255, 0.3);

  /* Accent Colors */
  --accent-primary: #00a3ff;
  --accent-secondary: #00e5ff;
  --accent-cta: #ff9500;
  --accent-success: #00c853;
  --accent-purple: #7c4dff;
  --accent-pink: #ff4081;
  --accent-gold: #ffd740;

  /* Text Colors */
  --text-heading: #ffffff;
  --text-body: #a0aabf;
  --text-muted: #6b7a94;
  --text-faint: #4a5568;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  --gradient-cta: linear-gradient(135deg, var(--accent-cta), #ff6d00);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(0,163,255,0.15) 0%, transparent 70%);

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 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;
  --space-5xl: 8rem;

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

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 8px 40px rgba(0, 163, 255, 0.15);
  --shadow-glow: 0 0 30px rgba(0, 163, 255, 0.2);
  --shadow-glow-strong: 0 0 60px rgba(0, 163, 255, 0.3);

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --nav-height: 72px;

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

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p {
  color: var(--text-body);
  line-height: 1.7;
  max-width: 65ch;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-secondary);
}

strong { color: var(--text-heading); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

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

.container--narrow {
  max-width: var(--max-width-narrow);
}

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

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

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

/* Grid utilities */
.grid { display: grid; }
.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 utilities */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }

/* Section labels */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent-primary);
}

.section-title {
  margin-bottom: var(--space-lg);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
}

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-3xl) 0;
}

/* Glow backgrounds */
.glow-top {
  position: relative;
}
.glow-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 300px;
  background: var(--gradient-glow);
  pointer-events: none;
  z-index: 0;
}

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

@media (max-width: 768px) {
  .container { padding: 0 var(--space-lg); }
  .section { padding: var(--space-3xl) 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--space-md); }
  .section { padding: var(--space-2xl) 0; }
}

/* Selection */
::selection {
  background: rgba(0, 163, 255, 0.3);
  color: var(--text-heading);
}

/* Image defaults */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* List reset */
ul, ol {
  list-style: none;
}

/* Button reset */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
