/* CJ Resort — Classic & Elegant Styles */

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

/* Selection */
::selection {
  background-color: #166534;
  color: #fefdf8;
}

/* Scroll Indicator */
.scroll-indicator {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-10px) translateX(-50%);
  }
  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

/* Hero Animations */
.hero-anim {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Scroll Reveal Animations (progressive enhancement) */
.scroll-element {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

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

  /* Staggered delays */
  .scroll-element:nth-child(2) { transition-delay: 0.1s; }
  .scroll-element:nth-child(3) { transition-delay: 0.2s; }
  .scroll-element:nth-child(4) { transition-delay: 0.3s; }
}

/* Navbar Scroll State */
#navbar.scrolled {
  background-color: rgba(5, 46, 22, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled .font-serif {
  color: #fefdf8;
}

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

/* Focus Styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
  background: #052e16;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #15803d;
}

/* Mobile Menu Animation */
#mobile-menu {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Link Hover Effect */
.nav-link::after,
.mobile-link::after {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

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

/* Button Ripple Effect */
button[type="submit"]::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(254, 253, 248, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

button[type="submit"]:active::after {
  width: 300px;
  height: 300px;
}

/* Form Input Transitions */
input,
textarea {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Image Hover Zoom */
.group:hover img {
  transform: scale(1.05);
}

/* Decorative Divider */
.w-24.h-px {
  background: linear-gradient(90deg, transparent, currentColor, transparent);
}
