/* ============================================
   Chico Deck & Porch — Custom Styles
   ============================================ */

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

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

body {
  overflow-x: hidden;
}

/* Selection */
::selection {
  background: #0d9488;
  color: #f8fafc;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f172a;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

/* Navbar */
#navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.scrolled {
  background-color: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

/* Mobile Menu */
.mobile-link {
  transition: color 0.2s ease;
}
.mobile-link:hover {
  color: #2dd4bf;
}

/* Service Cards */
.service-card {
  cursor: default;
}

/* Gallery */
.gallery-item {
  cursor: pointer;
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.2) 0%, transparent 40%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover::after {
  opacity: 1;
}
.gallery-item {
  position: relative;
}

/* Process Steps */
.process-step {
  position: relative;
}

/* Scroll Animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger delays */
.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; }

/* Mobile menu animation */
#mobile-menu {
  animation: slideDown 0.3s ease forwards;
}

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

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

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

/* Responsive adjustments */
@media (max-width: 640px) {
  .font-display {
    font-size: clamp(2rem, 8vw, 3rem);
  }
}
