/* ============================================
   RXL USA DESIGN SYSTEM
   "Enterprise Engineering" Aesthetic
   Dawn Palette + Dark Mode Foundation
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Dawn Palette */
  --dawn-purple: #D367E1;
  --dawn-violet: #8500FF;
  --dawn-blue: #579EF0;
  --dawn-bright-blue: #0000FF;
  --dawn-navy: #00009D;
  --dawn-black: #000000;

  /* Gradient Presets */
  --gradient-dawn: linear-gradient(135deg, #D367E1 0%, #8500FF 35%, #579EF0 70%, #0000FF 100%);
  --gradient-dawn-reverse: linear-gradient(135deg, #0000FF 0%, #579EF0 35%, #8500FF 70%, #D367E1 100%);
  --gradient-dawn-subtle: linear-gradient(135deg, rgba(211,103,225,0.15) 0%, rgba(133,0,255,0.15) 35%, rgba(87,158,240,0.15) 70%, rgba(0,0,255,0.15) 100%);
  --gradient-dawn-glow: radial-gradient(ellipse at center, rgba(133,0,255,0.4) 0%, rgba(87,158,240,0.15) 50%, transparent 70%);
  --gradient-surface: linear-gradient(180deg, #0A0A0F 0%, #0D0D15 50%, #0A0A0F 100%);
  --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
  --gradient-border: linear-gradient(135deg, rgba(133,0,255,0.5) 0%, rgba(87,158,240,0.3) 50%, rgba(211,103,225,0.5) 100%);

  /* Surface Colors */
  --surface-000: #000000;
  --surface-100: #05050A;
  --surface-200: #0A0A12;
  --surface-300: #0F0F1A;
  --surface-400: #141422;
  --surface-500: #1A1A2E;
  --surface-600: #22223A;
  --surface-700: #2A2A45;
  --surface-800: #333350;

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255,255,255,0.7);
  --text-tertiary: rgba(255,255,255,0.45);
  --text-muted: rgba(255,255,255,0.25);
  --text-dawn: var(--dawn-purple);

  /* Functional Colors */
  --color-success: #00E676;
  --color-warning: #FFB74D;
  --color-error: #FF5252;
  --color-info: var(--dawn-blue);

  /* Spacing Scale */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Typography */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.25rem;
  --text-6xl: 4rem;
  --text-7xl: 5rem;

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

  /* Shadows */
  --shadow-glow-purple: 0 0 40px rgba(133,0,255,0.2), 0 0 80px rgba(133,0,255,0.1);
  --shadow-glow-blue: 0 0 40px rgba(87,158,240,0.2), 0 0 80px rgba(87,158,240,0.1);
  --shadow-glow-dawn: 0 0 60px rgba(211,103,225,0.15), 0 0 120px rgba(133,0,255,0.1);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-elevated: 0 8px 40px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

input, textarea, select {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

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

.text-glow {
  text-shadow: 0 0 40px rgba(133,0,255,0.3), 0 0 80px rgba(87,158,240,0.15);
}

.font-mono {
  font-family: var(--font-mono);
}

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

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.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); }
.gap-3xl { gap: var(--space-3xl); }

.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); }

/* --- Component: Button --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-in-out);
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-dawn);
  color: #fff;
  box-shadow: 0 4px 20px rgba(133,0,255,0.3);
}

.btn-primary::before {
  background: linear-gradient(135deg, #D367E1 0%, #8500FF 35%, #579EF0 70%, #0000FF 100%);
  filter: brightness(1.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 30px rgba(133,0,255,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

.btn-secondary::before {
  background: rgba(255,255,255,0.08);
}

.btn-secondary:hover {
  border-color: rgba(133,0,255,0.4);
  box-shadow: 0 0 20px rgba(133,0,255,0.1);
}

.btn-ghost {
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-md);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: var(--space-xxs) var(--space-sm);
  font-size: var(--text-xs);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
}

/* --- Component: Card --- */
.card {
  background: var(--gradient-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  transition: all var(--duration-normal) var(--ease-out-expo);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-in-out);
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.card-glow {
  box-shadow: var(--shadow-glow-purple);
}

/* --- Component: Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xxs);
  padding: var(--space-xxs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-dawn {
  background: rgba(133,0,255,0.15);
  color: var(--dawn-purple);
  border: 1px solid rgba(133,0,255,0.25);
}

.badge-blue {
  background: rgba(87,158,240,0.15);
  color: var(--dawn-blue);
  border: 1px solid rgba(87,158,240,0.25);
}

.badge-success {
  background: rgba(0,230,118,0.12);
  color: var(--color-success);
  border: 1px solid rgba(0,230,118,0.2);
}

/* --- Component: Input --- */
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.input-group label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.input-field {
  padding: var(--space-sm) var(--space-md);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: all var(--duration-fast) var(--ease-in-out);
}

.input-field:focus {
  border-color: rgba(133,0,255,0.5);
  box-shadow: 0 0 0 3px rgba(133,0,255,0.1);
  background: rgba(255,255,255,0.06);
}

.input-field::placeholder {
  color: var(--text-muted);
}

textarea.input-field {
  resize: vertical;
  min-height: 120px;
}

/* --- Component: Tag --- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* --- Component: Divider --- */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
}

.divider-dawn {
  background: var(--gradient-dawn);
  height: 2px;
  opacity: 0.5;
}

/* --- Component: Section --- */
.section {
  padding: var(--space-5xl) 0;
  position: relative;
}

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

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-3xl);
}

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

.section-header p {
  font-size: var(--text-lg);
}

/* --- Component: Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  padding: var(--space-md) 0;
  transition: all var(--duration-normal) var(--ease-in-out);
}

.nav.scrolled {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-sm) 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--gradient-dawn);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 900;
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease-in-out);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-dawn);
  border-radius: 1px;
  transition: width var(--duration-normal) var(--ease-out-expo);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* --- Component: Footer --- */
.footer {
  padding: var(--space-4xl) 0 var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.06);
  background: var(--surface-100);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand p {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  max-width: 320px;
}

.footer-col h6 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-lg);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--space-xxs) 0;
  transition: color var(--duration-fast) var(--ease-in-out);
}

.footer-col a:hover {
  color: var(--dawn-purple);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* --- Component: Background Effects --- */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.bg-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  opacity: 0.5;
}

.bg-glow-purple {
  background: var(--dawn-violet);
}

.bg-glow-blue {
  background: var(--dawn-blue);
}

.bg-glow-dawn {
  background: var(--gradient-dawn);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(133,0,255,0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(133,0,255,0.4);
  }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-in {
  animation: fadeInUp 0.6s var(--ease-out-expo) forwards;
  opacity: 0;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }
.animate-in-delay-5 { animation-delay: 0.5s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-3xl); }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

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

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

  .nav-links { display: none; }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}
