/* ── Base & Utilities ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(13, 148, 136, 0.2);
  color: #0f172a;
}

/* ── Hero Animations ──────────────────────────────────────────── */
.hero-anim {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.25s; }
.hero-anim:nth-child(3) { animation-delay: 0.4s; }
.hero-anim:nth-child(4) { animation-delay: 0.55s; }
.hero-anim:nth-child(5) { animation-delay: 0.7s; }

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Scroll Reveal ────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ── Navbar Scroll State ──────────────────────────────────────── */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 20px rgba(0, 0, 0, 0.04);
}

#navbar.scrolled .menu-line {
  background: #1e293b;
}

/* ── Mobile Menu ──────────────────────────────────────────────── */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.open .mobile-link {
  animation: menuLinkIn 0.4s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}

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

@keyframes menuLinkIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Hamburger Animation ──────────────────────────────────────── */
.menu-btn.active .menu-line:first-child {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-btn.active .menu-line:last-child {
  width: 20px;
  transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Service Card Tilt on Hover ───────────────────────────────── */
.group:hover .w-14 {
  transform: scale(1.08) rotate(-2deg);
}

/* ── Custom Select Arrow ──────────────────────────────────────── */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ── Subtle Parallax on Hero ──────────────────────────────────── */
#hero .absolute.inset-0 img {
  will-change: transform;
}

/* ── Focus Visible for Accessibility ──────────────────────────── */
:focus-visible {
  outline: 2px solid #0D9488;
  outline-offset: 2px;
}

/* ── Smooth Counter Animation ─────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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