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

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

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: rgba(196, 90, 74, 0.3);
  color: #fff;
}

/* ========== NAVBAR SCROLL STATE ========== */
#navbar.scrolled {
  background: rgba(18, 18, 24, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

#navbar.scrolled .font-serif {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ========== HERO ANIMATIONS ========== */
.hero-subtitle {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.3s;
}

.hero-title {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.5s;
}

.hero-desc {
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.7s;
}

.hero-title, .hero-desc {
  animation-delay: 0.5s;
}

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

/* ========== SCROLL REVEAL (below-the-fold only) ========== */
@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);
  }
}

/* Fallback: if JS is disabled, all content is visible */
@media not all and (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ========== SERVICE CARDS ========== */
.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, rgba(196, 90, 74, 0.6), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

/* ========== 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='%2388889A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ========== MOBILE MENU TRANSITION ========== */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

#mobile-menu.open {
  animation: slideDown 0.3s ease;
}

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

::-webkit-scrollbar-track {
  background: #121218;
}

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

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

/* ========== INPUT AUTOFILL OVERRIDE ========== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0px 1000px #25252f inset;
  transition: background-color 5000s ease-in-out 0s;
}
