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

body {
  overflow-x: hidden;
}

::selection {
  background: #E8A838;
  color: #270f23;
}

/* ===== Scroll Reveal Animations ===== */
/* Default state: always visible (progressive enhancement) */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* When JS adds the animated class, enable transitions */
.animate-scroll-reveals .reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.animate-scroll-reveals .reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}

.animate-scroll-reveals .reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

/* Active state (added by JS) */
.animate-scroll-reveals.revealed .reveal-up,
.animate-scroll-reveals.revealed .reveal-left,
.animate-scroll-reveals.revealed .reveal-right {
  opacity: 1;
  transform: none;
}

/* Scroll line animation */
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.animate-scroll-line {
  animation: scrollLine 1.8s ease-in-out infinite;
}

/* Floating cards animation */
@keyframes float1 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

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

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

.floating-card {
  animation: float1 4s ease-in-out infinite;
}

.card-2 {
  animation: float2 5s ease-in-out infinite;
  animation-delay: 0.5s;
}

.card-3 {
  animation: float3 4.5s ease-in-out infinite;
  animation-delay: 1s;
}

.card-4 {
  animation: float2 5.5s ease-in-out infinite;
  animation-delay: 1.5s;
}

/* ===== Navbar ===== */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(250, 245, 248, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(107, 47, 91, 0.08);
}

/* ===== Button Hover Effects ===== */
a {
  text-decoration: none;
}

/* ===== Image Hover ===== */
img {
  max-width: 100%;
  height: auto;
}

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

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

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

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

/* ===== Reduced 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;
  }
  .reveal-up,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}

/* ===== Mobile Menu Transition ===== */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobile-menu.open {
  max-height: 400px;
  padding-top: 0;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #E8A838;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Smooth Card Hover ===== */
.group:hover .group-hover\\\:translate-x-1 {
  transform: translateX(4px);
}
