/* Página que ve el cliente al escanear el QR. Lleva la imagen de la cafetería,
   no la de Cafetag: para cada local solo cambian estas variables de marca. */
:root {
  --brand: #1f4d3a;
  --brand-ink: #fff8ec;
  --accent: #f2b544;
  --bg: #fff8ec;
  --card: #ffffff;
  --ink: #16110f;
  --ink-soft: #4a403a;
  --border: 2.5px solid var(--ink);
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.05rem/1.55 var(--sans);
  /* Hueco para la barra fija del botón, también con la barra de gestos del móvil. */
  padding-bottom: calc(110px + env(safe-area-inset-bottom));
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { width: min(100% - 40px, 560px); margin-inline: auto; }
.muted { color: var(--ink-soft); margin: 0; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; letter-spacing: -.02em; margin: 0; }

.demo-banner {
  margin: 0; padding: 8px 20px;
  background: var(--ink); color: var(--bg);
  font-size: .8rem; font-weight: 600; text-align: center;
}

/* Cabecera del local */
.venue { position: relative; color: var(--brand-ink); background: var(--brand); overflow: hidden; }
.venue-photo { position: absolute; inset: 0; }
.venue-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.venue-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(31,77,58,.55), rgba(31,77,58,.92)); }
.venue-inner { position: relative; display: flex; align-items: center; gap: 14px; padding: 44px 0 28px; }
.venue-logo {
  flex: none; display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent); color: var(--brand);
  border: 2.5px solid var(--brand-ink);
}
.venue-logo svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.venue-hello { margin: 0; font-size: .95rem; opacity: .9; }
.venue-name { font-size: clamp(2rem, 9vw, 2.8rem); font-weight: 800; }
.lang {
  margin-left: auto; align-self: flex-start;
  padding: 6px 12px; border-radius: 999px;
  border: 2px solid var(--brand-ink); background: transparent; color: var(--brand-ink);
  font: 700 .85rem var(--sans); cursor: pointer;
}

/* Oferta */
.offer { padding: 28px 0 8px; }
.offer h2 { font-size: clamp(1.7rem, 7.5vw, 2.3rem); font-weight: 800; }
.offer mark { background: var(--accent); color: inherit; padding: 0 .15em; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* Bloques */
.block { margin-top: 28px; padding: 22px; background: var(--card); border: var(--border); border-radius: var(--radius); box-shadow: 5px 5px 0 var(--ink); }
.block h3 { font-size: 1.35rem; margin-bottom: 8px; }

.musts { list-style: none; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.musts li { display: grid; justify-items: center; gap: 8px; text-align: center; font-weight: 700; font-size: .95rem; line-height: 1.2; }
.must-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); border: var(--border); }
.must-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.example { margin: 18px 0 0; }
.example img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; border: var(--border); }
.example figcaption { margin-top: 6px; font-size: .85rem; color: var(--ink-soft); text-align: center; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 16px 0 0; display: grid; gap: 18px; }
.steps > li { counter-increment: step; position: relative; padding-left: 48px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: -3px;
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink);
  font: 800 1rem var(--display);
}
.steps h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }

.handles { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.handle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 999px;
  border: var(--border); background: var(--bg); color: var(--ink);
  font: 700 1rem var(--sans); cursor: pointer;
}
.handle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.handle.is-copied { background: var(--accent); }

.guide { margin-top: 8px; }
.guide summary { cursor: pointer; font-weight: 700; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.guide ol { margin: 10px 0; padding-left: 1.2em; display: grid; gap: 4px; }
.guide .muted { font-size: .9rem; }

.rules { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 6px; }
.accept { margin: 16px 0 0; font-size: .9rem; color: var(--ink-soft); }

.foot { padding: 32px 0 0; text-align: center; font-size: .85rem; color: var(--ink-soft); }

/* Botón principal siempre a mano: es lo único que el cliente tiene que pulsar. */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255,248,236,0), var(--bg) 35%);
}
.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: min(100%, 560px); margin-inline: auto;
  padding: 16px 20px; border-radius: 999px;
  border: var(--border);
  background: linear-gradient(90deg, #f58529, #dd2a7b 50%, #8134af);
  color: #fff;
  font: 700 1.1rem var(--sans);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
}
.cta:active { translate: 3px 3px; box-shadow: 0 0 0 var(--ink); }
.cta svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.toast {
  position: absolute; left: 50%; bottom: calc(100% - 4px);
  translate: -50% 8px; opacity: 0;
  width: max-content; max-width: calc(100% - 40px);
  margin: 0; padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--bg);
  font-size: .95rem; font-weight: 600; text-align: center;
  pointer-events: none;
  transition: opacity .2s, translate .2s;
}
.toast.is-on { opacity: 1; translate: -50% 0; }

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}
