/* Demos «Asistente por WhatsApp» · identidad A «La etiqueta» (12 nov 2026).
   Papel y tinta con un solo acento terracota; esquinas redondeadas y botones en píldora. Mismos tokens que shared/css/main.css.
   El celular conserva el aspecto de una conversación de WhatsApp (es lo que se demuestra); el resto es de AnonimoDSN.
   Letras: las del sitio (shared/fonts, licencia SIL OFL 1.1). Fraunces para títulos y Figtree para el texto; mismos archivos y mismo unicode-range que shared/css/fonts.css. */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../../shared/fonts/fraunces.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('../../shared/fonts/figtree.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2192, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Papel crema, hoja y azul tinta */
  --bg: #F6EEDC; --bg-2: #F0E6CF; --surface: #FCF8EE; --surface2: #F3EAD6; --border: #DACFB6;
  --line: rgba(20,35,74,.13); --line-strong: rgba(20,35,74,.24);
  --text: #14234A; --text-2: #2E3C63; --muted: #4B587A;
  /* Acento único: terracota (5,0:1 sobre papel; el hover, 7:1) */
  --terra: #AE4322; --terra-h: #8F3518; --terra-ink: #FCF8EE;
  --terra-soft: rgba(174,67,34,.09); --terra-line: rgba(174,67,34,.40);
  --ink: #14234A; --arcilla: #E58A66;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08  0 0 0 0 .14  0 0 0 0 .29  0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --ease: cubic-bezier(.16,1,.3,1);
  --radius-sm: 10px; --radius: 16px; --radius-lg: 24px; --pill: 999px;
  --font-disp: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
/* --accent la fija motor.js con el color de cada rubro: aquí es solo el color de marca del negocio simulado (avatar del chat y punto de la portada) */
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { background: var(--bg) var(--grain); color: var(--text); font: 400 1rem/1.6 var(--font-body); min-height: 100dvh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--terra); color: var(--terra-ink); }
svg.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

/* Cabecera y pie ocupan todo el ancho; su contenido queda alineado con el de la página */
.top, footer.wrap { max-width: none; }
@media (min-width: 768px) { .top, footer.wrap { padding-inline: max(32px, calc((100% - 1336px) / 2)); } }

/* Cabecera */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.top img { height: clamp(24px, calc(7.62vw - 2px), 30px); width: auto; display: block; }
@media (min-width: 769px) { .top img { height: 36px; } }
.top nav { display: flex; gap: 8px; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 0 20px; border-radius: var(--pill); border: 1.5px solid var(--text); background: transparent; font: 700 .88rem/1 var(--font-body); color: var(--text); text-decoration: none; transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ease); }
@media (hover: hover) and (pointer: fine) { .btn-ghost:hover { background: var(--terra-soft); border-color: var(--terra); color: var(--terra); transform: translateY(-1px); } }
.btn-ghost:active { transform: scale(.98); }
@media (max-width: 479px) { .btn-ghost { padding: 0 12px; } .btn-ghost .lg { display: none; } }

.intro { display: grid; gap: 12px; padding: clamp(32px, 5vw, 56px) 0 clamp(24px, 3vw, 32px); max-width: 980px; }
.tag { font-weight: 600; font-size: .8125rem; color: var(--terra); }
h1 { font: 600 clamp(1.75rem, 1rem + 2.7vw, 3rem)/1.07 var(--font-disp); letter-spacing: -.015em; overflow-wrap: break-word; }
.intro p { color: var(--text-2); max-width: 60ch; font-size: clamp(1.02rem, .96rem + .35vw, 1.15rem); line-height: 1.65; }

/* Situaciones */
.situ { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 960px) { .situ { grid-template-columns: repeat(4, 1fr); } }
.situ button { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; text-align: left; min-height: 64px; padding: 16px; border-radius: var(--radius); border: 1.5px solid var(--line); background: var(--surface); transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .situ button:hover { border-color: var(--line-strong); transform: translateY(-2px); } }
.situ button:active { transform: scale(.98); }
.situ button[aria-pressed="true"] { border-color: var(--terra); background: var(--terra-soft); box-shadow: 0 0 0 3px var(--terra-soft); }
.situ svg.i { color: var(--terra); margin-top: 2px; }
.situ b { font-weight: 700; font-size: .9375rem; }
.situ small { grid-column: 2; color: var(--muted); font-size: .8125rem; line-height: 1.4; }
@media (max-width: 639px) { .situ small { display: none; } }
.nota { margin-top: 16px; min-height: 3em; color: var(--text-2); font-size: .9375rem; max-width: 80ch; }
.nota strong { color: var(--text); font-weight: 700; }

/* Escenario */
.stage { display: grid; gap: 24px; padding: 24px 0 56px; align-items: start; }
@media (min-width: 960px) { .stage { grid-template-columns: 372px 1fr; gap: 32px; } }

/* Celular: marco de tinta; la pantalla imita WhatsApp en claro */
.phone { --wa-wall: #ECE5DD; --wa-head: #F7F5F2; --wa-in: #FFFFFF; --wa-out: #D9FDD3; --wa-text: #111B21; --wa-sub: #54656F; --wa-time: #5A6B75; --wa-green: #007A62; --wa-send: #00A884; --wa-tick: #34B7F1; --wa-line: rgba(17,27,33,.1);
  width: min(100%, 372px); height: 680px; margin: 0 auto; padding: 10px; border-radius: 42px; background: var(--ink); box-shadow: 0 28px 56px -28px rgba(20,35,74,.55), inset 0 0 0 1px rgba(252,248,238,.16); }
@media (max-width: 639px) { .phone { height: 600px; } }
.screen { height: 100%; border-radius: 32px; overflow: hidden; background: var(--wa-wall); color: var(--wa-text); display: flex; flex-direction: column; }
.status { display: flex; justify-content: space-between; align-items: center; padding: 10px 22px 4px; font: 700 .75rem var(--font-body); font-variant-numeric: tabular-nums; color: var(--wa-text); background: var(--wa-head); }
.status span:last-child { display: flex; gap: 5px; align-items: center; }
.status i { display: block; width: 18px; height: 9px; border: 1px solid var(--wa-text); border-radius: 3px; position: relative; }
.status i::after { content: ""; position: absolute; inset: 1px 5px 1px 1px; background: var(--wa-text); border-radius: 1px; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px 10px; background: var(--wa-head); border-bottom: 1px solid var(--wa-line); }
.chat-head .back { color: var(--wa-sub); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent, var(--terra)); color: var(--ink); font: 700 .8125rem var(--font-disp); flex: none; }
.chat-head b { display: block; font-weight: 700; font-size: .9375rem; line-height: 1.2; }
.chat-head small { font-size: .75rem; color: var(--wa-sub); }
.chat { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; scroll-behavior: smooth; overscroll-behavior: contain; }
.chat .empty { margin: auto; text-align: center; color: var(--wa-sub); font-size: .875rem; max-width: 24ch; }
.chip-day, .sys { align-self: center; font-size: .75rem; color: var(--wa-sub); background: rgba(255,255,255,.88); box-shadow: 0 1px .5px rgba(11,20,26,.1); }
.chip-day { padding: 3px 10px; border-radius: var(--pill); margin: 4px 0 6px; }
.sys { text-align: center; max-width: 30ch; margin: 4px 0; padding: 4px 12px; border-radius: 12px; }
.msg { max-width: 84%; padding: 7px 10px 5px; border-radius: 12px; font-size: .9375rem; line-height: 1.4; white-space: pre-line; box-shadow: 0 1px .5px rgba(11,20,26,.13); animation: msg-in .24s var(--ease) both; }
.msg.in { align-self: flex-start; background: var(--wa-in); border-top-left-radius: 4px; transform-origin: 0 100%; }
.msg.out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 4px; transform-origin: 100% 100%; }
.msg .who { display: block; font-size: .75rem; font-weight: 700; color: var(--wa-green); margin-bottom: 2px; }
.msg .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; font: 400 .75rem var(--font-body); font-variant-numeric: tabular-nums; color: var(--wa-time); }
.ticks { width: 17px; height: 11px; fill: none; stroke: var(--wa-time); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s var(--ease); }
.ticks.read { stroke: var(--wa-tick); }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8696A0; animation: dot 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.choices { align-self: flex-start; display: grid; gap: 6px; width: 84%; animation: msg-in .24s var(--ease) both; }
.choices button { min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 0; background: var(--wa-in); color: var(--wa-green); font-weight: 700; font-size: .9375rem; box-shadow: 0 1px .5px rgba(11,20,26,.18), inset 0 0 0 1.5px rgba(0,122,98,.28); transition: background-color .2s var(--ease), transform .2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .choices button:hover { background: #EAF4F1; } }
.choices button:active { transform: scale(.98); }
.composer { display: flex; align-items: center; gap: 8px; padding: 8px 10px 14px; background: var(--wa-wall); }
.composer .field { flex: 1; min-height: 40px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--pill); background: #fff; font-size: .9375rem; color: var(--wa-sub); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.composer .field.on { color: var(--wa-text); }
.composer .send { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--wa-send); color: #fff; flex: none; }

@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

/* Panel del negocio */
.panel { container-type: inline-size; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); padding: 20px; display: grid; gap: 24px; min-width: 0; }
@media (min-width: 768px) { .panel { padding: 28px; } }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
h2 { font: 600 1.5rem/1.15 var(--font-disp); letter-spacing: -.012em; }
h3 { font: 600 1.0625rem/1.25 var(--font-disp); letter-spacing: -.01em; margin-bottom: 12px; }
.panel-head p { color: var(--muted); font-size: .875rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { background: var(--bg); padding: 14px 16px; min-width: 0; line-height: 1.35; }
.stats b { display: block; font: 600 1.875rem/1 var(--font-disp); font-variant-numeric: tabular-nums; letter-spacing: -.01em; margin-bottom: 6px; }
@container (max-width: 479px) { .stats div { padding: 12px 10px; } .stats b.clp { font-size: 1.25rem; line-height: 1.4; } }
.stats span { display: block; font-size: .8125rem; color: var(--muted); }
.stats b.bump { animation: bump .3s var(--ease); }
@keyframes bump { 30% { transform: translateY(-3px); color: var(--terra-h); } }

/* Tablero: días de la agenda, carriles de pedidos o unidades (cabañas) */
.board { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@container (min-width: 520px) { .board { grid-template-columns: repeat(3, 1fr); } }
@container (min-width: 860px) { .board { grid-template-columns: repeat(6, 1fr); } .board[data-n="3"] { grid-template-columns: repeat(3, 1fr); } .board[data-n="4"] { grid-template-columns: repeat(4, 1fr); } }
@container (max-width: 519px) { .board[data-n="3"] { grid-template-columns: 1fr; } }
.col { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; background: var(--bg); display: grid; align-content: start; gap: 6px; min-height: 120px; }
@container (max-width: 519px) { .board[data-n="3"] .col { min-height: 0; } }
.col > span { font-size: .8125rem; font-weight: 700; color: var(--text-2); }
.col > span em { font-style: normal; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.card { position: relative; padding: 6px 9px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-size: .8125rem; line-height: 1.35; }
.card time { display: block; font: 700 .75rem var(--font-body); font-variant-numeric: tabular-nums; color: var(--text-2); }
.card .sub { display: block; font: 400 .75rem var(--font-body); color: var(--muted); margin-top: 2px; }
.card.new { background: var(--terra-soft); border-color: var(--terra-line); }
.card.fresh { animation: pop .3s var(--ease) both; }
.card.new time { color: var(--terra-h); }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
/* Objeto seleccionado: marco, etiqueta y tiradores */
.card.sel { margin: 22px 0 4px; }
.card.sel::after { content: ""; position: absolute; inset: -6px; border: 1.5px solid var(--terra-line); border-radius: 14px; pointer-events: none; }
.card.sel .lbl { position: absolute; left: -5px; bottom: calc(100% + 8px); font: 600 .75rem var(--font-body); color: var(--terra); white-space: nowrap; }
.card.sel .h { position: absolute; width: 8px; height: 8px; background: var(--terra); border-radius: 2px; box-shadow: 0 0 0 1.5px var(--surface); }
.h.a { top: -10px; left: -10px; } .h.b { top: -10px; right: -10px; } .h.c { bottom: -10px; left: -10px; } .h.d { bottom: -10px; right: -10px; }
/* el marco solo aparece cuando la tarjeta es recién creada o movida, no en cada repintado */
.card.fresh.sel::after, .card.fresh.sel .h { animation: fade .22s .12s var(--ease) both; }
.card.fresh.sel .lbl { animation: fade .22s .16s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }

/* Vitrina o stock */
.stock { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.stock li { display: flex; align-items: baseline; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--bg); font-size: .8125rem; color: var(--text-2); }
.stock b { font: 700 .875rem var(--font-body); font-variant-numeric: tabular-nums; color: var(--text); }
.stock b.bump { animation: bump .3s var(--ease); }
.stock li.low b { color: var(--terra-h); }

.cols { display: grid; gap: 20px; }
@container (min-width: 640px) { .cols { grid-template-columns: 1.3fr 1fr; } }
.list { display: grid; gap: 8px; list-style: none; padding: 0; }
.list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); font-size: .875rem; }
.list li.fresh { animation: msg-in .26s var(--ease) both; }
.list li time { font: 500 .75rem/1.9 var(--font-body); font-variant-numeric: tabular-nums; color: var(--muted); }
.list li p { color: var(--text-2); }
.list li p b { color: var(--text); font-weight: 700; }
.pill { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: var(--pill); white-space: nowrap; border: 1px solid var(--line-strong); color: var(--text-2); }
.pill.ok { border-color: var(--terra-line); color: var(--terra-h); background: var(--terra-soft); }
.pill.urg { border-color: var(--text); color: var(--text); }
@container (max-width: 419px) { .list li { grid-template-columns: auto 1fr; } .list li .pill { grid-column: 2; justify-self: start; } }
.list.deriv li { grid-template-columns: auto 1fr; }
.list.deriv .pill { display: inline-block; margin-top: 6px; white-space: normal; }
.list.deriv svg.i { color: var(--terra); margin-top: 1px; }
.vacio { color: var(--muted); font-size: .875rem; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.list li.vacio { display: block; }

/* Pie: franja de tinta, como en el resto del sitio */
footer.wrap { margin-top: 24px; background: var(--ink); color: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-block: 40px max(32px, calc(env(safe-area-inset-bottom) + 24px)); font-size: .875rem; line-height: 1.7; }
footer.wrap::before { content: ""; display: block; width: min(240px, 100%); aspect-ratio: 589 / 88; background: url('logo-negativo.svg') left center / contain no-repeat; margin-bottom: 20px; }
footer p { max-width: 90ch; color: #D3CCBB; }

/* Texto bajo la demo */
.seo { display: grid; gap: 16px; margin-top: 56px; padding: 40px 0 56px; border-top: 1px solid var(--line); max-width: 75ch; }
.seo h2 { font: 600 clamp(1.5rem, 1rem + 1.6vw, 2.1rem)/1.12 var(--font-disp); letter-spacing: -.014em; }
.seo h3 { font: 600 1.2rem/1.25 var(--font-disp); margin: 8px 0 0; }
.seo p, .seo li { color: var(--text-2); }
.seo ul, .seo ol { display: grid; gap: 10px; padding-left: 1.3em; }
.seo li::marker { color: var(--terra); font-weight: 700; }
.seo li b { color: var(--text); font-weight: 700; }
.seo-cta { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 8px; }
.btn-ghost.fill { background: var(--terra); border-color: var(--terra); color: var(--terra-ink); }
@media (hover: hover) and (pointer: fine) { .btn-ghost.fill:hover { background: var(--terra-h); border-color: var(--terra-h); color: var(--terra-ink); } }
.rubros + .seo { margin-top: 0; }

/* Portada */
.rubros { display: grid; gap: 16px; padding: 8px 0 56px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); list-style: none; padding-left: 0; }
.rub { height: 100%; display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color .25s, background-color .25s, transform .3s var(--ease); }
@media (hover: hover) and (pointer: fine) { .rub:hover { border-color: var(--terra-line); background: var(--surface2); transform: translateY(-3px); } }
.rub:active { transform: scale(.99); }
.rub .tag { display: flex; align-items: center; gap: 8px; }
.rub h2 { font: 600 1.3rem/1.2 var(--font-disp); letter-spacing: -.01em; }
.rub p { color: var(--text-2); font-size: .9375rem; }
.rub ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin-top: 6px; }
.rub li { font-size: .75rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line-strong); border-radius: var(--pill); padding: 2px 10px; }
.rub .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--accent, var(--terra)); box-shadow: inset 0 0 0 1px rgba(20,35,74,.3); }

@media (prefers-reduced-motion: reduce) {
  @keyframes msg-in { from { opacity: 0; } }
  @keyframes pop { from { opacity: 0; } }
  .stats b.bump, .stock b.bump, .typing i { animation: none; }
  .situ button, .btn-ghost, .choices button, .rub { transform: none !important; }
  .chat { scroll-behavior: auto; }
}
@container (min-width: 860px) { .board[data-n="5"] { grid-template-columns: repeat(5, 1fr); } }
