/* Bar Biosca — hoja de estilos común a todas las páginas.
   Si cambias este archivo, sube el ?v= del <link> en todos los HTML (caché de Safari). */

@font-face { font-family: "Marcellus"; src: url("fonts/marcellus-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

@view-transition { navigation: auto; }

:root {
  --bg: #f6f1ea;
  --surface: #fffdf9;
  --sand: #c9bdb1;
  --sand-2: #ece3d8;
  --ink: #293133;
  --muted: #6d6660;
  --line: #e3d9cd;
  --veg: #00a651;
  --radius: 18px;
  --gutter: 16px;
  --max: 1120px;
  --header-h: 64px;
  --serif: "Marcellus", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 64px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--sans); overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; letter-spacing: .02em; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.eyebrow { font: 500 .75rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.section { padding-block: clamp(48px, 9vw, 96px); }
.section--sand { background: var(--sand-2); }
.lead { font-size: clamp(1.1rem, 2.6vw, 1.35rem); line-height: 1.55; }
.center { text-align: center; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.4em; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font: 500 .95rem/1 var(--sans); text-decoration: none;
  transition: transform .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--reservar {
  flex-basis: 100%; min-height: 60px; background: #e0a43a; border-color: #e0a43a; color: var(--ink);
  font-size: 1.15rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 8px 24px rgba(224,164,58,.45);
}
.btn--reservar:hover { background: #eab04a; }
.btn--reservar svg { width: 22px; height: 22px; }
@media (min-width: 700px) { .btn--reservar { flex-basis: auto; padding-inline: 2em; } }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo img { width: 150px; }
.nav-desktop { display: none; }
.nav-desktop ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-desktop a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: .82rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { background: var(--sand-2); }
.menu-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.menu-btn svg { width: 26px; height: 26px; }

/* Menú móvil (popover: va en la capa superior, no le afecta el blur de la cabecera) */
.nav-mobile {
  inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  opacity: 0; transition: opacity .25s, display .25s allow-discrete, overlay .25s allow-discrete;
}
.nav-mobile:popover-open { opacity: 1; }
@starting-style { .nav-mobile:popover-open { opacity: 0; } }
.nav-mobile .top { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; padding-inline: var(--gutter); border-bottom: 1px solid var(--line); }
.nav-mobile ul { list-style: none; margin: 0; padding: 24px var(--gutter); }
.nav-mobile li + li { border-top: 1px solid var(--line); }
.nav-mobile ul a { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px; font: 400 1.7rem/1.1 var(--serif); text-decoration: none; letter-spacing: .04em; }
.nav-mobile ul a::after { content: "→"; font: 400 1.1rem var(--sans); color: var(--muted); }
.nav-mobile .contact { padding: 8px var(--gutter) 32px; display: grid; gap: 12px; }

/* Hero */
.hero { position: relative; min-height: calc(100svh - var(--header-h) - 64px - env(safe-area-inset-bottom)); display: grid; align-items: end; color: #fff; isolation: isolate; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,24,25,0) 30%, rgba(20,24,25,.72) 100%); }
.hero .wrap { padding-block: 40px 48px; }
.hero h1 { font-size: clamp(2.6rem, 11vw, 5.5rem); letter-spacing: .06em; margin-bottom: .2em; }
.hero p { font-size: clamp(1rem, 2.6vw, 1.2rem); max-width: 34ch; opacity: .95; }

.page-hero { position: relative; color: #fff; isolation: isolate; min-height: 34vh; display: grid; align-items: end; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20,24,25,.1), rgba(20,24,25,.65)); }
.page-hero .wrap { padding-block: 32px; }
.page-hero h1 { font-size: clamp(2.4rem, 9vw, 4.5rem); letter-spacing: .06em; margin: 0; }

/* Chip de abierto/cerrado */
.estado { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; }
.estado::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.estado[data-abierto="1"]::before { background: #2fb36b; box-shadow: 0 0 0 4px rgba(47,179,107,.2); }
.estado[data-abierto="0"]::before { background: #c4553a; }
.estado:empty { display: none; }
.hero .estado { background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }

/* Tarjetas y rejillas */
.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1.5rem; }
.card--link { text-decoration: none; display: flex; flex-direction: column; gap: 4px; transition: transform .2s, box-shadow .2s; }
.card--link:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(41,49,51,.45); }
.card--link .arrow { margin-top: auto; padding-top: 12px; font-size: .9rem; font-weight: 500; }

.photo { border-radius: var(--radius); overflow: hidden; background: var(--sand-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* Carrusel horizontal (móvil) que pasa a rejilla en escritorio */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; aspect-ratio: 4 / 5; }
/* tarjetas: carrusel en móvil, rejilla en escritorio */
.rail--cards { grid-auto-columns: 80%; }
.rail--cards > * { aspect-ratio: auto; }
@media (min-width: 700px) { .rail { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } }

.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split--rev > :first-child { order: 2; } }
.split .photo { aspect-ratio: 4 / 5; }

.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.info-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; }
.info-list svg { width: 22px; height: 22px; margin-top: 2px; }
.horario { width: 100%; border-collapse: collapse; }
.horario td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.horario td + td { text-align: right; font-variant-numeric: tabular-nums; }
.horario tr.hoy td { font-weight: 600; }

/* Pie */
.site-footer { background: var(--ink); color: #e9e4de; padding-block: 56px 32px; }
.site-footer a { color: #fff; }
.site-footer .cols { display: grid; gap: 32px; }
@media (min-width: 800px) { .site-footer .cols { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer h2 { font-size: 1.1rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.site-footer .logo-f { width: 120px; filter: invert(1) brightness(1.6); opacity: .9; margin-bottom: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .tel { font: 400 1.6rem/1.2 var(--serif); text-decoration: none; letter-spacing: .04em; }
.social { display: flex; gap: 10px; }
.social a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center; }
.social svg { width: 20px; height: 20px; }
.site-footer .bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .85rem; color: #b9b2ab; }
.site-footer .bottom a { color: #b9b2ab; }

/* Barra de acciones fija (solo móvil) */
.action-bar {
  position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px -16px rgba(41,49,51,.4);
}
.action-bar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; text-decoration: none; font-size: .72rem; font-weight: 500; letter-spacing: .04em; }
.action-bar svg { width: 22px; height: 22px; }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }

@media (min-width: 900px) {
  .nav-desktop { display: block; }
  .menu-btn, .action-bar { display: none; }
  body { padding-bottom: 0; }
  .hero { min-height: calc(100svh - var(--header-h)); }
  .logo img { width: 170px; }
}

/* Texto legal y páginas de texto */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose a { word-break: break-word; }

/* ---------- Carta ---------- */
.carta-nav {
  position: sticky; top: var(--header-h); z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line);
}
.carta-nav ul { list-style: none; margin: 0; padding: 10px var(--gutter); display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.carta-nav ul::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .carta-nav ul { justify-content: center; } }
.carta-nav a {
  display: block; white-space: nowrap; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; font-size: .88rem; font-weight: 500; scroll-snap-align: start;
}
.carta-nav a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.carta { padding-block: 24px 64px; }
.carta-seccion { padding-top: 32px; }
.carta-seccion > h2 { font-size: clamp(2rem, 7vw, 3rem); text-align: center; margin-bottom: 8px; letter-spacing: .08em; }
.carta-seccion > .eyebrow { text-align: center; }
.carta-cols { display: grid; gap: 20px; }
@media (min-width: 900px) { .carta-cols { grid-template-columns: 1fr 1fr; align-items: start; } }

.grupo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 8px; }
.grupo-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.grupo-cab h3 { font-size: 1.55rem; margin: 0; letter-spacing: .06em; }
.grupo-cab .en { display: block; font: 500 .72rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.grupo-cab img { width: 52px; height: 52px; object-fit: contain; opacity: .55; flex: none; }
.horas { font-size: .82rem; color: var(--muted); margin: 6px 0 4px; }
.horas strong { color: var(--ink); font-weight: 600; }
.cols-precio { display: flex; justify-content: flex-end; gap: 0; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cols-precio span { width: 64px; text-align: right; }

.platos { list-style: none; margin: 0; padding: 0; }
.plato { padding: 14px 0; border-top: 1px solid var(--line); }
.plato:first-child { border-top: 0; }
.plato-cab { display: flex; align-items: baseline; gap: 12px; }
.plato h4 { font: 600 .98rem/1.35 var(--sans); letter-spacing: 0; margin: 0; flex: 1; }
.plato .precio { display: flex; gap: 0; margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plato .precio span { width: 64px; text-align: right; }
.plato .precio .copa { color: var(--muted); font-weight: 500; }
.plato .desc { margin: 2px 0 0; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.v { color: var(--veg); font-weight: 400; margin-left: 2px; }
.alergenos { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.alergenos img { width: 20px; height: 20px; opacity: .7; }

.nota { font-size: .82rem; color: var(--muted); border-left: 2px solid var(--sand); padding-left: 12px; margin: 16px 0; }
.nota p { margin: 0 0 4px; }
.lista-extras { margin: 4px 0 16px; font-size: .92rem; }
.lista-extras .desc { color: var(--muted); font-size: .85rem; }
.nombres { columns: 2; gap: 16px; list-style: none; padding: 8px 0 12px; margin: 0; font-size: .95rem; }
.nombres li { padding: 6px 0; border-top: 1px solid var(--line); break-inside: avoid; }

.destacado { background: var(--ink); color: #f3eee8; border-color: var(--ink); }
.destacado .grupo-cab .en, .destacado .desc, .destacado .horas { color: #c9c1b8; }
.destacado .horas strong { color: #fff; }
.destacado h3 { color: #fff; }
.oferta { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.15); }
.oferta:first-of-type { border-top: 0; }
.oferta .plato-cab h4 { font: 400 1.25rem/1.2 var(--serif); letter-spacing: .04em; }
.oferta .precio { font: 400 1.25rem/1.2 var(--serif); }
.oferta .plato-cab h4 { flex: 1; margin: 0; }
.oferta p { margin: 2px 0 0; }

.menu-grupo h4 { font: 600 .75rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.menu-grupo ul { list-style: none; margin: 0; padding: 0; }
.menu-grupo li { padding: 4px 0; }
.menu-grupo .pvp { font: 400 1.6rem/1 var(--serif); margin: 18px 0 14px; }

.leyenda { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 16px; list-style: none; padding: 8px 0 16px; margin: 0; font-size: .88rem; }
.leyenda li { display: flex; align-items: center; gap: 8px; }
.leyenda img { width: 22px; height: 22px; opacity: .75; }
.leyenda span { color: var(--muted); }
details.alergenos-info { margin-top: 24px; }
details.alergenos-info summary { cursor: pointer; font-weight: 600; padding: 12px 0; }

/* Carta en móvil: texto un 40% más grande */
@media (max-width: 699px) {
  .carta { font-size: 1.4rem; }
  .carta .eyebrow { font-size: 1.05rem; }
  .carta-seccion > h2 { font-size: 2.8rem; }
  .grupo-cab h3 { font-size: 2.17rem; }
  .grupo-cab .en { font-size: 1rem; }
  .horas, .nota { font-size: 1.15rem; }
  .cols-precio { font-size: 1rem; }
  .cols-precio span, .plato .precio span { width: 92px; }
  .plato-cab { flex-wrap: wrap; column-gap: 12px; row-gap: 2px; }
  .plato h4 { flex: 1 1 8em; }
  .plato .precio { margin-left: auto; }
  .plato h4 { font-size: 1.37rem; }
  .plato .desc, .leyenda { font-size: 1.23rem; }
  .leyenda { grid-template-columns: 1fr; }
  .alergenos img { width: 28px; height: 28px; }
  .lista-extras { font-size: 1.29rem; }
  .lista-extras .desc { font-size: 1.19rem; }
  .nombres { font-size: 1.33rem; }
  .oferta .plato-cab h4, .oferta .precio { font-size: 1.75rem; }
  .menu-grupo h4 { font-size: 1.05rem; }
  .menu-grupo .pvp { font-size: 2.24rem; }
}

/* ---------- Formulario de reservas (assets/reservas.js) ---------- */
.reserva { max-width: 640px; margin-inline: auto; }
.reserva [hidden] { display: none !important; }
.reserva fieldset { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.reserva legend { font-weight: 600; margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; scroll-snap-type: x proximity; }
.chips--scroll::-webkit-scrollbar { display: none; }
.chip {
  min-width: 48px; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); color: var(--ink); font: 500 1rem/1.2 var(--sans); font-variant-numeric: tabular-nums; cursor: pointer;
}
.chips--scroll .chip { display: grid; justify-items: center; gap: 2px; flex: none; min-width: 64px; scroll-snap-align: start; }
.chip small { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.chip b { font-size: 1.3rem; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] small { color: #d6cfc7; }
.chip:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.ayuda { color: var(--muted); font-size: .92rem; margin: 8px 0 0; }
.reserva .datos { display: grid; gap: 12px; }
.reserva label { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.reserva input { min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: 400 1rem var(--sans); color: var(--ink); }
.reserva .trampa { position: absolute; left: -9999px; }
.reserva-error { color: #b54a3c; font-weight: 600; }
.reserva .btn { width: 100%; justify-content: center; }
.reserva-ok h3 { font-size: 2rem; }

/* ---------- Galería ---------- */
.galeria { columns: 2 160px; column-gap: 10px; }
.galeria button { display: block; width: 100%; margin: 0 0 10px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--sand-2); cursor: zoom-in; break-inside: avoid; }
.galeria img { width: 100%; height: auto; transition: transform .4s; }
.galeria button:hover img { transform: scale(1.03); }
@media (min-width: 900px) { .galeria { columns: 4; } }

.visor { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(15,17,18,.96); color: #fff; }
.visor::backdrop { background: rgba(15,17,18,.9); }
.visor[open] { display: grid; place-items: center; }
.visor img { max-width: 100vw; max-height: 86dvh; object-fit: contain; }
.visor button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1.4rem; cursor: pointer; }
.visor .cerrar { top: 14px; right: 14px; }
.visor .ant { left: 10px; top: 50%; translate: 0 -50%; }
.visor .sig { right: 10px; top: 50%; translate: 0 -50%; }

/* Mapa */
.mapa { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--sand-2); }
@media (min-width: 900px) { .mapa { aspect-ratio: 16 / 9; } }

/* Aparición al hacer scroll (solo navegadores que lo soportan; sin JS) */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes reveal { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
