:root {
  color-scheme: light;
  --blue: #18404f;
  --blue-dark: #0f2e3a;
  --blue-soft: #d7edf0;
  --paper: #ecdfcb;
  --paper-deep: #e1d2b8;
  --surface: #f5ecda;
  --ink: #25211a;
  --muted: #716858;
  --line: rgba(37, 33, 26, 0.13);
  --gold: #c99a52;
  --terracotta: #b65e44;
  --sage: #718564;
  --shadow: 0 18px 40px rgba(15, 46, 58, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  background:
    linear-gradient(rgba(24, 64, 79, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 64, 79, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, #ecdfcb 0%, #e1d2b8 100%);
  background-size: 34px 34px, 34px 34px, auto;
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  min-height: 100svh;
  overflow-x: clip;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(24, 64, 79, 0.2);
  pointer-events: none;
  z-index: 0;
}

.page-shell::before {
  left: max(12px, calc((100vw - 720px) / 2));
}

.page-shell::after {
  right: max(12px, calc((100vw - 720px) / 2));
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(22svh, 200px);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 18px;
  background:
    linear-gradient(180deg, rgba(15, 46, 58, 0.02), rgba(15, 46, 58, 0.3)),
    linear-gradient(135deg, var(--blue) 0%, #0f5a68 48%, var(--blue-dark) 100%);
  color: var(--paper);
  display: grid;
  place-items: center;
  isolation: isolate;
}

.hero__content {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 4px 0 8px;
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  z-index: 1;
}

.brand-logo {
  display: block;
  width: min(140px, 42vw);
  height: auto;
  filter:
    brightness(0) invert(1)
    drop-shadow(0 12px 24px rgba(0, 0, 0, 0.16));
}

.hero h1 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--paper);
  font-size: clamp(1.8rem, 4.8vw, 2.6rem);
  line-height: 0.96;
  font-weight: 700;
}

.category-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(24, 64, 79, 0.14);
  background: rgba(251, 245, 232, 0.88);
  backdrop-filter: blur(14px);
}

.category-nav__track {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.category-link {
  flex: 0 0 auto;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(24, 64, 79, 0.14);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--blue);
  background: rgba(255, 250, 241, 0.92);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.category-link.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.menu {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 16px 58px;
  z-index: 1;
}

.section__count,
.dish-modal__section {
  display: block;
  color: var(--terracotta);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section {
  scroll-margin-top: 76px;
  padding-top: 18px;
}

.section + .section {
  margin-top: 36px;
}

.section__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  margin-bottom: 12px;
}

.section__title {
  margin: 0;
  color: var(--blue);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 0.94;
  font-weight: 700;
}

.section__note {
  margin: 8px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.section__count {
  color: var(--gold);
  text-align: right;
  white-space: nowrap;
}

.section__rule {
  height: 1px;
  background:
    linear-gradient(90deg, rgba(24, 64, 79, 0.4), rgba(24, 64, 79, 0.06)),
    var(--line);
  margin-bottom: 6px;
}

.dish-list {
  display: grid;
  gap: 8px;
}

.dish-card {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 17px;
  background: transparent;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.dish-card__inner {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 10px 10px 10px 8px;
  border-radius: 17px;
  background: rgba(255, 250, 241, 0.78);
  border: 1px solid rgba(24, 64, 79, 0.09);
  box-shadow: 0 7px 20px rgba(15, 46, 58, 0.055);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dish-card:hover .dish-card__inner,
.dish-card:focus-visible .dish-card__inner {
  border-color: rgba(24, 64, 79, 0.24);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.dish-card:focus-visible {
  outline: 3px solid rgba(201, 154, 82, 0.42);
  outline-offset: 3px;
}

.dish-card__image {
  position: relative;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(24, 64, 79, 0.13), rgba(201, 154, 82, 0.22)),
    var(--paper-deep);
}

.dish-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.dish-image {
  opacity: 0;
  filter: blur(14px);
  transform: scale(1.06);
  transform-origin: center;
  transition: opacity 0.48s ease, filter 0.7s ease, transform 0.7s ease;
  will-change: opacity, filter, transform;
}

.dish-image.is-loaded {
  opacity: 1;
  filter: blur(0);
  transform: scale(1);
}

.dish-card__image--empty {
  display: grid;
  place-items: center;
}

.dish-card__image--empty::before {
  content: "";
  width: 34px;
  height: 28px;
  background: url("assets/favicon.png") center / contain no-repeat;
  opacity: 0.32;
}

.dish-card__body {
  min-width: 0;
}

.dish-card__name {
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.98rem, 2.6vw, 1.08rem);
  line-height: 1.22;
  font-weight: 900;
}

.dish-card__desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.dish-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--blue);
  background: var(--blue-soft);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.tag--accent {
  color: #fff;
  background: var(--terracotta);
}

.tag--sage {
  color: #fff;
  background: var(--sage);
}

.dish-card__price {
  display: grid;
  gap: 3px;
  justify-items: end;
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.dish-card__price span {
  font-size: 0.98rem;
  line-height: 1;
}

.dish-card__price small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dish-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  align-items: end;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dish-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.dish-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 46, 58, 0.58);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.dish-modal__panel {
  position: relative;
  width: min(100%, 760px);
  max-height: min(88svh, 760px);
  margin: 0 auto;
  overflow: auto;
  overscroll-behavior: contain;
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 -24px 60px rgba(15, 46, 58, 0.34);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.dish-modal.is-open .dish-modal__panel {
  transform: translateY(var(--modal-drag-y, 0));
}

.dish-modal.is-dragging .dish-modal__panel {
  transition: none;
}

.dish-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 250, 241, 0.64);
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 46, 58, 0.52);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.dish-modal__close svg {
  width: 21px;
  height: 21px;
}

.dish-modal__close path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.dish-modal__image-wrap {
  height: min(44svh, 350px);
  min-height: 220px;
  background: var(--blue);
  overflow: hidden;
}

.dish-modal__image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dish-modal__body {
  padding: 24px 20px calc(30px + env(safe-area-inset-bottom, 0px));
}

.dish-modal__body h2 {
  margin: 8px 0 10px;
  color: var(--blue);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 8vw, 3.2rem);
  line-height: 0.95;
}

.dish-modal__body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.56;
}

.dish-modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.dish-modal__prices {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.modal-price {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--blue);
  font-weight: 900;
}

.modal-price small {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-price strong {
  font-size: 1.16rem;
}

.footer {
  position: relative;
  z-index: 1;
  padding: 38px 18px calc(42px + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(180deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: rgba(251, 245, 232, 0.86);
  text-align: center;
}

.footer img {
  width: min(250px, 68vw);
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.footer p {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.footer a {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.36);
  text-underline-offset: 4px;
}

@media (max-width: 560px) {
  .hero {
    min-height: 18svh;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    padding-bottom: 14px;
  }

  .hero__content {
    gap: 5px;
    padding-bottom: 6px;
  }

  .brand-logo {
    width: min(132px, 42vw);
  }

  .dish-card__inner {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
  }

  .dish-card__image {
    width: 64px;
    height: 64px;
  }

  .dish-card__price {
    grid-column: 2;
    justify-items: start;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: baseline;
    gap: 5px 10px;
    margin-top: -2px;
  }

  .dish-card__price span {
    font-size: 0.92rem;
  }
}

@media (min-width: 900px) {
  .hero__content {
    padding-left: 26px;
    padding-right: 26px;
  }

  .menu {
    padding-top: 26px;
  }

  .dish-modal {
    align-items: center;
    padding: 24px;
  }

  .dish-modal__panel {
    display: grid;
    grid-template-columns: 46% 54%;
    max-height: min(76svh, 620px);
    border-radius: 28px;
  }

  .dish-modal__image-wrap {
    height: 100%;
    min-height: 520px;
  }

  .dish-modal__body {
    align-self: center;
    padding: 46px 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* ---------- Selector de idioma ---------- */
.lang-switch {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 14px;
  z-index: 4;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(236, 223, 203, 0.16);
  border: 1px solid rgba(236, 223, 203, 0.4);
  backdrop-filter: blur(6px);
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: 600 12px/1 "Manrope", system-ui, sans-serif;
  letter-spacing: 0.04em;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-switch button.is-active {
  background: var(--paper);
  color: var(--blue);
}

/* ---------- Listas (vinos y bebidas) ---------- */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.menu-group__title {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.01em;
}
.menu-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.menu-row:last-child {
  border-bottom: 0;
}
.menu-row__name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}
.menu-row__name small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  font-style: italic;
}
.menu-row__prices {
  flex: 0 0 auto;
  display: flex;
  gap: 14px;
  white-space: nowrap;
  text-align: right;
}
.menu-row__price {
  color: var(--gold);
  font-weight: 600;
  font-size: 14.5px;
}
.menu-row__price small {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
