/* Cantina La Potosina — public website
   Retro-historic theme, mobile-first, no build step.
*/
:root {
  --bg:        #1a120b;
  --bg-elev:   #251a10;
  --panel:     #2e2014;
  --border:    #4a3522;
  --text:      #f4e7d3;
  --muted:     #b39977;
  --accent:    #c89b51;
  --accent-strong: #e6b66a;
  --danger:    #c0392b;
  --ok:        #2e8b57;
  --tap: 44px;
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px; line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(200,155,81,0.10), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(200,155,81,0.07), transparent 50%);
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { color: #fff; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 0.88em; }
.center { text-align: center; }
.r { text-align: right; }

h1, h2, h3 { font-family: 'Playfair Display', serif; letter-spacing: 0.01em; }
h1 { font-size: clamp(1.6em, 4.6vw, 2.4em); margin: 0 0 12px; }
h2 { font-size: clamp(1.3em, 3vw, 1.8em); margin: 18px 0 10px; }
h3 { font-size: 1.15em; margin: 14px 0 8px; }

.page-title { font-family: 'Playfair Display', serif; font-weight: 700; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 22px; font: inherit; font-weight: 500;
  min-height: var(--tap); cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--accent); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent); color: #1a120b; border-color: var(--accent-strong);
  font-weight: 600;
}
.btn.primary:hover { background: var(--accent-strong); color: #1a120b; }
.link {
  display: inline-block; padding: 4px 0;
  border-bottom: 1px dashed var(--accent);
}
.link:hover { border-bottom-color: #fff; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 20px;
  background: rgba(26,18,11,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.brand-cantina { font-family: 'Playfair Display', serif; letter-spacing: 0.35em; font-size: 0.7em; color: var(--muted); }
.brand-potosina { font-family: 'UnifrakturCook', cursive; font-size: clamp(1.4em, 4vw, 1.8em); color: var(--accent-strong); }

.site-nav {
  display: flex; align-items: center; gap: 6px;
}
.site-nav a {
  color: var(--text); padding: 10px 14px; border-radius: 8px;
  font-weight: 500; font-size: 0.96em;
  min-height: var(--tap); display: inline-flex; align-items: center;
}
.site-nav a:hover { background: var(--panel); color: #fff; }
.site-nav a.active { color: var(--accent-strong); }
.lang-btn {
  background: transparent; color: var(--accent-strong);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 6px 14px; font: inherit; cursor: pointer;
  margin-left: 8px; min-height: 36px; font-weight: 600; letter-spacing: 0.1em;
}
.lang-btn:hover { background: var(--accent); color: #1a120b; }

.hamburger {
  display: none; width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 0; cursor: pointer;
}
.hamburger span { width: 20px; height: 2px; background: var(--text); border-radius: 1px; }

@media (max-width: 800px) {
  .hamburger { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; right: 12px; top: 64px;
    flex-direction: column; align-items: stretch;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
    padding: 8px; gap: 2px; min-width: 200px;
    box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  }
  .site-nav.open { display: flex; }
  .lang-btn { margin: 6px 0 0; align-self: flex-start; }
}

/* ===== Announcement strip ===== */
.announcement-strip {
  background: var(--accent); color: #1a120b;
  padding: 10px 12px; text-align: center;
  font-weight: 500; font-size: 0.95em;
  border-bottom: 1px solid var(--accent-strong);
}
.announcement-strip .container { max-width: var(--maxw); margin: 0 auto; padding: 0 12px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 86vh; min-height: 86dvh;
  display: grid; place-items: center;
  background-image:
    linear-gradient(180deg, rgba(26,18,11,0.4) 0%, rgba(26,18,11,0.92) 90%),
    url('../images/web-background.jpg');
  background-size: cover; background-position: center;
  padding: 60px 20px 80px;
  text-align: center;
}
.hero-content { max-width: 760px; }
.title-cursive { line-height: 1; margin: 0 0 20px; }
.title-cantina {
  display: block; font-family: 'Playfair Display', serif;
  font-weight: 700; letter-spacing: 0.5em; font-size: clamp(1em, 3vw, 1.4em);
  color: var(--muted);
}
.title-potosina {
  display: block; font-family: 'UnifrakturCook', cursive;
  font-size: clamp(3.2em, 12vw, 6em); color: var(--accent-strong);
  margin-top: 4px;
}
.hero-sub { font-size: clamp(1em, 2.5vw, 1.2em); margin: 0 0 8px; color: var(--text); }
.hero-since { font-style: italic; color: var(--muted); margin: 0 0 24px; letter-spacing: 0.06em; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== Strips / sections ===== */
.strip { padding: 60px 0; }
.strip.alt { background: var(--bg-elev); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 26px 22px; transition: transform .12s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card-icon { font-size: 2em; }
.card h3 { font-family: 'Playfair Display', serif; }
.card p { color: var(--muted); }

#quote blockquote {
  margin: 0; padding: 30px;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: clamp(1.05em, 2.5vw, 1.4em);
  color: var(--accent-strong);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  max-width: 820px; margin: 0 auto;
}

/* ===== Menu page ===== */
.menu-banner {
  text-align: center;
  padding: 30px 16px 0;
}
.menu-banner img {
  max-width: min(620px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,0.4));
}
.menu-toolbar {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  margin: 24px 0 12px; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  flex-wrap: wrap;
}
.switch-label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.95em; cursor: pointer; min-height: var(--tap); }
.switch-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
#menuSearch {
  background: var(--bg-elev); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; font: inherit; font-size: 16px;
  min-height: var(--tap); min-width: 200px; flex: 0 1 280px;
}
.menu-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6em; margin: 38px 0 6px; padding-bottom: 6px;
  border-bottom: 3px solid var(--accent);
}
.menu-cat { margin: 14px 0 22px; }
.menu-cat h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1em; color: var(--accent-strong); letter-spacing: 0.08em;
  text-transform: uppercase; margin: 12px 0 6px;
}
.menu-table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.menu-table th, .menu-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.menu-table th { color: var(--muted); font-weight: 600; font-family: 'Playfair Display', serif; }
.menu-table td.r, .menu-table th.r { text-align: right; }
@media (max-width: 540px) {
  .menu-table th, .menu-table td { padding: 8px 4px; font-size: 0.92em; }
}

/* No-prices public menu — chip-style list */
.menu-chip-list {
  list-style: none; padding: 0; margin: 6px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.menu-chip {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; display: inline-flex; align-items: baseline; gap: 6px;
  transition: border-color .15s, transform .08s;
}
.menu-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.mc-name { font-weight: 500; }
.mc-size { color: var(--muted); font-size: 0.85em; font-style: italic; }

/* QR-only minimal nav (carta-precios page) */
.site-nav.minimal { gap: 0; }
.site-nav.minimal a { display: none; }

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.gallery-item {
  margin: 0; position: relative; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); cursor: pointer; aspect-ratio: 1 / 1;
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
  filter: brightness(0.92);
}
.gallery-item:hover img { transform: scale(1.05); filter: brightness(1); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.78));
  color: #fff; padding: 18px 12px 10px; font-size: 0.85em;
  opacity: 0; transition: opacity .25s;
}
.gallery-item:hover figcaption { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.92);
  display: grid; place-items: center; padding: 30px 12px;
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 95vw; max-height: 86vh; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.lb-figure img { max-width: 100%; max-height: 80vh; border-radius: 6px; box-shadow: 0 12px 40px rgba(0,0,0,0.6); }
#lbCaption { color: #cebda1; text-align: center; max-width: 700px; font-style: italic; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: rgba(0,0,0,0.55); color: #fff;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 999px;
  width: 48px; height: 48px; font-size: 1.6em; cursor: pointer;
  display: grid; place-items: center;
}
.lb-close { top: 14px; right: 14px; }
.lb-prev  { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 14px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: var(--accent); color: #1a120b; border-color: var(--accent); }

.contribute summary { cursor: pointer; }
.contribute summary strong { font-family: 'Playfair Display', serif; }

/* ===== History page ===== */
.historic-photo {
  margin: 30px 0; text-align: center;
}
.historic-photo img {
  border: 6px solid var(--panel); border-radius: 6px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.55);
  filter: sepia(0.15) contrast(1.05);
  max-width: min(720px, 100%);
  margin: 0 auto;
}
.history-prose p {
  font-size: 1.05em; line-height: 1.75;
  margin: 0 0 18px;
  text-align: justify;
  text-justify: inter-word;
}
.history-prose p:first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.2em; line-height: 0.95; float: left;
  margin: 4px 10px 0 0; color: var(--accent-strong);
}
.history-prose .cheers {
  text-align: center; font-family: 'Playfair Display', serif;
  font-size: 1.4em; letter-spacing: 0.05em; color: var(--accent-strong);
  margin-top: 28px;
}
.history-prose .cheers::first-letter { all: revert; }
.history-source { margin-top: 36px; }
.history-images { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.history-images img { border-radius: 6px; border: 1px solid var(--border); }
@media (max-width: 700px) {
  .history-images { grid-template-columns: 1fr; }
  .history-prose p:first-letter { font-size: 2.6em; margin-right: 6px; }
}

/* ===== Contact page ===== */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px; margin: 30px 0;
}
.panel {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px;
}
.panel h3 { margin-top: 0; font-family: 'Playfair Display', serif; }
.hours { list-style: none; padding: 0; margin: 8px 0; }
.hours li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.hours li:last-child { border-bottom: none; }
.map-wrap { margin: 20px 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-elev); border-top: 1px solid var(--border);
  margin-top: 60px; padding: 36px 0 28px; text-align: center;
}
.site-footer .title-cursive { margin-bottom: 8px; }
.site-footer .brand-potosina { font-size: 2em; }
.site-footer .brand-cantina { font-size: 0.78em; }

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