/* Base & Typography */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: rgba(168, 230, 207, 0.3);
  color: #a8e6cf;
}

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

::-webkit-scrollbar-track {
  background: #060e20;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #2a5a8c;
}

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

#navbar.scrolled {
  background: rgba(6, 14, 32, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(168, 230, 207, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

#mobileMenu.open .mobile-link {
  animation: fadeSlideIn 0.4s ease forwards;
}

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

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

/* Menu Button */
.menu-line {
  display: block;
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(3px, 3px);
}

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

#menuBtn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -3px);
  width: 1.5rem;
}

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

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

.service-card:hover::before {
  opacity: 1;
}

/* Gallery */
.gallery-item {
  cursor: pointer;
  position: relative;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 14, 32, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Testimonial Cards */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 24px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 6rem;
  line-height: 1;
  color: rgba(168, 230, 207, 0.06);
  pointer-events: none;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-delay="0"] { transition-delay: 0s; }
.reveal[data-delay="100"] { transition-delay: 0.1s; }
.reveal[data-delay="200"] { transition-delay: 0.2s; }
.reveal[data-delay="300"] { transition-delay: 0.3s; }
.reveal[data-delay="400"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: no-preference) {
  .reveal-hidden {
    opacity: 0;
    transform: translateY(32px);
  }

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

  .reveal-hidden-left {
    opacity: 0;
    transform: translateX(-32px);
  }

  .reveal-hidden-left.revealed {
    opacity: 1;
    transform: translateX(0);
  }

  .reveal-hidden-right {
    opacity: 0;
    transform: translateX(32px);
  }

  .reveal-hidden-right.revealed {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Reduce 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-hidden,
  .reveal-hidden-left,
  .reveal-hidden-right {
    opacity: 1;
    transform: none;
  }
}

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

/* Pulse for CTA */
@keyframes subtlePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 230, 207, 0.3); }
  50% { box-shadow: 0 0 0 12px rgba(168, 230, 207, 0); }
}

.cta-pulse {
  animation: subtlePulse 2.5s ease-in-out infinite;
}

/* Image shimmer placeholder */
img {
  background: linear-gradient(110deg, #0C1B3A 8%, #142238 18%, #0C1B3A 33%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
  to { background-position: -200% 0; }
}

img[src] {
  animation: none;
  background: none;
}

/* Form select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a8e6cf' stroke-width='2' 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 12px center;
  padding-right: 40px;
}
