/* VOICE: un comerciante le habla a otro, claro y sin humo.
   IDEA: la página es la bandeja de WhatsApp de un negocio: mensajes sin leer que se transforman en ventas.
   COLOR y TIPO: teal de la barra de WhatsApp, papel de chat, coral de "sin leer"; Schibsted Grotesk + Figtree.
   Mobile-first: estilos base para mobile, min-width para agrandar.
   Animaciones: todo lo que arranca oculto vive bajo html.anim, que solo existe sin "reducir movimiento". */

/* Fuentes propias (variables, subconjunto latino, licencia OFL) */
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/schibsted-grotesk-latin.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin.woff2) format('woff2'); }

:root {
  color-scheme: light dark;
  interpolate-size: allow-keywords;
  --bg: light-dark(#F6F1EA, #0F1C1A);
  --paper: light-dark(#EDE4D8, #14231F);
  --ink: light-dark(#10201D, #E8EFEC);
  --muted: light-dark(#4F5E5A, #A3B3AE);
  --teal: light-dark(#0B4F47, #0B3B35);
  --teal-2: light-dark(#0E5B52, #0F4A42);
  --teal-3: light-dark(#083F39, #072B27);
  --teal-ink: #F2FBF8;
  --bubble-in: light-dark(#FFFFFF, #1F2C2A);
  --bubble-out: light-dark(#D9FDD3, #0E4F43);
  --coral: light-dark(#C23A1F, #FF7A5C);
  --on-coral: light-dark(#FFFFFF, #10201D);
  --coral-text: light-dark(#B93A20, #FF8A6E);
  --good: light-dark(#0B6B5E, #5FD3BC);
  --line: light-dark(#D8CDBE, #26403A);
  --card: light-dark(#FFFFFF, #172925);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 Figtree, system-ui, sans-serif; overflow-x: clip; }
h1, h2, h3 { font-family: 'Schibsted Grotesk', system-ui, sans-serif; line-height: 1.05; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.6vw, 3.8rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; letter-spacing: -.015em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; }
.band { position: relative; padding: clamp(48px, 7vw, 96px) max(5vw, 16px); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }

.skip { position: absolute; left: 16px; top: -100px; z-index: 10; background: var(--card); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border-radius: 999px; background: var(--coral); color: var(--on-coral); font: 700 1.05rem/1.2 Figtree, system-ui, sans-serif; text-decoration: none; border: 0; cursor: pointer; transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.btn:hover { box-shadow: 0 10px 24px -10px light-dark(rgba(194, 58, 31, .7), rgba(255, 122, 92, .5)); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; border: 2px solid currentColor; color: inherit; min-height: 44px; padding: 0 20px; font-size: .95rem; box-shadow: none; }

/* texto que rueda letra por letra al pasar el mouse (lo arma app.js) */
/* cada letra está una sola vez en el texto; la copia que sube es un ::after (así el nombre accesible coincide) */
.roll { text-align: center; }
.roll-w { display: inline-flex; white-space: nowrap; }
.roll-l { display: inline-block; overflow: hidden; height: 1.2em; line-height: 1.2em; vertical-align: top; }
.roll-l > span { display: block; transition: transform .5s var(--ease-io) calc(var(--i) * 14ms); }
.roll-l > span::after { content: attr(data-c); display: block; }
:is(a, button):is(:hover, :focus-visible) .roll-l > span { transform: translateY(-1.2em); }

/* barra */
.bar { position: sticky; top: 0; z-index: 5; background: var(--teal); color: var(--teal-ink); padding: 10px max(5vw, 16px); transition: box-shadow .3s; }
.bar.scrolled { box-shadow: 0 10px 30px -12px rgba(4, 30, 27, .55); }
.bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.bar .btn.ghost { display: none; }
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Schibsted Grotesk', system-ui, sans-serif; font-weight: 800; font-size: 1.2rem; }
.brand i { width: 34px; height: 34px; border-radius: 50%; background: var(--teal-ink); color: var(--teal); display: grid; place-items: center; font-style: normal; }

/* hero */
.hero { background:
  radial-gradient(circle at 1px 1px, light-dark(rgba(11, 79, 71, .09), rgba(242, 251, 248, .05)) 1px, transparent 0) 0 0 / 22px 22px,
  var(--bg); }
.hero .wrap { display: grid; gap: clamp(32px, 4vw, 48px); }
.hero-top { display: grid; gap: 24px; align-items: end; }
.hero-top .lead { color: var(--muted); font-size: 1.12rem; max-width: 34em; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 24px; }
.buy small { color: var(--muted); font-size: .9rem; line-height: 1.4; }

.inbox { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(11, 79, 71, .45); }
.inbox-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--teal); color: var(--teal-ink); font-weight: 600; }
.inbox-head b { font-family: 'Schibsted Grotesk', system-ui, sans-serif; font-size: 1.1rem; }
.js-unread { display: inline-block; min-width: 1.2em; text-align: right; font-variant-numeric: tabular-nums; }
.row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--card); }
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: var(--av); }
.row .who { font-weight: 600; }
.row .msg { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { display: grid; justify-items: end; gap: 4px; font-size: .82rem; color: var(--coral-text); white-space: nowrap; }
.badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--coral); color: var(--on-coral); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.row.lost { background: light-dark(#FFF4F1, #2A1D1A); }
.inbox-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }

/* antes / después */
.duo { background: var(--paper); }
.sub { color: var(--muted); margin-top: 12px; max-width: 36em; }
.duo .grid { display: grid; gap: 24px; margin-top: 32px; }
.chat { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); box-shadow: 0 24px 50px -36px rgba(11, 79, 71, .5); }
.chat h3 { padding: 14px 18px; background: var(--card); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.chat h3 span { font-family: Figtree, system-ui, sans-serif; font-weight: 500; font-size: .85rem; color: var(--muted); }
.thread { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 280px; }
.b { max-width: 85%; padding: 10px 14px; border-radius: 14px; line-height: 1.4; font-size: .98rem; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.b time { display: block; text-align: right; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.in { align-self: flex-start; background: var(--bubble-in); border-top-left-radius: 4px; transform-origin: top left; }
.out { align-self: flex-end; background: var(--bubble-out); border-top-right-radius: 4px; transform-origin: top right; }
.note { align-self: center; font-size: .85rem; color: var(--muted); background: var(--card); padding: 4px 12px; border-radius: 8px; }
.verdict { padding: 14px 18px; border-top: 1px solid var(--line); font-weight: 600; }
.bad .verdict { color: var(--coral-text); }
.good .verdict { color: var(--good); }

.typing { position: absolute; display: flex; gap: 4px; padding: 13px 14px; border-radius: 14px; background: var(--bubble-in); border-top-left-radius: 4px; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.typing.out { background: var(--bubble-out); border-radius: 14px; border-top-right-radius: 4px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

/* índice */
.intro { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: end; }
.intro p { color: var(--muted); max-width: 32em; }
.toc { display: grid; gap: 0 48px; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: c; }
.toc li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 8px; padding: 14px 10px; margin: 0 -10px; border-bottom: 1px solid var(--line); border-radius: 10px; transition: background-color .25s; }
.toc li:hover { background: var(--card); }
.toc li::before { counter-increment: c; content: "Cap. " counter(c); color: var(--muted); font-size: .85rem; padding-top: 3px; transition: color .25s; }
.toc li:hover::before { color: var(--coral-text); }
.toc li.extra::before { content: "Bonus"; counter-increment: none; color: var(--coral-text); font-weight: 600; }
.toc b { display: block; }
.toc span { color: var(--muted); font-size: .95rem; }

/* muestra */
.sample { background: var(--teal); color: var(--teal-ink); overflow: hidden; }
.sample .lead { opacity: .88; max-width: 36em; margin-top: 12px; }
.tpls { display: grid; gap: 20px; margin-top: 32px; }
.tpl { background: var(--teal-2); border-radius: 18px; padding: 20px; display: grid; gap: 14px; align-content: start; }
.tpl code { font: inherit; font-weight: 700; color: #BFF3E6; }
.tpl blockquote { margin: 0; background: #D9FDD3; color: #10201D; padding: 14px 16px; border-radius: 14px; border-top-right-radius: 4px; transition: box-shadow .3s; }
.tpl blockquote.copied { box-shadow: 0 0 0 3px #BFF3E6; }
.tpl .btn.ghost { justify-self: start; }

/* paneles diagonales que abren la sección de muestra */
.panels { display: none; }

/* para quién + precio */
.fit { display: grid; gap: 48px; align-items: start; }
.rubros { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.rubros li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); user-select: none; }
.fit .about { margin-top: 28px; color: var(--muted); }
.price { position: relative; margin-top: 70px; background: var(--card); border: 2px solid light-dark(var(--teal), #3E8C7F); border-radius: 24px; padding: 0 24px 28px; display: grid; gap: 16px; }
.amount { font-family: 'Schibsted Grotesk', system-ui, sans-serif; font-weight: 800; font-size: clamp(3rem, 7vw, 4.2rem); line-height: 1; }
.amount small { font-family: Figtree, system-ui, sans-serif; font-weight: 500; font-size: 1rem; color: var(--muted); margin-left: 8px; }
.ars { margin-top: -6px; color: var(--muted); font-weight: 500; }
.price ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.price .btn { width: 100%; }
.fine { color: var(--muted); }

/* tapa del ebook (decorativa) */
.cover-wrap { margin: -70px auto 4px; perspective: 800px; }
.cover { width: 140px; aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 14px 12px 12px 18px; border-radius: 5px 12px 12px 5px; color: var(--teal-ink);
  background: linear-gradient(155deg, #12695E, #0B4F47 55%, #083F39);
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .2), inset 7px 0 0 rgba(255, 255, 255, .08), 0 26px 40px -18px rgba(8, 63, 57, .7);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--ease-out); }
.cover-brand { display: flex; align-items: center; gap: 6px; font: 800 .72rem 'Schibsted Grotesk', system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.cover-brand i { width: 16px; height: 16px; border-radius: 50%; background: var(--teal-ink); color: #0B4F47; display: grid; place-items: center; font-style: normal; font-size: .6rem; }
.cover b { font: 800 1.08rem/1 'Schibsted Grotesk', system-ui, sans-serif; letter-spacing: -.01em; }
.cover-chat { display: grid; gap: 4px; }
.cover-chat i { display: block; height: 9px; border-radius: 6px; background: rgba(242, 251, 248, .85); width: 70%; }
.cover-chat i:nth-child(2) { justify-self: end; width: 55%; background: #D9FDD3; }
.cover-chat i:nth-child(3) { width: 40%; background: #FF7A5C; }
.cover small { font-size: .62rem; opacity: .8; }

/* gracias */
.thanks { min-height: calc(100vh - 64px); }
.thanks .wrap { max-width: 560px; display: grid; gap: 24px; }
.thanks .thread { min-height: 0; }

/* faq */
.faq { background: var(--paper); }
.faq .wrap { max-width: 820px; }
.faq-list { margin-top: 20px; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--coral); transition: transform .3s var(--ease-out); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-top: 10px; color: var(--muted); }

footer.site { padding: 28px max(5vw, 16px); font-size: .9rem; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- tamaños mayores ---------- */
@media (min-width: 641px) {
  .bar .btn.ghost { display: inline-flex; }
  .row { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; padding: 14px 20px; }
  .av { width: 48px; height: 48px; }
  .inbox-head { padding: 14px 20px; }
  .inbox-foot { padding: 12px 20px; }
  .duo .grid, .tpls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tpl:nth-child(2) { margin-top: 32px; }
  .price { padding: 0 32px 32px; }
  .cover { width: 156px; }
}
@media (min-width: 861px) {
  .hero-top { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
  .toc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .price { margin-top: 0; }
}

/* ---------- movimiento (nada de esto corre con "reducir movimiento") ---------- */
@media (prefers-reduced-motion: no-preference) {
  .row.lost.pulse { animation: pulse 2.4s ease-in-out 2; }
  @keyframes pulse { 50% { background: light-dark(#FFE1D9, #3A2520); } }

  .cover-wrap { animation: float 6s ease-in-out infinite; }
  @keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(1deg); } }

  details::details-content { block-size: 0; overflow: hidden; transition: block-size .35s var(--ease-out), content-visibility .35s allow-discrete; }
  details[open]::details-content { block-size: auto; }
}

/* estados iniciales: solo con html.anim (lo pone el script del head) */
.anim [data-r]:not(.is-in) { opacity: 0; }
.anim .panels { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.anim .panels i { position: absolute; top: -15%; bottom: -15%; width: 26%; transform: skewX(-14deg); background: var(--teal-3); }
.anim .panels i:nth-child(1) { left: -6%; }
.anim .panels i:nth-child(2) { left: 14%; background: var(--teal-2); }
.anim .panels i:nth-child(3) { left: 34%; background: var(--coral); }
.anim .panels i:nth-child(4) { left: 54%; background: var(--teal-2); }
.anim .panels i:nth-child(5) { left: 74%; width: 34%; background: var(--teal-3); }
.anim .rubros li { position: relative; touch-action: pan-y; }
.anim .rubros li.dragging { z-index: 3; box-shadow: 0 12px 24px -12px rgba(11, 79, 71, .5); }
@media (hover: hover) and (pointer: fine) { .anim .rubros li { cursor: grab; } .anim .rubros li.dragging { cursor: grabbing; } }
