/* ── Custom styles for Red's 615 Kitchen ── */

/* Scroll-behavior */
html {
  scroll-behavior: smooth;
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid #B8503D;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #B8503D;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(184, 80, 61, 0.35);
}

.btn-primary:hover {
  background: #A04330;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(184, 80, 61, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

/* ── Nav links ── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #B8503D;
  transition: width 0.25s ease;
}

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

/* ── Mobile menu ── */
.mobile-link {
  position: relative;
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

/* ── Stat Cards ── */
.stat-card {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s;
  box-shadow: 0 8px 32px rgba(184, 80, 61, 0.12);
}

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

/* Card stagger animation */
.card-1 { animation: float-card-1 0.7s ease-out both; }
.card-2 { animation: float-card-2 0.7s ease-out 0.1s both; }
.card-3 { animation: float-card-3 0.7s ease-out 0.2s both; }
.card-4 { animation: float-card-4 0.7s ease-out 0.3s both; }

@keyframes float-card-1 {
  from { opacity: 0; transform: translateY(30px) translateX(-10px); }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

@keyframes float-card-2 {
  from { opacity: 0; transform: translateY(30px) translateX(10px); }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

@keyframes float-card-3 {
  from { opacity: 0; transform: translateY(30px) translateX(10px); }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

@keyframes float-card-4 {
  from { opacity: 0; transform: translateY(30px) translateX(-10px); }
  to { opacity: 1; transform: translateY(0) translateX(0); }
}

/* ── Menu cards ── */
.menu-card {
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* ── Gallery items ── */
.gallery-item {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

/* ── Scroll reveal (progressive enhancement) ── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* When JS is active, hide initially and reveal on scroll */
.js-active .reveal {
  opacity: 0;
  transform: translateY(24px);
}

.js-active .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.js-active .reveal:nth-child(2) { transition-delay: 0.08s; }
.js-active .reveal:nth-child(3) { transition-delay: 0.16s; }
.js-active .reveal:nth-child(4) { transition-delay: 0.24s; }
.js-active .reveal:nth-child(5) { transition-delay: 0.32s; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .js-active .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .stat-card { animation: none; }
  .stat-card:hover { transform: none; }
  .menu-card:hover { transform: none; }
  .gallery-item:hover { transform: none; }
  .btn-primary:hover,
  .btn-secondary:hover { transform: none; }
  .nav-link::after { transition: none; }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Mobile menu button animation ── */
.menu-line {
  display: block;
}

#menu-btn.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

#menu-btn.active .menu-line:nth-child(2) {
  opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
  width: 1.25rem;
  transform: rotate(-45deg) translate(4px, -4px);
  margin-left: 0;
}

/* ── Responsive tweaks ── */
@media (max-width: 640px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
