/* Base & Utilities */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* Scroll reveal animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

#nav.scrolled {
  background: rgba(255, 252, 248, 0.95);
  backdrop-blur-md;
  box-shadow: 0 1px 20px rgba(138, 43, 43, 0.08);
}

/* Mobile menu toggle */
.nav-line {
  display: block;
  transition: all 0.3s ease;
}

#menu-toggle.active .nav-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* Mobile links */
.mobile-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.mobile-link:hover {
  color: #a33535;
  transform: scale(1.05);
}

/* Hero badge animation */
.hero-badge {
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero text animation */
#hero h1,
#hero p,
#hero a,
#hero .flex {
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

#hero h1 { animation-delay: 0.3s; }
#hero p { animation-delay: 0.4s; }
#hero a { animation-delay: 0.5s; }
#hero .flex { animation-delay: 0.6s; }

/* Floating card animation */
.absolute.-bottom-6.-left-6 {
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}

/* Small accent image animation */
.absolute.-top-4.-right-4 {
  animation: float 5s ease-in-out infinite reverse;
}

/* Image hover effects */
.group:hover .group-hover\:scale-105 {
  transform: scale(1.05);
}

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

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

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

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

/* Selection color */
::selection {
  background: #f9d4d4;
  color: #6e2222;
}

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

/* Smooth image loading */
img {
  loading: lazy;
}

/* Reduce 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;
  }

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