/* ============================================
   QMEX — Main CSS Entry
   ============================================ */
@import "tailwindcss";

@import './variables.css';
@import './reset.css';
@import './animations.css';
@import './components.css';
@import './particle.css';
@import './clients.css';
@import './leadership.css';

/* ============================================
   Page-level styles & utilities
   ============================================ */

body.loading {
  overflow: hidden;
}



/* Section backgrounds */
.section--soft {
  background: var(--bg-soft);
}

.section--muted {
  background: var(--bg-muted);
}

.section--gradient {
  background: linear-gradient(180deg, var(--bg-pure) 0%, var(--bg-soft) 100%);
}

.section--dark {
  background: var(--text-primary);
  color: white;
}



/* Stats section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1);
  background: var(--bg-muted);
  border-radius: var(--radius-3xl);
  overflow: hidden;
}

.stats-grid .stat-card {
  background: var(--bg-pure);
  position: relative;
}

.stats-grid .stat-card::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--bg-muted);
}

.stats-grid .stat-card:last-child::after {
  display: none;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* Mission Vision */
.mission-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

.mv-card {
  padding: var(--space-10);
  border-radius: var(--radius-3xl);
  position: relative;
  overflow: hidden;
  transition: all var(--duration-slow) var(--ease-smooth);
}

.mv-card:hover {
  transform: translateY(-8px);
}

.mv-card--mission {
  background: var(--gradient-primary);
  color: white;
}

.mv-card--mission:hover {
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.25), var(--shadow-xl);
}

.mv-card--vision {
  background: var(--bg-soft);
  border: var(--border-subtle);
}

.mv-card--vision:hover {
  box-shadow: var(--shadow-xl);
  border-color: rgba(37, 99, 235, 0.2);
}

.mv-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  transition: transform var(--duration-normal) var(--ease-spring);
}

.mv-card:hover .mv-card__icon {
  transform: scale(1.15) rotate(-5deg);
}

.mv-card--mission .mv-card__icon {
  background: rgba(255, 255, 255, 0.2);
}

.mv-card--vision .mv-card__icon {
  background: var(--accent-blue-pale);
}

.mv-card__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  opacity: 0.7;
  margin-bottom: var(--space-3);
}

.mv-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
}

.mv-card--mission .mv-card__title {
  color: white;
}

.mv-card__text {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  opacity: 0.85;
}

.mv-card--mission .mv-card__text {
  color: rgba(255, 255, 255, 0.85);
}

.mv-card--vision .mv-card__text {
  color: var(--text-tertiary);
}

/* Why choose section */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.why-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  border-radius: var(--radius-2xl);
  border: var(--border-subtle);
  background: var(--bg-pure);
  transition: all var(--duration-slow) var(--ease-smooth);
}

.why-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.2);
}

.why-item__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xl);
  background: var(--accent-blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
}

.why-item__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.why-item__text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: var(--leading-relaxed);
}

/* Industries */
.industries-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

/* CTA Section */
.cta-section {
  background: var(--gradient-primary);
  border-radius: var(--radius-3xl);
  padding: var(--space-12) var(--space-10);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-section__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 800;
  color: white;
  margin-bottom: var(--space-4);
  position: relative;
}

.cta-section__sub {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-8);
  position: relative;
}

.cta-section__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.btn--white {
  background: white;
  color: var(--accent-blue);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn--white:hover {
  background: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  color: var(--accent-violet);
}

.btn--outline-white {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Lead gen form */
.lead-form-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius-3xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.lead-form__left {
  background: var(--gradient-primary);
  padding: var(--space-10) var(--space-8);
  color: white;
  position: relative;
  overflow: hidden;
}

.lead-form__right {
  background: var(--bg-pure);
  padding: var(--space-8);
}

.lead-form__left-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.lead-form__left-sub {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.8);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
}

.lead-form__benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.lead-form__benefit {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.9);
}

.lead-form__benefit-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Who we are */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.team-card {
  text-align: center;
  padding: var(--space-6);
  border-radius: var(--radius-2xl);
  border: var(--border-subtle);
  background: var(--bg-pure);
  transition: all var(--duration-slow) var(--ease-smooth);
}

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

.team-card__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  margin: 0 auto var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: 800;
  color: white;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.25);
}

.team-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.team-card__role {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Service detail page */
.service-detail-hero {
  padding: calc(68px + var(--space-12)) 0 var(--space-10);
  background: var(--bg-pure);
  position: relative;
  overflow: hidden;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.feature-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: var(--border-subtle);
  background: var(--bg-pure);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.feature-item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.2);
  transform: translateX(4px);
}

.feature-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--accent-blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
}

.feature-item__title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
}

.feature-item__desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: var(--leading-relaxed);
}

/* Tools strip */
.tools-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.tool-badge {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: var(--border-subtle);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.tool-badge:hover {
  background: var(--accent-blue-pale);
  border-color: rgba(37, 99, 235, 0.2);
  color: var(--accent-blue);
}

/* Deliverables list */
.deliverables-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.deliverable-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.deliverable-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient-primary);
  flex-shrink: 0;
}

/* Local SEO page */
.city-hero {
  padding: calc(68px + var(--space-12)) 0 var(--space-10);
  background: var(--bg-pure);
  position: relative;
  overflow: hidden;
}

.city-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero-mesh);
  pointer-events: none;
}

.city-map-bg {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.08), transparent 70%);
  pointer-events: none;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-12);
}

.contact-info__item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: var(--border-subtle);
  background: var(--bg-pure);
  margin-bottom: var(--space-4);
  transition: all var(--duration-normal) var(--ease-smooth);
}

.contact-info__item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.2);
}

.contact-info__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  background: var(--accent-blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.contact-info__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}

.contact-info__value {
  font-weight: 600;
  color: var(--text-primary);
}

.contact-info__sub {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* Form success state */
.form-success {
  text-align: center;
  padding: var(--space-12);
  display: none;
}

.form-success.show {
  display: block;
  animation: scaleInSpring 0.5s var(--ease-spring) forwards;
}

.form-success__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-emerald-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  color: var(--accent-emerald);
  animation: bounceIn 0.6s var(--ease-spring) forwards;
}

/* About page */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.founder-card {
  padding: var(--space-8);
  border-radius: var(--radius-3xl);
  background: var(--bg-soft);
  border: var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.founder-quote {
  font-size: var(--text-xl);
  font-style: italic;
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
  position: relative;
}

.founder-quote::before {
  content: '"';
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 900;
  color: var(--accent-blue);
  opacity: 0.15;
  position: absolute;
  top: -20px;
  left: -10px;
  line-height: 1;
}

.founder-sig {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.founder-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 800;
  color: white;
}

.founder-name {
  font-weight: 700;
  color: var(--text-primary);
}

.founder-title {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Responsive additional */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .mission-vision {
    grid-template-columns: 1fr;
  }

  .lead-form-section {
    grid-template-columns: 1fr;
  }

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

  .about-story {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

  .cta-section {
    padding: var(--space-8) var(--space-5);
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

}

/* ============================================
   Mobile Performance Overrides
   ============================================ */
@media (max-width: 768px) {
  /* Disable expensive backdrop-filter (glassmorphism) completely on mobile */
  *, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  /* Provide opaque fallbacks for elements that previously relied on glassmorphism */
  .navbar {
    background: var(--bg-pure) !important;
  }

  .navbar.scrolled {
    background: var(--bg-pure) !important;
    box-shadow: var(--shadow-sm) !important;
  }

  .mobile-nav {
    background: var(--bg-pure) !important;
  }
  
  .glass-card {
    background: var(--bg-pure) !important;
    border-color: rgba(37, 99, 235, 0.1) !important;
  }
}