/* =========================================================
   Ay Caramba Lounge — estilos
   Arquetipo: oscuro cálido con la marca del local: verde, dorado y lila.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #0C130E;
  --bg-2: #121C15;
  --bg-3: #19271D;
  --cream: #F3EDDC;
  --cream-2: #D8D2BC;
  --cream-3: #949883;
  --accent: #D8B15A;      /* dorado del logo */
  --accent-ink: #15130A;  /* texto sobre dorado */
  --lilac: #C6A8E3;       /* lila de su horario y la flor del logo */
  --warm: #E0553A;        /* solo errores */
  --ok: #5BC17F;
  --line: rgba(243, 237, 220, .12);

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 .8em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(64px, 10vw, 120px) 0; border-top: 1px solid var(--line); }
.kicker { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--lilac); margin-bottom: 12px; }
.h2 { font: 500 clamp(32px, 5vw, 52px)/1.08 var(--f-display); letter-spacing: -.01em; margin-bottom: 24px; max-width: 18ch; }
.note { font-size: 13px; color: var(--cream-3); margin-top: 20px; }
.link-arrow { color: var(--accent); text-decoration: none; font-weight: 500; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }

.demo-strip {
  background: var(--accent); color: var(--accent-ink);
  font-size: 12px; font-weight: 600; text-align: center; padding: 6px 12px; letter-spacing: .02em;
}

/* ---------- 3. Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--f-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #E8C46E; }
.btn-ghost { border-color: rgba(243, 235, 220, .35); color: var(--cream); background: transparent; }
.btn-ghost:hover { border-color: var(--cream); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- 4. Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gutter);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(12, 19, 14, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--line); }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; font: 500 22px/1 var(--f-display); text-decoration: none; }
.logo-img { width: 40px; height: 40px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(216,177,90,.4); }
.nav-logo em, .foot-logo em, .carta-logo em { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: 26px; }
.nav-menu a { text-decoration: none; font-size: 15px; color: var(--cream-2); }
.nav-menu a:hover { color: var(--cream); }
.nav-menu .nav-cta { background: var(--accent); color: var(--accent-ink); padding: 9px 16px; border-radius: 999px; font-weight: 600; }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: grid; place-content: center; gap: 6px; width: 44px; height: 44px;
    background: none; border: 0; cursor: pointer; position: relative; z-index: 60;
  }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); transition: transform .3s var(--ease); }
  .nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav-menu {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 22px;
    background: var(--bg); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav-menu a { font: 500 30px/1.1 var(--f-display); color: var(--cream); }
  .nav-menu .nav-cta { font: 600 17px/1 var(--f-body); padding: 14px 26px; margin-top: 8px; }
  .nav-open .nav-menu { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
}

/* ---------- 5. Hero ---------- */
@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 110px);
  display: grid; align-items: center;
  margin-top: -73px; padding: 120px 0 72px;
}
.hero-photo {
  position: absolute; inset: 0;
  background: url("assets/img/plato-portada.webp") center 55% / cover no-repeat;
  opacity: .32; filter: saturate(1.05) contrast(1.05);
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,19,14,.55) 0%, rgba(12,19,14,.75) 55%, var(--bg) 100%);
}
.hero-mesh {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 40% at 25% 30%, rgba(216, 177, 90, .26), transparent 70%),
    radial-gradient(35% 35% at 78% 65%, rgba(198, 168, 227, .18), transparent 70%),
    conic-gradient(from var(--mesh-angle) at 50% 50%, rgba(216, 177, 90, .08), rgba(12, 19, 14, 0) 30%, rgba(46, 90, 58, .22) 60%, rgba(216, 177, 90, .08));
  filter: blur(70px);
  animation: mesh 22s linear infinite;
  mix-blend-mode: screen;
}
@keyframes mesh { to { --mesh-angle: 360deg; } }
.hero-grain {
  position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hero-inner { position: relative; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.hero-meta { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--cream-2); padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 19, 14, .55); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cream-3); flex: none; }
.dot.is-open { background: var(--ok); box-shadow: 0 0 0 0 rgba(91, 193, 127, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(91, 193, 127, 0); } 100% { box-shadow: 0 0 0 0 rgba(91, 193, 127, 0); } }
.hero-kicker { margin: 28px 0 8px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--lilac); }
.hero-title { font: 500 clamp(64px, 15vw, 188px)/.9 var(--f-display); letter-spacing: -.03em; }
.hero-title span { display: block; }
.hero-title em { display: block; font-style: italic; color: var(--accent); padding-left: .35em; }
.hero-sub { margin-top: 28px; font-size: clamp(17px, 2vw, 20px); color: var(--cream-2); max-width: 46ch; }
.hero-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; margin-top: 40px; }
.hero-rating { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 10px; text-decoration: none; color: var(--cream-2); font-size: 14px; }
.hero-rating strong { font: 700 28px/1 var(--f-display); color: var(--cream); }
.stars { color: var(--accent); letter-spacing: .08em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- 6. La casa ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.pillar { padding: 28px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.pillar-num { font: 500 14px/1 var(--f-display); color: var(--accent); }
.pillar h3 { font: 500 26px/1.2 var(--f-display); margin: 16px 0 10px; }
.pillar p { color: var(--cream-2); margin: 0; }

/* ---------- 7. Destacados ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dish-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.dish {
  position: relative; padding: 24px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s;
}
.dish:hover { transform: translateY(-3px); border-color: rgba(216, 177, 90, .45); }
.dish-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.dish h3 { font: 500 21px/1.2 var(--f-display); }
.dish-price { color: var(--accent); font-weight: 600; white-space: nowrap; }
.dish p { color: var(--cream-3); font-size: 14px; margin: 0; }

/* ---------- 8. Reserva ---------- */
.res-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.res-copy p { color: var(--cream-2); }
.res-facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; color: var(--cream-2); }
.res-facts li { padding-left: 22px; position: relative; }
.res-facts li::before { content: "→"; position: absolute; left: 0; color: var(--accent); }
.res-form { background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 32px); display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-size: 13px; font-weight: 500; color: var(--cream-2); }
.field label span { color: var(--cream-3); font-weight: 400; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--bg); color: var(--cream); color-scheme: dark;
  border: 1px solid rgba(243, 235, 220, .2); border-radius: 10px;
  font: 400 16px/1.4 var(--f-body); /* 16px evita el zoom en iPhone */
  transition: border-color .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field .is-invalid, .field input.is-invalid { border-color: var(--warm); }
.field-hint { font-size: 13px; color: var(--cream-3); margin: -4px 0 0; }
.field-hint.is-closed { color: var(--warm); }
.form-error { color: #FF8A73; font-size: 14px; margin: 0; min-height: 0; }
.form-error:empty { display: none; }

/* ---------- 9. Eventos ---------- */
.event-list { display: grid; gap: 14px; margin-top: 12px; }
.event {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  padding: 22px 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
}
.event-date { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line); }
.event-day { font: 700 30px/1 var(--f-display); color: var(--accent); }
.event-month { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--cream-2); }
.event-when { font-size: 13px; color: var(--cream-3); margin: 0 0 4px; text-transform: capitalize; }
.event h3 { font: 500 23px/1.2 var(--f-display); margin-bottom: 4px; }
.event-body p:last-child { margin: 0; color: var(--cream-2); }
.event-side { text-align: right; display: grid; gap: 4px; justify-items: end; }
.event-price { font: 700 26px/1 var(--f-display); margin: 0; }
.event-inc { font-size: 13px; color: var(--cream-3); margin: 0 0 6px; }
.empty { color: var(--cream-2); }

/* ---------- 10. Horario + mapa ---------- */
.hor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 64px); align-items: start; }
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours th, .hours td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; color: var(--cream-2); font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { color: var(--accent); font-weight: 600; }
.hours tr.is-today th::after { content: " · hoy"; font-weight: 400; font-size: 13px; }
.addr { font-style: normal; margin-top: 28px; color: var(--cream-2); line-height: 1.7; }
.addr a { color: var(--accent); }
.services { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.services li { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--cream-2); }
.map { display: grid; gap: 12px; }
.map iframe { width: 100%; aspect-ratio: 4 / 3.4; border: 0; border-radius: var(--radius); filter: grayscale(.4) contrast(1.05); background: var(--bg-2); }

/* ---------- 11. Reseñas ---------- */
.rev-box { text-align: center; display: grid; justify-items: center; }
.rev-box .h2 { max-width: none; display: flex; align-items: baseline; gap: 16px; }
.rev-score { font: 700 clamp(72px, 12vw, 128px)/1 var(--f-display); color: var(--cream); }
.rev-box .stars { font-size: clamp(22px, 3vw, 32px); }
.rev-box > p { color: var(--cream-2); font-size: 17px; }
.rev-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 12px; }

/* ---------- 12. Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 56px 0 96px; color: var(--cream-2); font-size: 14px; }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-logo { font: 500 26px/1 var(--f-display); color: var(--cream); margin-bottom: 14px; }
.foot-links { display: flex; gap: 20px; }
.foot-links a, .footer a { text-decoration: none; }
.foot-links a:hover, .footer a:hover { color: var(--accent); }
.foot-credit { margin-top: 36px; color: var(--cream-3); font-size: 13px; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- 13. Revelado al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 13b. Galería e Instagram ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 12px; background: var(--bg-2); aspect-ratio: 1; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .5s; }
.gallery figure:hover img { transform: scale(1.06); filter: saturate(1.15); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px;
  font-size: 13px; font-weight: 500; color: var(--cream);
  background: linear-gradient(transparent, rgba(12,19,14,.85));
}
.ig-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); text-decoration: none; font-weight: 500; }
.ig-link:hover { text-decoration: underline; }
.ig-link svg { width: 18px; height: 18px; fill: currentColor; }
.ev-intro { color: var(--cream-2); max-width: 60ch; margin-bottom: 24px; }
.celebra { margin-top: 18px; padding: 22px 24px; border-radius: var(--radius); border: 1px dashed rgba(198,168,227,.45); color: var(--cream-2); }
.celebra strong { color: var(--lilac); font-weight: 600; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  /* Destacados en carrusel horizontal: menos scroll en móvil. */
  .dish-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 16px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter);
  }
  .dish-grid::-webkit-scrollbar { display: none; }
  .dish { scroll-snap-align: start; }
}

/* ---------- 14. Página de la carta (la que abre el QR) ---------- */
.page-carta { background: var(--bg); }
.carta-head {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px;
  padding: 12px var(--gutter); background: rgba(12, 19, 14, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.carta-back { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); text-decoration: none; font-size: 18px; }
.carta-logo { font: 500 22px/1.1 var(--f-display); margin: 0; display: flex; align-items: center; gap: 8px; }
.carta-logo .logo-img { width: 30px; height: 30px; }
.carta-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--cream-3); margin: 2px 0 0; }
.carta-wa { background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 999px; }

.cat-nav {
  position: sticky; top: 68px; z-index: 29;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 10px var(--gutter) 12px; background: rgba(12, 19, 14, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  flex: none; text-decoration: none; font-size: 14px; color: var(--cream-2);
  padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); transition: background .2s, color .2s;
}
.cat-nav a.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }

.carta-main { max-width: 720px; margin: 0 auto; padding: 8px var(--gutter) 24px; }
.cat { padding-top: 32px; scroll-margin-top: 130px; }
.cat-title { font: 500 32px/1.1 var(--f-display); margin-bottom: 8px; color: var(--accent); }
.item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.item-line { display: flex; align-items: baseline; gap: 10px; }
.item h3 { font: 500 19px/1.3 var(--f-display); }
.item-dots { flex: 1; border-bottom: 1px dotted rgba(243, 235, 220, .3); transform: translateY(-4px); min-width: 20px; }
.item-price { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item p { margin: 4px 0 0; font-size: 14px; color: var(--cream-3); }
.carta-foot { max-width: 720px; margin: 0 auto; padding: 24px var(--gutter) 56px; font-size: 13px; color: var(--cream-3); }
.carta-foot a { color: var(--accent); }

/* ---------- 15. Responsive ---------- */
@media (max-width: 900px) {
  .res-grid, .hor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; }
  .hero { margin-top: -73px; padding-top: 110px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .event { grid-template-columns: auto 1fr; gap: 16px; padding: 18px; }
  .event-side { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; align-items: center; text-align: left; justify-items: start; gap: 12px; }
  .event-inc { margin: 0; }
  .event-side .btn { justify-self: end; }
}
@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
  .event-side { grid-template-columns: 1fr auto; }
  .event-inc { grid-column: 1; grid-row: 2; }
  .event-side .btn { grid-row: 1 / span 2; grid-column: 2; }
}

/* Solo se apagan los efectos intrusivos. */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation: none; }
  .dot.is-open { animation: none; }
}
