/* ========== BASE ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Lato', system-ui, sans-serif;
  background: #3d1520;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(251, 191, 36, 0.3); color: #fff; }
img, video { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.12); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(34, 10, 17, 0.60) 0%,
    rgba(61, 21, 32, 0.45) 50%,
    rgba(34, 10, 17, 0.80) 100%
  );
}
.hero-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  pointer-events: none;
}

/* Hero content entrance */
.hero-content {
  animation: heroFadeUp 1s ease-out 0.2s both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Floating stat cards */
.stat-card {
  animation: floatCard 6s ease-in-out infinite;
  will-change: transform;
}
.card-1 { animation-delay: 0s; }
.card-2 { animation-delay: -2s; }
.card-3 { animation-delay: -4s; }
@keyframes floatCard {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* Scroll dot animation */
@keyframes scrollDot {
  0% { top: 0; opacity: 1; }
  100% { top: 48px; opacity: 0; }
}
.scroll-dot {
  animation: scrollDot 1.5s ease-in-out infinite;
}

/* ========== NAV ========== */
#site-header.scrolled {
  background: rgba(34, 10, 17, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
#site-header.scrolled #nav-brand { color: #fff; }

/* Mobile menu */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}
.mobile-link {
  font-size: 1.875rem;
  line-height: 1.3;
}

/* ========== REVEAL ANIMATIONS ========== */
/* Default: always visible (no JS required) */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 1;
  transform: none;
  transition: none;
}

/* When JS adds .is-visible, animate */
@media (prefers-reduced-motion: no-preference) {
  .reveal-up.is-visible,
  .reveal-left.is-visible,
  .reveal-right.is-visible {
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  }
  .reveal-up.is-visible { opacity: 1; transform: translateY(0); }
  .reveal-left.is-visible { opacity: 1; transform: translateX(0); }
  .reveal-right.is-visible { opacity: 1; transform: translateX(0); }
}

/* Default states for JS-gated animation (progressive enhancement) */
.reveal-up { transform: translateY(0); }
.reveal-left { transform: translateX(0); }
.reveal-right { transform: translateX(0); }

/* If JS runs, add these base states */
.js-enabled .reveal-up { transform: translateY(30px); opacity: 0; transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.js-enabled .reveal-left { transform: translateX(-30px); opacity: 0; transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.js-enabled .reveal-right { transform: translateX(30px); opacity: 0; transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.js-enabled .reveal-up.is-visible { transform: translateY(0); opacity: 1; }
.js-enabled .reveal-left.is-visible { transform: translateX(0); opacity: 1; }
.js-enabled .reveal-right.is-visible { transform: translateX(0); opacity: 1; }

/* Reduced motion: never animate */
@media (prefers-reduced-motion: reduce) {
  .js-enabled .reveal-up,
  .js-enabled .reveal-left,
  .js-enabled .reveal-right {
    transform: none;
    opacity: 1;
    transition: none;
  }
  .hero-img { animation: none; transform: none; }
  .stat-card { animation: none; }
  .scroll-dot { animation: none; }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #220a11; }
::-webkit-scrollbar-thumb { background: #8b3a52; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8556e; }

/* ========== FOCUS ========== */
:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1023px) {
  .hero-content h1 { font-size: 2.5rem; }
}
@media (min-width: 1024px) {
  .hero-content h1 { font-size: 3.75rem; }
}
@media (min-width: 1280px) {
  .hero-content h1 { font-size: 4.5rem; }
}
