/* ---------- Base & utilities ---------- */
:root {
  --brand: #dc2626; /* red-600 */
  --brand-dark: #b91c1c; /* red-800 */
  --brand-light: #fef2f2; /* red-50 */
  --text: #1e293b; /* slate-800 */
  --text-light: #64748b; /* slate-600 */
  --accent: #f59e0b; /* amber-500 */
  --accent-dark: #d97706; /* amber-600 */
  --success: #10b981; /* emerald-500 */
  --background: #f8fafc; /* slate-50 */
  --surface: #ffffff;
  --border: #e2e8f0; /* slate-200 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s ease;
  --transition-slow: all 0.5s ease;
  --transition-bounce: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

html { 
  scroll-behavior: smooth; 
  scroll-padding-top: 5rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 999;
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.skip-link:focus { 
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
}

/* Improved Tailwind helper classes */
.nav-link { 
  position: relative;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: var(--brand);
}

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

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

.section-title { 
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  background: linear-gradient(to right, var(--text), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.btn-primary, .btn-secondary {
  position: relative;
  padding: 1rem 2rem;
  font-weight: 700;
  border-radius: var(--radius);
  transition: var(--transition-bounce);
  overflow: hidden;
  z-index: 1;
  transform: translateY(0);
  box-shadow: var(--shadow);
}

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

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--brand-dark);
  transition: var(--transition-slow);
  z-index: -1;
}

.btn-primary:hover::before {
  left: 0;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--brand-light);
  color: var(--brand);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-gradient {
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--surface);
  background-image: 
    radial-gradient(40rem 10rem at 120% -10%, rgba(220, 38, 38, 0.08), transparent),
    radial-gradient(40rem 10rem at -20% 110%, rgba(220, 38, 38, 0.06), transparent);
  transition: var(--transition);
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.card-gradient:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.menu-card { 
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-bounce);
  transform: translateY(0);
}

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

.menu-card-img { 
  height: 16rem;
  width: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.menu-card:hover .menu-card-img {
  transform: scale(1.05);
}

.gallery-img {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  object-fit: cover;
  height: 12rem;
  width: 100%;
  transition: var(--transition);
  cursor: pointer;
}

.gallery-img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
}

.review-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.review-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 4rem;
  color: var(--brand-light);
  font-family: Georgia, serif;
  line-height: 1;
  z-index: 0;
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.review-card blockquote { 
  position: relative;
  color: var(--text);
  font-style: italic;
  z-index: 1;
}

.review-card figcaption { 
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--brand);
  font-weight: 600;
}

.form-label { 
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.form-input { 
  margin-top: 0.5rem;
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.875rem 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  outline: none;
}

.form-error { 
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--brand);
}

.footer-link { 
  color: #cbd5e1;
  font-size: 0.875rem;
  transition: var(--transition);
  position: relative;
  padding: 0.25rem 0;
}

.footer-link:hover {
  color: white;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: white;
  transition: var(--transition);
}

.footer-link:hover::after {
  width: 100%;
}

.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-xl);
  box-shadow: 
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 
    var(--shadow-lg),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.group:hover .group-hover\:animate-wiggle { 
  animation: wiggle .5s ease-in-out 1; 
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-pulse-slow {
  animation: pulse 3s ease-in-out infinite;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Header enhancements */
header {
  transition: var(--transition);
}

header.scrolled {
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.98);
}

/* Hero section enhancements */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.4) 100%
  );
}

/* Menu filter enhancements */
#menuSearch, #menuFilter {
  transition: var(--transition);
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

#menuSearch:focus, #menuFilter:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  outline: none;
}

/* FAQ enhancements */
details {
  transition: var(--transition);
}

details[open] {
  background: var(--brand-light);
}

details summary {
  transition: var(--transition);
  position: relative;
  padding-right: 2rem;
}

details summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  transition: var(--transition);
}

details[open] summary::after {
  content: '-';
  color: var(--brand);
}

/* Form status message */
#formStatus.success {
  color: var(--success);
}

#formStatus.error {
  color: var(--brand);
}

/* Loading animation for form submission */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  top: 50%;
  left: 50%;
  margin: -0.625rem 0 0 -0.625rem;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Menu page specific styles */
.menu-category-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 3rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--brand);
}

.menu-category-title:first-of-type {
  margin-top: 2rem;
}

.menu-page-header {
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?q=80&w=1900&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  padding: 8rem 0 4rem;
  text-align: center;
  color: white;
}

.menu-page-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.menu-page-header p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .card-gradient, .review-card {
    padding: 1.5rem;
  }
  
  .btn-primary, .btn-secondary {
    padding: 0.875rem 1.5rem;
  }
  
  .menu-page-header {
    padding: 6rem 0 3rem;
  }
  
  .menu-page-header h1 {
    font-size: 2.5rem;
  }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}