/* ============================================================
   KOI COMUNICACIÓN — landing.css
   Componentes compartidos por las landings de servicio.
   Depende de tokens.css + styles.css. Cada landing añade
   sus widgets únicos en un <style> propio.
   ============================================================ */

/* ---------------- Hero de servicio ---------------- */
.lhero { position: relative; overflow: hidden; color: #fff; background: var(--grad-hero); isolation: isolate; }
.lhero__deco { position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, #000, transparent); }
.lhero__glow { position: absolute; z-index: -1; width: 60vw; height: 60vw; right: -12vw; top: -20vw; border-radius: 50%; background: radial-gradient(circle, rgba(90,249,85,.22), transparent 60%); filter: blur(20px); }
.lhero__inner { position: relative; max-width: 62ch; padding: clamp(3.4rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem); }
.lhero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 600;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--verde);
  background: rgba(90,249,85,.12); border: 1px solid rgba(90,249,85,.32); padding: .4rem .9rem; border-radius: var(--r-pill); margin-bottom: 1.1rem;
}
.lhero__eyebrow svg { width: 16px; height: 16px; }
.lhero__title { font-size: var(--fs-h1); margin-bottom: 1rem; }
.lhero__title .hl { color: var(--verde); }
.lhero__sub { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: rgba(255,255,255,.82); margin-bottom: 1.7rem; }
.lhero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------------- Sub-nav sticky (bajo el header) ---------------- */
.lsection[id], .lhero[id] { scroll-margin-top: 120px; }
.subnav { position: sticky; top: 72px; z-index: 80; background: var(--header-bg); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.subnav__inner { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding: .6rem 0; }
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav a { flex: 0 0 auto; padding: .5rem .95rem; border-radius: var(--r-pill); font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--text-soft); white-space: nowrap; transition: background .2s var(--ease), color .2s var(--ease); }
.subnav a:hover { background: var(--surface-2); color: var(--text); }
.subnav a.is-active { background: var(--grad-koi); color: #fff; }
:root[data-theme="dark"] .subnav a.is-active { background: var(--verde); color: var(--negro); }

/* ---------------- Facts / stats (banda negra → cifras verdes) ---------------- */
.facts { background: var(--negro); color: #fff; }
.facts__inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 1.6rem 0; text-align: center; }
.fact .n { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--verde); }
.fact .l { font-size: .82rem; color: rgba(255,255,255,.7); letter-spacing: .03em; }
@media (max-width: 620px) { .facts__inner { grid-template-columns: 1fr 1fr; gap: 1.4rem 1rem; } }

/* ---------------- Landing sections ---------------- */
.lsection { padding: clamp(3rem, 7vw, 5.5rem) 0; position: relative; }
.lsection--soft { background: var(--bg-soft); }
.lsection--dark {
  background:
    radial-gradient(circle at 90% 14%, transparent 84px, rgba(90,249,85,.12) 85px, rgba(90,249,85,.12) 106px, transparent 107px),
    radial-gradient(circle at 6% 88%, transparent 50px, rgba(226,5,111,.16) 51px, rgba(226,5,111,.16) 64px, transparent 65px),
    radial-gradient(circle at 95% 76%, rgba(90,249,85,.5) 5px, transparent 6px),
    radial-gradient(860px 500px at 80% -12%, rgba(90,249,85,.08), transparent 62%),
    radial-gradient(720px 500px at -8% 112%, rgba(226,5,111,.09), transparent 62%),
    var(--grad-ink);
  color: #fff;
}
.lsection--dark .lhead__lead { color: rgba(255,255,255,.75); }

/* glow que sigue al cursor (equivalente a .section--spot de styles.css) */
.lsection--spot { --mx: 50%; --my: 20%; }
.lsection--spot::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(63,13,201,.10), transparent 60%);
  transition: background .2s linear;
}
.lsection--spot--warm::before { background: radial-gradient(420px circle at var(--mx) var(--my), rgba(226,5,111,.09), transparent 60%); }
.lsection--spot > .container { position: relative; z-index: 1; }
.lhead { max-width: 60ch; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.lhead--center { margin-inline: auto; text-align: center; }
.lhead__title { font-size: var(--fs-h2); }
.lhead__lead { font-size: clamp(1rem, 1.3vw, 1.12rem); color: var(--text-soft); }
.lsection--dark .lhead__eyebrow { color: var(--verde); background: rgba(90,249,85,.14); }

/* ---------------- Chips / tabs (reutilizables) ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.chip {
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; cursor: pointer;
  padding: .55rem 1.05rem; border-radius: var(--r-pill); border: 1.5px solid var(--line);
  background: var(--surface); color: var(--text-soft); transition: all .22s var(--ease);
}
.chip:hover { border-color: var(--azul); color: var(--text); }
.chip.is-active, .chip[aria-checked="true"], .chip[aria-selected="true"] { background: var(--grad-koi); border-color: transparent; color: #fff; box-shadow: var(--shadow-azul); }
:root[data-theme="dark"] .chip:hover { border-color: var(--verde); }
:root[data-theme="dark"] .chip.is-active, :root[data-theme="dark"] .chip[aria-checked="true"], :root[data-theme="dark"] .chip[aria-selected="true"] { background: var(--verde); color: var(--negro); box-shadow: var(--shadow-verde); }
.lsection--dark .chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.85); }
.lsection--dark .chip.is-active, .lsection--dark .chip[aria-selected="true"], .lsection--dark .chip[aria-checked="true"] { background: var(--verde); color: var(--negro); }

/* ---------------- Comparador antes / después ---------------- */
.ba { --pos: 50%; position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); user-select: none; touch-action: none; cursor: ew-resize; max-width: 900px; margin-inline: auto; }
.ba__layer { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ba__after { z-index: 1; }
.ba__before { z-index: 2; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__tag { position: absolute; top: 12px; z-index: 4; font-family: var(--font-display); font-weight: 600; font-size: .78rem; padding: .3rem .7rem; border-radius: var(--r-pill); color: #fff; backdrop-filter: blur(4px); }
.ba__tag--before { left: 12px; background: rgba(34,30,34,.6); }
.ba__tag--after { right: 12px; background: rgba(90,249,85,.8); color: var(--negro); }
.ba__divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; z-index: 3; transform: translateX(-1.5px); box-shadow: 0 0 12px rgba(0,0,0,.3); }
.ba__knob { position: absolute; top: 50%; left: var(--pos); z-index: 5; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: var(--azul); display: grid; place-items: center; font-size: 1.1rem; box-shadow: var(--shadow-md); pointer-events: none; }
.ba__range { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba__range:focus-visible + .ba__knob, .ba__range:focus-visible ~ .ba__knob { outline: 3px solid var(--azul); }
:root[data-theme="dark"] .ba__range:focus-visible + .ba__knob, :root[data-theme="dark"] .ba__range:focus-visible ~ .ba__knob { outline-color: var(--verde); }

/* ---------------- Benefits grid ---------------- */
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.9rem, 2vw, 1.4rem); }
.benefit {
  display: flex; align-items: center; gap: .9rem; padding: 1.2rem 1.3rem; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.benefit:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.benefit__ico { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 auto; border-radius: var(--r-sm); background: var(--surface-2); color: var(--azul); }
:root[data-theme="dark"] .benefit__ico { color: var(--verde); }
.benefit__ico svg { width: 24px; height: 24px; }
.lsection--dark .benefit { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: #fff; }
.lsection--dark .benefit__ico { background: rgba(90,249,85,.15); color: var(--verde); }
@media (max-width: 800px) { .benefits-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .benefits-grid { grid-template-columns: 1fr; } }

/* ---------------- CTA band (fondo azul → texto blanco) ---------------- */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem; padding: clamp(1.8rem, 4vw, 2.6rem); border-radius: var(--r-lg); background: var(--grad-koi-2); color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.4) 1px, transparent 1px); background-size: 24px 24px; opacity: .3; pointer-events: none; }
.cta-band h3 { font-size: var(--fs-h3); margin: 0 0 .3rem; position: relative; }
.cta-band p { margin: 0; color: rgba(255,255,255,.82); position: relative; max-width: 44ch; }
.cta-band .btn { position: relative; }

/* ---------------- Estimador -> WhatsApp ---------------- */
.estimator { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.2rem, 3vw, 2rem); align-items: start; }
.estimator__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-md); }
.estimator__out { background: var(--surface-2); border-radius: var(--r-sm); padding: .9rem 1.1rem; font-size: .95rem; color: var(--text); margin: .4rem 0 1.1rem; min-height: 3.4em; }
.estimator__out b { color: var(--azul); }
:root[data-theme="dark"] .estimator__out b { color: var(--verde); }
.estimator__aside { align-self: stretch; background: var(--grad-ink); color: #fff; border-radius: var(--r-lg); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow-md); }
.estimator__aside ul { display: grid; gap: .8rem; }
.estimator__aside li { position: relative; padding-left: 1.8rem; color: rgba(255,255,255,.86); font-size: .95rem; }
.estimator__aside li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--verde); color: var(--negro); font-size: .72rem; font-weight: 700; }
@media (max-width: 760px) { .estimator { grid-template-columns: 1fr; } }

/* ---------------- Barra CTA fija (móvil) ---------------- */
.mcta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: none; padding: .7rem var(--gutter); background: var(--header-bg); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(var(--shadow-color),.16); }
.mcta .btn { width: 100%; }
@media (max-width: 720px) { .mcta { display: block; } .wa-float { display: none; } body { padding-bottom: 78px; } }

/* ---------------- Split media / feature rows ---------------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 3vw, 2.6rem); align-items: center; }
.feature-row--rev .feature-row__media { order: 2; }
.feature-row__media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--grad-hero); min-height: 300px; position: relative; }
.feature-row ul { display: grid; gap: .7rem; margin-top: 1rem; }
.feature-row ul li { position: relative; padding-left: 1.8rem; color: var(--text-soft); }
.feature-row ul li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 14px; border-radius: 50%; background: var(--grad-koi); }
:root[data-theme="dark"] .feature-row ul li::before { background: var(--grad-verde); }
@media (max-width: 760px) { .feature-row { grid-template-columns: 1fr; } .feature-row--rev .feature-row__media { order: 0; } }

/* ---------------- Pill tags ---------------- */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tag { font-size: .85rem; font-weight: 600; padding: .35rem .8rem; border-radius: var(--r-pill); background: var(--surface-2); color: var(--azul); border: 1px solid var(--line); }
:root[data-theme="dark"] .tag { color: var(--verde); }
.lsection--dark .tag { background: rgba(255,255,255,.08); color: var(--verde); border-color: rgba(255,255,255,.15); }

/* ---------------- Placeholder badge (imágenes ilustrativas) ---------------- */
.ph-badge { position: absolute; bottom: 10px; right: 10px; z-index: 4; font-size: .68rem; font-weight: 600; letter-spacing: .04em; color: rgba(255,255,255,.85); background: rgba(34,30,34,.55); padding: .25rem .6rem; border-radius: var(--r-pill); backdrop-filter: blur(4px); }
