/* ===== CUSTOM STYLES FOR C&E SPOT ===== */

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

body {
  overflow-x: hidden;
}

::selection {
  background: #7B2D3B;
  color: #FDF8F4;
}

/* --- Scroll reveal base: content always visible (no JS required) --- */
.reveal-up {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Only animate when JS enables .revealed class (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up {
    opacity: 0;
    transform: translateY(24px);
  }

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

/* --- Navigation --- */
#site-header {
  background: rgba(253, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(123, 45, 59, 0.08);
}

#site-header.scrolled {
  box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #7B2D3B;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

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

#mobile-menu .mobile-link {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* --- Hamburger --- */
.menu-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-btn.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

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

#menu-btn.active .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.5rem;
}

/* --- Service cards --- */
.service-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

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

/* --- Gallery images --- */
.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* --- Button focus --- */
button:focus-visible,
a:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 2px;
}

/* --- Input autofill --- */
input:-webkit-autofill,
textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 30px #FDF8F4 inset !important;
}

/* --- Decorative serif drop caps for body sections --- */
.font-display em {
  font-style: italic;
}

/* --- Subtle parallax for hero images --- */
.hero-image-main {
  will-change: transform;
}

/* --- Print styles --- */
@media print {
  #site-header,
  #mobile-menu,
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
  }

  footer {
    background: #1A1212 !important;
    color: #fff !important;
  }
}
