/* ==========================================================================
   Stack Soluciones · Portada: agente de WhatsApp para inmobiliarias.
   Mobile-first. Solo se animan transform y opacity.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700 800; font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
}

:root {
  --ink: #12302F; --forest: #2F5E58; --amber: #F0A030; --amber-hover: #F5B556;
  --mist: #DCE8E4; --fog: #EEF3F1; --slate: #546663; --forest-light: #7FB0A8; --white: #FFFFFF;
  --line: #C9D6D2; --ink-line: #2D4D4A; --ink-soft: #163836; --mist-dark: #BFD6D1;
  /* la ficha y el panel muestran el producto real, que usa violeta */
  --bot: #5B45D6; --bot-ink: #3C2A8C; --chip-bg: #EEEFF3; --chip-k: #5C6470;
  --wa-bg: #ECE5DD; --wa-out: #D9FDD3; --wa-tx: #111B21;
  --r-sm: 8px; --r-md: 12px; --r-lg: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-title: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Figtree", system-ui, sans-serif;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--fog); color: var(--ink); font: 400 17px/1.55 var(--font-text); -webkit-font-smoothing: antialiased; padding-bottom: 76px; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: var(--r-sm); }
.lp-hero :focus-visible, .pilot :focus-visible, .lp-footer :focus-visible { outline-color: var(--amber); }
a, button, summary { touch-action: manipulation; }
.btn, summary, .lp-logo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--amber); color: var(--ink); padding: 12px 18px; border-radius: var(--r-md); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 12px; }

.lp-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-right, 0px)) 0 max(var(--gutter), env(safe-area-inset-left, 0px)); }
.lp-wrap--narrow { max-width: 860px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: var(--r-md); border: 2px solid transparent; font: 600 16px/20px var(--font-text); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease), background-color 200ms, color 200ms;
}
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 17px; }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--amber { background: var(--amber); color: var(--ink); }
.btn--ghost-light { border-color: var(--fog); color: var(--fog); }
.btn--outline { border-color: var(--ink); color: var(--ink); }
.btn--ink { background: var(--ink); color: var(--fog); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn--amber:hover { background: var(--amber-hover); }
  .btn--ghost-light:hover { background: var(--fog); color: var(--ink); }
  .btn--outline:hover { background: var(--ink); color: var(--fog); }
}

/* ---------- Portada ---------- */
.lp-hero { position: relative; overflow: hidden; background: var(--ink); color: var(--fog); }
.lp-hero__bricks span { position: absolute; width: 300px; height: 56px; border-radius: var(--r-md); pointer-events: none; }
.lp-hero__bricks span:nth-child(1) { right: -60px; top: 120px; background: var(--amber); opacity: 0.14; }
.lp-hero__bricks span:nth-child(2) { right: -210px; top: 192px; background: var(--forest-light); opacity: 0.12; }
.lp-hero__bricks span:nth-child(3) { right: -60px; top: 264px; background: var(--fog); opacity: 0.07; }
.lp-hero__bricks span:nth-child(4) { left: -120px; bottom: 60px; background: var(--forest); opacity: 0.5; }
.lp-hero__bricks span:nth-child(5) { left: 30px; bottom: -12px; background: var(--forest); opacity: 0.3; }

.lp-nav {
  position: relative; max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px max(var(--gutter), env(safe-area-inset-right, 0px)) 18px max(var(--gutter), env(safe-area-inset-left, 0px));
}
.lp-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--fog); min-height: 44px; }
.lp-logo svg { overflow: visible; }
.lp-logo__txt { display: flex; flex-direction: column; line-height: 1; }
.lp-logo__stack { font: 800 24px/1 var(--font-title); letter-spacing: -0.04em; }
.lp-logo__sub { font-weight: 500; font-size: 12px; letter-spacing: 0.04em; color: var(--mist-dark); margin-top: 3px; }
.lp-nav__links { display: none; }
.lp-nav__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mist); text-decoration: none; font-weight: 500; font-size: 15px; }
@media (hover: hover) and (pointer: fine) { .lp-nav__links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 6px; } }

.lp-hero__grid { position: relative; max-width: 1200px; margin: 0 auto; display: grid; gap: 48px; padding: 32px max(var(--gutter), env(safe-area-inset-right, 0px)) 72px max(var(--gutter), env(safe-area-inset-left, 0px)); }
.lp-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; margin-bottom: 20px;
  background: rgba(238, 243, 241, 0.08); border: 1px solid var(--ink-line); font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--mist);
}
.lp-badge span { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.lp-hero h1 { font: 800 42px/1.02 var(--font-title); letter-spacing: -0.035em; color: var(--fog); text-wrap: balance; }
.lp-hero__lead { margin-top: 22px; max-width: 540px; font-size: 19px; line-height: 1.5; color: var(--mist); }
.lp-hero__ctas { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.lp-hero__note { margin-top: 20px; font-size: 14px; color: var(--mist-dark); }

/* Celular con la conversación */
.lp-hero__visual { position: relative; display: flex; flex-direction: column; align-items: center; }
.phone { width: 320px; max-width: 100%; border-radius: 48px; background: #071413; padding: 11px; box-shadow: 0 50px 100px rgba(0, 0, 0, 0.45); }
.phone__screen { border-radius: 38px; overflow: hidden; background: var(--wa-bg); }
.phone__bar { display: flex; align-items: center; gap: 12px; padding: 30px 16px 12px; background: #1B4240; color: var(--white); }
.phone__bar b { display: block; font-size: 16px; }
.phone__av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.phone__status { display: block; font-size: 12px; color: var(--mist-dark); }
.phone__chat { padding: 14px 11px 18px; display: flex; flex-direction: column; gap: 8px; min-height: 470px; }
.wa-day { align-self: center; padding: 4px 12px; border-radius: var(--r-sm); background: var(--white); font-size: 12px; font-weight: 600; color: #4A5A61; }
.wa { max-width: 84%; padding: 8px 11px; font-size: 14px; line-height: 1.35; color: var(--wa-tx); }
.wa--out { align-self: flex-end; background: var(--wa-out); border-radius: 14px 14px 4px 14px; }
.wa--in { align-self: flex-start; background: var(--white); border-radius: 14px 14px 14px 4px; }
.wa-typing { align-self: flex-start; display: none; gap: 4px; padding: 12px 13px; background: var(--white); border-radius: 14px 14px 14px 4px; }
.wa-typing.on { display: flex; }
.wa-typing i { width: 6px; height: 6px; border-radius: 50%; background: #8A9AA2; }

/* Ficha del lead (producto real) */
.lead { position: relative; margin: -90px 0 0 auto; width: 280px; max-width: 92%; padding: 16px 14px 14px; border-radius: var(--r-lg); background: var(--white); color: var(--wa-tx); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
.lead__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lead__title { font-weight: 600; font-size: 16px; }
.lead__ok { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--bot); color: var(--white); font-size: 12px; font-weight: 600; }
.lead__segs { margin: 12px 0 10px; display: flex; gap: 5px; }
.lead__segs i { flex: 1; height: 5px; border-radius: 3px; background: var(--bot); }
.lead__segs--5 i { background: #E2E4EA; }
.lead__segs--5 i.on { background: var(--bot); }
.lead__rows { display: flex; flex-direction: column; gap: 6px; }
.lrow { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--chip-bg); }
.lrow__ck { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--bot); position: relative; }
.lrow__ck::after { content: ""; position: absolute; left: 6px; top: 6px; width: 8px; height: 4px; border-left: 2px solid var(--white); border-bottom: 2px solid var(--white); transform: rotate(-45deg); }
.panel .lrow__ck { background: transparent; border: 1.6px solid #8A919C; }
.panel .lrow__ck::after { display: none; }
.panel .lrow.is-done .lrow__ck { background: var(--bot); border: 0; }
.panel .lrow.is-done .lrow__ck::after { display: block; }
.lrow__k { display: block; font-size: 11px; color: var(--chip-k); }
.lrow__v { display: block; font-size: 13.5px; line-height: 1.3; }
.lrow__v--wait { color: #5C636D; }
.lead__seller-k { margin: 12px 0 6px; font-size: 12px; color: var(--chip-k); }
.lead__seller { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.lead__sav { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--forest); color: var(--white); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.lead__sav--wait { width: 28px; height: 28px; background: none; border: 1.5px dashed #8A919C; }
.lead__seller--wait { color: #3F4650; }

/* ---------- Secciones ---------- */
.lp-section { padding: 72px 0; }
.lp-section--tight { padding: 24px 0; }
.lp-section--mist { background: var(--mist); }
.lp-section--faq { padding-top: 56px; }
.lp-kicker { font-weight: 700; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--forest); }
.lp-h2 { margin-top: 12px; max-width: 760px; font: 800 32px/1.08 var(--font-title); letter-spacing: -0.03em; text-wrap: balance; }
.lp-h2--sm { font-size: 30px; }
.lp-h2--light { color: var(--fog); }

.timeline { margin-top: 36px; display: grid; gap: 16px; }
.tcard { padding: 26px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); }
.tcard__time { font: 800 40px/1 var(--font-title); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tcard p:last-child { margin-top: 10px; color: var(--slate); }
.tcard--dark { background: var(--ink); border-color: var(--ink); color: var(--fog); }
.tcard--dark p:last-child { color: var(--mist); }

.steps { margin-top: 36px; display: grid; gap: 16px; }
.step { padding: 28px 24px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.step__n { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--amber); color: var(--ink); display: grid; place-items: center; font: 800 24px/1 var(--font-title); }
.step h3 { font: 700 23px/1.2 var(--font-title); letter-spacing: -0.02em; }
.step p { color: var(--slate); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { padding: 6px 12px; border-radius: var(--r-sm); background: var(--mist); font-weight: 600; font-size: 14px; }

.team { display: grid; gap: 40px; align-items: center; }
.checks { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.checks li { position: relative; padding-left: 36px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 14px; height: 7px; border-left: 2.5px solid var(--forest); border-bottom: 2.5px solid var(--forest); transform: rotate(-45deg); }
.checks b { font-weight: 600; }
.panel { border-radius: var(--r-lg); overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: 0 30px 70px rgba(18, 48, 47, 0.18); min-width: 0; }
.panel__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--fog); border-bottom: 1px solid var(--line); }
.panel__bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.panel__bar span { margin-left: 10px; font-size: 13px; font-weight: 500; color: var(--slate); }
.panel__body { display: grid; }
.panel__list { padding: 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.panel__title { font-size: 13px; font-weight: 700; color: var(--slate); margin-bottom: 4px; }
.pitem { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: var(--r-md); }
.pitem--on { background: var(--mist); }
.pitem b { display: block; font-size: 14px; font-weight: 600; }
.pitem span span { display: block; font-size: 12px; color: var(--slate); }
.pav { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--forest); color: var(--white); font-weight: 700; font-size: 13px; display: grid; place-items: center; }
.pav--amber { background: var(--amber); color: var(--ink); }
.panel__lead { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; color: var(--wa-tx); }
.panel__lead-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel__lead-top b { font-weight: 600; font-size: 16px; }
.panel__lead-top span { font-size: 13px; font-weight: 600; color: var(--bot-ink); }
.panel__lead .lead__segs { margin: 0; }
.panel__lead .lead__seller-k { margin: 2px 0 0; }
.panel__take { margin-top: 4px; min-height: 44px; border-radius: var(--r-md); background: var(--ink); color: var(--fog); font-weight: 600; font-size: 15px; display: grid; place-items: center; }

.pilot { position: relative; overflow: hidden; border-radius: 28px; background: var(--ink); color: var(--fog); padding: 32px 22px; display: grid; gap: 36px; }
.pilot::before { content: ""; position: absolute; right: -80px; top: -20px; width: 280px; height: 56px; border-radius: var(--r-md); background: var(--amber); opacity: 0.12; }
.pilot__text { position: relative; }
.pilot__tag { display: inline-flex; padding: 6px 14px; border-radius: 999px; background: var(--amber); color: var(--ink); font-weight: 700; font-size: 14px; line-height: 1.3; }
.pilot .lp-h2 { margin-top: 18px; }
.pilot__lead { margin: 18px 0 28px; font-size: 18px; color: var(--mist); }
.pilot__steps { position: relative; display: flex; flex-direction: column; gap: 12px; }
.pilot__steps li { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--r-lg); background: var(--ink-soft); }
.pilot__n { flex: none; width: 28px; font: 800 30px/1 var(--font-title); color: var(--amber); }
.pilot__steps b { display: block; font-weight: 600; font-size: 18px; }
.pilot__steps b + span { display: block; margin-top: 4px; font-size: 16px; color: var(--mist-dark); }

.about { display: flex; align-items: center; gap: 18px; padding: 22px 20px; border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); max-width: 860px; }
.about__photo { flex: none; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; background: var(--mist); box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--amber); }
.about .lp-kicker { font-size: 12px; }
.about__h { margin-top: 4px; font: 800 24px/1.15 var(--font-title); letter-spacing: -0.02em; }
.about__bio { margin-top: 6px; color: var(--slate); font-size: 16px; }

.faq { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.faq__item { border-radius: var(--r-lg); background: var(--white); border: 1px solid var(--line); padding: 0 22px; transition: border-color 200ms; }
.faq__item[open] { border-color: var(--ink); }
.faq__item summary { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; font-size: 18px; line-height: 1.35; cursor: pointer; list-style: none; padding: 12px 0; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__plus { flex: none; font-size: 28px; font-weight: 400; line-height: 1; color: var(--forest); transition: transform 250ms var(--ease); }
.faq__item[open] .faq__plus { transform: rotate(45deg); }
.faq__item p { margin: 0 0 22px; color: var(--slate); }
.faq__item[open] p { animation: faq-in 300ms var(--ease); }
@keyframes faq-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (pointer: fine) { .faq__item:not([open]):hover { border-color: var(--forest); } }

.lp-other { border-top: 1px solid var(--line); }
.lp-other__in { padding-top: 48px; padding-bottom: 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.lp-other__h { font: 700 24px/1.2 var(--font-title); letter-spacing: -0.02em; }
.lp-other p { margin-top: 8px; color: var(--slate); max-width: 560px; }

.lp-footer { background: var(--ink); color: var(--fog); }
.lp-footer .lp-wrap { padding-top: 64px; padding-bottom: 32px; }
.lp-footer__cta { display: grid; gap: 28px; }
.lp-footer__h { font: 800 36px/1.02 var(--font-title); letter-spacing: -0.035em; max-width: 760px; text-wrap: balance; }
.lp-footer__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-footer__base { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--ink-line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; font-size: 15px; color: var(--mist-dark); }
.lp-footer__brand { display: flex; align-items: center; gap: 10px; }
.lp-footer__links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.lp-footer__links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--mist); }

/* Barra fija de celular: demo + WhatsApp */
.lp-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 10px;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: var(--fog); border-top: 1px solid var(--line);
}
.lp-sticky .btn--amber { flex: 1; }
.lp-sticky__wa { flex: none; width: 52px; padding: 0; }

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  :root { --gutter: 32px; }
  .lp-nav__links { display: flex; align-items: center; gap: 28px; margin-left: auto; }
  .lp-hero h1 { font-size: 58px; }
  .lp-hero__ctas { flex-direction: row; flex-wrap: wrap; }
  .lp-h2 { font-size: 42px; }
  .lp-h2--sm { font-size: 38px; }
  .timeline, .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .panel__body { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .panel__list { border-bottom: 0; border-right: 1px solid var(--line); }
  .pilot { padding: 48px; }
  .about { gap: 24px; padding: 26px 30px; }
  .about__photo { width: 96px; height: 96px; }
  .lp-footer__h { font-size: 52px; }
  .lp-section { padding: 88px 0; }
  .lp-section--tight { padding: 24px 0; }
}

/* ---------- Escritorio ---------- */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .lp-sticky { display: none; }
  .lp-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); align-items: center; gap: 56px; padding-top: 48px; padding-bottom: 96px; }
  .lp-hero h1 { font-size: 72px; }
  .lp-hero__lead { font-size: 20px; }
  .lp-hero__visual { display: block; padding-bottom: 40px; }
  .lead { position: absolute; margin: 0; right: -12px; bottom: 0; }
  .team { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; }
  .pilot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 64px; }
  .lp-footer__cta { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .lp-footer__h { font-size: 64px; }
}

/* ---------- Movimiento ---------- */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .step, .tcard { transition: transform 250ms var(--ease), border-color 250ms; }
  .step:hover, .tcard:not(.tcard--dark):hover { transform: translateY(-4px); border-color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Estados de la conversación de ejemplo (los pone el JS; sin JS se ve todo completo) */
.lead .lrow.pending .lrow__ck { background: transparent; border: 1.6px solid #8A919C; }
.lead .lrow.pending .lrow__ck::after { display: none; }
.lead .lrow.pending .lrow__v { color: #5C636D; }
.lead .lrow.pending .lrow__v::before { content: "Esperando respuesta"; }
.lead .lrow.pending .lrow__v { font-size: 0; }
.lead .lrow.pending .lrow__v::before { font-size: 13.5px; }
.lead__segs i.off { background: #E2E4EA; }

/* Página 404: ocupa la pantalla, sin barra fija */
.nf { padding-bottom: 0; background: var(--ink); }
.lp-hero--nf { min-height: 100svh; }
