/* Global CSS Variables */
:root {
  /* Brand Colors - Strict adherence to Salient MSP brand */
  --primary: #2c3178;
  --primary-dark: #1a1f4a;
  --primary-rgb: 44, 49, 120;
  --accent: #428bbc;
  --accent-rgb: 66, 139, 188;
  --tint: #71c0ec;
  --tint-rgb: 113, 192, 236;
  
  /* Text Colors */
  --text-primary: #f6f8ff;
  --text-secondary: #c6d0e3;
  --text-light: #8a93a3;
  --text-muted: #5b6472;
  
  /* Background Colors - Premium dark luxury aesthetic */
  --bg-primary: #0b0d16;
  --bg-secondary: #121527;
  --bg-dark: #0b0d16;
  --bg-darker: #080a12;
  --bg-glass: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.12);
  
  /* Premium Shadows & Glows */
  --shadow: 0 6px 18px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.45);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.65);
  --glow-primary: 0 0 0 1px rgba(var(--primary-rgb), 0.4), 0 8px 30px rgba(var(--primary-rgb), 0.25);
  --glow-accent: 0 0 0 1px rgba(var(--tint-rgb), 0.35), 0 8px 30px rgba(var(--accent-rgb), 0.25), inset 0 0 60px rgba(var(--primary-rgb), 0.12);
  --glow-soft: 0 0 20px rgba(var(--tint-rgb), 0.15);
  
  /* Radii */
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;
  
  /* Premium Transitions - Inspired by Unseen.co */
  --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Base Styles */
* { 
  box-sizing: border-box; 
}

html { 
  scroll-behavior: smooth; 
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-secondary);
  background: 
    radial-gradient(1000px 600px at 10% -10%, rgba(var(--accent-rgb), 0.08), transparent 40%),
    radial-gradient(800px 500px at 90% 0%, rgba(var(--primary-rgb), 0.12), transparent 45%),
    var(--bg-primary);
  margin: 0;
  padding: 0;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Ultra-Premium Typography System */
h1, h2, h3, h4, h5, h6 { 
  font-weight: 800; 
  line-height: 1.1; 
  margin: 0 0 1rem 0; 
  color: var(--text-primary);
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

h1 { 
  font-size: clamp(2.5rem, 6vw + 1rem, 5.5rem); 
  letter-spacing: -0.025em;
  line-height: 0.95;
}
h2 { 
  font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem); 
  letter-spacing: -0.02em;
  line-height: 1.05;
}
h3 { 
  font-size: clamp(1.5rem, 3vw + 0.25rem, 2.5rem); 
  letter-spacing: -0.015em;
}
h4 { 
  font-size: clamp(1.25rem, 2.5vw, 1.75rem); 
  font-weight: 700;
  letter-spacing: -0.01em;
}
h5 { 
  font-size: clamp(1.125rem, 2vw, 1.5rem); 
  font-weight: 600;
}
h6 { 
  font-size: clamp(1rem, 1.5vw, 1.25rem); 
  font-weight: 600;
}

p { 
  margin: 0 0 1rem 0; 
  color: var(--text-light); 
}

.lead { 
  font-size: clamp(1.125rem, 2.5vw, 1.375rem); 
  color: var(--text-secondary); 
  line-height: 1.6;
  font-weight: 400;
  max-width: 65ch;
}

.eyebrow { 
  display: inline-block; 
  font-size: 0.75rem; 
  font-weight: 700; 
  text-transform: uppercase; 
  letter-spacing: 0.1em; 
  color: var(--tint); 
  margin-bottom: 1rem;
  opacity: 0.9;
}

/* Containers */
.container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 clamp(1rem, 3vw, 2rem); 
}

.section { 
  padding: clamp(4rem, 8vw, 6rem) 0; 
  position: relative; 
}

.section-header { 
  text-align: center; 
  margin-bottom: 4rem; 
}

.section-header .lead { 
  max-width: 640px; 
  margin: 1rem auto 0; 
}

/* Premium Buttons - Inspired by Jeton.com */
.btn { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  padding: 0.75rem 1.5rem; 
  border-radius: var(--radius-full); 
  font-weight: 600; 
  font-size: 0.95rem;
  text-decoration: none; 
  border: 1px solid transparent; 
  cursor: pointer; 
  transition: var(--transition); 
  line-height: 1; 
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn-primary { 
  background: linear-gradient(135deg, var(--tint), var(--accent)); 
  color: #06101a; 
  border-color: rgba(var(--tint-rgb), 0.6); 
  box-shadow: var(--glow-accent); 
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.btn-primary:hover { 
  transform: translateY(-3px) scale(1.05); 
  box-shadow: 
    0 0 0 2px rgba(var(--tint-rgb), 0.8), 
    0 20px 50px rgba(var(--tint-rgb), 0.5),
    0 8px 25px rgba(0,0,0,0.2); 
  background: linear-gradient(135deg, 
    rgba(var(--tint-rgb), 1), 
    rgba(var(--accent-rgb), 0.95)
  );
}

.btn-primary:active {
  transform: translateY(-1px) scale(1.02);
}

.btn-secondary { 
  background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.8), rgba(var(--primary-rgb), 1)); 
  color: var(--text-primary); 
  border-color: rgba(var(--primary-rgb), 0.6); 
  box-shadow: var(--glow-primary); 
}

.btn-secondary:hover { 
  transform: translateY(-2px) scale(1.02); 
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.8), 0 16px 40px rgba(var(--primary-rgb), 0.35); 
}

.btn-outline { 
  background: var(--bg-glass); 
  color: var(--text-secondary); 
  border-color: var(--border-light); 
  backdrop-filter: blur(10px);
}

.btn-outline:hover { 
  background: rgba(255,255,255,0.08); 
  border-color: rgba(255,255,255,0.3); 
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-large { 
  padding: 1rem 2rem; 
  font-size: 1.1rem; 
}

/* Premium Cards & Glass Morphism */
.card { 
  background: linear-gradient(135deg, 
    rgba(var(--primary-rgb), 0.05), 
    rgba(var(--accent-rgb), 0.03)
  ); 
  border-radius: var(--radius-lg); 
  padding: 2rem; 
  border: 1px solid var(--border); 
  transition: var(--transition); 
  position: relative;
  backdrop-filter: blur(20px);
  box-shadow: var(--glow-soft);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, 
    rgba(var(--tint-rgb), 0.3), 
    transparent 50%, 
    rgba(var(--accent-rgb), 0.2)
  );
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  opacity: 0;
  transition: var(--transition);
}

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

.card:hover { 
  transform: translateY(-8px) scale(1.02); 
  box-shadow: 
    0 0 0 1px rgba(var(--tint-rgb), 0.4), 
    0 20px 60px rgba(0,0,0,0.4),
    0 0 40px rgba(var(--tint-rgb), 0.15);
}

/* Feature/Info Tiles */
.tile { 
  background: linear-gradient(135deg, 
    rgba(var(--primary-rgb), 0.08), 
    rgba(var(--accent-rgb), 0.05)
  ); 
  border-radius: var(--radius-lg); 
  padding: 1.5rem; 
  border: 1px solid var(--border); 
  backdrop-filter: blur(15px);
  transition: var(--transition);
  position: relative;
  box-shadow: var(--glow-soft);
}

.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--tint-rgb), 0.3);
  box-shadow: 
    0 0 20px rgba(var(--tint-rgb), 0.2),
    0 10px 30px rgba(0,0,0,0.3);
}

.tile .icon { 
  width: 60px; 
  height: 60px; 
  border-radius: var(--radius); 
  display: grid; 
  place-items: center; 
  background: radial-gradient(
    circle at 30% 20%, 
    rgba(var(--tint-rgb), 0.4), 
    rgba(var(--primary-rgb), 0.3)
  ); 
  color: var(--text-primary); 
  margin-bottom: 1rem;
  transition: var(--transition);
}

.tile:hover .icon {
  transform: scale(1.1) rotate(5deg);
  background: radial-gradient(
    circle at 30% 20%, 
    rgba(var(--tint-rgb), 0.6), 
    rgba(var(--primary-rgb), 0.4)
  );
}

/* Glass Morphism */
.glass { 
  background: rgba(255,255,255,0.03); 
  backdrop-filter: blur(20px); 
  border: 1px solid rgba(255,255,255,0.1); 
  border-radius: var(--radius-lg); 
  box-shadow: 
    0 8px 32px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Premium Animated Background */
.bg-flow {
  position: absolute; 
  inset: 0; 
  pointer-events: none; 
  z-index: 0;
  background: 
    radial-gradient(900px 600px at 15% -15%, rgba(var(--tint-rgb), 0.15), transparent 50%),
    radial-gradient(600px 400px at 85% 10%, rgba(var(--primary-rgb), 0.2), transparent 55%);
  mask-image: radial-gradient(ellipse at center, black 60%, transparent 90%);
  animation: backgroundPulse 8s ease-in-out infinite;
}

.bg-flow::after {
  content: '';
  position: absolute; 
  inset: 0;
  background:
    repeating-radial-gradient(
      circle at 30% 70%, 
      rgba(var(--tint-rgb), 0.05), 
      rgba(var(--tint-rgb), 0.05) 2px, 
      transparent 3px, 
      transparent 12px
    );
  opacity: 0.4;
  animation: drift 25s linear infinite;
}

@keyframes backgroundPulse {
  0%, 100% { 
    opacity: 0.8; 
    transform: scale(1); 
  }
  50% { 
    opacity: 1; 
    transform: scale(1.05); 
  }
}

@keyframes drift {
  from { 
    transform: translate3d(0,0,0) rotate(0deg); 
  }
  to { 
    transform: translate3d(-2%,-3%,0) rotate(360deg); 
  }
}

/* Premium Grid System */
.grid { 
  display: grid; 
  gap: clamp(1.5rem, 3vw, 2.5rem); 
}
.grid-2 { 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
}
.grid-3 { 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
}
.grid-4 { 
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
}

/* Reveal Animations - Inspired by CyberConvoy */
.reveal {
  opacity: 1;
  transform: none;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal:not(.in-view) {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* Premium Hover Effects */
.hover-float {
  transition: var(--transition);
}

.hover-float:hover {
  transform: translateY(-4px);
}

.hover-glow {
  transition: var(--transition);
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(var(--tint-rgb), 0.3);
}

/* Emergency/Important Notes */
.emergency-note {
  background: linear-gradient(135deg, 
    rgba(var(--tint-rgb), 0.1), 
    rgba(var(--accent-rgb), 0.05)
  );
  border: 1px solid rgba(var(--tint-rgb), 0.3);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .section { 
    padding: clamp(3rem, 6vw, 5rem) 0; 
  }
  
  .grid-3, .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .section { 
    padding: clamp(2.5rem, 5vw, 4rem) 0; 
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* Accessibility & Performance */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .bg-flow::after {
    animation: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255,255,255,0.3);
    --border-light: rgba(255,255,255,0.5);
  }
  
  .card, .tile {
    border-width: 2px;
  }
}

/* Print styles */
@media print {
  .bg-flow,
  .btn::before,
  .card::before {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}