/* ===== PERFORMANCE OPTIMIZATIONS ===== */
/* Critical CSS - Above the fold */
html {
  scroll-behavior: smooth;
  font-size: 16px; /* Base font size for rem calculations */
}

/* ===== RESET & GLOBAL STYLES ===== */
* {
  margin: 0; 
  padding: 0; 
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #0B0C10 !important;
  color: #fff !important;
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #38ef7d; 
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #4ade80;
}

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

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.25rem); }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

/* ===== LAYOUT ===== */
.container { 
  max-width: 1120px; 
  margin: 0 auto; 
  padding: 0 20px; 
}

.section-padding {
  padding: 4rem 0;
}

.bg-dark {
  background: rgba(10, 15, 20, 0.8);
  margin: 2rem 0;
  border-radius: 16px;
}

.text-center {
  text-align: center;
}

/* ===== NAVIGATION ===== */
.nav { 
  background: #0b0f14; 
  position: sticky; 
  top: 0; 
  z-index: 50;
  border-bottom: 1px solid rgba(56, 239, 125, 0.1);
}

.nav-row { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 70px; 
  padding: 0 20px;
}

.brand { 
  color: #fff; 
  font-weight: 700; 
  text-decoration: none;
  font-size: 1.25rem;
  z-index: 51;
}

/* Mobile Navigation Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 51;
}

.nav-toggle:hover {
  color: #38ef7d;
}

/* Navigation Menu */
.nav ul { 
  display: flex; 
  gap: 1.5rem; 
  list-style: none; 
  margin: 0; 
  padding: 0; 
  flex-wrap: wrap;
  align-items: center;
}

.nav a { 
  color: #b8c2cc; 
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav a.active, 
.nav a:hover { 
  color: #fff; 
  background: rgba(56, 239, 125, 0.1);
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .nav-row {
    height: 60px;
    padding: 0 16px;
  }
  
  .brand {
    font-size: 1.1rem;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav ul {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0b0f14;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 50;
    padding: 80px 20px 20px;
  }
  
  .nav ul.active {
    transform: translateX(0);
  }
  
  .nav ul li {
    width: 100%;
    text-align: center;
  }
  
  .nav a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(56, 239, 125, 0.1);
  }
  
  .nav a:hover,
  .nav a.active {
    background: rgba(56, 239, 125, 0.15);
    border-color: rgba(56, 239, 125, 0.3);
    transform: translateY(-2px);
  }
}

@media (max-width: 480px) {
  .nav-row {
    height: 56px;
    padding: 0 12px;
  }
  
  .brand {
    font-size: 1rem;
  }
  
  .nav ul {
    padding: 70px 16px 16px;
  }
  
  .nav a {
    padding: 0.875rem;
    font-size: 1rem;
  }
}

/* ===== HERO SECTION ===== */
.hero { 
  position: relative; 
  color: #fff !important; 
  text-align: center; 
  padding: 6rem 0 4rem;
  background: 
    radial-gradient(ellipse at center, rgba(0,0,0,.4), rgba(0,0,0,.7)),
    url('images/AdobeStock_176019551.jpeg') center/cover no-repeat;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(56, 239, 125, 0.1) 0%, rgba(0, 0, 0, 0) 50%, rgba(56, 239, 125, 0.05) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(56, 239, 125, 0.03) 2px,
      rgba(56, 239, 125, 0.03) 4px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      rgba(56, 239, 125, 0.03) 2px,
      rgba(56, 239, 125, 0.03) 4px
    );
  pointer-events: none;
  z-index: 1;
}

.hero > .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 1.5rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  color: #e2e8f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #38ef7d 0%, #22c55e 100%);
  color: #000;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(56, 239, 125, 0.3);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 239, 125, 0.4);
  color: #000;
}

.btn-secondary {
  display: inline-block;
  padding: 1rem 2rem;
  background: transparent;
  color: #38ef7d;
  text-decoration: none;
  border: 2px solid #38ef7d;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(56, 239, 125, 0.1);
  transform: translateY(-2px);
  color: #38ef7d;
}

/* ===== STATS ROW ===== */
.stats-row {
  background: rgba(56, 239, 125, 0.02);
  border-top: 1px solid rgba(56, 239, 125, 0.1);
  border-bottom: 1px solid rgba(56, 239, 125, 0.1);
  padding: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(56, 239, 125, 0.1);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(56, 239, 125, 0.15);
  border-color: rgba(56, 239, 125, 0.3);
}

.stat-card .number {
  color: #38ef7d;
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-card .label {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .desc {
  color: #b8c2cc;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== SERVICE AREAS ===== */
.service-areas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  margin: 3rem auto 0;
  width: 100%;
  max-width: 1120px;
}

.area-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(56, 239, 125, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  flex: 1 1 280px;
  max-width: 320px;
  min-width: 280px;
}

.area-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(56, 239, 125, 0.1);
}

.area-card h3 {
  color: #38ef7d;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.area-card p {
  color: #b8c2cc;
  font-size: 0.9rem;
  margin: 0;
}

/* Responsive breakpoints for service areas */
@media (max-width: 768px) {
  .service-areas {
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .area-card {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .service-areas {
    gap: 0.75rem;
    padding: 0 0.5rem;
  }
  
  .area-card {
    padding: 1.25rem;
  }
}

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* ===== WHAT WE DO SECTION ===== */
.what-we-do {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.what-we-do .title,
.what-we-do h2 {
  text-align: center;
  margin: 0 0 .5rem;
}

.what-we-do .subhead {
  max-width: 780px;
  margin: 0 auto 2rem;
  text-align: center;
  line-height: 1.6;
}

.what-we-do .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto 0;
  align-items: stretch;
  justify-items: stretch;
}

.what-we-do,
.what-we-do .cards {
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0;
}

@media (max-width: 640px) {
  .what-we-do .subhead {
    margin-bottom: 1.5rem;
  }
}

.service-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(56, 239, 125, 0.1);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(56, 239, 125, 0.15);
}

.service-card h3 {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.service-card p {
  color: #b8c2cc;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ===== SECTION TITLES ===== */
.section-title {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.section-subtitle {
  color: #b8c2cc;
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #0a0f14;
  border-top: 1px solid rgba(56, 239, 125, 0.1);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-left h3 {
  color: #38ef7d;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.footer-left p {
  color: #b8c2cc;
  margin-bottom: 1.5rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-info a {
  color: #b8c2cc;
  text-decoration: none;
}

.contact-info a:hover {
  color: #38ef7d;
}

.footer-right {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-links h4 {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #b8c2cc;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #38ef7d;
}

.footer-bottom {
  border-top: 1px solid rgba(56, 239, 125, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom .footer-left,
.footer-bottom .footer-right {
  color: #b8c2cc;
  font-size: 0.9rem;
}

.footer-bottom a {
  color: #b8c2cc;
  text-decoration: none;
}

.footer-bottom a:hover {
  color: #38ef7d;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  
  .section-padding {
    padding: 2rem 0;
  }
  
  .nav-row {
    height: 60px;
  }
  
  .nav ul {
    gap: 1rem;
  }
  
  .hero {
    padding: 4rem 0 2rem;
    min-height: 50vh;
  }
  
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .services-grid {
    gap: 1.5rem;
  }
  

  
  .service-areas {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-right {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 0 1.5rem;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .stats-grid {
    gap: 1rem;
  }
  
  .stat-card {
    padding: 1.5rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* Focus states for accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.nav a:focus,
.stat-card:focus {
  outline: 2px solid #38ef7d;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .stat-card,
  .service-card,
  .area-card {
    border-width: 2px;
  }
  
  .btn-primary {
    border: 2px solid #000;
  }
  
  .btn-secondary {
    border-width: 3px;
  }
}

/* Print styles */
@media print {
  .nav,
  .cta-row,
  .site-footer {
    display: none;
  }
  
  .hero {
    background: none !important;
    color: #000 !important;
  }
  
  .stat-card,
  .service-card,
  .area-card {
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}

/* ===== WHAT WE DO SECTION - FORCED CENTERING ===== */
#what-we-do .wwd-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  text-align: center;
}

#what-we-do .wwd-subhead {
  max-width: 780px;
  margin: 8px auto 24px;
  line-height: 1.6;
}

#what-we-do .wwd-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  width: 100%;
  max-width: 1120px;
  margin: 24px auto 0;
}

#what-we-do .wwd-cards > * {
  flex: 1 1 300px;
  max-width: 360px;
}

/* Nuke common left-drift culprits inside this section only */
#what-we-do, 
#what-we-do .wwd-cards {
  margin-left: auto !important;
  margin-right: auto !important;
}
#what-we-do .wwd-cards { justify-content: center !important; }
#what-we-do [class*="ml-"], 
#what-we-do [style*="margin-left"] { margin-left: 0 !important; }

@media (max-width: 640px) {
  #what-we-do .wwd-subhead { margin-bottom: 16px; }
}

/* ===== AI MATTERS SECTION - FORCED CENTERING ===== */
#ai-matters .aim-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  text-align: center;
}

#ai-matters .aim-subhead {
  max-width: 780px;
  margin: 8px auto 28px;
  line-height: 1.6;
  opacity: .9;
}

#ai-matters .aim-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  align-items: stretch;
  justify-items: stretch;
}

#ai-matters .aim-stats > * {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
  min-height: 140px;
}

/* Kill stray left offsets inside this section */
#ai-matters, #ai-matters .aim-stats {
  margin-left: auto !important;
  margin-right: auto !important;
}
#ai-matters [class*="ml-"], 
#ai-matters [style*="margin-left"] { margin-left: 0 !important; }

@media (max-width: 1024px) {
  #ai-matters .aim-stats { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}
@media (max-width: 640px) {
  #ai-matters .aim-stats { grid-template-columns: 1fr; }
  #ai-matters .aim-subhead { margin-bottom: 20px; }
}

/* ===== AI PROCESS SECTION - FORCED CENTERING ===== */
#ai-process .proc-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  text-align: center;
}

#ai-process .proc-subhead {
  max-width: 780px;
  margin: 8px auto 28px;
  line-height: 1.6;
  opacity: .9;
}

#ai-process .proc-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  align-items: stretch;
  justify-items: stretch;
}

#ai-process .proc-steps > * {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
  padding: 22px;
}

/* kill common left-drift inside this section only */
#ai-process, #ai-process .proc-steps {
  margin-left: auto !important;
  margin-right: auto !important;
}
#ai-process [class*="ml-"], 
#ai-process [style*="margin-left"] { margin-left: 0 !important; }

@media (max-width: 1024px) {
  #ai-process .proc-steps { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  #ai-process .proc-steps { grid-template-columns: 1fr; }
}

/* ===== INDUSTRY MATTERS SECTION - FORCED CENTERING ===== */
#industry-matters .industry-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  text-align: center;
}

#industry-matters .industry-subhead {
  max-width: 780px;
  margin: 8px auto 28px;
  line-height: 1.6;
  opacity: .9;
}

#industry-matters .industry-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  align-items: stretch;
  justify-items: stretch;
}

#industry-matters .industry-cards > * {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
  padding: 22px;
}

/* remove any inherited left margins for this section */
#industry-matters, #industry-matters .industry-cards {
  margin-left: auto !important;
  margin-right: auto !important;
}
#industry-matters [class*="ml-"], 
#industry-matters [style*="margin-left"] { margin-left: 0 !important; }

@media (max-width: 1024px) {
  #industry-matters .industry-cards { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  #industry-matters .industry-cards { grid-template-columns: 1fr; }
}
