/* =====================================================
   Oriental Bite Co. — Brand Website Styles
   Visual: forest green / rice white / pale cyan + Guochao opera IP
   ===================================================== */

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

::selection {
  background-color: rgba(27, 77, 62, 0.2);
  color: #1B4D3E;
}

/* ---------- Navbar ---------- */
#navbar {
  background: rgba(255, 253, 247, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(27, 77, 62, 0.06);
}

#navbar.scrolled {
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(27, 77, 62, 0.07);
  box-shadow: 0 4px 24px rgba(27, 77, 62, 0.06);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #1B4D3E;
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 1px;
}

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

/* ---------- Marquee ---------- */
.marquee {
  display: flex;
  animation: marquee 30s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Scroll Reveal ----------
   The hidden state is scoped to `html.js` so that if main.js ever fails to
   load, the html.js class is never added and all content stays visible
   instead of disappearing (progressive enhancement). */
html.js .reveal:not(.active) {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

html.js .reveal-left:not(.active) {
  opacity: 0;
  transform: translateX(-48px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

html.js .reveal-right:not(.active) {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }
.stagger-5 { transition-delay: 0.40s; }

/* ---------- Full-Width Hero Banner ---------- */
#hero img {
  animation: hero-zoom 20s ease-in-out infinite alternate;
}

@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

#hero h1 .drop-shadow-lg {
  text-shadow: 0 2px 12px rgba(22,42,38,0.4);
}

/* ---------- Advantage Cards ---------- */
.advantage-card {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.advantage-card:hover {
  transform: translateY(-8px) scale(1.02);
}

/* ---------- Scene Cards (legacy compat) ---------- */
.scene-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.scene-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 44px rgba(27, 77, 62, 0.12);
}

/* ---------- Menu Category Cards ---------- */
.menu-category {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.45s ease;
}

.menu-category:hover {
  transform: translateY(-10px) scale(1.01);
}

/* ---------- Plan Cards ---------- */
.plan-card {
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.35s ease, border-color 0.35s ease;
}

.plan-card:hover {
  transform: translateY(-10px) scale(1.03);
}

/* ========== CAROUSEL STYLES ========== */
.carousel-container {
  position: relative;
}

.carousel-track {
  border-radius: 2rem;
}

.carousel-slide {
  flex-shrink: 0;
}

.carousel-slide .carousel-img {
  transition: transform 0.7s ease;
}

.carousel-slide:hover .carousel-img {
  transform: scale(1.04);
}

/* Carousel buttons */
.carousel-btn {
  cursor: pointer;
  transition: all 0.25s ease;
}

.carousel-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 24px rgba(27, 77, 62, 0.18);
}

.carousel-btn:active {
  transform: scale(0.95);
}

/* Carousel dots */
.carousel-dot {
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot:hover {
  background-color: rgba(27, 77, 62, 0.4);
}

.carousel-dot.active {
  background-color: #1B4D3E;
  width: 2rem;
  border-radius: 9999px;
}

/* Auto-play pause on hover */
.carousel-container:hover .marquee-pause-hint {
  opacity: 1;
}

/* ---------- Gallery Items ---------- */
.gallery-item {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* ---------- Floating Decorations ---------- */
.float-slow {
  animation: floatSlow 5s ease-in-out infinite;
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(4deg); }
}

/* Scroll indicator dot animation */
@keyframes scrollDot {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50%      { opacity: 0.3; transform: translateY(8px); }
}

.animate-scroll-dot {
  animation: scrollDot 1.8s ease-in-out infinite;
}

/* ---------- Mobile Menu ---------- */
#mobile-menu {
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}

#mobile-menu.open {
  max-height: 480px;
  opacity: 1;
}

.mobile-nav-link {
  transition: background-color 0.2s ease;
}

/* ---------- Button Press Effect ---------- */
button:active,
a:active {
  transform: scale(0.97);
}

/* ---------- Focus Visible (a11y) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid #C8A464;
  outline-offset: 3px;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #F7F3E8;
}
::-webkit-scrollbar-thumb {
  background: #1B4D3E;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2A6B55;
}

/* ---------- Decorative Corner Frames ---------- */
.corner-frame {
  position: relative;
}
.corner-frame::before,
.corner-frame::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid #C8A464;
}
.corner-frame::before {
  top: -2px; left: -2px;
  border-right: none; border-bottom: none;
}
.corner-frame::after {
  bottom: -2px; right: -2px;
  border-left: none; border-top: none;
}

/* ---------- Chinese Decorative Underline ---------- */
.chinese-title {
  position: relative;
  display: inline-block;
}
.chinese-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #C8A464, transparent);
  border-radius: 2px;
}

/* ---------- Form Input Styling ---------- */
input::placeholder,
textarea::placeholder {
  color: #a8a29e;
}

/* ---------- Join Club Form (Dark Background) ---------- */
#join input::placeholder {
  color: rgba(255, 253, 247, 0.3);
}

#join select option {
  background-color: #1B4D3E;
  color: #FFFDF7;
}

/* ---------- Hero Carousel ---------- */
.hero-slide img {
  animation: hero-zoom 22s ease-in-out infinite alternate;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: rgba(255, 253, 247, 0.35);
  transition: all 0.35s ease;
  cursor: pointer;
}

.hero-dot:hover {
  background-color: rgba(255, 253, 247, 0.6);
}

.hero-dot.active {
  background-color: #FFFDF7;
  width: 28px;
}

/* ---------- Standards Carousel (#5) ---------- */
.std-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: rgba(27, 77, 62, 0.2);
  transition: all 0.35s ease;
  cursor: pointer;
}

.std-dot:hover {
  background-color: rgba(27, 77, 62, 0.4);
}

.std-dot.active {
  background-color: #B83A2F;
  width: 28px;
}

.std-arrow:active {
  transform: translateY(-50%) scale(0.9);
}

/* ---------- Craft Carousel (#6) ---------- */
.craft-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background-color: rgba(27, 77, 62, 0.2);
  transition: all 0.35s ease;
  cursor: pointer;
}

.craft-dot:hover {
  background-color: rgba(27, 77, 62, 0.4);
}

.craft-dot.active {
  background-color: #B83A2F;
  width: 28px;
}

.craft-nav:active {
  transform: translateY(-50%) scale(0.9);
}

.hero-arrow:active {
  transform: translateY(-50%) scale(0.9);
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee { animation: none; }
  html.js .reveal, html.js .reveal-left, html.js .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .float-slow { animation: none; }
  .animate-scroll-dot { animation: none; }
  .advantage-card:hover,
  .menu-category:hover,
  .plan-card:hover,
  .scene-card:hover {
    transform: none;
  }
  #hero img { animation: none; }
  .gallery-item:hover img { transform: none; }
  .carousel-slide .carousel-img { transition: none; }
}

/* ---------- Responsive Typography ---------- */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem !important; line-height: 1.1 !important; }
  h2 { font-size: 1.875rem !important; }
  h3 { font-size: 1.375rem !important; }
}

@media (max-width: 640px) {
  h1 { font-size: 2.25rem !important; line-height: 1.15 !important; }
  h2 { font-size: 1.625rem !important; }
}