/* Bar Juani · demo de propuesta
   Paleta "chalk-tomato" (blanco cálido de pared encalada y rojo tomate) y pareja
   tipográfica Besley / Albert Sans, repartidas con taste-skill para un bar restaurante.
   Página de tipo "place": fotos cuadradas, fondos planos, una sola banda de color (el cierre). */

:root {
  --bg: #f8f5ef;
  --surface: #ede7dc;
  --ink: #1f1b18;
  --muted: #645c54;
  --accent: #b8381f;
  --accent-ink: #ffffff;
  --line: rgba(31, 27, 24, 0.16);
  --font-display: "Besley", Georgia, "Times New Roman", serif;
  --font-text: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav: 60px;
  --gut: 20px;
  --padt: 84px;
  --padb: 48px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (min-width: 640px) { :root { --gut: 40px; } }
@media (min-width: 1024px) { :root { --nav: 72px; --gut: 56px; --padt: 120px; --padb: 72px; } }
@media (min-width: 1320px) { :root { --gut: 120px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.625 var(--font-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }

.wrap { width: min(100% - 2 * var(--gut), 1200px); margin-inline: auto; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.close :focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute; left: var(--gut); top: 8px; z-index: 30;
  padding: 10px 14px; background: var(--ink); color: var(--bg);
  text-decoration: none; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Tipografía ---------- */
h1, h2, h3, .statement, .address-xl, .nav__logo {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(32px, 2.2vw + 23px, 54px); line-height: 1.1; text-wrap: balance; }
h2 { font-size: clamp(28px, 1.2vw + 23px, 40px); line-height: 1.15; }
h3 { font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; }
.lead { font-size: 18px; line-height: 1.55; }
@media (min-width: 1024px) { .lead { font-size: 20px; line-height: 1.5; } }

/* Enlaces de texto: el subrayado se dibuja al pasar */
.link {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.35s var(--ease);
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.link--plain { background-size: 0 1px; }
.link--plain:hover { background-size: 100% 1px; background-position: 0 100%; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: 2px;
  font: 500 16px/1 var(--font-text); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background-color 0.18s, color 0.18s, border-color 0.18s;
}
.btn svg { flex: none; transition: transform 0.25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn:hover .ico-arrow { transform: translateX(3px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: #a02f19; }
.btn--secondary { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--secondary:hover { background: var(--ink); color: var(--bg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Cabecera ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: var(--nav);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav__bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.nav__logo { font-size: 21px; line-height: 1; text-decoration: none; white-space: nowrap; padding: 12px 0; }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__call { min-height: 44px; padding: 0 16px; }
.nav__call .long { display: none; }
.nav__toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid var(--ink); border-radius: 2px; background: transparent; color: var(--ink);
  cursor: pointer;
}
.nav__toggle .x { display: none; }
.menu-open .nav__toggle .x { display: block; }
.menu-open .nav__toggle .bars { display: none; }

.nav__links {
  position: fixed; inset: var(--nav) 0 0 0; z-index: 19;
  background: var(--bg);
  padding: 8px var(--gut) 32px;
  overflow-y: auto;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0s 0.2s;
}
.menu-open .nav__links { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.nav__link {
  display: flex; align-items: center; min-height: 60px;
  border-bottom: 1px solid var(--line);
  font: 400 26px/1.2 var(--font-display); letter-spacing: -0.02em; text-decoration: none;
}
.nav__foot { margin-top: 28px; display: grid; gap: 6px; }


@media (min-width: 900px) {
  .nav__bar { display: grid; grid-template-columns: 1fr auto 1fr; }
  .nav__logo { grid-column: 2; grid-row: 1; font-size: 24px; }
  .nav__actions { grid-column: 3; grid-row: 1; justify-self: end; }
  .nav__toggle { display: none; }
  .nav__call .long { display: inline; }
  .nav__call .short { display: none; }
  .nav__links {
    position: static; grid-column: 1; grid-row: 1;
    display: flex; gap: 28px; padding: 0; overflow: visible; background: none;
    visibility: visible; opacity: 1; transform: none; transition: none;
  }
  .nav__link {
    min-height: 44px; border: 0;
    font: 500 15px/1 var(--font-text); letter-spacing: 0;
    background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 0 1px no-repeat;
    transition: background-size 0.3s var(--ease);
  }
  .nav__link:hover { background-size: 100% 1px; }
  .nav__foot { display: none; }
}

/* ---------- Secciones ---------- */
.section { padding: var(--padt) 0 var(--padb); }
@media (min-width: 1024px) and (min-height: 700px) {
  .section { min-height: 100svh; }
}
.head-row { display: grid; gap: 12px; margin-bottom: 32px; }
@media (min-width: 900px) {
  .head-row { grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; margin-bottom: 40px; }
}

/* Fotografías: esquinas rectas, sin marco; zoom suave dentro del encuadre */
.ph { overflow: hidden; background: var(--surface); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.ph:hover img, a:hover > .ph img { transform: scale(1.03); }

/* ---------- Hero ---------- */
.hero { min-height: 100svh; padding-top: var(--nav); display: flex; flex-direction: column; }
.hero__photo { flex: 1 1 auto; min-height: 230px; position: relative; overflow: hidden; display: block; background: var(--surface); }
.hero__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero__body { padding: 24px 0 28px; }
.hero__grid { display: grid; gap: 16px; }
.hero__side { display: grid; gap: 16px; justify-items: start; }
.hero .btn-row { width: 100%; }
.hero .btn-row .btn { flex: 1 1 150px; }
@media (min-width: 900px) {
  .hero__body { padding: 40px 0 56px; }
  .hero__grid { grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .hero__side { gap: 20px; }
  .hero .btn-row .btn { flex: 0 0 auto; }
}
@media (min-width: 1024px) and (min-height: 700px) {
  .hero { height: 100svh; }
}

/* Valoración: cinco estrellas con el 92 % relleno (4,6 de 5) */
.rating { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-weight: 500; text-decoration: none; min-height: 44px; }
.rating svg { flex: none; }
.rating .star-off { fill: rgba(31, 27, 24, 0.2); }
.rating .star-on { fill: var(--accent); }
.rating span span { font-weight: 400; color: var(--muted); }

/* Entrada del hero, una vez al cargar. La foto nunca arranca oculta. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__photo img { animation: settle 1.4s var(--ease) both; }
  .js .hero h1, .js .hero__side > * { animation: rise 0.7s var(--ease) both; }
  .js .hero__side > :nth-child(1) { animation-delay: 0.08s; }
  .js .hero__side > :nth-child(2) { animation-delay: 0.16s; }
  .js .hero__side > :nth-child(3) { animation-delay: 0.24s; }
}
@keyframes settle { from { transform: scale(1.05); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Visita: horario, dirección y contacto ---------- */
.address-xl {
  font-size: clamp(38px, 6vw, 84px); line-height: 1.04; letter-spacing: -0.03em;
  margin: 12px 0 32px; text-wrap: balance;
}
.address-xl a { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.5s var(--ease); }
.address-xl a:hover { background-size: 100% 2px; }
.visit { display: grid; gap: 20px; }
.visit__panel { background: var(--surface); padding: 24px 20px; display: grid; gap: 24px; align-content: start; }
.visit__photo { aspect-ratio: 4 / 3; }
.open-now { display: flex; align-items: center; gap: 10px; font-weight: 500; min-height: 24px; }
.open-now::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.open-now.is-open::before { background: #2f7d3a; }
.open-now:empty { display: none; }
.visit__cols { display: grid; gap: 24px; }
.label { font: 500 14px/1.4 var(--font-text); color: var(--muted); margin-bottom: 8px; }
.hours { display: grid; }
.hours > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours > div:first-child { padding-top: 0; }
.hours dd { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hours .is-today { font-weight: 500; }
.hours .is-today dt { position: relative; }
.hours .is-today dt::before { content: ""; position: absolute; left: -14px; top: 50%; width: 7px; height: 7px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
.contact { display: grid; gap: 4px; justify-items: start; }
.contact__tel { font: 400 28px/1.2 var(--font-display); letter-spacing: -0.02em; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

.contact .btn { margin-top: 12px; }
.facts { display: grid; }
.facts li { padding: 12px 0; border-top: 1px solid var(--line); }
@media (min-width: 640px) {
  .visit__panel { padding: 40px; }
  .visit__cols { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (min-width: 1024px) {
  .visit { grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
  .visit__photo { aspect-ratio: auto; min-height: 380px; }
}

/* ---------- Carta ---------- */
.note {
  display: inline-block; margin-bottom: 24px; padding: 0 0 8px;
  border-bottom: 1px solid var(--accent);
  color: var(--accent); font: 500 14px/1.45 var(--font-text);
}
.menu { display: grid; gap: 36px; }
.menu h3 { margin-bottom: 12px; }
.rows li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.rows strong { display: block; font-weight: 500; }
.rows span { display: block; color: var(--muted); }
.strip { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
.strip .ph { aspect-ratio: 1 / 1; }
@media (min-width: 900px) {
  .menu { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .strip { grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 32px; }
  .strip .ph { aspect-ratio: 4 / 3; }
}

/* ---------- El local ---------- */
.pair { display: grid; gap: 12px; }
.pair .ph { aspect-ratio: 4 / 3; }
@media (min-width: 720px) { .pair { grid-template-columns: 1fr 1fr; gap: 24px; } }

/* ---------- Opiniones: la frase se enciende palabra a palabra al pasar ---------- */
.statement {
  font-size: clamp(30px, 4.6vw, 66px); line-height: 1.12; letter-spacing: -0.025em;
  margin: 20px 0 40px; max-width: 22ch;
}
@media (min-width: 900px) { .statement { max-width: none; } }
.statement .w { transition: color 0.35s linear; }
.js-words .statement .w { color: rgba(31, 27, 24, 0.24); }
.js-words .statement .w.on { color: var(--ink); }
.topics { display: grid; gap: 16px; }
.topics ul { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.topics li { padding: 6px 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); }
@media (min-width: 900px) {
  .topics { grid-template-columns: 1fr auto; align-items: end; gap: 24px; }
}

/* ---------- Cierre (la banda de color) y pie ---------- */
.close { background: var(--accent); color: var(--accent-ink); padding: 72px 0; }
.close__grid { display: grid; gap: 32px; }
.close h2 { margin-bottom: 16px; }
.close .lead { max-width: 34ch; }
.close__tel { display: flex; align-items: center; min-height: 56px; margin: 12px 0 20px; font: 400 clamp(40px, 6vw, 72px)/1.05 var(--font-display); letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.close .btn--primary { background: var(--bg); color: var(--ink); }
.close .btn--primary:hover { background: #fff; }
.close__photo { aspect-ratio: 1 / 1; max-width: 420px; background: #a02f19; }
@media (min-width: 900px) {
  .close { padding: 96px 0; }
  .close__grid { grid-template-columns: 7fr 4fr; gap: 24px; align-items: center; justify-content: space-between; }
  .close__photo { justify-self: end; width: 100%; }
}

.footer { padding: 56px 0 28px; }
.footer__grid { display: grid; gap: 32px; }
.footer__name { font: 400 28px/1.1 var(--font-display); letter-spacing: -0.02em; }
.footer__name + p { margin: 8px 0; }
.footer ul li a { display: inline-flex; min-height: 44px; align-items: center; }
.footer .hours > div { padding: 8px 0; }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; font-size: 14px; color: var(--muted); }
.legal a, .legal button { color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.legal button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .footer__grid { grid-template-columns: 4fr 4fr 2fr; gap: 24px; }
  .footer__grid > :last-child { justify-self: end; }
}

/* ---------- Modo revisión: señala en la página lo que falta confirmar ---------- */
.revision [data-pc] { outline: 2px dashed var(--accent); outline-offset: 4px; }
.revision .close [data-pc] { outline-color: #fff; }
.revision-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: var(--ink); color: var(--bg);
  padding: 12px var(--gut); font-size: 14px; line-height: 1.45;
  display: none; align-items: center; justify-content: space-between; gap: 16px;
}
.revision .revision-bar { display: flex; }
.revision-bar button { flex: none; min-height: 44px; padding: 0 14px; font: 500 14px/1 var(--font-text); background: var(--bg); color: var(--ink); border: 0; border-radius: 2px; cursor: pointer; }
.revision body { padding-bottom: 72px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* En el móvil los botones de una fila ocupan todo el ancho */
@media (max-width: 639px) {
  .btn-row .btn { flex: 1 1 100%; }
}

@media (min-width: 1024px) { #carta { padding-bottom: 56px; } }

@media (min-width: 1024px) and (min-height: 700px) { #opiniones { min-height: 72svh; } }

/* Enlaces de texto con zona táctil de 44 px */
.tap { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.tap:hover { text-decoration-thickness: 2px; }

.close .btn-row { align-items: center; gap: 12px 24px; }
