/* ============================================
   M.C. Luncheonette — Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #2B5F8A;
  --color-primary-dark: #1A3A5C;
  --color-accent: #E8722A;
  --color-accent-light: #F5A623;
  --color-bg: #FDF8F3;
  --color-surface: #F5EDE3;
  --color-text: #1A1A1A;
  --color-text-secondary: #5C5C5C;
  --color-success: #2D8C4E;
  --color-white: #ffffff;
  --color-overlay: rgba(15, 25, 40, 0.7);

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1200px;
  --header-height: 72px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-accent); }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.text-accent { color: var(--color-accent); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-primary:hover {
  background: #d4621f;
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  border: 2px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-white);
  color: var(--color-primary-dark);
}
.btn-secondary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-secondary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-sm {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-primary-dark);
  height: var(--header-height);
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-link:hover { color: var(--color-white); }
.logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
}

/* Desktop Nav */
.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-list a {
  color: rgba(255,255,255,0.85);
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}
.nav-list a:hover {
  color: var(--color-white);
  background: rgba(255,255,255,0.1);
}
.nav-order {
  background: var(--color-accent) !important;
  color: var(--color-white) !important;
  margin-left: 0.5rem;
}
.nav-order:hover {
  background: #d4621f !important;
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 20, 35, 0.6) 0%,
    rgba(10, 20, 35, 0.75) 50%,
    rgba(10, 20, 35, 0.85) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1rem;
  max-width: 700px;
}
.hero-logo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 900;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--color-accent-light);
  margin-bottom: 0.75rem;
}
.hero-tagline {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  line-height: 1.5;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   SECTIONS (shared)
   ============================================ */
.section {
  padding: 5rem 0;
}
.section-alt {
  background: var(--color-surface);
}
.section-dark {
  background: var(--color-primary-dark);
  color: var(--color-white);
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 0.75rem;
}
.section-header p {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
.section-dark .section-header p {
  color: rgba(255,255,255,0.75);
}
.section-divider {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}
.about-text p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  color: var(--color-text-secondary);
}
.about-text p:first-child {
  font-size: 1.15rem;
  color: var(--color-text);
}
.about-highlight {
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius-md);
  text-align: center;
}
.about-highlight .stat {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--color-accent-light);
}
.about-highlight .stat-label {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  margin-top: 0.25rem;
}
.about-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.about-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.about-stat-card {
  background: var(--color-surface);
  padding: 1.5rem 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}
.about-stat-card .stat-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-accent);
}
.about-stat-card .stat-text {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 0.25rem;
}

/* ============================================
   MENU
   ============================================ */
.menu-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
  position: sticky;
  top: var(--header-height);
  z-index: 50;
  background: var(--color-bg);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.menu-nav a {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  transition: all 0.2s;
}
.menu-nav a:hover, .menu-nav a.active {
  background: var(--color-accent);
  color: var(--color-white);
}

.menu-category {
  margin-bottom: 3rem;
  scroll-margin-top: calc(var(--header-height) + 80px);
}
.menu-category-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-surface);
}
.menu-category-header h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  white-space: nowrap;
}
.menu-category-desc {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  font-style: italic;
}
.menu-category-image {
  width: 100%;
  max-width: 400px;
  margin: 0 auto 1.5rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.menu-category-image img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.menu-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
}
.menu-item:not(:last-child) {
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.menu-item-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.menu-item-desc {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: 0.15rem;
}
.menu-item-price {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.95rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.menu-cta {
  text-align: center;
  margin-top: 3rem;
}

/* Menu page specific (menu.html) */
.menu-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s, box-shadow 0.3s;
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.gallery-item.wide {
  grid-column: span 2;
}
.gallery-item.wide img {
  aspect-ratio: 2/1;
}

/* ============================================
   ORDER
   ============================================ */
.order-section {
  text-align: center;
}
.order-main-cta {
  margin-bottom: 3rem;
}
.order-main-cta .btn {
  font-size: 1.15rem;
  padding: 1rem 2.5rem;
}
.delivery-label {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}
.delivery-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s;
}
.delivery-btn:hover {
  background: rgba(255,255,255,0.2);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.delivery-icon {
  font-size: 1.25rem;
}

/* ============================================
   LOCATION / VISIT
   ============================================ */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
.visit-info h3 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}
.visit-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.visit-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.visit-detail-content a {
  font-weight: 600;
}
.visit-detail-content p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}
.hours-table {
  width: 100%;
  margin-top: 0.75rem;
}
.hours-table tr {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.hours-table .day {
  font-weight: 600;
  font-size: 0.95rem;
}
.hours-table .time {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}
.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(45, 140, 78, 0.1);
  color: var(--color-success);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.open-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--color-success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.visit-map {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 300px;
}
.visit-map iframe {
  width: 100%;
  height: 350px;
  border: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .logo-link { margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 300px;
}
.footer-nav h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
}
.footer-nav a {
  display: block;
  color: rgba(255,255,255,0.6);
  padding: 0.3rem 0;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--color-accent-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

/* ============================================
   FLOATING ORDER BUTTON (mobile)
   ============================================ */
.floating-order {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 999;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(232, 114, 42, 0.4);
  transition: all 0.25s;
}
.floating-order:hover {
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 114, 42, 0.5);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Mobile: <640px */
@media (max-width: 639px) {
  .menu-toggle { display: flex; }
  .nav-list {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary-dark);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-list.open { display: flex; }
  .nav-list a {
    padding: 0.75rem 1rem;
    width: 100%;
  }
  .nav-order { margin-left: 0; margin-top: 0.5rem; text-align: center; }

  .hero { min-height: 100svh; }
  .hero-logo { width: 110px; height: 110px; }

  .floating-order { display: flex; }

  .gallery-grid { gap: 0.5rem; }

  .section { padding: 3rem 0; }

  .container { padding: 0 1rem; }
}

/* Tablet: 640px–1023px */
@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }

  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .menu-items {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .delivery-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .visit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .menu-page-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 1024px+ */
@media (min-width: 1024px) {
  .container { padding: 0 2rem; }

  .hero { min-height: 85vh; }
  .hero-logo { width: 160px; height: 160px; }

  .section { padding: 6rem 0; }

  .about-grid {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .visit-map iframe { height: 100%; min-height: 400px; }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
  .site-header, .hero-bg, .hero-overlay, .floating-order,
  .gallery-grid, .order-section, .visit-map, .menu-nav { display: none; }
  body { background: white; color: black; font-size: 11pt; }
  .section { padding: 1rem 0; }
  .menu-item { break-inside: avoid; }
  a { color: black; }
  .menu-item-price { color: black; font-weight: 700; }
}

/* ============================================
   ANIMATIONS (respects prefers-reduced-motion)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .js-ready .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
  }
}
