/* =====================================================
   KAVACH VPN - Professional Website Stylesheet
   Version: 1.0.0
   Last Updated: January 9, 2026
   ===================================================== */

/* =====================================================
   CSS VARIABLES - Design System
   ===================================================== */
:root {
  /* Brand Colors */
  --primary-color: #4F46E5;        /* Indigo - Trust & Security */
  --primary-dark: #3730A3;
  --primary-light: #818CF8;
  --secondary-color: #10B981;       /* Emerald - Privacy & Safety */
  --secondary-dark: #059669;
  --accent-color: #F59E0B;          /* Amber - Highlights */
  
  /* Neutral Colors */
  --bg-primary: #0F172A;            /* Dark slate - Main background */
  --bg-secondary: #1E293B;          /* Slightly lighter */
  --bg-tertiary: #334155;           /* Card backgrounds */
  --bg-gradient-start: #0F172A;
  --bg-gradient-end: #1E1B4B;
  
  /* Text Colors */
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  
  /* Semantic Colors */
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  
  /* 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;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 40px rgba(79, 70, 229, 0.3);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Light Mode Override */
@media (prefers-color-scheme: light) {
  :root.light-mode {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #E2E8F0;
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
  }
}

/* =====================================================
   RESET & BASE STYLES
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Animated logo background pattern */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(79, 70, 229, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.02) 0%, transparent 50%);
  animation: backgroundFloat 30s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes backgroundFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(2%, 3%) rotate(1deg);
  }
  66% {
    transform: translate(-2%, -3%) rotate(-1deg);
  }
}

/* Floating logo particles */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%234F46E5" opacity="0.1"/></svg>'),
    url('data:image/svg+xml;utf8,<svg width="30" height="30" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%2310B981" opacity="0.08"/></svg>');
  background-size: 200px 200px, 300px 300px;
  background-position: 0 0, 50px 50px;
  animation: particlesFloat 60s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

@keyframes particlesFloat {
  0% {
    background-position: 0 0, 50px 50px;
  }
  100% {
    background-position: 200px 200px, 250px 250px;
  }
}

/* Ensure content is above animated background */
.header,
.section,
.footer {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-color);
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* =====================================================
   LAYOUT
   ===================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: 800px;
}

.section {
  padding: var(--space-3xl) 0;
}

.section--hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* =====================================================
   HEADER & NAVIGATION
   ===================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
}

.header--scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: var(--shadow-lg);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.nav__logo-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  transition: all var(--transition-base);
}

.nav__logo:hover .nav__logo-img {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
}

.nav__links {
  display: flex;
  gap: var(--space-xl);
  list-style: none;
}

.nav__link {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-fast);
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__cta {
  display: flex;
  gap: var(--space-md);
}

/* Mobile Navigation */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }
  
  .nav__toggle {
    display: block;
  }
  
  .nav__cta {
    display: none;
  }
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  color: white;
}

.btn--secondary {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-light);
}

.btn--secondary:hover {
  background: var(--primary-color);
  color: white;
}

.btn--lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: 1rem;
}

.btn--icon {
  gap: var(--space-sm);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  text-align: center;
  padding-top: 100px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: rgba(79, 70, 229, 0.1);
  border: 1px solid rgba(79, 70, 229, 0.3);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--primary-light);
  margin-bottom: var(--space-xl);
}

.hero__title {
  margin-bottom: var(--space-lg);
}

.hero__title span {
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
}

.hero__cta {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-3xl);
}

.hero__features {
  display: flex;
  gap: var(--space-2xl);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-2xl);
}

.hero__feature {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
}

.hero__feature-icon {
  color: var(--secondary-color);
  font-size: 1.25rem;
}

/* =====================================================
   FEATURES SECTION
   ===================================================== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  transition: all var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
}

.feature-card__icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--space-lg);
}

.feature-card__title {
  margin-bottom: var(--space-sm);
}

.feature-card__desc {
  color: var(--text-muted);
}

/* =====================================================
   LEGAL PAGES STYLES
   ===================================================== */
.legal-page {
  padding-top: 120px;
  padding-bottom: var(--space-3xl);
}

.legal-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-header__title {
  margin-bottom: var(--space-md);
}

.legal-header__meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.legal-content {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-3xl);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: var(--space-2xl) 0 var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-content h3 {
  font-size: 1.25rem;
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--primary-light);
}

.legal-content h4 {
  font-size: 1.1rem;
  margin: var(--space-lg) 0 var(--space-sm);
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  line-height: 1.8;
}

.legal-content ul,
.legal-content ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}

.legal-content li {
  margin-bottom: var(--space-sm);
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 0.9rem;
}

.legal-content th,
.legal-content td {
  padding: var(--space-md);
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-content th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
}

.legal-content td {
  color: var(--text-secondary);
}

.legal-content a {
  color: var(--primary-light);
  text-decoration: underline;
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-content hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: var(--space-2xl) 0;
}

/* Highlight boxes */
.highlight-box {
  background: rgba(79, 70, 229, 0.1);
  border-left: 4px solid var(--primary-color);
  padding: var(--space-lg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--space-lg) 0;
}

.highlight-box--success {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--success);
}

.highlight-box--warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
}

/* No-collect checkmarks */
.no-collect {
  color: var(--error);
}

.yes-collect {
  color: var(--success);
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.footer__logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  object-fit: cover;
  transition: all var(--transition-base);
}

.footer__logo:hover .footer__logo-img {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(79, 70, 229, 0.4);
}

.footer__tagline {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer__section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--text-primary);
}

.footer__bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer__legal-links {
  display: flex;
  gap: var(--space-xl);
}

.footer__legal-link {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer__legal-link:hover {
  color: var(--text-primary);
}

/* =====================================================
   UTILITIES
   ===================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-md); }
.mb-2 { margin-bottom: var(--space-xl); }
.mb-3 { margin-bottom: var(--space-2xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-md); }
.mt-2 { margin-top: var(--space-xl); }
.mt-3 { margin-top: var(--space-2xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* =====================================================
   DYNAMIC ELEMENTS
   ===================================================== */

/* System Status Badge */
.system-status {
  position: fixed;
  top: 80px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.system-status.online {
  border-color: rgba(34, 197, 94, 0.3);
  color: #86EFAC;
}

.system-status.offline {
  border-color: rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse 2s infinite;
}

/* Global Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  padding: 2rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Security Check Card */
.security-check-card {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.security-check-card.exposed {
  border-color: var(--error);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.security-check-card.protected {
  border-color: var(--success);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
}

.security-status {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.security-status.exposed { color: var(--error); }
.security-status.protected { color: var(--success); }

.user-ip {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* Mobile Responsive Stats */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* =====================================================
   SCROLLBAR STYLING
   ===================================================== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
  .header,
  .footer,
  .nav {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .legal-content {
    background: white;
    border: none;
    box-shadow: none;
  }
  
  .legal-content h2,
  .legal-content h3,
  .legal-content h4 {
    color: black;
  }
  
  .legal-content p,
  .legal-content li,
  .legal-content td {
    color: #333;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}
