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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1a2a3a;
}
::-webkit-scrollbar-thumb {
  background: #e07a5f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d46143;
}

/* ===== NAVBAR SCROLL STATE ===== */
#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE MENU ANIMATION ===== */
#mobileMenu.open {
  animation: slideDown 0.3s ease-out;
}

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

/* ===== MOBILE LINKS ===== */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:last-child {
  border-bottom: none;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #e07a5f;
  transition: width 0.4s ease;
}

.service-card:hover::after {
  width: 100%;
}

/* ===== GALLERY ===== */
.gallery-item {
  position: relative;
}

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

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

/* ===== SCROLL REVEAL (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s 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; }
}

/* ===== BUTTON HOVER EFFECTS ===== */
a[href^="tel:"],
a[href^="mailto:"] {
  text-decoration: none;
}

/* ===== FOCUS STYLES ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #e07a5f;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== SELECTION ===== */
::selection {
  background: #e07a5f;
  color: #ffffff;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
  #hero h1 {
    font-size: 2.25rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  #about .grid img {
    height: 200px;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  #hero h1 {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  #hero h1 {
    font-size: 3.75rem;
  }
}
