/* Base & Utilities */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
  background: rgba(123, 45, 59, 0.15);
  color: #3a0f16;
}

/* Reveal Animations */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.reveal-up:nth-child(2) { transition-delay: 0.1s; }
.reveal-up:nth-child(3) { transition-delay: 0.2s; }

/* Header */
#header {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

#header.scrolled {
  background: rgba(254, 253, 251, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

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

#mobileMenu.closed {
  opacity: 0;
  pointer-events: none;
}

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

.mobile-link:hover {
  opacity: 0.7;
}

/* Smooth image loading */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

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

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

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

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

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

/* Remove default focus ring on buttons that already have custom focus */
button:focus:not(:focus-visible) {
  outline: none;
}

/* Print styles */
@media print {
  #header,
  #mobileMenuBtn {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
}
