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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection {
  background: rgba(196, 82, 36, 0.3);
  color: #faf6f1;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.pexels.com/photos/36733323/pexels-photo-36733323.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13, 12, 10, 0.92) 0%,
    rgba(13, 12, 10, 0.82) 40%,
    rgba(13, 12, 10, 0.65) 100%
  );
  z-index: 1;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c45224' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  z-index: 2;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 3;
}

.hero-badge {
  animation: fadeInDown 0.8s ease-out both;
}

.hero h1 {
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero p {
  animation: fadeInUp 0.8s ease-out 0.35s both;
}

.hero .flex {
  animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero .grid {
  animation: fadeInUp 0.8s ease-out 0.65s both;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    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:nth-child(2) { transition-delay: 0.1s; }
  .reveal:nth-child(3) { transition-delay: 0.2s; }
  .reveal:nth-child(4) { transition-delay: 0.3s; }
  .reveal:nth-child(5) { transition-delay: 0.4s; }
  .reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* ─── Service Cards ─── */
.service-card {
  will-change: transform;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* ─── Testimonial Cards ─── */
.testimonial-card {
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-2px);
}

/* ─── Contact Form ─── */
.contact-form {
  transition: border-color 0.3s ease;
}

.contact-form:focus-within {
  border-color: rgba(196, 82, 36, 0.3);
}

select option {
  background: #1f1c17;
  color: #faf6f1;
}

/* ─── Mobile Menu ─── */
.mobile-menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

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

.mobile-nav-link {
  transition: opacity 0.3s ease;
}

/* ─── Scroll to Top ─── */
#scroll-top.visible {
  opacity: 1;
  pointer-events: all;
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(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;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ─── Focus visible ─── */
:focus-visible {
  outline: 2px solid #c45224;
  outline-offset: 2px;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0d0c0a;
}

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

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

/* ─── Print ─── */
@media print {
  .site-header, #scroll-top, .hero-bg, .hero-pattern { display: none; }
  body { background: white; color: black; }
  .hero { min-height: auto; }
}
