/* Custom styles for Tool Times Equipment Rental */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fefcfb;
}
::-webkit-scrollbar-thumb {
  background: #f9c5d8;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f49aad;
}

/* Hero badge animation */
.hero-badge {
  animation: fadeInUp 0.8s ease-out both;
}

/* Hero content animation */
#hero h1 {
  animation: fadeInUp 0.8s ease-out 0.1s both;
}
#hero p {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}
#hero .flex-wrap {
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

/* Scroll line animation */
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.animate-scroll-line {
  animation: scrollLine 1.8s ease-in-out infinite;
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.grid > .scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.grid > .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.grid > .scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.grid > .scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.grid > .scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.grid > .scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* Navbar scroll state */
#navbar.scrolled {
  background: rgba(254, 252, 251, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(139, 26, 75, 0.06);
}

/* Nav links underline effect */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #8B1A4B;
  transition: width 0.3s ease;
  border-radius: 1px;
}
.nav-link:hover::after {
  width: 100%;
}

/* Service card image hover */
.service-card {
  transform: translateY(0);
}
.service-card:hover {
  transform: translateY(-4px);
}

/* Mobile menu */
#mobile-menu {
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.mobile-link:last-child {
  border-bottom: none;
}

/* Writing mode for side decoration */
.writing-mode-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* Form select styling */
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='%239ca3af' 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;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #8B1A4B;
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Tablet adjustments */
@media (max-width: 768px) {
  #hero h1 {
    font-size: 2.75rem;
  }
  .service-card {
    padding: 1.5rem;
  }
}

/* Large desktop */
@media (min-width: 1280px) {
  #hero h1 {
    font-size: 4rem;
  }
}
