/* ===== GLOBAL ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: #FAF6EE;
  color: #3B2314;
}

/* ===== AOS SAFETY FALLBACK ===== */
[data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-aos].aos-animate {
  opacity: 1 !important;
  transform: none !important;
}

/* ===== GRAIN OVERLAY ===== */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ===== STICKY NAV SCROLLED STATE ===== */
.nav-scrolled {
  background: rgba(250, 246, 238, 0.92) !important;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(59, 35, 20, 0.08);
  box-shadow: 0 2px 20px rgba(59,35,20,0.06);
}

/* ===== MARQUEE ===== */
.marquee-section {
  overflow: hidden;
}

.marquee-track {
  display: flex;
  white-space: nowrap;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

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

.marquee-track:hover {
  animation-play-state: paused;
}

/* ===== HERO ===== */
.hero-img {
  animation: hero-zoom 20s ease-in-out infinite alternate;
}

@keyframes hero-zoom {
  0%   { transform: scale(1.05); }
  100% { transform: scale(1.12); }
}

.scroll-line {
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 0.8; transform: scaleY(1.3); }
}

/* ===== MENU CARD HOVER ===== */
.menu-card {
  position: relative;
  overflow: hidden;
}

.menu-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(200,64,26,0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.menu-card:hover::before {
  opacity: 1;
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
  grid-auto-rows: auto;
}

/* ===== TESTIMONIAL CARD ===== */
.testimonial-card {
  position: relative;
}

/* ===== BUTTON PULSE ===== */
.btn-primary:hover {
  animation: btn-pulse 1s ease-in-out;
}

@keyframes btn-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200,64,26,0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(200,64,26,0); }
  100% { box-shadow: 0 0 0 0 rgba(200,64,26,0); }
}

/* ===== HAMBURGER ANIMATION ===== */
#hamburger.is-open .ham-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
#hamburger.is-open .ham-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-6px);
}
#hamburger.is-open .ham-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}
.ham-line {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ===== STAT CARDS HOVER ===== */
.stat-card {
  transition: transform 0.3s ease, background 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.18) !important;
}

/* ===== FORM INPUTS ===== */
input::placeholder,
textarea::placeholder {
  color: rgba(250,246,238,0.25);
}

select option {
  background: #3B2314;
  color: #FAF6EE;
}

/* ===== HERO BADGE ===== */
.hero-badge {
  transition: transform 0.3s ease;
}
.hero-badge:hover {
  transform: translateY(-2px);
}

/* ===== SMOOTH SECTION TRANSITIONS ===== */
section {
  position: relative;
}

/* ===== WINDMILL SLOW SPIN ===== */
.windmill-container svg {
  animation: windmill-spin 20s linear infinite;
  transform-origin: 100px 100px;
}

@keyframes windmill-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== COUNTER ANIMATION ===== */
.counter-val {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* ===== GALLERY ITEM BASE ===== */
.gallery-item {
  cursor: pointer;
}

/* ===== FOOTER LINK HOVER ===== */
footer a {
  position: relative;
}

/* ===== MOBILE MENU TRANSITION ===== */
#mobile-menu {
  transition: opacity 0.3s ease;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #FAF6EE;
}
::-webkit-scrollbar-thumb {
  background: #C8401A;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9E3214;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
  .hero-title {
    line-height: 0.9;
  }
  .marquee-track {
    animation-duration: 20s;
  }
}

/* ===== ABOUT BG CIRCLE ===== */
.about-bg-circle {
  filter: blur(60px);
  z-index: 0;
}

/* Ensure z layering in about */
#about > .max-w-7xl {
  position: relative;
  z-index: 1;
}

/* ===== SELECTION COLOR ===== */
::selection {
  background: #C8401A;
  color: #FAF6EE;
}
