/* dandevapp.com — DanDev
   Idea: del chat al pedido. El elemento memorable es la comanda impresa de la portada;
   todo lo demás es sobrio para inspirar confianza. */

@font-face { font-family: "Bricolage"; src: url("/fonts/bricolage.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("/fonts/hanken-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hanken"; src: url("/fonts/hanken-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/plexmono-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --page: #eef3f0;        /* fondo: papel verde muy claro */
  --surface: #ffffff;
  --ink: #0c2e2a;         /* tinta: títulos */
  --text: #1d2a27;
  --muted: #566863;
  --green: #0f766e;       /* verde DanDev */
  --green-strong: #0a5a53;
  --mint: #d3efe6;
  --line: #d6e1dc;
  --ticket: #fffdf6;      /* papel de la comanda */
  --ticket-ink: #23201a;
  --marker: #f3c643;      /* resaltador: solo en la comanda */
  --band: #0c2e2a;        /* franja de confianza */
  --band-text: #e3eeea;
  --band-muted: #9fb8b1;
  --focus: #0f766e;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0a1512; --surface: #10201c; --ink: #e8f2ee; --text: #d8e5e0; --muted: #94a9a2;
    --green: #3bd1b9; --green-strong: #6ee0cc; --mint: #123a33; --line: #21352f;
    --band: #0f2a25; --band-text: #e3eeea; --band-muted: #9fb8b1; --focus: #3bd1b9;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--page); color: var(--text); font: 17px/1.6 "Hanken", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--green); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-family: "Bricolage", "Hanken", sans-serif; color: var(--ink); font-variation-settings: "opsz" 48; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.1rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 700; margin: 0 0 22px; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.08; letter-spacing: -.025em; font-weight: 650; margin: 0 0 14px; }
h3 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -.01em; font-weight: 650; margin: 0 0 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--green); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 12px; font: 600 16px/1 "Hanken", sans-serif; text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn:hover { background: var(--mint); }
.btn.solid { background: var(--green); border-color: var(--green); color: #fff; }
.btn.solid:hover { background: var(--green-strong); border-color: var(--green-strong); }
@media (prefers-color-scheme: dark) { .btn.solid { color: #062b26; } }
.btn .ic { width: 19px; height: 19px; }

/* Barra superior */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--page) 90%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 20px/1 "Bricolage", sans-serif; letter-spacing: -.02em; }
.logo img { width: 32px; height: 32px; border-radius: 9px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.top nav a:not(.btn) { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.top nav a:not(.btn):hover { color: var(--ink); background: var(--mint); }
.top .btn { min-height: 40px; padding: 0 16px; font-size: 15px; margin-left: 8px; }
@media (max-width: 760px) { .top nav a:not(.btn) { display: none; } }

/* ===== Portada ===== */
.hero { padding: 72px 0 88px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center; }
.lead { font-size: 1.22rem; line-height: 1.55; color: var(--muted); max-width: 31em; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.assure { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.assure li { display: inline-flex; align-items: center; gap: 8px; }
.assure .ic { width: 18px; height: 18px; color: var(--green); }

/* Composición: chat → comanda */
.scene { position: relative; display: grid; max-width: 520px; width: 100%; justify-self: end; }
.chat { position: relative; width: 74%; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px 14px 16px; box-shadow: 0 30px 60px -30px rgba(12, 46, 42, .35); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 2px 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.chat-head .av { width: 34px; height: 34px; border-radius: 50%; background: var(--mint); color: var(--green); display: grid; place-items: center; font: 700 15px "Bricolage", sans-serif; }
.chat-head b { display: block; color: var(--ink); font-size: 15px; line-height: 1.2; }
.chat-head small { color: var(--muted); font-size: 12.5px; }
.bub { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; margin-bottom: 8px; }
.bub.in { background: var(--page); border-top-left-radius: 4px; }
.bub.out { background: var(--mint); color: var(--ink); margin-left: auto; border-top-right-radius: 4px; }
.bub .t { display: block; text-align: right; font-size: 11px; color: var(--muted); margin-top: 2px; }
.bub-btns { display: grid; gap: 6px; margin-top: 8px; }
.bub-btns span, .bub-btns button { display: block; text-align: center; padding: 6px; border-radius: 9px; background: var(--surface); color: var(--green); font-weight: 600; font-size: 13.5px; }

.ticket { position: relative; justify-self: end; width: 64%; margin-top: -96px; background: var(--ticket); color: var(--ticket-ink); font: 13.5px/1.55 "Plex Mono", ui-monospace, monospace; padding: 22px 22px 34px; transform: rotate(2.2deg); transform-origin: top center;
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 34px 60px -28px rgba(12, 46, 42, .45);
  -webkit-mask: radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) 0 0 / 16px 100% repeat-x;
          mask: radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) 0 0 / 16px 100% repeat-x; }
.ticket::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--green) 0 18px, transparent 18px 24px); opacity: .85; }
.ticket .tk-brand { display: flex; justify-content: space-between; font-weight: 600; letter-spacing: .02em; }
.ticket .tk-sub { display: flex; justify-content: space-between; color: #6b6558; font-size: 12.5px; }
.ticket hr { border: 0; border-top: 1.5px dashed #c9c2b1; margin: 12px 0; }
.ticket .ln { display: grid; grid-template-columns: 2ch 1fr auto; gap: 8px; }
.ticket .ln.ship { grid-template-columns: 2ch 1fr auto; color: #6b6558; }
.ticket .total { display: flex; justify-content: space-between; font-weight: 600; font-size: 16px; }
.ticket .total b { background: linear-gradient(transparent 55%, var(--marker) 55%, var(--marker) 90%, transparent 90%); padding: 0 2px; }
.ticket .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.stamp { display: inline-block; border: 2px solid #0f766e; color: #0f766e; border-radius: 6px; padding: 2px 10px; font-weight: 600; transform: rotate(-8deg); letter-spacing: .06em; }
.ticket .state { margin-top: 10px; color: #6b6558; }
.ticket .state b { color: var(--ticket-ink); }

/* La comanda "sale de la impresora" una sola vez al cargar */
@media (prefers-reduced-motion: no-preference) {
  .ticket { animation: imprimir 1.1s cubic-bezier(.2, .8, .2, 1) .35s both; }
  @keyframes imprimir {
    from { clip-path: inset(0 0 100% 0); transform: rotate(2.2deg) translateY(-14px); }
    to   { clip-path: inset(0 0 0 0);    transform: rotate(2.2deg) translateY(0); }
  }
}

/* ===== Secciones ===== */
.sec { padding: 96px 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* Captura del panel */
.browser { margin: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: 0 40px 80px -50px rgba(12, 46, 42, .5); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line); }
.browser-bar span { margin: 0 auto; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.browser-bar .ic { width: 14px; height: 14px; color: var(--green); }
.browser img { display: block; width: 100%; height: auto; }
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 36px; }
.notes p { margin: 0; color: var(--muted); }
.notes b { display: block; color: var(--ink); margin-bottom: 4px; }

/* Funciones agrupadas */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); }
.col { padding: 0 32px; border-left: 1px solid var(--line); }
.col:first-child { padding-left: 0; border-left: 0; }
.col-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.col-title .ic { width: 26px; height: 26px; color: var(--green); }
.col-title h3 { margin: 0; font-size: 1.35rem; }
.col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.col li b { display: block; color: var(--ink); }
.col li span { color: var(--muted); font-size: 16px; }

/* Rubros */
.rubros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rubro { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; }
.rubro .ic { width: 30px; height: 30px; color: var(--green); margin-bottom: 14px; }
.rubro p { margin: 0; color: var(--muted); }

/* Pasos (sí es una secuencia) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: paso; position: relative; }
.steps::before { content: ""; position: absolute; top: 21px; left: 22px; right: 22px; border-top: 2px dashed var(--line); }
.steps li { counter-increment: paso; position: relative; }
.steps li::before { content: counter(paso); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; font: 700 18px "Bricolage", sans-serif; margin-bottom: 16px; box-shadow: 0 0 0 6px var(--page); position: relative; }
@media (prefers-color-scheme: dark) { .steps li::before { color: #062b26; } }
.steps b { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }
.steps span { color: var(--muted); }

/* Franja de confianza */
.band { background: var(--band); color: var(--band-text); padding: 96px 0; }
.band h2, .band h3 { color: #fff; }
.band .sec-head p { color: var(--band-muted); }
.band a { color: #7fe3d2; }
.trust-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: start; }
.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.promises li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; }
.promises .ic { color: #7fe3d2; margin-top: 3px; }
.promises b { color: #fff; display: block; }
.promises span { color: var(--band-muted); }
.sub-h { margin: 44px 0 18px; font-size: 1.25rem; }
.ficha { background: var(--ticket); color: var(--ticket-ink); border-radius: 6px; padding: 26px 26px 22px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); position: relative; }
.ficha h3 { color: var(--ticket-ink); font-size: 1.2rem; margin-bottom: 4px; }
.ficha > p { margin: 0 0 14px; color: #6b6558; font-size: 14.5px; }
.ficha dl { margin: 0; }
.ficha dl div { display: grid; grid-template-columns: 128px 1fr; gap: 10px; padding: 9px 0; border-top: 1px dashed #d4cdbb; font-size: 15px; }
.ficha dt { color: #6b6558; }
.ficha dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ficha a { color: #0f766e; }
.ficha .docs { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; padding-top: 14px; border-top: 1.5px solid #d4cdbb; font-size: 15px; }

/* Quiénes somos */
.about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.about p { margin: 0 0 14px; color: var(--muted); font-size: 1.08rem; }
.about p b { color: var(--ink); }

/* Preguntas */
.faqs { max-width: 820px; border-top: 1px solid var(--line); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 2px; font: 600 1.12rem/1.35 "Bricolage", sans-serif; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { width: 20px; height: 20px; color: var(--green); transition: transform .2s; }
.faq[open] summary .ic { transform: rotate(45deg); }
.faq .ans { padding: 0 2px 20px; color: var(--muted); max-width: 70ch; }
.faq .ans p { margin: 0 0 10px; }
.faq .ans b { color: var(--ink); }

/* Contacto */
.contact { text-align: center; }
.contact h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.contact p { color: var(--muted); font-size: 1.1rem; margin: 0 auto 28px; max-width: 34em; }
.contact .cta { justify-content: center; }
.mail-big { font: 650 clamp(1.3rem, 3.2vw, 2rem)/1.2 "Bricolage", sans-serif; color: var(--ink); text-decoration-color: var(--green); text-decoration-thickness: 2px; overflow-wrap: anywhere; }

/* Pie */
footer.site { border-top: 1px solid var(--line); padding: 48px 0 40px; color: var(--muted); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid > div { display: flex; flex-direction: column; gap: 9px; }
.foot-grid b { color: var(--ink); }
.foot-grid p { margin: 0; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--ink); text-decoration: underline; }
.foot-grid .logo { color: var(--ink); font-size: 18px; }
.foot-grid .logo img { width: 28px; height: 28px; }
.fine { margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; max-width: 80ch; }

/* ===== Páginas legales ===== */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 20px 80px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 8px; }
.doc .muted { color: var(--muted); margin-top: 0; }
.doc h2 { font-size: 1.35rem; margin: 2.2em 0 .5em; }
.doc li { margin: .3em 0; }
.doc .box { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; padding: 16px 18px; margin: 22px 0; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero { padding: 44px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .scene { max-width: 460px; margin: 0 auto; justify-self: center; }
  .chat { width: 86%; }
  .ticket { width: 78%; margin-top: -18px; }
  .cols { grid-template-columns: 1fr; gap: 36px; }
  .col { padding: 0; border-left: 0; }
  .notes, .rubros { grid-template-columns: 1fr; gap: 18px; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .steps::before { top: 22px; bottom: 22px; left: 21px; right: auto; border-top: 0; border-left: 2px dashed var(--line); }
  .steps li { padding-left: 64px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .trust-grid, .about { grid-template-columns: 1fr; gap: 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .sec, .band { padding: 72px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .chat { width: 92%; }
  .ticket { width: 86%; }
  .foot-grid { grid-template-columns: 1fr; }
  .ficha dl div { grid-template-columns: 1fr; gap: 2px; }
  .btn { width: 100%; }
}

/* ===== Movimiento (v3) =====
   Regla: el contenido final es el estado normal; las animaciones solo se agregan si el navegador las soporta
   y la persona no pidió "reducir movimiento". Solo se animan transform y opacity (no cargan el celular). */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--green); transform-origin: 0 50%; transform: scaleX(0); }
.btn { transition: transform .18s ease, background-color .18s ease, border-color .18s ease; }
@media (hover: hover) { .btn:hover { transform: translateY(-1px); } }
.btn:active { transform: translateY(0); }
.faq summary { transition: color .15s; }
.faq summary:hover { color: var(--green); }
.faq[open] .ans { animation: abrir .25s ease-out; }
@keyframes abrir { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.browser-wrap { perspective: 1400px; }

@media (prefers-reduced-motion: no-preference) {
  /* 1) Portada: la conversación ocurre y termina impresa en la comanda (una sola secuencia al cargar) */
  .chat { animation: aparecer .6s cubic-bezier(.2,.8,.2,1) .1s both; }
  .chat .bub { animation: burbuja .45s cubic-bezier(.2,.8,.2,1) both; }
  .chat .bub.in { animation-delay: .45s; }
  .chat .bub.out { animation-delay: 1.15s; }
  .chat [data-reply] { animation-delay: 1.85s; }
  .ticket { animation-delay: 2.3s; }
  .ticket .total b { background-size: 0% 100%; background-repeat: no-repeat; background-image: linear-gradient(transparent 55%, var(--marker) 55%, var(--marker) 90%, transparent 90%); background-color: transparent; animation: resaltar .6s ease-out 3.3s forwards; }
  .stamp { animation: sello .45s cubic-bezier(.3,1.6,.5,1) 3.7s both; }
  @keyframes aparecer { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  @keyframes burbuja { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes resaltar { to { background-size: 100% 100%; } }
  @keyframes sello { from { opacity: 0; transform: rotate(-8deg) scale(1.8); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }

  /* 2) Al bajar (solo navegadores compatibles) */
  @supports (animation-timeline: view()) {
    .progress { animation: avance linear both; animation-timeline: scroll(root); }
    @keyframes avance { to { transform: scaleX(1); } }

    .browser { animation: panel-entra linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; transform-origin: 50% 100%; }
    @keyframes panel-entra { from { transform: rotateX(14deg) scale(.94) translateY(30px); } to { transform: none; } }

    .steps::before { animation: linea linear both; animation-timeline: view(); animation-range: entry 20% cover 50%; transform-origin: 0 0; }
    @keyframes subir { from { transform: translateY(24px); } to { transform: none; } }
    @keyframes linea { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    .steps li::before { animation: paso linear both; animation-timeline: view(); animation-range: entry 30% cover 40%; }
    @keyframes paso { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

    .ficha { animation: ficha linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    @keyframes ficha { from { transform: translateY(40px) rotate(2.5deg); } to { transform: rotate(-.6deg); } }

    .col { animation: subir linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
  }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 960px) {
  @supports (animation-timeline: view()) {
    .steps::before { animation-name: linea-v; }
    @keyframes linea-v { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  }
}

/* ===== Demo de la portada (v4) =====
   Sin JavaScript se ve la escena completa. Con demo.js, el visitante elige cómo paga y marca el pedido como listo. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; }
.scene { grid-template-areas: "chat" "ticket" "act"; }
.chat { grid-area: chat; }
.ticket, .demo-hint { grid-area: ticket; }
.demo-act { grid-area: act; }
.chat-head .live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 "Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.chat-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.bub.notice { display: none; }
.bub.notice small { display: flex; align-items: center; gap: 5px; font: 600 11px/1.2 "Plex Mono", monospace; letter-spacing: .04em; text-transform: uppercase; color: var(--green); margin-bottom: 4px; }
.bub.notice small .ic { width: 13px; height: 13px; }
.demo-hint { display: none; }
/* El espacio de los botones de la demo se reserva siempre: así la portada no "salta" al cargar */
.demo-act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; min-height: 44px; visibility: hidden; }
.demo-on .demo-act { visibility: visible; }
.ticket { margin-top: -18px; }
.bub-btns button { width: 100%; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; transition: transform .15s, border-color .15s, background-color .15s; }
@media (hover: hover) { .bub-btns button:not(:disabled):hover { border-color: var(--green); transform: translateY(-1px); } }
.bub-btns button[aria-pressed="true"] { background: var(--green); color: #fff; }
@media (prefers-color-scheme: dark) { .bub-btns button[aria-pressed="true"] { color: #062b26; } }
.bub-btns button:disabled { cursor: default; }
.bub-btns button:disabled:not([aria-pressed]) { opacity: .5; }
.stamp.due { border-color: #a15c07; color: #a15c07; }

.demo-on .scene[data-step="choose"] [data-reply],
.demo-on .scene[data-step="choose"] .ticket,
.demo-on .scene[data-step="typing"] .ticket { visibility: hidden; }
.demo-on .scene[data-step="ready"] .bub.notice { display: block; }
.demo-on .demo-hint { display: flex; visibility: hidden; justify-self: end; align-self: start; width: 64%; margin-top: -18px; min-height: 150px; align-items: center; justify-content: center; gap: 12px; padding: 20px; border: 2px dashed color-mix(in srgb, var(--green) 55%, var(--line)); border-radius: 14px; color: var(--muted); font-size: 15px; line-height: 1.4; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.demo-on .demo-hint b { color: var(--ink); }
.demo-on .demo-hint .ic { color: var(--green); width: 26px; height: 26px; }
.demo-on .scene[data-step="choose"] .demo-hint { visibility: visible; }
.demo-on .ticket { margin-top: -18px; }
.demo-act .btn { min-height: 44px; width: auto; padding: 0 18px; font-size: 15px; }
.demo-act .btn .ic { width: 17px; height: 17px; }
.demo-on .scene:not([data-step="ticket"]) [data-act="ready"],
.demo-on .scene:not([data-step="ready"]) [data-act="again"] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .chat-head .live::before { animation: latido 2s ease-in-out infinite; }
  @keyframes latido { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 0%, transparent); } }
  .demo-on .chat [data-reply], .demo-on .chat .bub.notice { animation: none; }
  .demo-on .scene:not([data-step="choose"]) [data-reply],
  .demo-on .scene[data-step="ready"] .bub.notice { animation: burbuja .45s cubic-bezier(.2,.8,.2,1) both; }
  .demo-on .ticket, .demo-on .ticket .stamp, .demo-on .ticket .total b { animation: none; }
  .demo-on .ticket.print { animation: imprimir 1s cubic-bezier(.2,.8,.2,1) both; }
  .demo-on .ticket.print .total b { animation: resaltar .6s ease-out .9s forwards; }
  .demo-on .ticket.print .stamp { animation: sello .45s cubic-bezier(.3,1.6,.5,1) 1.3s both; }
  .demo-on .scene[data-step="choose"] .demo-hint .ic { animation: toque 1.6s ease-in-out infinite; }
  @keyframes toque { 50% { transform: translate(-3px, -3px) scale(1.08); } }
  .demo-on .scene[data-step="ready"] .state b { animation: sello .45s cubic-bezier(.3,1.6,.5,1) both; display: inline-block; }
  .demo-act .btn { animation: aparecer .35s ease-out both; }
}
@media (prefers-reduced-motion: no-preference) {
  .demo-on .ticket .total b { background-size: 100% 100%; }
  .demo-on .ticket.print .total b { background-size: 0% 100%; }
}
@media (max-width: 960px) { .demo-on .ticket { margin-top: -18px; } .demo-on .demo-hint { width: 78%; } .demo-on .demo-act { justify-content: center; } }
@media (max-width: 520px) { .demo-on .demo-hint { width: 86%; } }

/* Pensado para aquí */
.local-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.local-list li { padding: 22px 22px 6px 0; display: flex; flex-direction: column; gap: 4px; }
.local-list li + li { padding-left: 22px; border-left: 1px solid var(--line); }
.local-list .tag { align-self: flex-start; font: 600 12.5px/1 "Plex Mono", monospace; color: var(--green-strong); background: var(--mint); border-radius: 6px; padding: 6px 8px; margin-bottom: 10px; }
.local-list b { color: var(--ink); font-size: 1.05rem; }
.local-list li > span:last-child { color: var(--muted); font-size: 15.5px; }

/* Revisión de seguridad */
.audit { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.audit-head { display: flex; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px dashed var(--line); font: 600 12px/1 "Plex Mono", monospace; letter-spacing: .08em; color: var(--muted); }
.audit ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.audit li { display: grid; grid-template-columns: 26px 1fr; align-content: start; gap: 6px 14px; padding: 22px; border-bottom: 1px solid var(--line); }
.audit li:nth-child(odd) { border-right: 1px solid var(--line); }
.audit li > .ic { color: var(--green); margin-top: 2px; }
.audit li b { display: block; color: var(--ink); margin-bottom: 2px; }
.audit li span { color: var(--muted); font-size: 15.5px; }
.audit li em { grid-column: 2; justify-self: start; align-self: start; font: 600 11.5px/1 "Plex Mono", monospace; font-style: normal; letter-spacing: .03em; color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); border-radius: 999px; padding: 5px 9px 5px 22px; margin-top: 8px; position: relative; }
.audit li em::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: currentColor; }
.audit-foot { margin: 0; padding: 18px 22px; color: var(--muted); font-size: 15px; }

/* Bitácora */
.log { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 26px; max-width: 760px; }
.log::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; border-left: 2px solid var(--line); transform-origin: 0 0; }
.log li { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 2px 18px; }
.log li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--page); border: 3px solid var(--green); }
.log li:first-child::before { background: var(--green); }
.log time { grid-row: span 2; font: 600 13px/1.6 "Plex Mono", monospace; color: var(--muted); }
.log b { color: var(--ink); }
.log span { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .log::before { animation: crecer linear both; animation-timeline: view(); animation-range: entry 10% cover 60%; }
    @keyframes crecer { from { transform: scaleY(0); } to { transform: scaleY(1); } }
    .audit li { animation: subir linear both; animation-timeline: view(); animation-range: entry 5% cover 25%; }
    .local-list li { animation: subir linear both; animation-timeline: view(); animation-range: entry 5% cover 25%; }
  }
}
@media (max-width: 960px) {
  .local-list { grid-template-columns: 1fr 1fr; }
  .local-list li:nth-child(3) { padding-left: 0; border-left: 0; }
  .audit ul { grid-template-columns: 1fr; }
  .audit li:nth-child(odd) { border-right: 0; }
}
@media (max-width: 520px) {
  .local-list { grid-template-columns: 1fr; }
  .local-list li, .local-list li + li { padding: 18px 0 4px; border-left: 0; }
  .log li { grid-template-columns: 1fr; }
  .log time { grid-row: auto; }
  .audit-head span:last-child { display: none; }
}

/* ===== Celular y tablet (v5) ===== */
html { -webkit-tap-highlight-color: color-mix(in srgb, var(--green) 18%, transparent); }
.btn, .bub-btns button, .faq summary, .menu summary { touch-action: manipulation; }
.bub .t, .chat-head .live, .bub.notice small { font-size: 12px; }
.audit li em { font-size: 12px; }
.bub-btns span, .bub-btns button { min-height: 40px; font-size: 14.5px; display: flex; align-items: center; justify-content: center; line-height: 1.2; }
.demo-hint small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.demo-on .demo-hint { align-self: stretch; }
.only-m { display: none; }

/* Menú del celular */
.menu { display: none; position: relative; }
.menu summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--line); color: var(--ink); cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--mint); border-color: var(--green); }
.menu-box { position: absolute; right: 0; top: 54px; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: 0 24px 50px -20px rgba(12, 46, 42, .45); display: grid; }
.menu-box a { display: flex; align-items: center; min-height: 46px; padding: 0 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu-box a:active, .menu-box a:hover { background: var(--mint); }
@media (prefers-reduced-motion: no-preference) { .menu[open] .menu-box { animation: abrir .18s ease-out; } }

/* Captura en un celular */
.phone { display: none; margin: 0 auto; width: min(300px, 82vw); padding: 10px; border-radius: 40px; background: var(--ink); box-shadow: 0 40px 70px -40px rgba(12, 46, 42, .6); position: relative; }
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 64px; height: 6px; margin-left: -32px; border-radius: 6px; background: color-mix(in srgb, var(--page) 30%, transparent); z-index: 1; }
.phone img { display: block; width: 100%; height: auto; border-radius: 30px; padding-top: 14px; background: var(--surface); }
@media (prefers-color-scheme: dark) { .phone { background: #1d3530; } }

@media (max-width: 760px) {
  .menu { display: block; }
  .top .wrap { gap: 8px; }
  .top nav { gap: 0; }
  .top .btn { min-height: 44px; margin-left: 0; padding: 0 14px; }
  .logo { min-height: 44px; }
}
@media (min-width: 641px) and (max-width: 960px) {
  .rubros, .notes { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .rubro { padding: 22px 18px; }
}
@media (max-width: 640px) {
  .browser-wrap { display: none; }
  .phone { display: block; }
  .only-m { display: inline; }
  .notes { margin-top: 32px; }
}
@media (max-width: 520px) {
  h1 { font-size: clamp(2.15rem, 10.5vw, 2.6rem); margin-bottom: 16px; }
  .lead { font-size: 1.08rem; margin-bottom: 24px; }
  .hero { padding: 32px 0 52px; }
  .hero .wrap { gap: 36px; }
  .assure { margin-top: 20px; gap: 6px 16px; font-size: 14.5px; }
  .sec, .band { padding: 60px 0; }
  .sec-head { margin-bottom: 30px; }
  .sec-head p { font-size: 1.02rem; }
  .bub { font-size: 14px; }
  .chat { padding: 12px 12px 14px; }
  .ticket { font-size: 13px; padding: 20px 18px 32px; }
  .demo-act .btn { width: auto; }
  .foot-grid > div { gap: 0; }
  .foot-grid a { display: flex; align-items: center; min-height: 40px; }
  .foot-grid b { margin: 10px 0 2px; }
  .mail-big { display: inline-block; padding: 10px 0; }
  .ficha .docs a, .doc a { padding: 6px 0; }
  .faq summary { padding: 18px 2px; font-size: 1.05rem; }
  .audit li { padding: 18px 16px; }
  .audit-head { padding: 12px 16px; }
  .audit-foot { padding: 16px; }
}
/* Pantallas táctiles (tablet incluida): todo lo que se toca mide al menos 44 px */
@media (pointer: coarse) {
  .top nav a:not(.btn) { min-height: 44px; align-items: center; }
  @media (min-width: 761px) { .top nav a:not(.btn) { display: inline-flex; } }
  .top .btn, .logo { min-height: 44px; }
  .bub-btns span, .bub-btns button { min-height: 44px; }
  .mail-big { display: inline-block; padding: 8px 0; }
  .foot-grid a { display: flex; align-items: center; min-height: 40px; }
  .foot-grid > div { gap: 0; }
}
