/* ═══════════════════════════════════════════════════════════════════
   THE NEEMS RESTAURANT & CULINARY HAVEN • TURA, MEGHALAYA
   Award-Winning Luxury Design System & Theme Engine
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,400&display=swap');

/* ─── DESIGN TOKENS & CSS VARIABLES ─── */
:root {
  /* Brand Palette: Refined Forest & Warm Cream (Default) */
  --bg-primary: #fcfaf6;
  --bg-secondary: #f5f0e6;
  --surface-card: #ffffff;
  --surface-subtle: #f0ebe1;
  --surface-glass: rgba(255, 255, 255, 0.85);

  --text-primary: #18241f;
  --text-secondary: #43514a;
  --text-muted: #6b7c74;
  --text-inverse: #fcfaf6;

  --border-color: #e5ded3;
  --border-subtle: #eee7dc;

  /* Forest Green Signature */
  --forest-950: #061711;
  --forest-900: #0c2b20;
  --forest-800: #143d2f;
  --forest-700: #1b5340;
  --forest-600: #256f56;
  --forest-100: #e2ede8;
  --forest-50: #f0f6f3;

  /* Antique Gold Accents */
  --gold: #d4af37;
  --gold-light: #f1df97;
  --gold-dark: #b89124;
  --gold-gradient: linear-gradient(135deg, #f7e7a8 0%, #d4af37 50%, #aa841c 100%);
  --gold-glow: rgba(212, 175, 55, 0.25);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(12, 43, 32, 0.05);
  --shadow-md: 0 6px 20px rgba(12, 43, 32, 0.08);
  --shadow-lg: 0 16px 36px rgba(12, 43, 32, 0.12);
  --shadow-xl: 0 24px 50px rgba(12, 43, 32, 0.16);

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Header height */
  --nav-height: 84px;
}

/* ─── DARK LUXURY THEME (OBSIDIAN EMERALD) ─── */
[data-theme="dark"] {
  --bg-primary: #07130e;
  --bg-secondary: #0c1c16;
  --surface-card: #10241d;
  --surface-subtle: #162f26;
  --surface-glass: rgba(12, 28, 22, 0.88);

  --text-primary: #f6f8f6;
  --text-secondary: #cbd6d0;
  --text-muted: #8e9e96;
  --text-inverse: #07130e;

  --border-color: #1e3b30;
  --border-subtle: #183127;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 28px 60px rgba(0, 0, 0, 0.7);

  --gold-glow: rgba(212, 175, 55, 0.35);
}

/* ─── BASE RESET & CORE STYLES ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Luxury Grain Overlay */
.luxury-grain-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* ─── TYPOGRAPHY UTILITIES ─── */
h1, h2, h3, h4, .font-serif {
  font-family: var(--font-serif);
  font-feature-settings: "liga" 1, "dlig" 1;
}

.text-gold-metallic {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.bg-gold-gradient {
  background: var(--gold-gradient);
}

/* ─── PRELOADER ─── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background-color: #0c2b20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-spinner {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── CUSTOM LUXURY CURSOR (DESKTOP) ─── */
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  position: fixed;
  top: -3px;
  left: -3px;
  pointer-events: none;
  z-index: 99999;
  transition: opacity 0.2s ease;
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  position: fixed;
  top: -16px;
  left: -16px;
  pointer-events: none;
  z-index: 99998;
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.cursor-ring.cursor-hover {
  width: 48px;
  height: 48px;
  top: -24px;
  left: -24px;
  background-color: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-light);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring {
    display: none !important;
  }
}

/* ─── SCROLL PROGRESS BAR ─── */
#scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gold-gradient);
  z-index: 10001;
  transition: width 0.1s ease-out;
}

/* ─── STICKY NAVBAR ─── */
#main-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: all 0.35s ease;
  background: rgba(6, 23, 17, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

#main-navbar.scrolled {
  background: rgba(6, 23, 17, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
  height: 72px;
}

.desktop-nav-link {
  position: relative;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f7e7a8;
  white-space: nowrap;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

@media (min-width: 1200px) {
  .desktop-nav-link {
    font-size: 0.76rem;
    padding: 5px 8px;
    letter-spacing: 0.04em;
  }
}

@media (min-width: 1360px) {
  .desktop-nav-link {
    font-size: 0.82rem;
    padding: 6px 10px;
    letter-spacing: 0.05em;
  }
}

.desktop-nav-link:hover {
  color: #ffffff;
  background-color: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.desktop-nav-link.active {
  color: #061711 !important;
  background: var(--gold-gradient) !important;
  border-color: var(--gold) !important;
  font-weight: 800;
  box-shadow: 0 2px 14px rgba(212, 175, 55, 0.5) !important;
  text-shadow: none !important;
}

/* Mobile full-screen drawer */
#mobile-menu-drawer {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 999;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  overflow-y: auto;
}

#mobile-menu-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ─── HERO SECTION ─── */
.hero-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--forest-950);
}

.hero-bg-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65) saturate(1.15);
  transform: scale(1.04);
  transition: transform 10s ease-out;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 23, 17, 0.75) 0%,
    rgba(6, 23, 17, 0.45) 50%,
    rgba(6, 23, 17, 0.92) 100%
  );
}

/* Pulse Dot */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.7;
  animation: pulseRipple 1.8s infinite ease-out;
}

@keyframes pulseRipple {
  0% { transform: scale(0.9); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* ─── VEG / NON-VEG DIETARY ICONS ─── */
.diet-icon, .diet-icon-sm {
  width: 16px;
  height: 16px;
  border: 1.5px solid;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.diet-icon-sm {
  width: 13px;
  height: 13px;
  border-width: 1px;
}

.diet-icon.veg, .diet-icon-sm.veg {
  border-color: #15803d;
}

.diet-icon.veg::after, .diet-icon-sm.veg::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #15803d;
}

.diet-icon-sm.veg::after {
  width: 5px;
  height: 5px;
}

.diet-icon.non-veg, .diet-icon-sm.non-veg {
  border-color: #b91c1c;
}

.diet-icon.non-veg::after, .diet-icon-sm.non-veg::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-bottom: 7px solid #b91c1c;
}

.diet-icon-sm.non-veg::after {
  border-left-width: 3px;
  border-right-width: 3px;
  border-bottom-width: 6px;
}

/* ─── FLOATING WHATSAPP BUTTON ─── */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  z-index: 990;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-whatsapp-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

.floating-whatsapp-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid #25d366;
  opacity: 0.6;
  animation: pulseWa 2s infinite ease-out;
}

@keyframes pulseWa {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ─── MOBILE STICKY BOTTOM BAR ─── */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  z-index: 980;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}

@media (min-width: 768px) {
  .mobile-sticky-bar {
    display: none !important;
  }
}

/* ─── CART SLIDE-OVER DRAWER ─── */
#cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  z-index: 10005;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

#cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 10004;
  transition: opacity 0.3s ease;
}

/* ─── TOAST NOTIFICATIONS ─── */
.neems-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #0c2b20;
  color: #f7e7a8;
  border: 1px solid var(--gold);
  padding: 12px 24px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 10010;
  white-space: nowrap;
}

.neems-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ─── REVIEWS SLIDER ─── */
#reviews-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── CUSTOM SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ─── ACCESSIBILITY & PREFERS-REDUCED-MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.skip-to-content {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--gold);
  color: var(--forest-950);
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 999999;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 16px;
}
