/* ===== Base & Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #c44545;
  color: #fff;
}

/* ===== Scroll Reveal Animations ===== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.scroll-reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal.revealed:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal.revealed:nth-child(6) { transition-delay: 0.5s; }

/* ===== Navbar Transition ===== */
#navbar.scrolled {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
  background: #c44545;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a83232;
}

/* ===== Service Card Hover Glow ===== */
.group:hover .group-hover\:bg-white\/20 {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== Button Focus States ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #c44545;
  outline-offset: 2px;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Counter Animation ===== */
.font-display {
  font-feature-settings: 'lnum' 1, 'cptn' 1;
}

/* ===== Responsive Typography ===== */
@media (max-width: 640px) {
  .font-display {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }
}

/* ===== Print Styles ===== */
@media print {
  #navbar, #mobile-menu-btn, .scroll-reveal {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
}
