/* ==========================================================================
   Loboburguer Restaurant — carta digital
   Sistema editorial: papel marfil, vino profundo, oro apagado.
   ========================================================================== */

:root {
  --paper: #faf6f0;
  --paper-2: #f3ece2;
  --surface: #fffdf9;
  --ink: #241b16;
  --ink-2: #4b3d33;
  --muted: #8b7969;
  --line: #e6dbcc;
  --line-soft: #efe6da;
  --wine: #6d1f27;
  --wine-deep: #511318;
  --gold: #b08a4f;
  --sand: #d8c2a2;
  --display: "Cormorant Garamond", "Iowan Old Style", Garamond, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --head: 78px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head) + 18px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }

::selection { background: rgba(109, 31, 39, .14); }

:focus-visible {
  outline: 1.5px solid var(--wine);
  outline-offset: 3px;
}

/* ---------- barra superior ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 246, 240, .94);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.top__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 40px);
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--head);
}

.top__brand {
  display: grid;
  gap: 3px;
  flex: none;
  padding: 6px 0;
}

.top__name {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--wine);
}

.top__sub {
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--muted);
}

/* navegación de categorías */

.chips {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}

.chip:hover { color: var(--wine); }

.chip.is-active {
  background: var(--wine);
  color: #fbf3e7;
}

/* progreso de lectura, pegado al borde inferior de la barra */

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  overflow: hidden;
}

.progress span {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--gold), var(--wine));
  will-change: transform;
}

/* buscador */

.search {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  transition: border-color .2s ease, color .2s ease;
}

.search:focus-within { border-color: var(--wine); color: var(--wine); }
.search svg { width: 14px; height: 14px; flex: none; }

.search input {
  width: 132px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--ink);
  padding: 0;
}

.search input::placeholder { color: var(--muted); }
.search input:focus { outline: 0; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---------- portada ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 94svh;
  padding: clamp(88px, 12vh, 132px) var(--gutter) clamp(96px, 13vh, 140px);
  overflow: hidden;
  background: #170c08;
  text-align: center;
}

.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 52%;
  transform: scale(1.02);
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(96% 90% at 50% 46%, rgba(23, 9, 5, .34) 0%, rgba(23, 9, 5, .58) 52%, rgba(20, 8, 5, .86) 100%),
    linear-gradient(180deg, rgba(23, 9, 5, .68) 0%, rgba(23, 9, 5, .1) 28%, rgba(23, 9, 5, .1) 62%, rgba(23, 9, 5, .82) 100%);
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 940px;
}

.hero__emblem {
  width: clamp(58px, 7vw, 76px);
  height: auto;
  aspect-ratio: 1;
  opacity: .92;
  margin-bottom: 4px;
}

.hero__eyebrow {
  margin-top: 6px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--sand);
}

.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(38px, 8.8vw, 104px);
  line-height: .95;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: #f9f0e2;
  text-indent: .075em;
}

.hero__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(300px, 62vw);
  margin: 8px 0 2px;
}

.hero__rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 194, 162, .75));
}

.hero__rule span:last-child {
  background: linear-gradient(270deg, transparent, rgba(216, 194, 162, .75));
}

.hero__rule i {
  width: 5px;
  height: 5px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.hero__menu {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(21px, 3vw, 28px);
  line-height: 1;
  letter-spacing: .04em;
  color: #e7d2b3;
  margin-top: 2px;
}

.hero__tag {
  margin-top: 8px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(249, 240, 226, .58);
}

.hero__down {
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 4vh, 36px);
  transform: translateX(-50%);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(249, 240, 226, .26);
  border-radius: 50%;
  color: rgba(249, 240, 226, .8);
  transition: border-color .25s ease, color .25s ease, transform .25s ease;
}

.hero__down:hover {
  border-color: rgba(249, 240, 226, .6);
  color: #f9f0e2;
  transform: translateX(-50%) translateY(-2px);
}

.hero__down svg { width: 19px; height: 19px; }

/* ---------- carta ---------- */

.menu {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.cat {
  padding: clamp(46px, 6vw, 78px) 0;
  border-top: 1px solid var(--line);
}

.cat:first-child {
  border-top: 0;
  padding-top: clamp(34px, 5vw, 56px);
}

.cat__head {
  display: grid;
  justify-items: center;
  gap: 11px;
  max-width: 620px;
  margin: 0 auto clamp(26px, 3.6vw, 44px);
  text-align: center;
}

.cat__index {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--gold);
}

.cat__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1;
  letter-spacing: .01em;
  color: var(--wine);
}

.cat__blurb {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--muted);
  max-width: 48ch;
}

.cat__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-top: 2px;
  width: min(240px, 60vw);
}

.cat__rule::before,
.cat__rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line));
}

.cat__rule::after { background: linear-gradient(270deg, transparent, var(--line)); }

.cat__rule i {
  width: 4px;
  height: 4px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px clamp(24px, 4vw, 52px);
}

.dish {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 15px;
  align-items: start;
  padding: 15px 0;
  border-top: 1px solid var(--line-soft);
}

.grid > .dish:first-child { border-top: 0; padding-top: 0; }

.dish__ph {
  width: 64px;
  height: 64px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-2);
}

.dish__ph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1), filter .4s ease;
  filter: saturate(.95);
}

.dish:hover .dish__ph img { transform: scale(1.06); filter: saturate(1); }

.dish__text {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding-top: 1px;
}

.dish__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.dish__name {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: .005em;
  color: var(--ink);
  min-width: 0;
}

.dish__name em {
  font-family: var(--sans);
  font-style: normal;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.dish__lead {
  flex: 1;
  min-width: 10px;
  height: 1px;
  border-bottom: 1px dotted #d3c4b1;
  transform: translateY(-4px);
}

.dish__price {
  flex: none;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--wine);
}

.dish__price.is-soft {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--muted);
}

.dish__tag {
  justify-self: start;
  margin-top: 3px;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}

.dish__flag {
  justify-self: start;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #a8423c;
}

.dish.is-blocked .dish__ph img { filter: grayscale(.55); }
.dish.is-blocked .dish__price { color: var(--muted); }
.dish.is-blocked .dish__desc { opacity: .7; }

.dish__desc {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dish__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
  margin-top: 5px;
}

.dish__opts li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  color: var(--muted);
}

.dish__opts b {
  font-weight: 500;
  color: var(--wine);
  font-variant-numeric: tabular-nums;
}

.dish__price.is-live { animation: priceFlash 1.2s ease; }

@keyframes priceFlash {
  0% { color: var(--gold); }
  100% { color: var(--wine); }
}

.is-hidden { display: none !important; }

.empty {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 56px var(--gutter) 90px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- pie ---------- */

.footer {
  margin-top: clamp(30px, 5vw, 56px);
  background: #2a1a13;
  color: rgba(246, 236, 223, .58);
  text-align: center;
}

.footer__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(52px, 7vw, 84px) var(--gutter) clamp(34px, 4vw, 48px);
  display: grid;
  justify-items: center;
}

.footer__emblem {
  width: 56px;
  height: auto;
  opacity: .75;
  margin-bottom: 18px;
}

.footer__name {
  font-family: var(--display);
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .2em;
  text-indent: .2em;
  text-transform: uppercase;
  color: #f7ece0;
}

.footer__sub {
  margin-top: 8px;
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: .44em;
  text-indent: .44em;
  text-transform: uppercase;
  color: rgba(246, 236, 223, .42);
}

.footer__rule {
  width: 46px;
  height: 1px;
  margin: 22px 0;
  background: rgba(246, 236, 223, .22);
}

.footer__note {
  max-width: 46ch;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(246, 236, 223, .55);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 24px;
}

.footer__links a {
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(246, 236, 223, .72);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color .2s ease, border-color .2s ease;
}

.footer__links a:hover {
  color: #f7ece0;
  border-color: rgba(246, 236, 223, .35);
}

.footer__credit {
  display: grid;
  gap: 7px;
  margin-top: 38px;
  padding: 20px 30px;
  border: 1px solid rgba(246, 236, 223, .14);
  text-align: center;
  transition: border-color .25s ease, background .25s ease;
}

.footer__credit:hover {
  border-color: rgba(227, 207, 174, .5);
  background: rgba(246, 236, 223, .04);
}

.footer__credit:focus-visible { outline-color: #e3cfae; }

.footer__credit:hover strong { color: #f2e2c6; }

.footer__credit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  letter-spacing: .26em !important;
  color: rgba(227, 207, 174, .78) !important;
  transition: color .25s ease;
}

.footer__credit:hover .footer__credit-link { color: #e3cfae !important; }

.footer__credit-link span { font-size: 10px; letter-spacing: 0; }

.footer__credit span {
  font-size: 7.5px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(246, 236, 223, .4);
}

.footer__credit strong {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .24em;
  text-indent: .24em;
  text-transform: uppercase;
  color: #e3cfae;
}

.footer__legal {
  margin-top: 34px;
  font-size: 8.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(246, 236, 223, .28);
}

/* ---------- responsive ---------- */

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid > .dish:nth-child(2) { border-top: 0; padding-top: 0; }
}

@media (min-width: 1060px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid > .dish:nth-child(3) { border-top: 0; padding-top: 0; }
  .hero { min-height: 94svh; }
}

@media (max-width: 860px) {
  :root { --head: calc(98px + env(safe-area-inset-top, 0px)); }
  html { -webkit-tap-highlight-color: transparent; }
  .top { padding-top: env(safe-area-inset-top, 0px); }
  .top__inner {
    flex-wrap: wrap;
    gap: 4px 14px;
    padding-top: 10px;
    padding-bottom: 4px;
    min-height: 0;
  }
  .top__brand { order: 1; }
  .top__name { font-size: 19px; letter-spacing: .15em; }
  .search { order: 2; margin-left: auto; }
  .search input { width: 118px; font-size: 16px; letter-spacing: 0; }
  .search input::placeholder { font-size: 13px; }
  .chips {
    order: 3;
    flex-basis: 100%;
    gap: 0;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    scroll-snap-type: x proximity;
  }
  .chip { min-height: 40px; padding: 0 12px; font-size: 10px; letter-spacing: .14em; scroll-snap-align: start; }
  .chip.is-active { box-shadow: inset 0 0 0 1px rgba(109, 31, 39, .2); }
  .hero { min-height: 92svh; padding-top: 84px; padding-bottom: 92px; }
  .hero__photo { object-position: 24% 52%; }
  .hero__veil {
    background:
      radial-gradient(120% 92% at 46% 44%, rgba(23, 9, 5, .42) 0%, rgba(23, 9, 5, .68) 58%, rgba(20, 8, 5, .9) 100%),
      linear-gradient(180deg, rgba(23, 9, 5, .7) 0%, rgba(23, 9, 5, .18) 30%, rgba(23, 9, 5, .16) 62%, rgba(23, 9, 5, .86) 100%);
  }
  .hero__title { letter-spacing: .055em; text-indent: .055em; }
  .hero__emblem { width: 56px; }
  .hero__down { width: 44px; height: 44px; bottom: 18px; }
  .dish__name { font-size: 19px; }
}

@media (max-width: 719px) {
  html { scroll-padding-top: calc(var(--head) + 12px); }
  .cat { padding: 34px 0; }
  .cat__head { margin-bottom: 20px; gap: 9px; }
  .cat__title { font-size: clamp(30px, 8.6vw, 42px); }
  .cat__blurb { font-size: 12.5px; line-height: 1.65; }
  .grid { gap: 0; }
  .dish { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 12px 0; }
  .dish__ph { width: 56px; height: 56px; }
  .dish__name { font-size: 18px; }
  .dish__desc { font-size: 11.5px; line-height: 1.55; -webkit-line-clamp: 3; }
  .dish__price { font-size: 12px; }
  .hero__eyebrow { font-size: 8.5px; letter-spacing: .34em; }
  .hero__tag { letter-spacing: .22em; font-size: 8px; }
  .footer__inner { padding: 46px var(--gutter) 30px; }
  .footer__credit { width: 100%; padding: 18px; }
  .footer__legal { margin-top: 26px; }
  .footer__links a { padding: 6px 0; }
}

@media (max-width: 380px) {
  .top__inner { gap: 4px 10px; }
  .top__name { font-size: 16px; letter-spacing: .13em; }
  .top__sub { letter-spacing: .3em; }
  .search input { width: 82px; }
  .search svg { width: 13px; height: 13px; }
  .hero__title { font-size: clamp(30px, 10vw, 40px); }
  .hero__menu { font-size: 20px; }
  .dish { grid-template-columns: 52px minmax(0, 1fr); gap: 11px; }
  .dish__ph { width: 52px; height: 52px; }
  .dish__name { font-size: 17px; }
  .footer__links { gap: 6px 18px; }
}

@media (hover: none) {
  .dish:hover .dish__ph img { transform: none; }
  .hero__down:hover { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
