/* ==========================================================================
   BASE — Variables, Reset, Typography, Layout
   ========================================================================== */

:root {
  --bg: #050816;
  --bg-secondary: #0a0f1e;
  --bg-elevated: rgba(255, 255, 255, 0.03);
  --primary: #3B82F6;
  --primary-rgb: 59, 130, 246;
  --secondary: #8B5CF6;
  --secondary-rgb: 139, 92, 246;
  --accent: #06B6D4;
  --accent-rgb: 6, 182, 212;
  --text: #FFFFFF;
  --text-muted: #94A3B8;
  --text-subtle: #64748B;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(var(--primary-rgb), 0.15);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 80px;
  --container-max: 1280px;
  --section-padding: clamp(80px, 10vw, 140px);
  --divider-fill: rgba(255, 255, 255, 0.02);
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  --gradient-text: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
}

[data-theme="light"] {
  --bg: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --bg-elevated: rgba(0, 0, 0, 0.02);
  --text: #0F172A;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px rgba(var(--primary-rgb), 0.1);
  --divider-fill: rgba(0, 0, 0, 0.03);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

body.no-scroll { overflow: hidden; }
body.custom-cursor { cursor: none; }
body.custom-cursor a,
body.custom-cursor button,
body.custom-cursor [data-cursor="hover"] { cursor: none; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul, ol { list-style: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, textarea { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--transition);
}

.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 40px);
}

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

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(48px, 6vw, 80px);
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.mesh-bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}

.mesh-bg__orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.3), transparent 70%);
  top: -200px; right: -100px;
}

.mesh-bg__orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(var(--secondary-rgb), 0.25), transparent 70%);
  bottom: 20%; left: -150px;
  animation-delay: -7s;
}

.mesh-bg__orb--3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.2), transparent 70%);
  top: 50%; right: 20%;
  animation-delay: -14s;
}

.particles-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

.floating-shapes {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  animation: shapeFloat 15s ease-in-out infinite;
}

.shape--1 { width: 60px; height: 60px; top: 15%; left: 8%; }
.shape--2 { width: 40px; height: 40px; top: 60%; right: 10%; animation-delay: -5s; border-radius: 50%; }
.shape--3 { width: 80px; height: 80px; bottom: 20%; left: 15%; animation-delay: -10s; transform: rotate(45deg); }
.shape--4 { width: 30px; height: 30px; top: 30%; right: 25%; animation-delay: -3s; }

.section-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}
