/* Custom styles for Sirens and Sailors Tattoo */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Navbar transitions */
#navbar.scrolled {
  background-color: rgba(17, 26, 46, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(201, 151, 30, 0.1);
}

#navbar.scrolled .menu-line {
  background-color: #f4f6fb;
}

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

#mobile-menu.open .mobile-link {
  animation: fadeUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#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; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* Mobile menu toggle animation */
#mobile-menu.open ~ nav button .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu.open ~ nav button .menu-line:nth-child(2) {
  opacity: 0;
}
#mobile-menu.open ~ nav button .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  width: 1.5rem;
}

/* Service card hover */
.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, #c9971e, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

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

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 26, 46, 0.4) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

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

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

::-webkit-scrollbar-track {
  background: #111a2e;
}

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

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

/* Selection color */
::selection {
  background-color: rgba(201, 151, 30, 0.3);
  color: #f4f6fb;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #c9971e;
  outline-offset: 2px;
}

/* Prevent layout shift on select */
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='%237a93c7' 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 1rem center;
  padding-right: 2.5rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .service-card,
  .gallery-item img,
  a,
  button {
    transition: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
