:root {
  --page: #ffffff;
  --card: #f7f7f6;
  --card-hover: #f0efed;
  --ink: #121212;
  --muted: #666666;
  --soft: #777777;
  --line: #e8e8e8;
  --accent: #b98935;
  --accent-soft: #ead8b3;
  --shadow: 0 24px 70px rgba(18, 18, 18, 0.12);
  --header-height: 128px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 18px);
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Manrope, Inter, Arial, sans-serif;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
  overflow: hidden;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 8px max(18px, calc((100vw - 1240px) / 2)) 0;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(18, 18, 18, 0.04);
}

.logo {
  display: block;
  width: fit-content;
  margin: 0 auto 18px;
  color: var(--ink);
  text-decoration: none;
}

.logo-image {
  display: block;
  width: clamp(162px, 38vw, 232px);
  height: auto;
  mix-blend-mode: multiply;
}

.category-tabs {
  display: flex;
  gap: clamp(22px, 4vw, 40px);
  padding: 0 10px 13px;
  overflow-x: auto;
  scroll-padding-inline: 22px;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  position: relative;
  flex: 0 0 auto;
  padding: 0 0 12px;
  color: #6e6e6e;
  font-size: clamp(20px, 4.2vw, 25px);
  font-weight: 650;
  line-height: 1.12;
  scroll-snap-align: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition:
    color 220ms var(--ease-out),
    opacity 220ms var(--ease-out),
    transform 260ms var(--ease-out);
}

.category-tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #eeeeee;
  border-radius: 999px;
  content: "";
  opacity: 0.72;
  transform: scaleX(0.56);
  transform-origin: center;
  transition:
    background 280ms var(--ease-out),
    opacity 280ms var(--ease-out),
    transform 280ms var(--ease-out);
}

.category-tab.active {
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-1px);
}

.category-tab.active::after {
  background: var(--accent);
  opacity: 1;
  transform: scaleX(1);
}

.category-tab:active {
  transform: translateY(1px);
}

.menu-page {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 16px 18px 76px;
}

.intro {
  max-width: 720px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 8vw, 68px);
  font-weight: 800;
  line-height: 1.02;
}

.intro p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.category-section {
  scroll-margin-top: calc(var(--header-height) + 18px);
  padding: 22px 0 48px;
}

.section-heading {
  margin-bottom: 20px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(27px, 5vw, 33px);
  font-weight: 720;
  line-height: 1.1;
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dish-card {
  display: grid;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  text-align: left;
  background: var(--card);
  border: 1px solid rgba(18, 18, 18, 0.04);
  border-radius: 22px;
  cursor: pointer;
  transition:
    background 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    transform 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
  animation: dish-enter 520ms var(--ease-out) both;
  animation-delay: min(calc(var(--dish-index, 0) * 34ms), 280ms);
}

.dish-card:hover {
  background: var(--card-hover);
  border-color: rgba(185, 137, 53, 0.18);
  box-shadow: 0 18px 42px rgba(18, 18, 18, 0.08);
  transform: translateY(-3px);
}

.dish-card:active {
  transform: translateY(-1px) scale(0.992);
}

.dish-card:focus-visible,
.category-tab:focus-visible,
.modal-close:focus-visible,
.modal-backdrop:focus-visible {
  outline: 3px solid #111111;
  outline-offset: 3px;
}

.dish-photo-wrap {
  display: block;
  aspect-ratio: 1 / 0.92;
  overflow: hidden;
  background: #dddddd;
}

.dish-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease-out);
}

.dish-card:hover .dish-photo {
  transform: scale(1.045);
}

.dish-info {
  display: grid;
  gap: 9px;
  padding: 13px 12px 14px;
}

.dish-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(16px, 4.2vw, 19px);
  font-weight: 680;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dish-price {
  color: var(--ink);
  font-size: clamp(18px, 4.8vw, 22px);
  font-weight: 780;
  line-height: 1;
}

.dish-description {
  display: -webkit-box;
  min-height: 40px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.dish-description.muted {
  color: #8a8a8a;
}

.empty-state {
  padding: 64px 0;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: 16px;
  pointer-events: none;
  visibility: hidden;
}

.modal[aria-hidden="false"] {
  pointer-events: auto;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
  border: 0;
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
}

.modal[aria-hidden="false"] .modal-backdrop {
  opacity: 1;
}

.modal-panel {
  position: relative;
  width: min(100%, 620px);
  max-height: min(88vh, 860px);
  overflow: auto;
  background: #ffffff;
  border-radius: 32px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition:
    opacity 240ms var(--ease-out),
    transform 240ms var(--ease-out);
}

.modal[aria-hidden="false"] .modal-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #111111;
  font-size: 28px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.9);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition:
    background 180ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.modal-close:active {
  transform: scale(0.96);
}

.modal-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.72;
  object-fit: cover;
  background: #dddddd;
}

.modal-content {
  padding: 22px;
}

.modal-title-row {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-title-row h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 7vw, 34px);
  font-weight: 760;
  line-height: 1.12;
}

.modal-price {
  color: var(--ink);
  font-size: 23px;
  font-weight: 780;
  line-height: 1;
}

@keyframes dish-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-description {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.modal-description[hidden] {
  display: none;
}

.modal-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.modal-meta:empty {
  display: none;
}

.modal-meta div {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.modal-meta dt {
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.modal-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

@media (min-width: 720px) {
  :root {
    --header-height: 142px;
  }

  .site-header {
    padding-top: 8px;
  }

  .category-tabs {
    justify-content: center;
  }

  .menu-page {
    padding-top: 34px;
  }

  .dish-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .dish-info {
    padding: 15px;
  }
}

@media (min-width: 1040px) {
  .dish-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
  }

  .modal {
    place-items: center;
  }
}

@media (max-width: 380px) {
  :root {
    --header-height: 122px;
  }

  .dish-grid {
    gap: 10px;
  }

  .dish-card {
    border-radius: 20px;
  }

  .dish-info {
    padding: 11px 10px 13px;
  }

  .dish-title {
    font-size: 16px;
  }

  .dish-price {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
