html, body {
  background-color: #05071e;
  color: #e8e7f7;
  font-family: Inter, system-ui, sans-serif;
}

/* --- SECTION SPACING (CRITICAL FIX) --- */
/* Keep section padding LIGHT.
   Use Tailwind margins (mt-24 / mt-32) for layout rhythm */
section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Optional compact section */
.section-compact {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* --- LAYOUT --- */
.container {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* --- GLASS / EFFECTS --- */
.glass {
  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.08),
    rgba(255,255,255,0.02)
  );
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.glow {
  filter: blur(60px);
  opacity: 0.6;
}

/* --- MOTION SYSTEM (REFINED) --- */
.motion {
  transition:
    transform 0.25s ease-out,
    box-shadow 0.25s ease-out,
    background-color 0.25s ease-out,
    color 0.25s ease-out;
}

.motion-soft {
  transition:
    transform 0.35s ease-out,
    box-shadow 0.35s ease-out,
    background-color 0.35s ease-out;
}

/* Lift effect */
.hover-lift:hover {
  transform: translateY(-4px);
}

/* Glow on hover */
.hover-glow:hover {
  box-shadow:
    0 0 0 1px rgba(82,77,211,0.35),
    0 25px 70px rgba(82,77,211,0.25);
}

/* --- NAV --- */
.nav-link {
  position: relative;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #524dd3;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* --- PILLS --- */
.pill {
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  background: #131428;
  font-size: 0.875rem;
  transition:
    transform 0.25s ease-out,
    background-color 0.25s ease-out;
}

.pill:hover {
  background: rgba(82,77,211,0.2);
  transform: translateY(-2px);
}

/* Sticky nav morph */
header.sticky {
  transition: all 0.3s ease;
}

/* When scrolled */
body.scrolled header .glass {
  border-radius: 0.75rem;
  box-shadow: 0 25px 80px rgba(0,0,0,0.6);
}
/* ================================
   MOBILE OPTIMIZATION (≤ 768px)
   ================================ */

@media (max-width: 768px) {

  /* Global spacing tightening */
  section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Container breathing room */
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* NAV */
  header {
    top: 0.75rem;
  }

  .nav-shell {
    padding: 0.75rem 1.25rem;
  }

  /* Hide desktop nav already handled by Tailwind,
     this ensures spacing stays clean */
  nav {
    display: none;
  }

  /* HERO */
  h1 {
    font-size: 2.5rem;
    line-height: 1.15;
  }

  .hero,
  section.container {
    gap: 3rem;
  }

  /* Stack hero content cleanly */
  section.container.grid {
    grid-template-columns: 1fr !important;
  }

  /* Hero buttons */
  section.container .flex.gap-4 {
    flex-direction: column;
  }

  section.container .flex.gap-4 a {
    width: 100%;
    text-align: center;
  }

  /* Reduce hero glow size if present */
  .glow {
    filter: blur(70px);
    opacity: 0.45;
  }

  /* STATS */
  .grid-cols-4 {
    grid-template-columns: 1fr 1fr !important;
  }

  /* WHY SIGMA */
  .md\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }

  /* Cards spacing */
  .space-y-4 > * {
    margin-top: 0.75rem;
  }

  /* SERVICES */
  .md\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }

  .rounded-3xl {
    padding: 1.5rem;
  }

  /* Reduce service card height feel */
  .rounded-2xl.p-6 {
    padding: 1.25rem;
  }

  /* EXPERTISE */
  .flex.flex-wrap {
    gap: 0.5rem;
  }

  .pill {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
  }

  /* CTA */
  .p-14 {
    padding: 2.5rem 1.5rem;
  }

  .p-16 {
    padding: 2.75rem 1.75rem;
  }

  /* FOOTER */
  footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Hover effects tone-down for touch */
  .hover-lift:hover {
    transform: none;
  }

  .hover-glow:hover {
    box-shadow:
      0 0 0 1px rgba(82,77,211,0.25),
      0 16px 40px rgba(82,77,211,0.2);
  }
}
/* ================================
   MOBILE NAV
   ================================ */

#mobile-menu {
  transition: opacity 0.25s ease;
}

#mobile-menu a {
  transition: color 0.2s ease, transform 0.2s ease;
}

#mobile-menu a:hover {
  color: #6c67ff;
  transform: translateY(-2px);
}
