/* Jocavi Restaurante v2 — hoja de estilos unica.
   Paleta: cal blanca andaluza, terracota, oliva y aceituna oscura.
   Va al reves que la v1: por defecto claro, y las bandas oscuras se piden
   con .band-dark. Sin dependencias externas, sin Google Fonts. */

:root {
  /* marca */
  --lime:       #fbf7ef;   /* cal */
  --sand:       #f3ebdc;
  --sand-2:     #e8dcc7;
  --clay:       #b24a26;   /* terracota, el color principal */
  --clay-deep:  #8c3a1d;
  --clay-soft:  #d46c40;
  --saffron:    #dfa13a;
  --olive:      #5e6b45;
  --olive-deep: #3d4630;
  --night:      #1d2620;   /* verde casi negro, para las bandas oscuras */
  --night-2:    #26312a;
  --ink:        #2a2320;

  /* banda clara (por defecto) */
  --bg: var(--lime);
  --bg-2: var(--sand);
  --panel: #fff;
  --fg: var(--ink);
  --fg-soft: #5c5049;
  --muted: #8d8078;
  --line: #e2d6c2;
  --accent: var(--clay);
  --accent-2: var(--olive);
  --on-accent: #fff;

  --max: 1180px;
  --pad: clamp(1.1rem, 4vw, 2.5rem);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 16px;
  /* botones fantasma: claros sobre fondo oscuro, terracota sobre fondo claro */
  --ghost-fg: var(--clay);
  --ghost-br: rgba(178,74,38,.4);
  --ghost-bg: rgba(178,74,38,.08);
  --shadow: 0 1px 2px rgba(42,35,32,.04), 0 14px 40px -24px rgba(42,35,32,.35);
}

/* banda oscura */
.band-dark {
  --bg: var(--night);
  --bg-2: var(--night-2);
  --panel: #2b362e;
  --fg: var(--lime);
  --fg-soft: #cbd3c6;
  --muted: #94a091;
  --line: #3a463c;
  --accent: var(--saffron);
  --accent-2: var(--clay-soft);
  --on-accent: #1d2620;
}

.hero, .band-dark, .book {
  --ghost-fg: var(--lime);
  --ghost-br: rgba(251,247,239,.5);
  --ghost-bg: rgba(251,247,239,.14);
}

/* banda arena, para romper entre dos claras */
.band-sand { --bg: var(--sand); --panel: #fff; --line: var(--sand-2); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 78px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0; background: var(--lime); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.narrow { max-width: 68ch; }

.skip {
  position: absolute; left: -9999px; z-index: 99;
  background: var(--clay); color: #fff; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--r) 0; font-weight: 600;
}
.skip:focus { left: 1rem; top: 1rem; }
:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px;
}

/* ---------------------------------------------------------------- cabecera */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,247,239,.93);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--sand-2);
}
.head-in {
  max-width: var(--max); margin: 0 auto; padding: .65rem var(--pad);
  display: flex; align-items: center; gap: 1.1rem;
}
.brand { margin-right: auto; display: flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; }
@media (max-width: 420px) { .brand img { height: 28px; } }

.nav { display: flex; gap: 1.15rem; align-items: center; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: .9rem;
  padding-bottom: 3px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav a:hover { border-bottom-color: var(--clay); }
.nav a[aria-current="page"] { border-bottom-color: var(--clay); font-weight: 600; }
.nav .btn-sm {
  background: var(--clay); color: #fff; padding: .48rem 1.05rem;
  border-radius: 999px; font-weight: 600; border-bottom: 0;
}
.nav .btn-sm:hover { background: var(--clay-deep); border-bottom-color: transparent; }

.langs { display: flex; gap: .25rem; align-items: center; }
.langs a {
  color: var(--muted); text-decoration: none; font-size: .72rem; line-height: 1;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
  padding: .3rem .45rem; border-radius: 6px; border-bottom: 0;
}
.langs a:hover { color: var(--ink); background: var(--sand); }
.langs a[aria-current="true"] { color: #fff; background: var(--clay); }

.burger {
  display: none; background: none; border: 0; color: var(--ink);
  font-size: 1.5rem; line-height: 1; cursor: pointer; padding: .2rem .4rem;
}
@media (max-width: 1080px) {
  .burger { display: block; order: 3; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--lime); border-bottom: 1px solid var(--sand-2);
    padding: .4rem var(--pad) 1.1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--sand-2); }
  .nav a[aria-current="page"] { border-bottom-color: var(--sand-2); }
  .nav .btn-sm { margin-top: .8rem; text-align: center; }
  .langs { order: 2; margin-left: auto; }
  .burger { margin-left: .2rem; }
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative; display: grid; align-items: end;
  min-height: clamp(420px, 72vh, 640px);
  padding: 5rem var(--pad) 3.4rem; overflow: hidden; color: var(--lime);
}
.hero.short { min-height: clamp(300px, 44vh, 420px); }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(29,38,32,.95) 4%, rgba(29,38,32,.78) 42%, rgba(29,38,32,.58) 100%);
}
.hero-in {
  position: relative; max-width: var(--max); margin: 0 auto; width: 100%;
  text-shadow: 0 1px 14px rgba(20,26,22,.5);
}
.hero h1 {
  font-family: var(--serif); font-weight: 400; line-height: 1.1;
  font-size: clamp(2.1rem, 6vw, 3.8rem); margin: 0 0 1rem;
  color: var(--lime); text-wrap: balance; max-width: 26ch;
}
.hero.short h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
.hero p { max-width: 54ch; margin: 0 0 1.8rem; color: #e4e9df; font-size: 1.05rem; }
.hero .kicker { color: var(--saffron); }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; }

.kicker {
  text-transform: uppercase; letter-spacing: .22em; font-size: .69rem;
  color: var(--accent); margin: 0 0 .9rem; font-weight: 600;
}

.btn {
  display: inline-block; padding: .8rem 1.65rem; border-radius: 999px;
  text-decoration: none; font-weight: 600; font-size: .94rem;
  border: 1.5px solid transparent; transition: background .16s, color .16s, border-color .16s;
}
.btn-primary { background: var(--clay); color: #fff; border-color: var(--clay); }
.btn-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.btn-ghost { color: var(--ghost-fg); border-color: var(--ghost-br); }
.btn-ghost:hover { background: var(--ghost-bg); }

/* --------------------------------------------------------------- secciones */
section { padding: clamp(3.2rem, 7.5vw, 5.6rem) 0; background: var(--bg); color: var(--fg); }
h2 {
  font-family: var(--serif); font-weight: 400; line-height: 1.18;
  font-size: clamp(1.7rem, 3.6vw, 2.5rem); margin: 0 0 1.1rem;
  color: var(--fg); text-wrap: balance;
}
h3 { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; margin: 0 0 .6rem; color: var(--fg); }
p { color: var(--fg-soft); }
section p { max-width: 66ch; }

.two-col { display: grid; gap: clamp(2rem, 5vw, 3.6rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.two-col.flip > :first-child { order: 2; }
@media (max-width: 899px) { .two-col.flip > :first-child { order: 0; } }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: clamp(1.4rem, 3vw, 2.1rem);
  box-shadow: var(--shadow);
}
.band-dark .card { box-shadow: none; }

.rule { height: 2px; width: 54px; background: var(--accent); margin: 0 0 1.4rem; border: 0; }

/* listas */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ticks li { padding-left: 1.6rem; position: relative; color: var(--fg-soft); font-size: .95rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
  transform: rotate(45deg);
}
@media (min-width: 700px) { .ticks.two { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }

/* rejilla de tarjetas */
.grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; margin-top: 2.4rem; }
@media (min-width: 640px) { .grid.g2, .grid.g4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid.g4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .grid.g3 { grid-template-columns: repeat(3, 1fr); } }
.grid h3 { margin-bottom: .35rem; }

/* Cada razon es una tarjeta: foto, titulo y texto juntos, para que se vea
   que la foto es de eso y no de la de al lado. */
.reasons .reason .shot { margin-bottom: 1rem; }
.reasons h3 { min-height: 2.6em; align-content: end; }
@media (max-width: 639px) { .reasons h3 { min-height: 0; } }
.grid p { font-size: .93rem; margin: 0; }

/* mitades dia / noche */
.halves { display: grid; gap: 1.6rem; grid-template-columns: 1fr; margin-top: 2.6rem; }
@media (min-width: 860px) { .halves { grid-template-columns: 1fr 1fr; } }
.half {
  border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  background: var(--panel); display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.half .shot { border-radius: 0; aspect-ratio: 16/10; }
.half-body { padding: clamp(1.3rem, 3vw, 1.9rem); flex: 1; display: flex; flex-direction: column; }
.half-body .kicker { color: var(--accent-2); }
.half-body p { flex: 1; font-size: .95rem; }
.half-body a { font-weight: 600; text-decoration: none; font-size: .9rem; }
.half-body a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------- fotos */
.shot { border-radius: var(--r); overflow: hidden; background: var(--bg-2); position: relative; }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot-tall { aspect-ratio: 4/5; }
.shot-wide { aspect-ratio: 3/2; }
.shot-sq  { aspect-ratio: 1; }
figure.shot { margin: 0; }
figure.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.6rem .9rem .75rem;
  background: linear-gradient(to top, rgba(29,38,32,.92), transparent);
  color: var(--lime); font-size: .78rem; line-height: 1.35;
}

.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); margin-top: 1.8rem; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1050px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery .shot { aspect-ratio: 1; transition: transform .18s ease; }
.gallery .shot:hover { transform: scale(1.015); }
.gallery .shot-zoom { display: block; height: 100%; cursor: zoom-in; }
.gallery .shot-zoom picture, .gallery .shot-zoom img { height: 100%; }
/* el pie va encima de la foto: que el clic lo atraviese y llegue al enlace */
.gallery figure.shot figcaption { pointer-events: none; }
.gallery .shot-zoom:focus-visible { outline: 3px solid var(--clay); outline-offset: -3px; }

.strip { display: grid; gap: .8rem; grid-template-columns: repeat(2, 1fr); margin-top: 2.2rem; }
@media (min-width: 720px) { .strip { grid-template-columns: repeat(4, 1fr); } }
.strip .shot { aspect-ratio: 1; }

/* ------------------------------------------------------------------- carta */
.menu-nav { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 2.6rem; }
.menu-nav a {
  font-size: .8rem; text-decoration: none; color: var(--fg-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: .34rem .9rem;
  background: var(--panel);
}
.menu-nav a:hover { border-color: var(--accent); color: var(--accent); }

.course { margin: 0 0 2.8rem; scroll-margin-top: 96px; }
.course-head { border-bottom: 2px solid var(--accent); padding-bottom: .45rem; }
.course-head h3 { margin: 0; font-size: 1.55rem; }
.course-note { color: var(--muted); font-size: .82rem; margin: .5rem 0 1.2rem; }

.dishes { list-style: none; margin: 0; padding: 0; }
.dish {
  display: flex; align-items: baseline; gap: 1rem;
  padding: .6rem 0; border-bottom: 1px dotted var(--line);
}
.dish:last-child { border-bottom: 0; }
.dish .name { margin: 0; font-size: .97rem; color: var(--fg); flex: 1; max-width: none; }
.dish .price {
  font-variant-numeric: tabular-nums; color: var(--accent);
  font-weight: 600; font-size: .93rem; white-space: nowrap;
}
.dish .price.dual { display: flex; gap: .85rem; }
.dish .price .tag {
  font-size: .61rem; color: var(--muted); margin-right: .22rem;
  text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
}
.menu-foot { color: var(--muted); font-size: .82rem; margin-top: 2rem; }

/* --------------------------------------------------------------- horarios */
.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .55rem 0; border-bottom: 1px solid var(--line);
}
.hours li:last-child { border-bottom: 0; }
.hours .day { color: var(--fg-soft); }
.hours .time { font-variant-numeric: tabular-nums; color: var(--fg); text-align: right; }
.hours li.closed .day, .hours li.closed .time { color: var(--muted); }
.hours li.closed .time { font-style: italic; }

/* ------------------------------------------------------------------- mapa */
.map-embed {
  border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  aspect-ratio: 4/3; background: var(--bg-2);
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.contact-list { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .8rem; }
.contact-list li { color: var(--fg-soft); }
.contact-list a { color: var(--fg); text-decoration: none; }
.contact-list a:hover { color: var(--accent); }
.contact-list .lbl {
  display: block; font-size: .67rem; text-transform: uppercase;
  letter-spacing: .16em; color: var(--muted); margin-bottom: .1rem;
}

/* ---------------------------------------------------------------- reserva */
.book { text-align: center; background: var(--clay); color: var(--lime); }
.book h2 { color: var(--lime); }
.book .kicker { color: #f6d9a8; }
.book p { color: #f7e6dd; margin-inline: auto; }
.book .hero-cta { margin-top: 1.7rem; justify-content: center; }
.book .btn-primary { background: var(--lime); color: var(--clay-deep); border-color: var(--lime); }
.book .btn-primary:hover { background: #fff; border-color: #fff; }
.book .btn-ghost { color: var(--lime); border-color: rgba(251,247,239,.55); }
.tel-big {
  display: inline-block; margin: 1.2rem 0 0; font-family: var(--serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem); color: var(--lime); text-decoration: none;
}
.tel-big:hover { color: #fff; }

/* ------------------------------------------------------------- migas de pan */
.crumbs { font-size: .8rem; color: var(--muted); padding: 1rem 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--clay); text-decoration: underline; }
.crumbs span { margin: 0 .4rem; }

/* --------------------------------------------------------------------- pie */
.site-foot {
  background: var(--night); color: #cbd3c6; padding: 3.4rem 0 1.6rem; font-size: .9rem;
}
.foot-grid { display: grid; gap: 2.2rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-foot h4 {
  font-family: var(--serif); font-weight: 400; font-size: 1.08rem;
  color: var(--lime); margin: 0 0 .8rem;
}
.site-foot p { margin: 0 0 .5rem; color: #cbd3c6; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .42rem; }
.site-foot ul li { display: flex; justify-content: space-between; gap: 1rem; }
.site-foot a { color: var(--lime); text-decoration: none; }
.site-foot a:hover { color: var(--saffron); }
.foot-logo { height: 32px; width: auto; margin-bottom: 1rem; }
.foot-bottom {
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between;
  align-items: center; margin-top: 2.6rem; padding-top: 1.3rem;
  border-top: 1px solid #3a463c; color: #94a091; font-size: .79rem;
}

/* ------------------------------------------------------- puerta de idiomas */
.gate .hero-in { text-align: center; }
.gate .hero-in p.kicker { max-width: none; margin-inline: auto; }
.gate .hero-bg::after {
  background: linear-gradient(to top, rgba(29,38,32,.90), rgba(29,38,32,.72));
}
.gate-logo { height: 56px; width: auto; margin: 0 auto 1.5rem; }
.gate-langs {
  list-style: none; margin: 2.2rem auto 0; padding: 0;
  display: grid; gap: .7rem; max-width: 440px; grid-template-columns: 1fr 1fr;
}
@media (max-width: 420px) { .gate-langs { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------- visor */
[hidden] { display: none !important; }

.lb {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(20,26,22,.94);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(.8rem, 3vw, 2.6rem);
}
.lb-frame {
  margin: 0; max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; gap: .8rem; align-items: center;
}
.lb-frame img {
  max-width: 100%; max-height: 78vh; width: auto; height: auto;
  border-radius: 6px; background: var(--night-2);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
}
.lb-frame figcaption {
  color: var(--lime); font-size: .85rem; text-align: center;
  display: flex; gap: .8rem; align-items: baseline; justify-content: center;
  flex-wrap: wrap; max-width: 62ch;
}
.lb-count { color: #94a091; font-variant-numeric: tabular-nums; font-size: .78rem; }

.lb-btn {
  position: absolute; z-index: 2;
  background: rgba(251,247,239,.1); color: var(--lime);
  border: 1px solid rgba(251,247,239,.28); border-radius: 999px;
  cursor: pointer; line-height: 1; padding: 0;
  width: 46px; height: 46px; font-size: 1.5rem;
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.lb-btn:hover { background: rgba(251,247,239,.22); border-color: rgba(251,247,239,.5); }
.lb-close { top: clamp(.7rem, 2vw, 1.4rem); right: clamp(.7rem, 2vw, 1.4rem); font-size: 1.7rem; }
.lb-prev  { left: clamp(.5rem, 2vw, 1.6rem);  top: 50%; transform: translateY(-50%); }
.lb-next  { right: clamp(.5rem, 2vw, 1.6rem); top: 50%; transform: translateY(-50%); }
.lb-prev, .lb-next { font-size: 2rem; padding-bottom: .18em; }

@media (max-width: 560px) {
  .lb-frame img { max-height: 66vh; }
  .lb-prev { left: .5rem; }
  .lb-next { right: .5rem; }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
}
