/* Página principal de Whabi.
   Un solo momento animado (el chat que vende); el resto es tipografía, ritmo y contraste. */
.landing { overflow-x: clip; }
.landing .wrap { max-width: 1160px; padding: 0 var(--s5); }
.landing .narrow { max-width: 780px; }
.landing main { position: relative; }
.center { text-align: center; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Luz de fondo: una sola, quieta, detrás de la portada */
.glow { position: absolute; inset: 0 0 auto; height: 900px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 55% at 72% 18%, rgba(37,211,102,.13), transparent 70%), radial-gradient(45% 40% at 10% 0%, rgba(56,190,255,.06), transparent 70%); }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(7,9,11,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: var(--s4); }
.links { display: flex; gap: var(--s6); }
.links a { color: var(--text-2); font-size: 15px; font-weight: 500; transition: color .15s; }
.links a:hover { color: #fff; }
.top-actions { display: flex; gap: var(--s2); }
.btn.ghost { background: transparent; border-color: var(--border-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.big { padding: 14px 22px; font-size: 16px; border-radius: 12px; }
.btn .ic { width: 18px; height: 18px; transition: transform .2s cubic-bezier(.2,.8,.2,1); }
.btn:hover .ic { transform: translateX(3px); }

/* ---------- Portada ---------- */
.hero { padding: var(--s9) 0 var(--s8); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--s8); align-items: center; }
.hero-copy h1 { font-size: clamp(40px, 5.2vw, 64px); font-weight: 750; letter-spacing: -.03em; line-height: 1.04; margin: 0 0 var(--s5); }
.accent { color: var(--green); }
.lead { font-size: 19px; line-height: 1.6; color: var(--text-2); max-width: 34em; margin: 0 0 var(--s6); }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); }
.trust { list-style: none; padding: 0; margin: var(--s6) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); color: var(--text-2); font-size: 15px; }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .ic { width: 18px; height: 18px; color: var(--green); stroke-width: 2.2; }

.hero-visual { position: relative; display: flex; justify-content: center; padding: var(--s6) 0; }
.phone { position: relative; width: 300px; height: 560px; border-radius: 40px; padding: 11px; background: #12181c; box-shadow: inset 0 0 0 1px #263037, var(--shadow-2);
  display: flex; flex-direction: column; z-index: 2; }
.phone::before { content: ''; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 84px; height: 22px; border-radius: 12px; background: #000; z-index: 3; }
.phone-top { display: flex; align-items: center; gap: 10px; padding: 46px 14px 12px; background: #101b17; border-radius: 30px 30px 0 0; }
.phone-top b { font-size: 14px; display: block; line-height: 1.2; }
.phone-top small { display: block; color: var(--green); font-size: 12px; }
.chat { flex: 1; background: #0b1311; padding: 14px 10px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; justify-content: flex-end; }
.msg { max-width: 82%; padding: 8px 11px 6px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; animation: msg-in .32s cubic-bezier(.16,1,.3,1) both; }
.msg.in { align-self: flex-start; background: #1c2724; border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: #0f5c3c; border-bottom-right-radius: 4px; }
.msg.card { align-self: flex-end; background: rgba(37,211,102,.12); border: 1px solid rgba(37,211,102,.45); color: #c8ffe0; font-weight: 600; padding: 8px 11px; }
.msg small { display: block; font-size: 10px; opacity: .6; margin-top: 2px; text-align: right; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.typing { align-self: flex-end; background: #0f5c3c; border-radius: 14px; padding: 10px 12px; display: flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #c8ffe0; opacity: .5; animation: typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 30% { opacity: 1; transform: translateY(-2px); } }
.phone-input { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 10px 14px; border-radius: 0 0 28px 28px; background: #101b17; color: var(--muted); font-size: 12px; }
.phone-input i { width: 26px; height: 26px; border-radius: 50%; background: var(--green); }
.robot { position: absolute; right: -6px; top: -4px; width: 190px; height: auto; z-index: 3; filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); animation: float 5.5s ease-in-out infinite; }
/* La mascota flota suave: sube, se inclina apenas y vuelve */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(-3deg); } }
.chip { position: absolute; z-index: 4; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: #182126; box-shadow: var(--shadow-1); white-space: nowrap; }
.chip .ic { color: var(--green); width: 18px; height: 18px; }
.c1 { left: 0; top: 30%; }
.c2 { right: 0; bottom: 14%; }

.rubros { color: var(--muted); font-size: 15px; text-align: center; max-width: 760px; padding-bottom: var(--s4); }

/* ---------- Secciones ---------- */
.landing .section { padding: var(--s9) var(--s5) 0; }
.landing .section-tight { padding-top: var(--s9); padding-bottom: var(--s9); }
.head { margin-bottom: var(--s7); max-width: 720px; }
.head.center { margin-inline: auto; }
.head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; margin: 0; }
.head .sub { color: var(--text-2); font-size: 18px; margin: var(--s3) 0 0; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); counter-reset: none; }
.steps li { padding-top: var(--s5); border-top: 1px solid var(--border-2); }
.steps .num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--green); color: var(--green-ink); font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.steps h3 { font-size: 21px; margin: var(--s4) 0 var(--s2); }
.steps p { color: var(--text-2); margin: 0; max-width: 32ch; }

.features { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); align-items: start; }
.showcase { padding: var(--s6); border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.showcase h3, .feature-list h3 { font-size: 20px; margin: 0 0 var(--s2); }
.showcase h3 { display: flex; align-items: center; gap: 10px; font-size: 24px; }
.showcase h3 .ic { color: var(--green); width: 24px; height: 24px; }
.showcase > p { color: var(--text-2); margin: 0; max-width: 40ch; }
.mini-chat { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s6); }
.mini-chat span { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: 15px; line-height: 1.45; }
.mini-chat .in { background: #1c2724; align-self: flex-start; border-bottom-left-radius: 4px; }
.mini-chat .out { background: #0f5c3c; align-self: flex-end; border-bottom-right-radius: 4px; }
.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li { display: flex; gap: var(--s4); padding: var(--s5) 0; border-bottom: 1px solid var(--border); }
.feature-list li:first-child { padding-top: var(--s2); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list .ic { color: var(--green); width: 22px; height: 22px; margin-top: 3px; }
.feature-list h3 { font-size: 18px; margin-bottom: var(--s1); }
.feature-list p { color: var(--text-2); margin: 0; }

.band { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: var(--s9); border-block: 1px solid var(--border-2); }
.band div { padding: var(--s6) var(--s5); display: flex; flex-direction: column; gap: var(--s1); }
.band div + div { border-left: 1px solid var(--border-2); }
.band b { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.band span { color: var(--text-2); font-size: 15px; }

/* Planes (las tarjetas las arma site.js) */
.plans { align-items: stretch; gap: var(--s5); margin-bottom: var(--s5); }
.landing .plan { position: relative; padding: var(--s6); border-radius: 16px; background: var(--surface); border: 1px solid var(--border); gap: var(--s3); transition: border-color .2s; }
.landing .plan:hover { border-color: var(--border-2); }
.landing .plan.featured { border-color: rgba(37,211,102,.55); background: #0f1714; }
.landing .plan h3 { font-size: 22px; }
.landing .plan .pill { font-size: 12px; padding: 3px 10px; }
.plan .tagline { color: var(--muted); font-size: 15px; margin: -4px 0 var(--s2); }
.landing .price { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.landing ul.feat { font-size: 15px; gap: var(--s2); margin: var(--s3) 0 var(--s5); }
.landing .plan .btn { margin-top: auto; padding: 13px 18px; }
.fine { color: var(--muted); font-size: 14px; line-height: 1.7; margin: var(--s5) auto 0; max-width: 620px; }

/* Preguntas */
.faq { border-bottom: 1px solid var(--border-2); }
.faq:first-of-type { border-top: 1px solid var(--border-2); }
.faq summary { cursor: pointer; padding: var(--s5) var(--s1); font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg) translateY(-3px); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.faq[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq summary:hover { color: #fff; }
.faq p { margin: 0; padding: 0 var(--s1) var(--s5); color: var(--text-2); max-width: 62ch; }

/* Cierre */
.final { display: flex; align-items: center; gap: var(--s6); padding: var(--s7); border-radius: 20px; background: #0e1714; border: 1px solid rgba(37,211,102,.3); }
.final > div { flex: 1; }
.final h2 { margin: 0 0 var(--s2); font-size: clamp(26px, 3vw, 36px); }
.final p { margin: 0; color: var(--text-2); font-size: 17px; }
.robot-sm { width: 132px; height: auto; flex: none; animation: float 6s ease-in-out infinite; }

.foot { display: flex; align-items: center; gap: var(--s4); padding-top: var(--s6); padding-bottom: var(--s7); border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.foot .brand { font-size: 17px; }
.foot nav { margin-left: auto; display: flex; gap: var(--s5); }
.foot nav a { color: var(--text-2); }
.foot nav a:hover { color: #fff; }

/* ---------- Aparición al hacer scroll (solo si hay JS; sin JS todo se ve) ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Pantallas medianas y celular ---------- */
@media (max-width: 980px) {
  .hero { padding-top: var(--s8); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .hero-copy { text-align: center; }
  .lead { margin-inline: auto; }
  .cta-row, .trust { justify-content: center; }
  .links { display: none; }
  .features { grid-template-columns: 1fr; gap: var(--s6); }
  .steps { grid-template-columns: 1fr; gap: var(--s5); }
  .steps p { max-width: none; }
  .band { grid-template-columns: 1fr; }
  .band div + div { border-left: 0; border-top: 1px solid var(--border-2); }
  .final { flex-direction: column; text-align: center; padding: var(--s6) var(--s5); }
}
@media (max-width: 560px) {
  .landing .wrap { padding: 0 var(--s4); }
  .landing .section { padding: var(--s8) var(--s4) 0; }
  .hero { padding: var(--s7) 0 var(--s5); }
  .lead { font-size: 17px; }
  .cta-row .btn { width: 100%; }
  .top-actions .ghost { display: none; }
  .phone { width: 272px; height: 520px; }
  .robot { width: 120px; right: -4px; top: 0; }
  .chip { font-size: 13px; padding: 8px 11px; }
  .c1 { left: -4px; } .c2 { right: -4px; }
  .head { margin-bottom: var(--s6); }
  .showcase { padding: var(--s5); }
  .foot { flex-wrap: wrap; }
  .foot nav { margin-left: 0; width: 100%; }
}

/* Quien prefiere menos movimiento: nada se mueve, todo visible. */
@media (prefers-reduced-motion: reduce) {
  .landing *, .landing *::before, .landing *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
