/* Landing: animaciones, demo interactiva, panel, simulador. Tokens en site.css. */
.landing { overflow-x: hidden; }
.btn-lg { padding: 16px 26px; font-size: 1.05rem; }
.btn .arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }
.eyebrow { display: inline-block; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.lead-sm { font-size: 1.08rem; }

.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--brand), var(--accent)); z-index: 50; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.steps .reveal:nth-child(2), .panel-points .reveal:nth-child(2) { transition-delay: 0.1s; }
.steps .reveal:nth-child(3), .panel-points .reveal:nth-child(3) { transition-delay: 0.2s; }
.panel-points .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Hero */
.hero2 { position: relative; padding: 48px 0 64px; overflow: hidden; }
.hero2-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 920px) { .hero2-grid { grid-template-columns: 1fr; gap: 28px; } .hero2 { padding-top: 24px; } }
.hero2 h1 { font-size: clamp(2.2rem, 5.6vw, 3.9rem); }
.rotator { display: inline-block; position: relative; color: var(--brand); }
.rot-word { display: inline-block; background: linear-gradient(transparent 64%, var(--accent) 64%); padding: 0 4px; border-radius: 4px; transition: opacity 0.35s ease, transform 0.35s ease; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rot-word { background: linear-gradient(transparent 64%, #3d5a1a 64%); } }
.rot-word.out { opacity: 0; transform: translateY(-14px); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; pointer-events: none; }
.b1 { width: 520px; height: 520px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 70%, transparent), transparent 70%); right: -120px; top: -80px; animation: float 14s ease-in-out infinite; }
.b2 { width: 420px; height: 420px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 35%, transparent), transparent 70%); left: -160px; bottom: -120px; animation: float 18s ease-in-out infinite reverse; }
@keyframes float { 50% { transform: translate(30px, 40px) scale(1.08); } }

.hero2-visual { position: relative; min-height: 560px; display: grid; place-items: center; perspective: 1200px; }
@media (max-width: 920px) { .hero2-visual { min-height: 0; padding: 10px 0 30px; } }
.phone.tilt { transform: rotateY(-8deg) rotateX(4deg); transition: transform 0.4s ease; transform-style: preserve-3d; }
.phone .chat.live { height: 470px; min-height: 0; overflow: hidden; justify-content: flex-end; }
.chat .msg { animation: pop 0.35s ease forwards; }
.msg.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: 0.2s; } .msg.typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.msg.img { padding: 4px; max-width: 72%; }
.msg.img img { display: block; width: 100%; border-radius: 9px; }
.msg.img .cap { padding: 4px 6px 0; display: block; }
.msg.audio { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.msg.audio .play { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 0.7rem; flex: none; }
.msg.audio .wave { display: flex; align-items: center; gap: 2px; height: 24px; flex: 1; }
.msg.audio .wave i { width: 3px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 45%, transparent); animation: wave 1s ease-in-out infinite; }
@keyframes wave { 50% { transform: scaleY(0.4); } }
.msg .transcript { display: block; font-size: 0.78rem; color: var(--muted); font-style: italic; margin-top: 4px; }
.msg.out.ticket .t { animation: scan 1.4s ease 0.2s; }
@keyframes scan { 0% { box-shadow: inset 0 0 0 0 transparent; } 40% { box-shadow: inset 0 -40px 0 0 color-mix(in srgb, var(--brand) 18%, transparent); } 100% { box-shadow: inset 0 -120px 0 0 transparent; } }

.float-card { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; min-width: 150px; will-change: transform; animation: bob 6s ease-in-out infinite; }
.float-card b { font-size: 1.35rem; letter-spacing: -0.02em; }
.float-card b.up { color: #c0362c; }
.fc-l { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.fc-s { font-size: 0.78rem; color: var(--muted); }
.fc1 { left: -10px; top: 70px; }
.fc2 { right: -20px; top: 200px; animation-delay: -2s; }
.fc3 { left: 10px; bottom: 60px; animation-delay: -4s; }
@keyframes bob { 50% { translate: 0 -10px; } }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 26px; margin-top: 4px; }
.mini-bars i { flex: 1; background: var(--brand-soft); border-radius: 3px; animation: grow 1.6s ease infinite alternate; }
.mini-bars i:nth-child(1) { height: 30%; } .mini-bars i:nth-child(2) { height: 55%; animation-delay: .2s; } .mini-bars i:nth-child(3) { height: 40%; animation-delay: .4s; }
.mini-bars i:nth-child(4) { height: 70%; animation-delay: .6s; } .mini-bars i:nth-child(5) { height: 100%; background: #e07a2e; animation-delay: .8s; }
@keyframes grow { from { transform: scaleY(0.6); } }
@media (max-width: 920px) { .fc1 { left: 0; top: 10px; } .fc2 { right: 0; top: 160px; } .fc3 { display: none; } .float-card { min-width: 0; padding: 9px 12px; } .float-card b { font-size: 1.1rem; } }
@media (max-width: 480px) { .fc2 { display: none; } }

/* Marquee */
.marquee-sec { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { white-space: nowrap; padding: 8px 14px; background: var(--bubble-out); border-radius: 12px 12px 4px 12px; font-weight: 600; font-size: 0.95rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Dolor */
.pain-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 820px) { .pain-grid { grid-template-columns: 1fr; } }
.pain h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
.stats { display: grid; gap: 14px; }
.stat { display: flex; align-items: baseline; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; }
.stat b { font-size: 2.2rem; letter-spacing: -0.03em; color: var(--brand); min-width: 120px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); }

/* Demo */
.demo-grid { display: grid; grid-template-columns: 380px 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-phone { max-width: 380px; }
.demo-chat { height: 440px; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.composer { display: flex; gap: 8px; padding: 10px; background: var(--chat-bg); border-top: 1px solid rgba(0,0,0,0.05); }
.composer input { flex: 1; min-width: 0; border: 0; border-radius: 999px; padding: 12px 16px; font: inherit; font-size: 0.95rem; background: var(--bubble-in); color: var(--ink); outline: none; }
.composer input:focus { box-shadow: 0 0 0 2px var(--brand); }
.composer button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; font-size: 1.05rem; cursor: pointer; flex: none; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.examples button { font: inherit; font-size: 0.92rem; font-weight: 600; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: transform 0.15s, border-color 0.15s, background 0.15s; }
.examples button:hover { transform: translateY(-2px); border-color: var(--brand); background: var(--brand-soft); }
.examples button:disabled { opacity: 0.5; transform: none; cursor: wait; }
.mini-dash { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); }
.md-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.md-top span { display: block; font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.md-top b { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.md-top b.good { color: var(--brand); }
.md-top b.bad { color: #c0362c; }
.md-top b.flash { animation: flash 0.6s ease; }
@keyframes flash { 30% { transform: scale(1.06); } }
.md-meter { position: relative; height: 12px; background: var(--brand-soft); border-radius: 99px; margin: 16px 0 6px; }
.md-meter i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand); transition: width 0.7s cubic-bezier(.2,.8,.2,1), background 0.3s; }
.md-meter i.bad { background: #c0362c; }
.md-meter em { position: absolute; top: -4px; width: 3px; height: 20px; background: var(--ink); border-radius: 2px; }
.md-note { font-size: 0.82rem; color: var(--muted); margin: 0 0 14px; }
.md-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.md-cats li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 0.92rem; animation: pop 0.35s ease forwards; }
.md-cats li b { font-variant-numeric: tabular-nums; }
.md-cats .bar { grid-column: 1 / -1; height: 7px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; }
.md-cats .bar i { display: block; height: 100%; border-radius: 99px; transition: width 0.7s cubic-bezier(.2,.8,.2,1); }
.md-cats li.hl { background: var(--brand-soft); border-radius: 10px; padding: 4px 8px; margin: -4px -8px; }
.link-like { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.85rem; text-decoration: underline; cursor: pointer; margin-top: 14px; padding: 0; }

/* Gráficos */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .charts-grid { grid-template-columns: 1fr; gap: 28px; } }
.chart-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chart-tabs button { font: inherit; font-weight: 700; font-size: 0.93rem; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.chart-tabs button[aria-selected="true"] { background: var(--brand); color: #fff; border-color: transparent; }
.wa-shot { background: var(--chat-bg); border-radius: 28px; padding: 22px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); max-width: 480px; justify-self: center; width: 100%; }
.wa-bubble { padding: 9px 12px; border-radius: 12px; font-size: 0.95rem; box-shadow: 0 1px 1px rgba(0,0,0,0.08); max-width: 85%; }
.wa-bubble.out { align-self: flex-end; background: var(--bubble-out); border-top-right-radius: 4px; }
.wa-bubble.in { align-self: flex-start; background: var(--bubble-in); border-top-left-radius: 4px; }
.wa-bubble.img { padding: 5px; max-width: 100%; }
.wa-bubble.img img { display: block; width: 100%; height: auto; border-radius: 9px; transition: opacity 0.25s, transform 0.25s; }
.wa-bubble.img img.swap { opacity: 0; transform: scale(0.98); }
.wa-bubble.img span { display: block; padding: 8px 6px 2px; font-size: 0.92rem; }

/* Panel */
.panel-stage { position: relative; max-width: 1000px; margin: 0 auto; padding-right: 120px; }
@media (max-width: 760px) { .panel-stage { padding-right: 0; padding-bottom: 0; } }
.browser { border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(16, 34, 26, 0.18); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e2dfd4; }
.browser-bar i:nth-child(1) { background: #ff5f57; } .browser-bar i:nth-child(2) { background: #febc2e; } .browser-bar i:nth-child(3) { background: #28c840; }
.browser-bar span { margin-left: 12px; font-size: 0.8rem; color: var(--muted); background: var(--card); border-radius: 8px; padding: 3px 12px; flex: 1; max-width: 300px; }
.browser video, .browser img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 760; background: #f7f6f1; }
.panel-phone { position: absolute; right: 0; bottom: -40px; width: 230px; border-radius: 30px; padding: 8px; }
.panel-phone .phone-screen { border-radius: 23px; }
.panel-phone img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) { .panel-phone { position: relative; right: auto; bottom: auto; margin: -60px 12px 0 auto; width: 46%; max-width: 200px; } }
.panel-points { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 72px; }
@media (max-width: 900px) { .panel-points { grid-template-columns: 1fr 1fr; margin-top: 36px; } }
@media (max-width: 520px) { .panel-points { grid-template-columns: 1fr; } }
.pp { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.pp b { display: block; margin-bottom: 6px; }
.pp span { color: var(--muted); font-size: 0.95rem; }

/* Simulador */
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .sim-grid { grid-template-columns: 1fr; gap: 28px; } }
.sim-controls { display: grid; gap: 22px; margin-top: 24px; }
.sim-controls label { display: grid; gap: 8px; font-weight: 600; }
.sim-controls label b { color: var(--brand); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: linear-gradient(90deg, var(--brand) var(--p, 50%), var(--line) var(--p, 50%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); box-shadow: var(--shadow); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); cursor: grab; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent); }
.sim-result { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.sim-head { font-size: clamp(1.3rem, 2.6vw, 1.7rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }
.sim-head b { color: #c0362c; }
.sim-head.ok b { color: var(--brand); }
.sim-cal { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-bottom: 14px; }
.sim-cal i { aspect-ratio: 1; border-radius: 6px; background: var(--brand); display: grid; place-items: center; font-style: normal; font-size: 0.72rem; font-weight: 700; color: #fff; transition: background 0.25s; }
.sim-cal i.empty { background: color-mix(in srgb, #c0362c 22%, var(--card)); color: #c0362c; }
.sim-cal i.pay { outline: 2px solid var(--ink); outline-offset: 1px; }
.sim-msg { color: var(--muted); }

/* Sticky CTA en celular */
.sticky-cta { position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 30; display: none; text-align: center; padding: 15px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 10px 30px rgba(18, 122, 75, 0.4); transform: translateY(120%); transition: transform 0.3s ease; }
.sticky-cta.show { transform: none; }
@media (max-width: 720px) { .sticky-cta { display: block; } }

.landing .chips { justify-content: center; }
.landing section { scroll-margin-top: 70px; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .float-card, .marquee-track, .mini-bars i, .msg.audio .wave i { animation: none !important; }
  .phone.tilt { transform: none; }
}
/* Ajustes: el titular rotativo reserva 2 líneas para no mover la página; ticket y audio más compactos */
.rotator { display: block; min-height: 2.24em; }
.rot-word { -webkit-box-decoration-break: clone; box-decoration-break: clone; display: inline; }
.rot-word.out { display: inline-block; }
.msg.ticket { max-width: 86%; }
.msg.ticket .t { font-size: 11px; white-space: pre; }
.msg.audio { flex-wrap: wrap; row-gap: 2px; }
.msg.audio .transcript { flex-basis: 100%; margin-top: 2px; }
.msg.audio time { flex-basis: 100%; }
@media (max-width: 920px) { .rotator { min-height: 2.24em; } }
@media (max-width: 900px) {
  .demo-grid { display: flex; flex-direction: column; gap: 16px; }
  .demo-side { display: contents; }
  .examples { order: 1; margin-bottom: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .examples button { flex: none; }
  .demo-phone { order: 2; width: 100%; margin: 0 auto; }
  .mini-dash { order: 3; }
  .demo-chat { height: 340px; }
}
@media (max-width: 900px) { .examples { max-width: 100%; min-width: 0; } .demo-grid > * { min-width: 0; } }
