/* Base & Utilities */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: rgba(126, 207, 192, 0.3);
  color: #0a1628;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: rgba(126, 207, 192, 0.4);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(126, 207, 192, 0.6);
}

/* Scrollbar light */
.light-scroll ::-webkit-scrollbar-track {
  background: #f1f5f5;
}
.light-scroll ::-webkit-scrollbar-thumb {
  background: #7ecfc0;
}

/* Navbar */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(10, 22, 40, 0.06);
}

#navbar.scrolled .nav-logo-text {
  color: #0a1628;
}

#navbar.scrolled .menu-line {
  background: #0a1628;
}

#navbar.scrolled .mobile-nav-link {
  color: #0a1628;
}

/* Hero Decorations */
.hero-deco {
  opacity: 0;
  animation: floatIn 1.2s ease forwards;
}
.hero-deco-1 { animation-delay: 0.6s; }
.hero-deco-2 { animation-delay: 0.8s; }
.hero-deco-3 { animation-delay: 1s; }
.hero-deco-4 { animation-delay: 1.2s; }
.hero-deco-5 { animation-delay: 1.4s; }
.hero-deco-6 { animation-delay: 1.6s; }

@keyframes floatIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Scroll Line Animation */
.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.2); }
}

/* Section Reveal */
.section-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Service Cards */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #7ecfc0, transparent);
  transform: scaleX(0);
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

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

#mobile-menu.open .mobile-nav-link {
  animation: slideIn 0.4s ease forwards;
  opacity: 0;
}

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

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

/* Mobile Menu Button Active State */
#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(2px, 2px);
}
#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(2px, -2px);
  width: 1.5rem;
}

/* Image hover containers */
.overflow-hidden {
  position: relative;
}

.overflow-hidden::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 22, 40, 0.1), transparent);
  pointer-events: none;
}

/* Gallery hover */
overflow-hidden img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Form 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='%230a1628' stroke-width='1.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;
  appearance: none;
  -webkit-appearance: none;
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.1;
  }
}
