/* Embrujo Music Bar · estilos compartidos (carta, páginas legales y 404)
   Crema claro, tinta oscura y marrón "hoja". Fuentes alojadas en el propio dominio (sin Google Fonts). */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/figtree.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: italic;
  font-weight: 500 600;
  font-display: swap;
  src: url("../fonts/figtree-italic.woff2") format("woff2");
}

:root {
  --bg: #fbf7ec;
  --surface: #f2ecdb;
  --field: #fffdf7;
  --line: #ddd3b9;
  --fg: #1f2119;
  --muted: #62645a;
  --leaf: #924f1f;
  --leaf-dark: #7a4119;
  --leaf-soft: #f6e4cd;
  --ok: #2f6b3a;
  --ok-soft: #e3efdc;
  --err: #a1261b;
  --err-soft: #f8e1dc;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-behavior: smooth; scroll-padding-top: env(safe-area-inset-top, 0px); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg) url("../img/fondo.png") 0 0 / min(300px, 76vw) auto repeat;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 56px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 10;
}
img { max-width: 100%; }
[hidden]:not([hidden=until-found i]) { display: none !important; }
.wrap { max-width: 780px; margin-inline: auto; }

a, button { font: inherit; }
a { color: var(--leaf); }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Cabecera */
.top { position: relative; overflow: hidden; padding: 34px 0 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.logo { margin: 0; width: min(210px, 56%); }
.logo img { display: block; width: 100%; height: auto; }
.frond { position: absolute; width: min(280px, 64%); color: var(--leaf); opacity: .16; pointer-events: none; }
.top .frond { top: -20px; right: -26px; }
.top > *:not(.frond) { position: relative; }
.tagline { margin: 4px auto 0; max-width: 42ch; color: var(--muted); font-size: 1.04rem; }
.cover { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; object-position: 50% 32%; border-radius: 6px; background: var(--surface); }

/* Botones */
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.btn {
  box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 22px;
  border: 0; border-radius: 999px;
  background: var(--leaf); color: var(--bg);
  font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease;
}
.btn:hover { background: var(--leaf-dark); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.ghost { background: transparent; color: var(--leaf); box-shadow: inset 0 0 0 1.5px var(--leaf); }
.btn.ghost:hover { background: var(--leaf-soft); }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Barra de secciones */
.navslot { margin-top: 18px; min-height: 55px; }
.nav { position: relative; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav.fix { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; }
.nav.fix .chips { max-width: 780px; margin: 0 auto; padding-inline: 16px; }
.chips { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; padding: 6px 14px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap; }
.chips a.on { background: var(--leaf); color: var(--bg); }
.chips .sep { flex: none; width: 1px; height: 16px; margin: 0 6px; background: var(--line); }

/* Capítulos y títulos */
.chapter { margin-top: 56px; padding: 10px 14px; background: var(--leaf-soft); color: var(--leaf); border-radius: 4px; font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: .16em; text-transform: uppercase; text-align: center; }
.chapter-note { margin: 12px 0 0; color: var(--muted); font-size: .88rem; text-align: center; }
.sec { padding-top: 44px; scroll-margin-top: 62px; }
.sec-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
h2 { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 8vw, 2.5rem); line-height: 1.05; letter-spacing: -.02em; text-wrap: balance; }
h2::before, h2::after { content: ""; flex: none; width: clamp(18px, 7vw, 40px); height: 3px; border-radius: 2px; background: var(--leaf); }
.stitle { margin: 0; color: var(--leaf); font-weight: 600; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.al { color: var(--leaf); font-style: italic; font-weight: 600; white-space: nowrap; }
.note { margin: 10px auto 0; max-width: 52ch; color: var(--muted); font-size: .9rem; text-align: center; }
.tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 3px; background: var(--leaf-soft); color: var(--leaf); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; vertical-align: 2px; }

/* Platos apilados */
.dishes { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 26px 44px; }
.dname { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.14rem; line-height: 1.25; }
.dname .al { margin-left: 6px; font-family: var(--sans); font-size: .95rem; }
.ddesc { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.dprice { margin: 6px 0 0; color: var(--leaf); font-weight: 700; font-variant-numeric: tabular-nums; }
.dprice small { margin-right: 8px; color: var(--muted); font-size: .86rem; font-weight: 500; }
.dname .chili { display: inline-block; width: 1.1em; height: 1.1em; margin: -.3em 0 -.2em 6px; vertical-align: -.22em; color: var(--leaf); }
.dname .med { margin-left: 8px; color: var(--muted); font-family: var(--sans); font-size: .86rem; font-weight: 500; white-space: nowrap; }
.dishes .has-photo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%); gap: 24px; align-items: start; }
.dishes .has-photo.stack { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.dishes .has-photo.stack .dphoto { width: min(100%, 300px); }
@media (max-width: 330px) { .dishes .has-photo { grid-template-columns: minmax(0, 1fr); } }
#hamburguesas .dishes { row-gap: 64px; grid-template-columns: minmax(0, 1fr); max-width: none; }
#hamburguesas .dishes .has-photo { padding-bottom: 6px; }
.dphoto { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; background: var(--surface); }
@media (min-width: 560px) {
  .dishes .has-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 28px; }
  #hamburguesas .dishes .has-photo { grid-template-columns: minmax(0, 1fr) minmax(0, 42%); align-items: start; gap: 40px; }
}
.recs { display: flex; flex-wrap: wrap; justify-content: center; gap: 96px 72px; margin-top: 28px; }
.rec { margin: 0; width: min(100%, 300px); text-align: center; }
.rec figcaption { margin-bottom: 10px; }
.rphoto { display: block; margin-inline: auto; width: min(100%, 300px); height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 42%; border-radius: 4px; background: var(--surface); }

/* Filas compactas */
.row { display: flex; align-items: baseline; gap: 10px; }
.name { min-width: 0; font-weight: 600; }
.row .al { margin-left: 6px; font-size: .92rem; }
.lead { flex: 1; min-width: 12px; border-bottom: 1px dotted #b9ae92; transform: translateY(-4px); }
.price { color: var(--leaf); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.compact { margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); column-gap: 44px; row-gap: 12px; }
.compact .desc { margin: 1px 0 0; color: var(--muted); font-size: .86rem; }
.extra { margin: 24px 0 0; color: var(--muted); font-size: .92rem; text-align: center; }
.extra b { color: var(--leaf); }

.ing { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 26px 0 0; padding: 0; list-style: none; }
.ing li { padding: 3px 12px; border-radius: 999px; background: var(--surface); color: var(--fg); font-size: .9rem; }
.tiers { margin: 22px auto 0; max-width: 420px; display: grid; gap: 8px; }
.tiers + .dishes { margin-top: 30px; }

.sub { margin: 28px 0 0; color: var(--leaf); font-weight: 600; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.flavours { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px 40px; }
.flavours b { font-weight: 600; }
.flavours span { display: block; color: var(--muted); font-size: .88rem; }

.groups { margin-top: 28px; columns: 2 270px; column-gap: 44px; }
.group { break-inside: avoid; margin-bottom: 28px; }
.group .sub { margin: 0 0 12px; }
.group .compact { grid-template-columns: 1fr; margin: 0; row-gap: 9px; }
.group .note { margin: 10px 0 0; text-align: left; }

/* Fotos */
.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 26px 0 0; }
.strip img, .gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; background: var(--surface); }
.banner { display: block; width: 100%; height: auto; margin: 26px 0 0; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 35%; border-radius: 4px; background: var(--surface); }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 26px; }
.gallery .wide { grid-column: 1 / -1; }
.gallery .wide img { aspect-ratio: 3 / 2; }
@media (min-width: 560px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Reservas */
.reserva { margin: 28px auto 0; max-width: 560px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-grid > .full { grid-column: 1 / -1; }
.field label, .field .label { font-weight: 600; font-size: .92rem; }
.field label small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--fg);
  font: inherit;
  font-size: 16px; /* evita el zoom automático de iOS */
  -webkit-appearance: none;
  appearance: none;
}
.field input::-webkit-date-and-time-value { text-align: left; }
.field select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23924f1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.field select:disabled { color: var(--muted); background-color: var(--surface); }
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--leaf); outline-offset: 0; border-color: var(--leaf); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--err); }
.hint { margin: 0; color: var(--muted); font-size: .84rem; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--leaf); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.reserva .btn { width: 100%; }
.estado { margin: 0; padding: 12px 14px; border-radius: 8px; font-size: .95rem; }
.estado:empty { display: none; }
.estado.error { background: var(--err-soft); color: var(--err); }
.estado.info { background: var(--surface); color: var(--muted); }
.reserva-ok { margin: 28px auto 0; max-width: 560px; padding: 24px 22px; border-radius: 10px; background: var(--ok-soft); color: var(--fg); text-align: center; }
.reserva-ok:focus { outline: none; }
.reserva-ok h3 { margin: 0; color: var(--ok); font-family: var(--display); font-weight: 800; font-size: 1.5rem; }
.reserva-ok p { margin: 10px 0 0; }
.reserva-ok .btn { margin-top: 18px; }
.reserva-contacto { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.reserva-alt { margin: 4px auto 0; max-width: 46ch; color: var(--muted); font-size: .92rem; text-align: center; }
@media (max-width: 420px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

/* Contacto */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 28px 44px; margin-top: 28px; }
.info h3 { margin: 0 0 10px; color: var(--leaf); font-family: var(--sans); font-weight: 600; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; }
.info p { margin: 0; }
.info address { font-style: normal; }
.info .btn { margin-top: 14px; }
.horario { display: grid; gap: 8px; margin: 0; }
.horario .row span:last-child { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.links a { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 600; text-decoration: none; }
.links a:hover { color: var(--leaf); }
.links svg { width: 20px; height: 20px; flex: none; color: var(--leaf); }

/* Pie */
.legend-box { margin-top: 64px; padding-top: 26px; border-top: 1px solid var(--line); }
.foot-logo { margin: 116px auto 0; position: relative; z-index: 1; }
footer { position: relative; overflow: hidden; margin-top: 24px; }
footer .frond { left: -22px; bottom: -40px; transform: scaleX(-1) rotate(-12deg); opacity: .12; }
.legend-title { margin: 0; color: var(--leaf); font-weight: 600; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; }
.legend { position: relative; list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 20px; font-size: .92rem; }
.legend b { margin-right: 6px; color: var(--leaf); font-style: italic; }
.foot-note { position: relative; margin: 18px 0 0; color: var(--muted); font-size: .86rem; }
.foot-legal { position: relative; z-index: 1; margin: 22px 0 0; color: var(--muted); font-size: .84rem; text-align: center; }
.foot-legal a { color: var(--muted); }
.foot-legal a:hover { color: var(--leaf); }
.foot-pad { height: 110px; }

/* Páginas de texto (aviso legal, privacidad, 404) */
.page-top { display: flex; justify-content: center; padding: 28px 0 8px; }
.page-top .logo { width: min(130px, 40%); }
.doc { max-width: 68ch; margin: 24px auto 0; padding: 28px clamp(18px, 5vw, 40px) 36px; border-radius: 8px; background: rgba(251, 247, 236, .94); }
.doc h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 7vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; }
.doc h2 { display: block; margin: 32px 0 0; font-size: 1.2rem; letter-spacing: 0; text-align: left; }
.doc h2::before, .doc h2::after { content: none; }
.doc p, .doc ul, .doc dl { margin: 12px 0 0; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; }
.doc dt { font-weight: 600; }
.doc dd { margin: 0; overflow-wrap: anywhere; }
.doc .updated { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.doc .back { margin-top: 32px; }
@media (max-width: 420px) { .doc dl { grid-template-columns: minmax(0, 1fr); } .doc dd { margin-bottom: 8px; } }

/* ── Versión 2: datos de cabecera, presentación y preguntas frecuentes ── */
.top-info { margin: 0; color: var(--muted); font-size: .92rem; }
.top-info a, .top-info span { white-space: nowrap; }
.top-info a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.top-info a:hover { color: var(--leaf); }
.sobre { margin: 18px auto 0; max-width: 56ch; color: var(--muted); text-align: center; }
.faq { max-width: 640px; margin: 28px auto 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 2px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.08rem; line-height: 1.3; }
.faq summary::after { content: "+"; flex: none; color: var(--leaf); font-weight: 700; font-size: 1.5rem; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 2px 18px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
