/* --- Design System --- */
:root {
  --primary: #1a120b; /* Deep Espresso */
  --secondary: #3c2a21; /* Roasted Bean */
  --accent: #d4a373; /* Terracotta / Gold */
  --accent-soft: #e7bc91;
  --bg-light: #fdfaf7; /* Creamy Paper */
  --bg-dark: #121212;
  --text-main: #2b2b2b;
  --text-muted: #6b6b6b;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-dark: rgba(26, 18, 11, 0.85);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius: 16px;
}

/* --- Reveal Animations --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* --- Header & Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
  background: transparent; /* Start transparent */
}

/* Ensure header is visible on all pages by default if they don't have a hero */
body:not(.home-page) .header {
  background: var(--glass);
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow);
  padding: 15px 0;
}

.header.scrolled {
  background: var(--glass);
  backdrop-filter: blur(15px);
  padding: 15px 0;
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

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

.nav-cta {
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(212, 163, 115, 0.3);
}

/* --- Hero Section --- */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 140px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 650px;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(212, 163, 115, 0.1);
  color: var(--accent);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 4.5rem);
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

.hero-img-container {
  position: absolute;
  right: 0;
  top: 0;
  width: 50%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6; /* Soften the background image */
  filter: sepia(20%); /* Add a warm cafe vibe */
}

/* --- Quick Info Strip --- */
.info-strip {
  background: var(--primary);
  color: #fff;
  padding: 30px 0;
  margin-top: -50px;
  position: relative;
  z-index: 10;
  border-radius: var(--border-radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.info-item i {
  font-size: 1.5rem;
  color: var(--accent);
}

.info-item h4 {
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.info-item p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
}

/* Responsive adjustments for info strip */
@media (max-width: 768px) {
  .info-strip {
    margin-top: 0;
    border-radius: 0;
  }
  .info-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* --- Featured Menu --- */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.menu-card {
  background: #fff;
  border-radius: var(--border-radius);
  padding: 10px;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.03);
}

.menu-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.menu-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
}

.menu-card-content {
  padding: 10px 15px 20px;
}

.menu-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.menu-price {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
}

.menu-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.menu-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Features Section --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.feature-item {
  padding: 40px;
  background: #fff;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.feature-item:hover {
  background: var(--primary);
}

.feature-item:hover h3, 
.feature-item:hover p {
  color: #fff;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: rgba(212, 163, 115, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 1.5rem;
  color: var(--accent);
}

/* --- Social Proof --- */
.reviews-slider {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding: 20px 0;
  scrollbar-width: none;
}

.review-card {
  min-width: 350px;
  background: #fff;
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.review-text {
  font-style: italic;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.review-user {
  display: flex;
  align-items: center;
  gap: 15px;
}

.review-user-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

/* --- Footer --- */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo {
  font-size: 2rem;
  margin-bottom: 24px;
  display: block;
}

.footer h4 {
  color: #fff;
  margin-bottom: 24px;
  font-size: 1.1rem;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 5px;
}

.footer-social {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.btn-accent {
  background: var(--accent);
  color: var(--primary);
}

.btn-accent:hover {
  background: var(--accent-soft);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(212, 163, 115, 0.2);
}

.btn-outline {
  border: 2px solid var(--primary);
  background: transparent;
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

/* ==========================================================================
   Comprehensive Responsive Fixes (Mobile & Tablets)
   ========================================================================== */

/* 1. Tablets & Small Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-img-container {
    display: none;
  }
  .hero-content {
    max-width: 100%;
    text-align: center;
    margin: 0 auto;
  }
  .hero-btns {
    justify-content: center;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  /* Prevent horizontal scroll from large grid minimums on tablets */
  .menu-items-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
  }
}

/* 2. Tablet Portrait & Mobile Landscape (max-width: 992px) */
@media (max-width: 992px) {
  /* Safely override hardcoded 2-column inline styles (e.g., about.html Vibe section) */
  div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .story-section, 
  .visit-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .values-grid {
    grid-template-columns: 1fr !important;
  }
  .map-embed, .map-container {
    min-height: 300px !important;
  }
}

/* 3. Mobile Phones (max-width: 768px) */
@media (max-width: 768px) {
  /* Navigation Slide-in Menu */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* Hides the menu completely off-screen */
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    padding: 100px 40px;
    gap: 30px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex !important;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  /* Your existing JS toggles this 'active' class smoothly now */
  .nav-links.active {
    right: 0; 
  }
  .mobile-menu-btn {
    display: block;
    z-index: 1001;
    color: var(--primary) !important; /* Force visibility */
    font-size: 2rem;
  }

  /* Force all overflowing grids to stack vertically */
  .menu-grid, 
  .features-grid, 
  .shop-grid, 
  .order-options, 
  .specials-grid, 
  .info-grid {
    grid-template-columns: 1fr !important;
  }

  .gallery-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
  }

  .gallery-item.wide, 
  .gallery-item.tall {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
    height: 280px !important;
  }

  /* Section Spacing Adjustments */
  section {
    padding: 60px 0 !important;
  }
  .hero {
    padding-top: 120px;
  }
  .hero h1 {
    font-size: 2.5rem;
  }
  
  /* CTA Banner Adjustments */
  .atmosphere {
    margin: 0 16px 60px !important;
    padding: 60px 20px !important;
  }
  .atmosphere h2 {
    font-size: 2rem !important;
  }

  /* Components */
  .event-card {
    grid-template-columns: 1fr !important;
  }
  .event-img {
    height: 250px !important;
  }
  .reviews-slider {
    gap: 15px;
  }
  .review-card {
    min-width: 300px;
    padding: 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 30px;
  }
}

/* 4. Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  /* Prevent Logo and CTA Buttons from squashing on tiny screens */
  .nav-container {
    gap: 10px;
  }
  .logo {
    font-size: 1.2rem;
  }
  .nav-cta {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
  .header-actions {
    gap: 10px !important;
  }

  /* Typography Scaling */
  .hero h1 {
    font-size: 2.2rem !important;
  }
  .section-header h2 {
    font-size: 2rem;
  }

  /* Format Menu Items neatly for small viewports */
  .menu-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px !important;
  }
  .menu-item-price {
    align-self: flex-start;
  }

  /* Expand Buttons to Full Width */
  .hero-btns {
    flex-direction: column;
    width: 100%;
  }
  .hero-btns .btn {
    width: 100%;
  }
}