/* ===== Base & Utilities ===== */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    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);
  }
  .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; }
}

/* All content is visible by default; JS adds .reveal for animation */

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

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1e3a5f, #c8952e);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 0 0 0 0;
}

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

/* ===== Testimonial Cards ===== */
.testimonial-card {
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 16px;
  left: 20px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 72px;
  line-height: 1;
  color: #c8952e;
  opacity: 0.15;
  pointer-events: none;
}

/* ===== Header shadow on scroll ===== */
#site-header.scrolled {
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.1);
}

/* ===== Mobile nav transition ===== */
#mobile-nav {
  animation: slideDown 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ===== Selection color ===== */
::selection {
  background-color: #c8952e;
  color: #0f2136;
}

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

/* ===== Custom 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='%23648cb2' stroke-width='2.5' 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 12px center;
  padding-right: 36px;
}

/* ===== Subtle pattern for hero (optional) ===== */
.hero-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 32px 32px;
}

/* ===== Responsive tweaks ===== */
@media (max-width: 640px) {
  .service-card {
    padding: 1.5rem;
  }
}

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