/* === Base === */
*, *::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, 86, 61, 0.2);
  color: inherit;
}

/* === Scroll Reveal === */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger children */
.service-card:nth-child(1) { transition-delay: 0ms; }
.service-card:nth-child(2) { transition-delay: 80ms; }
.service-card:nth-child(3) { transition-delay: 160ms; }
.service-card:nth-child(4) { transition-delay: 240ms; }
.service-card:nth-child(5) { transition-delay: 320ms; }
.service-card:nth-child(6) { transition-delay: 400ms; }

/* === Navigation === */
#site-header {
  background: transparent;
  transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#site-header.scrolled {
  background: rgba(253, 251, 248, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#site-header.scrolled .nav-link {
  color: #292524;
  opacity: 0.7;
}

#site-header.scrolled .nav-link:hover {
  opacity: 1;
}

#site-header.scrolled a {
  color: inherit;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  opacity: 1;
}

/* Mobile menu */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-link {
  text-decoration: none;
}

/* === Hero === */
.hero {
  position: relative;
}

.hero-bg {
  transition: transform 8s ease;
}

.hero-bg.active {
  transform: scale(1);
}

.hero-overlay {
  background: linear-gradient(
    180deg,
    rgba(15, 13, 12, 0.55) 0%,
    rgba(15, 13, 12, 0.45) 40%,
    rgba(15, 13, 12, 0.65) 100%
  );
}

.hero-content {
  padding-top: 80px;
}

.hero-headline {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.hero-eyebrow {
  opacity: 0;
  animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

.hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s forwards;
}

.hero-ctas {
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s forwards;
}

.hero-scroll {
  opacity: 0;
  animation: heroFadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.3s forwards;
}

@keyframes heroFadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Buttons === */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

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

/* === Form === */
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='%23a8a29e' 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;
}

/* === Utility === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* === 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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* === Print === */
@media print {
  #site-header, .hero-scroll, button {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
}
