/* Base & Typography */
@layer base {
  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: 'Lora', Georgia, serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
  }
}

/* Fade-up animation for hero elements */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  animation: fade-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Scroll reveal — progressive enhancement via JS */
.scroll-reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animate-fade-up {
    animation: none;
    opacity: 1;
  }

  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

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

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

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

/* Selection color */
::selection {
  background: #fce7eb;
  color: #6e1f34;
}

/* Image lazy-load fallback */
img[loading="lazy"] {
  opacity: 1;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid #a11d3b;
  outline-offset: 2px;
}

/* Subtle hover lift for cards */
.group:hover .group-hover\:translate-y-\\[-4px\] {
  transform: translateY(-4px);
}
