/* =========================================================
   Herber's Food — Carta digital
   Paleta y tipografía derivadas del logo de la marca.
   ========================================================= */

:root {
  --ink:      #14100E;
  --ink-2:    #1E1815;
  --ink-3:    #2B221C;
  --line:     #3A2E26;
  --cream:    #F6EFE4;
  --muted:    #A2907F;
  --red:      #DC2B39;
  --red-soft: #EE5A66;
  --amber:    #E9A13B;
  --kraft:    #D8C3A2;

  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body:    "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "Space Mono", ui-monospace, "SFMono-Regular", monospace;

  --pad: 20px;
  --radius: 14px;
  --topbar-h: 58px;
  --nav-h: 54px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.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;
}

/* ---------- Barra superior ---------- */

.topbar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  background: rgba(20, 16, 14, .92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__logo img { height: 26px; width: auto; }

.langbtn {
  display: inline-flex; align-items: center;
  padding: 7px 13px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-2);
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase;
  transition: border-color .18s ease, background .18s ease;
}
.langbtn:hover { border-color: var(--kraft); background: var(--ink-3); }
.langbtn svg { width: 15px; height: 15px; flex: none; opacity: .8; margin-right: 8px; }

/* ---------- Portada ---------- */

.hero { padding: 46px 0 30px; text-align: center; }

.hero__logo {
  height: 104px; width: auto; margin: 0 auto 24px;
}

.hero__eyebrow {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 10px;
}

.hero__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 38px;
  line-height: .92;
  letter-spacing: -.03em;
  text-transform: uppercase;
  margin: 0;
}
.hero__title em { font-style: normal; color: var(--red-soft); }

/* ---------- Buscador y filtros ---------- */

.tools { padding-bottom: 14px; }

.search {
  position: relative;
  display: flex; align-items: center;
}
.search svg {
  position: absolute; left: 14px; width: 17px; height: 17px;
  color: var(--muted); pointer-events: none;
}
.search input {
  width: 100%;
  padding: 13px 44px 13px 40px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  font: inherit;
  font-size: 15px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--kraft); outline: none; }
.search__clear {
  position: absolute; right: 8px;
  width: 30px; height: 30px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  color: var(--muted);
}
.search__clear.is-on { display: flex; }
.search__clear:hover { color: var(--cream); background: var(--ink-3); }

.filters { display: flex; margin-top: 10px; flex-wrap: wrap; }
.filters > * { margin: 0 8px 8px 0; }

.filter {
  display: inline-flex; align-items: center;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  transition: all .18s ease;
}
.filter:hover { color: var(--cream); border-color: var(--kraft); }
.filter[aria-pressed="true"] {
  background: var(--cream); color: var(--ink); border-color: var(--cream);
}

/* ---------- Navegación de secciones ---------- */

.secnav {
  position: -webkit-sticky; position: sticky; top: var(--topbar-h); z-index: 30;
  background: rgba(20, 16, 14, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.secnav__inner {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  height: var(--nav-h);
  align-items: center;
}
.secnav__inner::-webkit-scrollbar { display: none; }

.secnav a {
  flex: none;
  margin-right: 8px;
  scroll-snap-align: center;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease;
}
.secnav a:hover { color: var(--cream); }
.secnav a.is-active { background: var(--red); color: #fff; }

/* ---------- Secciones ---------- */

.section { padding-top: 42px; scroll-margin-top: calc(var(--topbar-h) + var(--nav-h) + 8px); }
.section:last-of-type { padding-bottom: 10px; }

.section__head { display: flex; align-items: baseline; margin-bottom: 6px; }
.section__head > * + * { margin-left: 14px; }

.section__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.02em;
  text-transform: uppercase;
  margin: 0;
}

.section__count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.subtitle {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 34px 0 12px;
}
.subtitle:first-of-type { margin-top: 20px; }

.notes {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.notes li {
  padding: 12px 15px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--cream);
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-left: 3px solid var(--amber);
  border-radius: 10px;
}

/* Avisos de la casa, sobre el buscador */
.notice { display: grid; gap: 8px; margin: 0 0 18px; }
.notice p {
  margin: 0;
  padding: 13px 16px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -.005em;
  color: var(--cream);
  background: rgba(233, 161, 59, .10);
  border: 1px solid rgba(233, 161, 59, .38);
  border-radius: 12px;
}

@media (min-width: 680px) {
  .notice { grid-template-columns: 1fr 1fr; }
  .notes { grid-template-columns: 1fr 1fr; }
}

/* ---------- Cinta métrica (selector de tamaño) ---------- */

.meter {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--topbar-h) + var(--nav-h));
  z-index: 20;
  margin: 18px 0 6px;
  padding: 14px 0 16px;
  background: rgba(20, 16, 14, .96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.meter__label {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.meter__label strong {
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
}
.meter__label span {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}

.sizes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.size {
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink-2);
  text-align: center;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.size:hover { border-color: var(--kraft); }

.size strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.15;
}

.size span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.size[aria-checked="true"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.size[aria-checked="true"] span { color: rgba(255, 255, 255, .82); }

.meter__now {
  margin-top: 11px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.meter__now b { color: var(--cream); font-weight: 600; }

/* ---------- Rejilla de platos ---------- */

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  grid-template-areas:
    "img name  price"
    "img desc  desc"
    "img tags  tags";
  column-gap: 14px;
  row-gap: 6px;
  align-content: start;
  width: 100%;
  padding: 12px 14px 12px 12px;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius);
  text-align: left;
  transition: border-color .18s ease, background .18s ease;
}
.card:hover { border-color: var(--kraft); background: var(--ink-3); }

.card__img {
  grid-area: img;
  align-self: start;
  width: 92px; height: 92px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--ink-3);
}

.card__name {
  grid-area: name;
  align-self: center;
  min-width: 0;
  overflow-wrap: break-word;
  -webkit-hyphens: none;
  hyphens: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: -.005em;
  margin: 0;
}

.card__desc {
  grid-area: desc;
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.card__tags { grid-area: tags; display: flex; flex-wrap: wrap; }
.card__tags > * { margin: 0 5px 4px 0; }

.tag {
  font-family: var(--mono);
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid currentColor;
}
.tag--spicy { color: var(--red-soft); }
.tag--veg   { color: #7FB069; }
.tag--beef  { color: var(--kraft); }

.card__price {
  grid-area: price;
  align-self: center;
  max-width: 40%;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  text-align: right;
  color: var(--cream);
}
.card__price small {
  display: block;
  font-size: 9.5px; font-weight: 400; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card__price .dual { display: block; }
.card__price .dual + .dual { margin-top: 5px; }

.sheet__tags { display: flex; flex-wrap: wrap; margin-bottom: 12px; }
.sheet__tags > * { margin: 0 6px 6px 0; }

/* ---------- Bebidas ---------- */

.drinks { margin-top: 8px; }

.drinks__group + .drinks__group { margin-top: 26px; }

.drinks__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 2px;
}
.drinks__sub { font-size: 12px; color: var(--muted); margin: 0 0 10px; }

.drinks__list { list-style: none; margin: 0; padding: 0; }

.drinks__list li {
  display: flex; align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}
.drinks__list li:last-child { border-bottom: 0; }
.drinks__list .dots { flex: 1; margin: 0 8px; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.drinks__list .price { font-family: var(--mono); font-weight: 700; font-size: 14px; }

/* ---------- Estado vacío ---------- */

.empty { padding: 60px 0; text-align: center; display: none; }
.empty.is-on { display: block; }
.empty p { color: var(--muted); margin: 0 0 16px; }
.empty button {
  padding: 10px 20px; border-radius: 999px;
  background: var(--cream); color: var(--ink);
  font-weight: 600; font-size: 14px;
}

/* ---------- Panel de detalle ---------- */

.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.sheet.is-open { display: flex; }

.sheet__scrim {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(8, 6, 5, .72);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: fade .2s ease;
}

.sheet__panel {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  animation: rise .28s cubic-bezier(.2, .8, .3, 1);
}

.sheet__close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 16, 14, .72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--cream);
}

.sheet__img {
  width: 100%;
  height: 240px;              /* respaldo para navegadores sin aspect-ratio */
  object-fit: cover;
}
@supports (aspect-ratio: 4 / 3) {
  .sheet__img { height: auto; aspect-ratio: 4 / 3; }
}

.sheet__body { padding: 20px var(--pad) 30px; }

.sheet__name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px; letter-spacing: -.02em; text-transform: uppercase;
  margin: 0 0 8px;
}
.sheet__desc { font-size: 15px; line-height: 1.55; color: #D9CBBA; margin: 0 0 16px; }

.sheet__price {
  display: flex; align-items: baseline; flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono); font-weight: 700; font-size: 22px;
}
.sheet__price span { margin-left: 10px; font-family: var(--body); font-weight: 400; font-size: 13px; color: var(--muted); }

.sheet__note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Selector de idioma ---------- */

.langsheet .sheet__panel { padding: 8px 0 14px; }
.langsheet h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
  margin: 14px var(--pad) 8px;
}
.langsheet ul { list-style: none; margin: 0; padding: 0 10px; }
.langsheet button {
  display: flex; align-items: center;
  width: 100%; padding: 14px;
  border-radius: 12px;
  font-size: 16px;
}
.langsheet button:hover { background: var(--ink-3); }
.langsheet button[aria-current="true"] { color: var(--amber); font-weight: 600; }
.langsheet .code {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  color: var(--muted); margin-left: auto;
}

/* ---------- Pie ---------- */

.foot {
  margin-top: 48px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.foot p { margin: 0 0 6px; font-size: 12.5px; color: var(--muted); }
.foot__mark {
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--line);
  margin-top: 16px;
}

@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- Pantallas muy estrechas ---------- */

@media (max-width: 380px) {
  :root { --pad: 14px; }
  .card { grid-template-columns: 76px minmax(0, 1fr) auto; column-gap: 11px; padding: 10px 11px 10px 10px; }
  .card__img { width: 76px; height: 76px; }
  .card__name { font-size: 15px; letter-spacing: -.015em; }
}

/* ---------- Escritorio ---------- */

/* Los titulares crecen por tramos, sin clamp() */
@media (min-width: 460px) {
  .hero__title { font-size: 46px; }
  .section__title { font-size: 32px; }
}

@media (min-width: 820px) {
  :root { --pad: 32px; }
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
  .hero { padding: 60px 0 34px; }
  .hero__logo { height: 132px; }
  .hero__title { font-size: 56px; }
  .section__title { font-size: 38px; }
  .card { grid-template-columns: 104px minmax(0, 1fr) auto; }
  .card__img { width: 104px; height: 104px; }
  .sheet { align-items: center; }
  .sheet__panel { border-radius: 20px; }
}

/* Tres columnas solo en pantallas apaisadas: en un totem vertical
   quedarian tres columnas estrechas y letra diminuta. */
@media (min-width: 1300px) and (orientation: landscape) {
  /* con tres columnas hace falta mas ancho util: si no, el nombre mas
     largo de la carta ("Encantadora") no cabe y se parte */
  .wrap { max-width: 1280px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__title { font-size: 62px; }
  .section__title { font-size: 40px; }
  .drinks { columns: 2; column-gap: 40px; }
  .drinks__group { break-inside: avoid; }
  .drinks__group + .drinks__group { margin-top: 0; padding-top: 26px; }
}

/* ---------- Modo totem / pantalla vertical grande ----------
   Se activa solo (pantalla ancha y vertical, o pantalla tactil grande)
   y se puede forzar con ?totem=1 en la direccion. Ver carta.js.
   Se lee de pie y a un metro: todo mas grande y dos columnas como maximo. */
body.totem { --pad: 48px; --topbar-h: 78px; --nav-h: 76px; }
body.totem { font-size: 21px; }
body.totem .wrap { max-width: 1400px; }
body.totem .topbar__logo img { height: 40px; }
body.totem .langbtn { font-size: 17px; padding: 12px 20px 12px 18px; }
body.totem .langbtn svg { width: 20px; height: 20px; }
body.totem .hero { padding: 70px 0 40px; }
body.totem .hero__logo { height: 190px; }
body.totem .hero__eyebrow { font-size: 15px; }
body.totem .hero__title { font-size: 76px; }
body.totem .notice p { font-size: 24px; padding: 20px 24px; }
body.totem .search input { font-size: 21px; padding: 20px 52px; }
body.totem .search svg { width: 22px; height: 22px; left: 20px; }
body.totem .filter { font-size: 18px; padding: 11px 20px; }
body.totem .secnav a { font-size: 19px; padding: 11px 22px; }
body.totem .section__title { font-size: 52px; }
body.totem .section__count { font-size: 16px; }
body.totem .subtitle { font-size: 24px; }
body.totem .meter__label strong { font-size: 19px; }
body.totem .meter__label span { font-size: 15px; }
body.totem .size strong { font-size: 26px; }
body.totem .size span { font-size: 16px; }
body.totem .meter__now { font-size: 19px; }
body.totem .grid { grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
body.totem .card { grid-template-columns: 150px minmax(0, 1fr) auto; column-gap: 20px; padding: 16px 20px 16px 16px; }
body.totem .card__img { width: 150px; height: 150px; }
body.totem .card__name { font-size: 25px; }
body.totem .card__desc { font-size: 18px; }
body.totem .card__price { font-size: 22px; }
body.totem .card__price small { font-size: 13px; }
body.totem .tag { font-size: 13px; padding: 4px 10px; }
body.totem .notes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
body.totem .notes li { font-size: 20px; padding: 16px 20px; }
body.totem .drinks__title { font-size: 21px; }
body.totem .drinks__list li { font-size: 20px; padding: 13px 0; }
body.totem .drinks__list .price { font-size: 19px; }
body.totem .foot p { font-size: 16px; }

@media (min-width: 1120px) {
  body.totem .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

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

@media print {
  .topbar, .secnav, .tools, .meter, .sheet { display: none !important; }
  body { background: #fff; color: #000; }
  .card { border-color: #ccc; break-inside: avoid; }
}
