/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
}

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

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: #1f3a6a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #34d4a8;
}

/* ===== NAVBAR ===== */
#navbar {
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
  background: rgba(6, 14, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(52, 212, 168, 0.1);
}

/* ===== MOBILE MENU ===== */
.mobile-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
}

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

#mobileMenu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobileMenu.closed .mobile-link {
  opacity: 0;
  transform: translateY(12px);
}

#mobileMenu.closed .mobile-link:nth-child(1) { transition-delay: 0s; }
#mobileMenu.closed .mobile-link:nth-child(2) { transition-delay: 0.05s; }
#mobileMenu.closed .mobile-link:nth-child(3) { transition-delay: 0.1s; }
#mobileMenu.closed .mobile-link:nth-child(4) { transition-delay: 0.15s; }
#mobileMenu.closed .mobile-link:nth-child(5) { transition-delay: 0.2s; }

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.2s; }

/* Hamburger animation */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuToggle.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}
#menuToggle.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menuToggle.active .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.25rem;
}

/* ===== HERO SHAPES ===== */
.hero-shape {
  will-change: transform;
}

.shape-circle-1 {
  animation: floatShape1 8s ease-in-out infinite;
}
.shape-circle-2 {
  animation: floatShape2 10s ease-in-out infinite;
}
.shape-square-1 {
  animation: floatShape3 6s ease-in-out infinite;
}
.shape-square-2 {
  animation: floatShape4 7s ease-in-out infinite;
}
.shape-diamond {
  animation: floatShape5 9s ease-in-out infinite;
}

@keyframes floatShape1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 15px) scale(1.05); }
}
@keyframes floatShape2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(15px, -20px) scale(1.08); }
}
@keyframes floatShape3 {
  0%, 100% { transform: rotate(12deg) translate(0, 0); }
  50% { transform: rotate(18deg) translate(10px, -15px); }
}
@keyframes floatShape4 {
  0%, 100% { transform: rotate(-12deg) translate(0, 0); }
  50% { transform: rotate(-6deg) translate(-12px, 10px); }
}
@keyframes floatShape5 {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(60deg) translate(8px, -12px); }
}

/* ===== FLOATING STAT CARDS ===== */
.floating-card {
  will-change: transform;
  animation: floatCard 4s ease-in-out infinite;
}

.card-stat-1 {
  animation-delay: 0s;
  animation-duration: 4.2s;
}
.card-stat-2 {
  animation-delay: -1.1s;
  animation-duration: 3.8s;
}
.card-stat-3 {
  animation-delay: -2.2s;
  animation-duration: 4.5s;
}
.card-stat-4 {
  animation-delay: -0.7s;
  animation-duration: 3.6s;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ===== MARQUEE ===== */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 20s linear infinite;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  will-change: transform;
}

/* ===== PORTFOLIO ===== */
.portfolio-item {
  overflow: hidden;
  position: relative;
}

/* ===== TESTIMONIAL CARDS ===== */
.testimonial-card {
  will-change: transform;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .floating-card {
    display: none;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .floating-card {
    display: none;
  }
}
