/* ==========================================================================
   Café Chico — menu page styles
   Dedicated menu page with 3D food viewer + category navigation
   ========================================================================== */

.menu-hero {
  background: var(--bg-dark);
  color: white;
  padding: clamp(72px, 10vw, 140px) 0 clamp(48px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}
.menu-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../../assets/photos/raw/cover-photo.jpg") center / cover;
  opacity: 0.18;
  filter: saturate(1.1);
}
.menu-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
.menu-hero h1 {
  color: white;
  margin: 0 0 var(--space-3);
}
.menu-hero .lede {
  font-size: clamp(16px, 1.4vw, 19px);
  color: #fff;                                                                    /* was oklch(100% 0 0 / 0.8) — 20% alpha loss multiplied by the 55%
                                                                                     black tile overlay dropped the menu hero lede into a dim grey.
                                                                                     Force fully opaque white. (user 1 Sep 2026) */
  max-width: 56ch;
}
.menu-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-5);
  color: #fff;                                                                    /* was oklch(100% 0 0 / 0.6) — 40% alpha loss × 55% black tile overlay
                                                                                     = perceived 27% L (mid-grey). The 'Dishes / From / To' labels
                                                                                     were nearly invisible. Force fully opaque white. (user 1 Sep 2026) */
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.menu-hero__stats strong {
  color: white;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-transform: none;
  display: block;
}

/* ---------- Category sub-nav ---------- */
.cat-nav {
  position: sticky;
  top: 73px;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
}
.cat-nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav__inner::-webkit-scrollbar { display: none; }
.cat-nav__btn {
  flex-shrink: 0;
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-radius: var(--radius-pill);
  transition: background 180ms, color 180ms;
  border: 1px solid transparent;
}
.cat-nav__btn:hover { color: var(--fg); background: var(--accent-soft); }
.cat-nav__btn.active {
  color: white;
  background: var(--fg);
}

/* ---------- 3D viewer ---------- */
.viewer {
  background: linear-gradient(180deg, var(--bg) 0%, oklch(94% 0.015 80) 100%);
  padding: clamp(48px, 6vw, 80px) 0;
}
.viewer__stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-7);
  align-items: center;
}
.viewer__plate {
  position: relative;
  aspect-ratio: 1/1;
  background: radial-gradient(circle at center, oklch(99% 0.008 80) 0%, oklch(92% 0.018 80) 100%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 -20px 60px oklch(20% 0.025 145 / 0.08),
    0 30px 80px oklch(20% 0.025 145 / 0.12);
  perspective: 1200px;
  transform-style: preserve-3d;
  overflow: hidden;
}
.viewer__dish {
  position: relative;
  width: 78%;
  aspect-ratio: 1/1;
  transform-style: preserve-3d;
  cursor: grab;
  transition: transform 200ms var(--ease-soft);
}
.viewer__dish:active { cursor: grabbing; }
.viewer__dish img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 30px 40px oklch(20% 0.025 145 / 0.25));
  user-select: none;
  -webkit-user-drag: none;
}
.viewer__dish::after {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, oklch(100% 0 0 / 0.4) 0%, transparent 50%);
  pointer-events: none;
}
.viewer__hint {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.viewer__hint .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: hintPulse 1.6s var(--ease-soft) infinite;
}
@keyframes hintPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.viewer__info {
  padding: var(--space-3) 0;
}
.viewer__info h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  margin-bottom: var(--space-3);
}
.viewer__info .cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.viewer__info .desc {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 0 var(--space-4);
}
.viewer__info .price {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--fg);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.viewer__controls {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-5);
}
.viewer__btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid; place-items: center;
  transition: background 180ms, border-color 180ms, transform 180ms;
  color: var(--fg);
}
.viewer__btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
.viewer__btn:active { transform: scale(0.94); }
.viewer__btn[disabled] { opacity: 0.3; cursor: not-allowed; }

@media (max-width: 880px) {
  .viewer__stage { grid-template-columns: 1fr; gap: var(--space-5); }
  .viewer__plate { max-width: 480px; margin: 0 auto; width: 100%; }
}

/* ---------- Menu grid by category ---------- */
.menu-section {
  padding: clamp(56px, 8vw, 96px) 0;
  scroll-margin-top: 130px;
  /* Transparent so the .bg-tile-page wall texture on <body> shows
     through between the dish cards. Cards keep their own var(--bg)
     surface, so individual dishes stay readable. */
  background: transparent;
}

.menu-section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--space-4);
}
.menu-section__head h2 { margin: 0; }
.menu-section__count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (max-width: 720px) {
  .menu-grid { grid-template-columns: 1fr; }
}

.dish {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-items: center;
  transition: transform 200ms var(--ease-soft), box-shadow 200ms var(--ease-soft), border-color 200ms;
}
.dish:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--accent); }
.dish--no-photo { grid-template-columns: 72px 1fr auto; }
.dish--no-photo::before {
  content: '';
  width: 60px; height: 60px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
}
.dish--no-photo::after {
  content: '?';
  position: absolute;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--muted);
  pointer-events: none;
}

.dish__photo {
  width: 92px; height: 92px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--accent-soft);
  position: relative;
}
.dish__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-soft);
}
.dish:hover .dish__photo img { transform: scale(1.08); }

/* Missing-thumb fallback (drinks / desserts / subs / kids that don't have photos yet).
   .dish__photo--placeholder is always rendered inside .dish__photo but hidden by default;
   onerror toggles the --missing class on the parent which reveals it. */
.dish__photo--placeholder {
  display: none;
}
.dish__photo--missing {
  background: var(--bg-muted, #f0ebe2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dish__photo--missing .dish__photo--placeholder {
  display: block;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  color: var(--muted, #8a7e6e);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
  padding: 6px;
  pointer-events: none;
}
.dish__photo--missing {
  box-shadow: inset 0 0 0 1px rgba(138, 126, 110, 0.25);
}
.dish__photo--missing img { display: none; }

.dish__info h3 {
  font-size: 18px;
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.dish__info p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dish__price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  align-self: start;
  white-space: nowrap;
}
.dish__price--placeholder {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}

/* ---------- Menu footer note ---------- */
.menu-note {
  background: var(--bg-dark);
  color: oklch(90% 0.012 80);
  padding: var(--space-6) 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
}
.menu-note a {
  color: var(--gold);
  border-bottom: 1px solid oklch(78% 0.08 75 / 0.4);
  padding-bottom: 1px;
}

/* ============================================================
   FOOD DETAIL MODAL
   Click any .dish to open large image + right info + chef note
   Chef note (only for breakfast + brunch) appears on left of image
   with chalk-on-paper effect and a chef hat icon.
   ============================================================ */
.dish { cursor: pointer; }
.dish:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.food-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.food-modal.is-open { display: flex; }
.food-modal[aria-hidden="true"] { display: none; }
.food-modal[aria-hidden="false"] { display: flex; }

.food-modal__backdrop {
  position: absolute;
  inset: 0;
  background: oklch(8% 0.02 50 / 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fm-fade 220ms var(--ease-soft);
}
@keyframes fm-fade { from { opacity: 0; } to { opacity: 1; } }

.food-modal__dialog {
  position: relative;
  width: min(1100px, 96vw);
  max-height: 92vh;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px oklch(8% 0.02 50 / 0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: fm-rise 320ms var(--ease-soft);
}
@keyframes fm-rise { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }

.food-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: oklch(20% 0.02 50 / 0.65);
  color: #fdf6ed;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms var(--ease-soft), transform 160ms var(--ease-soft);
  cursor: pointer;
}
.food-modal__close:hover { background: oklch(15% 0.02 50 / 0.85); transform: scale(1.06); }
.food-modal__close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.food-modal__content {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  min-height: 0;
  max-height: 92vh;
}
@media (max-width: 760px) {
  .food-modal { padding: 0; }
  .food-modal__dialog { width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .food-modal__content { grid-template-columns: 1fr; grid-template-rows: 50vh 1fr; }
}

/* Left: media (large image only; chef-note moved to right info pane) */
.food-modal__media {
  position: relative;
  background: #1a120c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 320px;
}
.food-modal__img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 92vh;
  object-fit: cover;
  animation: fm-img 360ms var(--ease-soft);
}
@keyframes fm-img { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }

/* When the large image can't be found in full/ or thumb/ we drop in an
   inline placeholder so every dish click still produces a viewable modal
   instead of a broken-image icon. The placeholder fills the media pane
   and shows the dish name. */
.food-modal__img--missing { display: none; }
.food-modal__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201,161,74,0.10), transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(201,161,74,0.08), transparent 60%),
    linear-gradient(135deg, #2a1a10 0%, #1a120c 100%);
  color: oklch(92% 0.012 80);
}
.food-modal__placeholder-icon {
  width: 56px;
  height: 56px;
  color: var(--gold, #c9a14a);
  opacity: 0.85;
  margin-bottom: 4px;
}
.food-modal__placeholder-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold, #c9a14a);
  margin: 0;
}
.food-modal__placeholder-name {
  font-family: "Fraunces", var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-style: italic;
  color: oklch(96% 0.012 80);
  margin: 0;
  max-width: 28ch;
  line-height: 1.25;
}

/* Right: info */
.food-modal__info {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}
.food-modal__cat {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.food-modal__name {
  font-family: "Fraunces", var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0;
  color: var(--fg);
}
.food-modal__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  margin: 6px 0 0;
  flex: 1;
}
.food-modal__price {
  font-family: "Fraunces", var(--font-display);
  font-size: clamp(26px, 2.6vw, 32px);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 14px 0 0;
}
.food-modal__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.food-modal__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fdf6ed;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  text-decoration: none;
  transition: background 160ms var(--ease-soft);
}
.food-modal__cta:hover { background: oklch(35% 0.08 35 / 1); }
.food-modal__cta--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.food-modal__cta--ghost:hover {
  background: var(--accent);
  color: #fdf6ed;
}

/* ============================================================
   CHEF'S NOTE — chalk-on-paper effect, sits in the right info pane
   under the dish description (Breakfast + Brunch only). Lives inside
   .food-modal__info so the .food-modal__dialog overflow: hidden
   doesn't clip it. The slight rotation keeps the handwritten feel.
   ============================================================ */
.chef-note {
  /* In-flow inside .food-modal__info — no absolute positioning, no
     overlap with the photo. The handwritten tilt is kept so it still
     reads as a slip of paper rather than a flat caption. */
  margin: 18px 0 22px;
  padding: 18px 22px 16px 22px;
  background:
    radial-gradient(ellipse at 25% 15%, oklch(96% 0.04 80) 0%, oklch(92% 0.05 75) 60%, oklch(86% 0.06 70) 100%);
  border-radius: 2px;
  box-shadow:
    0 1px 0 oklch(0% 0 0 / 0.08),
    0 2px 6px oklch(20% 0.02 50 / 0.18),
    0 22px 60px oklch(20% 0.02 50 / 0.32);
  transform: rotate(-1.2deg);
  transform-origin: left center;
  /* subtle paper edge */
  outline: 1px solid oklch(78% 0.04 70 / 0.4);
  outline-offset: -1px;
}
.chef-note::before {
  /* paper grain overlay — noise via repeating-gradient */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    repeating-linear-gradient(45deg, oklch(20% 0.02 50 / 0.04) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, oklch(20% 0.02 50 / 0.03) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
  opacity: 0.6;
}
.chef-note::after {
  /* corner wear — slight dark vignette at one corner */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 90% 95%, oklch(35% 0.04 50 / 0.18) 0%, transparent 40%);
}
.chef-note__hat {
  display: block;
  width: 44px;
  height: 32px;
  color: #2a2118;
  margin: 0 0 6px;
  /* subtle hand-drawn feel via filter */
  filter: drop-shadow(0 1px 0 oklch(20% 0.02 50 / 0.15));
}
.chef-note__label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #6a5b48;
  margin: 0 0 4px;
  font-weight: 500;
}
.chef-note__text {
  font-family: "Caveat", "Indie Flower", "Comic Sans MS", cursive;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 500;
  line-height: 1.32;
  color: #1f1812;
  margin: 0;
  /* chalk feel: slight letter variation, soft shadow */
  text-shadow:
    0 0 1px oklch(20% 0.02 50 / 0.15),
    0 1px 0 oklch(96% 0.04 80 / 0.6);
  letter-spacing: 0.01em;
}
@media (max-width: 760px) {
  .chef-note {
    margin: 14px 0 18px;
    padding: 14px 16px 12px;
    transform: rotate(-1deg);
  }
  .chef-note__hat { width: 36px; height: 26px; }
  .chef-note__text { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .food-modal__dialog,
  .food-modal__img,
  .food-modal__backdrop { animation: none !important; }
}
}
.menu-note a:hover { color: white; border-color: white; }