/* ============================================
   Ilich Rodriguez — Custom Styles
   ============================================ */

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

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

body {
  margin: 0;
}

::selection {
  background: rgba(52, 211, 153, 0.3);
  color: #f0f4f8;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #061526;
}
::-webkit-scrollbar-thumb {
  background: #1a3a5c;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #34d399;
}

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

#navbar.scrolled {
  background: rgba(6, 21, 38, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(52, 211, 153, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #34d399;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Marquee */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 20s linear infinite;
}

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

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

.floating-card:nth-child(2) {
  animation-delay: -1.3s;
  animation-duration: 4.5s;
}

.floating-card:nth-child(3) {
  animation-delay: -2.6s;
  animation-duration: 5s;
}

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

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #34d399, #86efac);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

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

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

/* Testimonials */
.testimonial-card {
  position: relative;
  transition: all 0.4s ease;
}

.testimonial-card:hover {
  border-color: rgba(52, 211, 153, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

/* Scroll Reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
  .reveal-delay-5 { transition-delay: 0.5s; }
  .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Reduced motion */
@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;
  }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid #34d399;
  outline-offset: 2px;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .floating-card {
    display: none;
  }
}

/* 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='%2334d399' 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 16px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
