:root {
  /* Common Core Palette */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --accent: #06b6d4;
  --white: #ffffff;
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1280px;
}

/* Dark Mode (Existing Tech-Noir) */
[data-theme="dark"] {
  --bg-deep: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-bg: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
  --shadow-neon: 0 0 20px rgba(99, 102, 241, 0.3);
  --nav-text: #94a3b8;
  --card-hover: rgba(30, 41, 59, 0.9);
  --footer-bg: #020617;
  --logo-filter: brightness(0) invert(1);
}

/* Light Mode (Enterprise-Pro) */
[data-theme="light"] {
  --bg-deep: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(15, 23, 42, 0.1);
  --shadow-neon: 0 10px 25px rgba(99, 102, 241, 0.1);
  --nav-text: #475569;
  --card-hover: #f1f5f9;
  --footer-bg: #f1f5f9;
  --logo-filter: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Background Abstract Elements - Subtle adjustments for light mode */
body::before {
  content: '';
  position: fixed;
  top: -10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  z-index: -1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* Modern Typography */
h1, h2, h3 {
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

[data-theme="dark"] .gradient-text {
  background: linear-gradient(90deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .gradient-text {
  background: linear-gradient(90deg, var(--secondary-color, #0f172a) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.5rem;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  color: var(--text-main);
}

[data-theme="light"] .btn-glass {
  background: rgba(15, 23, 42, 0.05);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
  filter: var(--logo-filter);
  transition: var(--transition);
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--nav-text);
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  background-image: url('../assets/img/hero/h1_hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: var(--transition);
  z-index: 1;
}

[data-theme="dark"] .hero::before {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 100%);
}

[data-theme="light"] .hero::before {
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.9) 0%, rgba(248, 250, 252, 0.4) 100%);
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 2;
}

.hero .container {
  margin-left: 10%; /* Nudge content slightly to the right */
}

.hero-tag {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 100px;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.15em; /* Focused, diligent look */
  text-transform: uppercase;
  margin-bottom: 3rem; /* More space */
}

.hero h1 {
  font-size: 4.5rem;
  line-height: 1.15; /* More breathing room */
  margin-bottom: 2.5rem;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.hero p {
  font-size: 1.3rem;
  line-height: 1.85; /* Highly readable and focused */
  color: var(--text-muted);
  margin-bottom: 4rem;
  max-width: 650px;
}

/* Standard 3-Column Grid - Icon-Centric Version */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.card {
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  transition: var(--transition);
  backdrop-filter: blur(10px);
  color: var(--text-main);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  align-items: center; /* Center everything */
  text-align: center;
  height: 100%;
}

.card-icon {
  width: 75px; /* Larger icon container */
  height: 75px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 2rem;
  transition: var(--transition);
}

.card-icon i {
  width: 35px; /* Larger SVG icons */
  height: 35px;
}

.card:hover .card-icon {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.card h3 {
  font-size: 1.4rem; /* Bolder titles */
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 280px; /* Keep text focused */
}

.card h3 {
  font-size: 1.25rem; /* Reduced from 1.5rem */
  margin-bottom: 0.75rem;
}

.card p {
  font-size: 0.95rem; /* More compact text */
  line-height: 1.5;
  color: var(--text-muted);
}

/* Footer */
.footer {
  padding: 6rem 0 3rem;
  background: var(--footer-bg);
  margin-top: 8rem;
  transition: background-color 0.5s ease;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--glass-border);
}

.footer-logo { height: 40px; margin-bottom: 2rem; filter: var(--logo-filter); }

/* Stats Section Corrected Design */
.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  transition: var(--transition);
}

[data-theme="dark"] .stat-number { color: var(--white); }
[data-theme="light"] .stat-number { color: var(--primary); }

.stat-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stats-card {
  padding: 5rem 3rem;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(6, 182, 212, 0.05));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

[data-theme="light"] .stats-card {
  background: var(--white);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

@media (max-width: 992px) {
  .stats-container { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

@media (max-width: 576px) {
  .stats-container { grid-template-columns: 1fr; gap: 3rem; }
  .stat-number { font-size: 3rem; }
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Media Queries */
@media (max-width: 1100px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .hero h1 { font-size: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-container { grid-template-columns: 1fr 1fr; gap: 4rem; }
  
  .row { gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  
  .navbar .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.65rem;
    border-radius: 6px;
    width: auto;
    min-width: 0;
  }
  
  .logo img {
    height: 28px;
  }
  
  .nav-container {
    padding: 0 1rem;
  }
  
  .hero {
    text-align: center;
    justify-content: center;
  }
  
  .hero .container {
    margin-left: 0;
    padding: 0 1.5rem;
  }
  
  .hero h1 { font-size: 2.5rem; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-content { max-width: 100%; }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  
  section { padding: 60px 0; }
  
  .row { flex-direction: column; }
  .col-6 { width: 100%; min-width: 100%; }
  
  /* AI DNA Badge on Mobile */
  .card[style*="position: absolute"] {
    position: relative !important;
    top: 0 !important;
    right: 0 !important;
    margin: 20px auto 0 !important;
    width: 100% !important;
    max-width: 280px;
  }
}

@media (max-width: 576px) {
  .stats-container { grid-template-columns: 1fr; gap: 3rem; }
  .stat-number { font-size: 3rem; }
  
  .hero h1 { font-size: 2rem; }
  .hero-tag { font-size: 0.65rem; padding: 0.5rem 1rem; }
  
  .card { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.5rem; }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .hero-content div[style*="display: flex"] {
    flex-direction: column;
  }
}
