/* =============================================================================
   home.css — La página principal y las fichas de proyecto (retoque 2026-11).

   Carga DESPUÉS de styles.css y solo en index.html y base.html (body.home).
   styles.css sigue siendo la base de /partners, /seguridad y /privacidad y de
   lo compartido (header, tokens, formulario, botones antiguos): aquí no se
   redefine nada de esas páginas.

   Identidad (CONVENTIONS §8): acento #00BFDB, negro / grises / blanco, nunca
   navy. Space Grotesk en títulos, Inter en cuerpo. Lo nuevo es la composición:
   secciones claras y oscuras que se alternan, capturas enmarcadas como una
   sola familia, y un solo botón de acción repetido a lo largo de la página.
   ========================================================================== */

.home {
  --dark: #0c0d0e;
  --dark-2: #15171a;
  --dark-3: #1e2125;
  --dark-line: rgba(255, 255, 255, 0.09);
  --on-dark: #f3f5f6;
  --on-dark-muted: #a3abb3;
  --radius: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.wrap2 { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 32px; }

.home .header .wrap { max-width: 1200px; }
.home .header { transition: box-shadow 0.25s ease, background 0.25s ease; }
.home .header.is-scrolled { box-shadow: 0 6px 24px -18px rgba(12, 13, 14, 0.5); }
.scroll-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }

/* ----------------------------------------------------------------- botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.005em;
  line-height: 1.2;
  text-decoration: none;
  padding: 15px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.btn svg { width: 18px; height: 18px; flex: 0 0 auto; transition: transform 0.18s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 28px -12px rgba(0, 191, 219, 0.75);
}
.btn--primary:hover { box-shadow: 0 16px 34px -12px rgba(0, 191, 219, 0.85); }
.btn--ghost { border-color: rgba(12, 13, 14, 0.16); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--quiet { border-color: var(--line); color: var(--ink-soft); font-weight: 500; }
.btn--quiet:hover { border-color: var(--ink-soft); }
.btn:focus-visible,
.chipbtn:focus-visible,
.pcard__link:focus-visible,
.door__link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.tlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0a8ea3;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
}
.tlink svg { width: 16px; height: 16px; transition: transform 0.18s var(--ease); }
.tlink:hover svg { transform: translateX(3px); }
.tlink--light { color: var(--accent); }

/* ---------------------------------------------------- aparición al scroll */
.js-motion .rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.7s var(--ease);
}
.js-motion .rv.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------- marcos de captura */
.frame { position: relative; background: #fff; }
.frame__screen { overflow: hidden; background: #fff; }
.frame__screen img,
.frame__screen video { display: block; width: 100%; height: auto; }

.frame--browser {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  background: #e9ecef;
}
.frame__bar span { width: 7px; height: 7px; border-radius: 50%; background: #c4cad0; }
.frame__bar em {
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fff;
  color: #6a7178;
  font: 500 10.5px/1.4 var(--font-body);
  font-style: normal;
}

.frame--phone {
  border: 8px solid #0c0d0e;
  border-radius: 34px;
  background: #0c0d0e;
  box-shadow: 0 34px 70px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.frame--phone .frame__screen { border-radius: 26px; }
.frame__notch {
  position: absolute;
  z-index: 2;
  top: 7px;
  left: 50%;
  width: 62px;
  height: 14px;
  margin-left: -31px;
  border-radius: 999px;
  background: #0c0d0e;
}

/* Una captura real de teléfono ya trae su barra de estado: sin muesca encima. */
.frame--phone:has(img, video) .frame__notch { display: none; }

.frame--paper {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 60px -26px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* El escenario: mismo fondo y mismo encuadre para cualquier captura. */
.stage {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(0, 191, 219, 0.16), transparent 70%),
    linear-gradient(180deg, #24282d, #15171a);
}
.stage .frame { position: absolute; transition: transform 0.6s var(--ease); }
.stage--browser .frame { top: 13%; left: 9%; right: 9%; }
.stage--phone .frame { top: 10%; left: 50%; width: 40%; margin-left: -20%; }
.stage--paper .frame { top: 10%; left: 50%; width: 46%; margin-left: -23%; transform: rotate(-2.5deg); }

/* -------------------------------------------------------------------- hero */
.hero2 {
  position: relative;
  overflow: hidden;
  padding: 76px 0 96px;
  background:
    radial-gradient(48% 62% at 88% 30%, rgba(0, 191, 219, 0.13), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(0, 191, 219, 0.06), transparent 70%),
    #fff;
}
.hero2__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
}
.hero2__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(42px, 6.1vw, 80px);
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.hero2__lead {
  margin: 26px 0 0;
  max-width: 30em;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--ink-soft);
}
.hero2__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero2__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: var(--muted);
}
.hero2__notes li { display: inline-flex; align-items: center; gap: 7px; }
.hero2__notes svg { width: 14px; height: 14px; color: var(--accent); }

/* La demostración: un sistema al fondo, un agente contestando al frente. */
.demo { position: relative; margin: 0; padding-bottom: 34px; min-height: 590px; }
/* Tablero de fondo: dibujado en código, oscuro, con el cian como única luz. */
.dash {
  position: absolute;
  top: 30px;
  left: 196px;
  width: 424px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(0, 191, 219, 0.2), transparent 70%),
    #0c0d0e;
  color: #f3f5f6;
  box-shadow: 0 50px 90px -40px rgba(12, 13, 14, 0.65), 0 0 0 1px rgba(12, 13, 14, 0.04);
}
.dash__bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.dash__bar span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.dash__bar em { margin-left: 86px; font: 500 11.5px/1 var(--font-head); font-style: normal; letter-spacing: 0.04em; color: #a3abb3; }
/* El lado izquierdo queda bajo el teléfono: el contenido empieza después. */
.dash__body { padding: 16px 16px 16px 100px; }
.dash__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.dash__kpis li { padding: 12px 12px 11px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.dash__kpis li:first-child { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.dash__kpis strong { display: block; font: 700 23px/1 var(--font-head); letter-spacing: -0.03em; }
.dash__kpis small { display: block; margin-top: 7px; font-size: 10.5px; line-height: 1.25; color: #a3abb3; }
.dash__kpis li:first-child small { color: rgba(6, 52, 60, 0.82); }
.dash__chart { margin-top: 10px; padding: 13px 14px 0; border-radius: 12px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); overflow: hidden; }
.dash__chart p { margin: 0 0 6px; font-size: 10.5px; color: #a3abb3; }
.dash__chart svg { display: block; width: calc(100% + 28px); height: 190px; margin: 0 -14px; }
.dash__grid line { stroke: rgba(255, 255, 255, 0.06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dash__line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(0, 191, 219, 0.7)); }
.js-motion .dash__line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dash-draw 2.4s 0.5s var(--ease) forwards; }
.js-motion .dash__area { opacity: 0; animation: dash-fade 1.2s 1.7s ease forwards; }
@keyframes dash-draw { to { stroke-dashoffset: 0; } }
@keyframes dash-fade { to { opacity: 1; } }
.dash__bar .dash__pill { margin-left: auto; }
.dash__pill { padding: 4px 9px; border-radius: 999px; font: 600 10.5px/1 var(--font-head); letter-spacing: 0.02em; white-space: nowrap; }
.dash__pill--live { background: rgba(0, 191, 219, 0.16); color: var(--accent); }
.dash__pill--live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent); animation: live 1.6s infinite ease-in-out; }
@keyframes live { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* El agente trabajando: una lista de pasos que se va palomeando. */
.run {
  position: absolute;
  z-index: 3;
  left: 318px;
  top: 388px;
  width: 262px;
  padding: 15px 16px 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 60px -26px rgba(12, 13, 14, 0.5), 0 0 0 1px rgba(12, 13, 14, 0.06);
}
.run__title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 600 13px/1.2 var(--font-head); }
.run__title i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(0, 191, 219, 0.2); }
.run ol { margin: 0; padding: 0; list-style: none; }
.run li { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 12.5px; line-height: 1.3; color: var(--ink-soft); transition: color 0.4s ease, opacity 0.4s ease; }
.run__check { display: grid; place-items: center; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; transition: background 0.35s ease, transform 0.45s var(--ease); }
.run__check svg { width: 11px; height: 11px; }
.demo.is-playing .run li:not(.is-shown) { color: var(--muted-2); }
.demo.is-playing .run li:not(.is-shown) .run__check { background: #e6e8eb; transform: scale(0.82); }
.demo.is-playing .run li:not(.is-shown) .run__check svg { opacity: 0; }

.demo__phone { position: absolute; left: 0; top: 0; width: 280px; }
.demo__phone .frame--phone { box-shadow: 0 40px 80px -34px rgba(12, 13, 14, 0.6); }
.demo__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  font-size: 12.5px;
  color: var(--muted-2);
}
.demo__chip {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 16px 11px 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 44px -22px rgba(12, 13, 14, 0.45), 0 0 0 1px rgba(12, 13, 14, 0.06);
  transition: opacity 0.45s ease, transform 0.6s var(--ease);
}
.demo__chip strong { display: block; font: 600 14px/1.25 var(--font-head); }
.demo__chip small { display: block; font-size: 12px; color: var(--muted); }
.demo__chip--result { left: 236px; top: 306px; }
.demo__check {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}
.demo__check svg { width: 16px; height: 16px; }
.demo__dot {
  width: 10px;
  height: 10px;
  margin: 0 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(0, 191, 219, 0.18);
}
.demo.is-playing .demo__chip:not(.is-shown) { opacity: 0; transform: translateY(12px) scale(0.96); }

.chat { display: flex; flex-direction: column; height: 536px; background: #efeae2; }
.chat__head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 26px 13px 10px;
  background: #f6f7f8;
  border-bottom: 1px solid #e3e6e8;
}
.chat__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00bfdb, #06343c);
}
.chat__who strong { display: block; font: 600 13px/1.2 var(--font-body); color: #111; }
.chat__who small { display: block; font-size: 10.5px; color: #6a7178; }
.chat__list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 13px 10px;
  list-style: none;
  overflow: hidden;
}
.chat__msg {
  max-width: 86%;
  padding: 7px 9px 5px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.38;
  color: #111;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.1);
}
.chat__msg time { display: block; margin-top: 2px; font-size: 9.5px; color: #7b848b; text-align: right; }
.chat__msg--in { align-self: flex-end; background: #d9fdd3; border-top-right-radius: 3px; }
.chat__msg--out { align-self: flex-start; background: #fff; border-top-left-radius: 3px; }
.chat__note {
  align-self: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(12, 13, 14, 0.09);
  color: #50585f;
  font-size: 10.5px;
  text-align: center;
}
.chat__typing { display: none; align-self: flex-start; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #fff; }
.chat__typing.is-on { display: inline-flex; }
.chat__typing i { width: 5px; height: 5px; border-radius: 50%; background: #9aa1a8; animation: typing 1s infinite ease-in-out; }
.chat__typing i:nth-child(2) { animation-delay: 0.15s; }
.chat__typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
.demo.is-playing .chat__list [data-step]:not(.is-shown) { display: none; }
.demo.is-playing .chat__list [data-step].is-shown { animation: msg-in 0.35s var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------- secciones */
.sec { padding: 108px 0; }
.sec__head { max-width: 760px; margin-bottom: 48px; }
.sec__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.sec__lead { margin: 18px 0 0; max-width: 34em; font-size: 18px; line-height: 1.55; color: var(--muted); }
.sec--dark { background: var(--dark); color: var(--on-dark); }
.sec--dark .sec__lead { color: var(--on-dark-muted); }

/* ---------------------------------------------------------- qué construimos */
.sec--doors { padding-top: 96px; border-top: 1px solid var(--line-2); }
.doors {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.door {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 32px;
  border-radius: 24px;
  background: var(--soft);
}
.door--main {
  grid-row: 1 / span 2;
  padding: 40px;
  color: var(--on-dark);
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(0, 191, 219, 0.28), transparent 70%),
    var(--dark);
}
.door__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #fff;
  color: #0a8ea3;
  box-shadow: 0 0 0 1px var(--line);
}
.door__icon svg { width: 24px; height: 24px; }
.door--main .door__icon { background: rgba(255, 255, 255, 0.08); color: var(--accent); box-shadow: 0 0 0 1px var(--dark-line); }
.door__title { margin: 22px 0 0; font: 700 26px/1.15 var(--font-head); letter-spacing: -0.02em; }
.door--main .door__title { font-size: clamp(30px, 3.4vw, 42px); }
.door__text { margin: 12px 0 0; max-width: 32em; font-size: 16px; line-height: 1.55; color: var(--muted); }
.door--main .door__text { font-size: 17.5px; color: #c6ccd2; }
.door__channels { margin-top: 28px; }
.door__channels p { margin: 0 0 12px; font-size: 13px; color: var(--on-dark-muted); }
.door__channels ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.door__channels li {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13.5px;
  color: var(--on-dark);
}
.door__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 26px;
  color: #0a8ea3;
  font: 600 15px/1.2 var(--font-head);
  text-decoration: none;
}
.door--main .door__link { color: var(--accent); padding-top: 34px; }
.door__link svg { width: 17px; height: 17px; transition: transform 0.18s var(--ease); }
.door__link:hover svg { transform: translateX(4px); }

/* --------------------------------------------------------------- proyectos */
.sec--work { scroll-margin-top: 60px; }
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.filters__kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.chipbtn {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: none;
  color: #cfd4d9;
  font: 500 14.5px/1.2 var(--font-head);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chipbtn:hover { border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.chipbtn.is-active { background: #fff; border-color: #fff; color: var(--dark); }
.filters__industry { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; color: var(--on-dark-muted); }
.filters__industry select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 250px;
  padding: 10px 40px 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: var(--dark-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3abb3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 14px center / 16px;
  color: #fff;
  font: 500 14.5px/1.2 var(--font-head);
  cursor: pointer;
}
.filters__industry select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.pgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pcard { min-width: 0; }
.pcard__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--dark-line);
  background: var(--dark-2);
  color: var(--on-dark);
  text-decoration: none;
  transition: transform 0.3s var(--ease), border-color 0.25s ease, box-shadow 0.3s ease;
}
.pcard__link:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 191, 219, 0.55);
  box-shadow: 0 30px 60px -34px rgba(0, 191, 219, 0.5);
}
.pcard__link:hover .stage--browser .frame,
.pcard__link:hover .stage--phone .frame { transform: translateY(-10px); }
.pcard__link:hover .stage--paper .frame { transform: rotate(-1deg) translateY(-10px); }
.pcard__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.pcard__tag {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
  font: 600 11.5px/1.4 var(--font-head);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.pcard__tag span:first-child { color: var(--accent); }
.pcard__tag span + span { color: var(--on-dark-muted); }
.pcard__tag span + span::before { content: "·"; margin-right: 10px; }
.pcard__title { margin: 10px 0 0; font: 600 19px/1.28 var(--font-head); letter-spacing: -0.012em; text-wrap: pretty; }
.pcard__text { margin: 10px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--on-dark-muted); }
.pcard__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--accent);
  font: 600 14px/1.2 var(--font-head);
}
.pcard__more svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.pcard__link:hover .pcard__more svg { transform: translateX(4px); }

.pcard--lead { grid-column: 1 / -1; }
.pcard--lead .pcard__link { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.pcard--lead .stage { aspect-ratio: auto; min-height: 400px; height: 100%; }
.pcard--lead .stage--phone .frame { width: 46%; margin-left: -23%; top: 9%; }
.pcard--lead .stage--paper .frame { width: 36%; margin-left: -18%; }
.pcard--lead .pcard__body { justify-content: center; padding: 44px; }
.pcard--lead .pcard__title { font-size: clamp(24px, 2.5vw, 32px); line-height: 1.14; letter-spacing: -0.022em; margin-top: 14px; }
.pcard--lead .pcard__text { font-size: 16px; margin-top: 16px; }
.pcard--lead .pcard__more { margin-top: 26px; padding-top: 0; font-size: 15px; }

.pcard--ask { grid-column: 1 / -1; }
.pcard--ask .pcard__body { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; min-height: 0 !important; padding: 30px 34px; }
.pcard--ask .pcard__more { margin-top: 0 !important; font-size: 15.5px; }
.pcard--ask .pcard__link { border-style: dashed; border-color: rgba(255, 255, 255, 0.22); background: none; }
.pcard--ask .pcard__body { justify-content: center; min-height: 220px; }
.pcard--ask .pcard__title { margin: 0; font-size: 22px; }
.pcard--ask .pcard__more { margin-top: 14px; padding-top: 0; }

.pgrid--flat .pcard--lead { grid-column: auto; }

/* --------------------------------------------------------------- confianza */
.trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.trust__item { padding-top: 22px; border-top: 2px solid var(--ink); }
.trust__item h3 { margin: 0; font: 700 21px/1.2 var(--font-head); letter-spacing: -0.015em; }
.trust__item p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.trust__item .tlink { margin-top: 14px; }

/* La garantía reusa el HTML de render.js (sectionGuarantee), el mismo que
   imprime /seguridad: aquí solo se le da su lugar. El texto no se toca. */
.guarantee { max-width: 1200px; margin: 84px auto 0; padding: 0 32px; }
.home .guarantee .section { padding: 0; }
.home .guarantee .wrap {
  max-width: none;
  padding: 52px;
  border-radius: 28px;
  background: var(--soft);
}
.home .guarantee .section__title {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 30px;
}
.home .guarantee .cards { counter-reset: g; gap: 16px; }
.home .guarantee .card {
  counter-increment: g;
  padding: 26px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line-2);
}
.home .guarantee .card::before {
  content: "0" counter(g);
  display: block;
  margin-bottom: 16px;
  color: #0a8ea3;
  font: 700 13px/1 var(--font-head);
  letter-spacing: 0.12em;
}
.home .guarantee .card__title { font-size: 20px; }
.home .guarantee .card__text { font-size: 15px; color: var(--ink-soft); }
.home .guarantee .footnote { margin: 24px 0 0; color: var(--muted); font-style: normal; font-size: 14px; }

/* ----------------------------------------------------------- cómo empezamos */
.sec--steps { padding-top: 0; }
.psteps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pstep { position: relative; }
.pstep__n {
  display: block;
  font: 700 76px/1 var(--font-head);
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}
.pstep__title { margin: 16px 0 0; font: 700 22px/1.2 var(--font-head); letter-spacing: -0.015em; }
.pstep__text { margin: 8px 0 0; color: var(--muted); font-size: 16px; max-width: 26em; }
.steps__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin-top: 56px;
  padding: 26px 30px;
  border-radius: 22px;
  border: 1px solid var(--line);
}
.steps__price { margin: 0; font: 600 18px/1.35 var(--font-head); letter-spacing: -0.01em; }
.steps__price span { display: block; margin-top: 4px; font: 400 14.5px/1.5 var(--font-body); letter-spacing: 0; color: var(--muted); }

/* ---------------------------------------------------------------- contacto */
.contact2 {
  padding: 108px 0;
  scroll-margin-top: 56px;
  color: var(--on-dark);
  background:
    radial-gradient(50% 60% at 0% 0%, rgba(0, 191, 219, 0.16), transparent 70%),
    var(--dark);
}
.contact2__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.contact2 .sec__lead { color: #c6ccd2; }
.contact2__scarcity {
  margin: 32px 0 0;
  padding: 2px 0 2px 20px;
  border-left: 2px solid var(--accent);
  color: var(--on-dark);
  font: 500 17px/1.55 var(--font-head);
}
.contact2__about { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--dark-line); }
.contact2__about p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--on-dark-muted); }
.contact2__about .contact2__about-k {
  margin-bottom: 10px;
  color: var(--on-dark);
  font: 600 12px/1.4 var(--font-head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.contact2__about .contact2__about-line { margin-top: 12px; color: #7f878e; font-size: 13px; }
.contact2 .contact-form {
  max-width: none;
  margin: 0;
  padding: 34px;
  border-radius: 26px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 40px 90px -50px rgba(0, 191, 219, 0.6);
}
.contact2 .field input,
.contact2 .field textarea { background: #fbfcfc; border-color: #dfe3e6; font-size: 16px; }
.contact2 .btn-submit { padding: 15px 28px; font-size: 15.5px; box-shadow: 0 10px 28px -12px rgba(0, 191, 219, 0.75); }
.contact2 .contact-mode__base { border-radius: 14px; }

.home .footer { background: var(--dark); border-top: 1px solid var(--dark-line); }
.home .footer .wrap { max-width: 1200px; }
.home .footer__link { color: #7f878e; }
.home .footer__link:hover,
.home .footer__link:focus-visible { color: var(--on-dark); }

/* Botón fijo en móvil. */
.stickycta {
  position: fixed;
  z-index: 60;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 15.5px/1.2 var(--font-head);
  text-decoration: none;
  box-shadow: 0 18px 40px -14px rgba(12, 13, 14, 0.55);
  transform: translateY(160%);
  transition: transform 0.4s var(--ease);
}
.stickycta svg { width: 18px; height: 18px; }
.stickycta.is-on { transform: none; }

/* =============================================================================
   FICHA DE PROYECTO (/bases/<código>) e índice /bases
   ========================================================================== */
.base-page.home main { display: block; }
.ficha__head { padding: 56px 0 52px; }
.ficha__back {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 30px;
  color: var(--muted);
  font: 500 14px/1.2 var(--font-head);
  text-decoration: none;
}
.ficha__back:hover { color: var(--ink); }
.ficha__tag span + span { color: var(--muted); }
.ficha__title {
  margin: 14px 0 0;
  max-width: 19em;
  font: 700 clamp(32px, 4.7vw, 58px)/1.04 var(--font-head);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.ficha__hook {
  margin: 22px 0 0;
  max-width: 40em;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font: 500 18px/1.5 var(--font-head);
  color: var(--ink);
}
.ficha__lead { margin: 22px 0 0; max-width: 40em; font-size: 18.5px; line-height: 1.6; color: var(--ink-soft); }
.ficha__note { margin: 14px 0 0; max-width: 46em; font-size: 14.5px; color: var(--muted); }
.ficha__note a { color: #0a8ea3; }
.ficha__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn--quiet svg { width: 17px; height: 17px; }
.btn--quiet:hover svg { transform: none; }

.ficha__stage { padding: 64px 0 40px; background: var(--dark); color: var(--on-dark); }
.stage--hero {
  width: 100%;
  aspect-ratio: auto;
  padding: 0;
  border: 0;
  border-radius: 26px;
  cursor: zoom-in;
}
.stage--hero .frame { position: relative; top: auto; left: auto; right: auto; margin: 56px auto 0; }
.stage--hero.stage--browser .frame { width: 86%; border-radius: 12px 12px 0 0; }
.stage--hero.stage--phone .frame { width: 300px; max-width: 70%; margin-bottom: 56px; }
.stage--hero.stage--paper .frame { width: 400px; max-width: 76%; margin-bottom: 56px; transform: none; }
.media__caption { margin: 18px 0 0; font-size: 14.5px; color: var(--on-dark-muted); text-align: center; }
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 22px 0 0; padding: 0; list-style: none; }
.shots--1 { grid-template-columns: minmax(0, 420px); }
.shots--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shots--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shot__button {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--dark-line);
  border-radius: 14px;
  background: #fff;
  cursor: zoom-in;
  transition: transform 0.25s var(--ease), border-color 0.2s ease;
}
.shot__button:hover { transform: translateY(-4px); border-color: rgba(0, 191, 219, 0.6); }
.shot__button img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top center; }
.shot--video video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--dark-line);
  border-radius: 14px;
  background: #fff;
}
.shot p { margin: 12px 2px 0; font-size: 13.5px; line-height: 1.5; color: var(--on-dark-muted); }
.ficha__proof { margin: 30px 0 0; font-size: 12.5px; color: #7f878e; }

.ficha__how { padding: 92px 0 100px; }
.ficha__h2 { margin: 0 0 30px; font: 700 clamp(26px, 3vw, 38px)/1.1 var(--font-head); letter-spacing: -0.025em; }
.ficha__h3 { margin: 0 0 12px; font: 700 19px/1.2 var(--font-head); letter-spacing: -0.01em; }
.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; margin: 0; padding: 0; list-style: none; }
.flow__step { position: relative; padding: 28px; border-radius: 22px; background: var(--soft); }
.flow__step + .flow__step::before {
  content: "→";
  position: absolute;
  top: 50%;
  left: -34px;
  width: 34px;
  margin-top: -14px;
  color: var(--accent);
  font: 600 22px/28px var(--font-head);
  text-align: center;
}
.flow__step--decide { background: var(--dark); color: var(--on-dark); }
.flow__k {
  display: block;
  margin-bottom: 16px;
  color: #0a8ea3;
  font: 700 12px/1 var(--font-head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.flow__step--decide .flow__k { color: var(--accent); }
.flow__step p { margin: 0; font-size: 16px; line-height: 1.6; }
.flow__step ul,
.ficha__box ul { margin: 0; padding: 0; list-style: none; }
.flow__step li,
.ficha__box li { position: relative; padding-left: 18px; font-size: 15.5px; line-height: 1.5; }
.flow__step li + li,
.ficha__box li + li { margin-top: 10px; }
.flow__step li::before,
.ficha__box li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.ficha__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.ficha__box { padding: 28px; border-radius: 22px; border: 1px solid var(--line); }
.ficha__box p { margin: 0; font-size: 16px; line-height: 1.6; }
.ficha__box--muted { color: var(--ink-soft); }
.ficha__box--muted li::before { background: var(--muted-2); }
.ficha__also { margin-top: 44px; }
.ficha__also ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ficha__also a {
  display: block;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14.5px;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.ficha__also a:hover { border-color: var(--accent); color: var(--ink); }
.home .base-work { margin-top: 20px; padding: 28px; border-radius: 22px; border: 1px solid var(--line); }

.ficha__cta {
  padding: 84px 0;
  color: var(--on-dark);
  background: radial-gradient(50% 80% at 100% 0%, rgba(0, 191, 219, 0.2), transparent 70%), var(--dark);
}
.ficha__cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 36px 56px; }
.ficha__cta .sec__lead { color: #c6ccd2; }
.ficha__cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.ficha__bridge { margin: 0; font-size: 14.5px; color: var(--on-dark-muted); }
.ficha__bridge a { color: var(--on-dark); }

.sec--index { min-height: 70vh; padding-top: 72px; }

.home .base-lightbox { max-width: min(1200px, 94vw); padding: 0; border: 0; border-radius: 18px; background: #fff; }
.home .base-lightbox::backdrop { background: rgba(12, 13, 14, 0.82); }
.home .base-lightbox img { display: block; max-width: 100%; max-height: 82vh; margin: 0 auto; }
.home .base-lightbox p { margin: 0; padding: 14px 20px 18px; font-size: 14.5px; color: var(--ink-soft); }
.home .base-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(12, 13, 14, 0.75);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

/* ============================================================== responsive */
@media (max-width: 1300px) and (min-width: 1081px) {
  .hero2__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 44px; }
  .hero2__title { font-size: clamp(46px, 5vw, 62px); }
  .dash { width: 372px; }
  .dash__kpis { grid-template-columns: repeat(2, 1fr); }
  .dash__kpis li:nth-child(3) { display: none; }
  .run { left: 300px; width: 250px; }
}
@media (max-width: 1080px) {
  .hero2__grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .demo { max-width: 560px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard--lead .pcard__link { grid-template-columns: minmax(0, 1fr); }
  .pcard--lead .stage { aspect-ratio: 16 / 10; min-height: 0; }
  .pcard--lead .pcard__body { padding: 30px; }
  .contact2__grid { gap: 44px; }
}
@media (max-width: 860px) {
  .sec, .contact2 { padding: 80px 0; }
  .sec--steps { padding-top: 0; }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .door--main { grid-row: auto; padding: 32px; }
  .trust, .psteps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pstep__n { font-size: 60px; }
  .contact2__grid { grid-template-columns: minmax(0, 1fr); }
  .flow, .ficha__pair { grid-template-columns: minmax(0, 1fr); }
  .flow { gap: 34px; }
  .flow__step + .flow__step::before { content: "↓"; top: -34px; left: 50%; margin: 0 0 0 -17px; line-height: 34px; }
  .shots, .shots--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home .guarantee .wrap { padding: 32px 24px; }
  .guarantee { margin-top: 64px; }
}
@media (max-width: 700px) {
  .wrap2, .guarantee { padding-left: 20px; padding-right: 20px; }
  .hero2 { padding: 44px 0 64px; }
  .hero2__actions .btn { flex: 1 1 100%; }
  .demo { min-height: 0; padding-bottom: 0; display: flex; flex-direction: column; align-items: center; }
  .dash { display: none; }
  .demo__phone { position: relative; width: min(290px, 84%); }
  .demo__chip, .run { position: relative; left: auto; top: auto; width: min(320px, 100%); margin-top: 12px; }
  .demo__chip--result { margin-top: -34px; }
  .demo__caption { position: static; margin-top: 16px; text-align: center; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
  .filters { align-items: stretch; flex-direction: column; }
  .filters__industry { justify-content: space-between; }
  .steps__foot { padding: 22px; }
  .steps__foot .btn { width: 100%; }
  .contact2 .contact-form { padding: 24px 20px; border-radius: 22px; }
  .stickycta { display: flex; }
  .home .footer { padding-bottom: 96px; }
  .nav__link--work { display: none; }
  .ficha__head { padding: 36px 0 40px; }
  .ficha__actions .btn { flex: 1 1 100%; }
  .stage--hero .frame { margin-top: 28px; }
  .stage--hero.stage--browser .frame { width: 92%; }
}
@media (max-width: 700px) {
  /* En la portada el botón vive abajo, fijo y al alcance del pulgar: el del
     header se retira para que la barra quede en una línea. */
  .home:not(.base-page) .nav__cta { display: none; }
  .home .header__inner { flex-wrap: nowrap; min-height: 56px; }
  .home .nav { gap: 14px; }
  .home .nav__cta { padding: 7px 12px; font-size: 12.5px; }
  .chat { height: 440px; }
  /* Los proyectos se recorren de lado, con el dedo. */
  .pgrid:not(.pgrid--flat) {
    display: flex;
    gap: 14px;
    margin: 0 -20px;
    padding: 4px 20px 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .pgrid:not(.pgrid--flat)::-webkit-scrollbar { display: none; }
  .pgrid:not(.pgrid--flat) .pcard { flex: 0 0 84%; scroll-snap-align: center; }
  .pgrid:not(.pgrid--flat) .pcard--lead .pcard__body { padding: 22px 22px 24px; }
  .pgrid:not(.pgrid--flat) .pcard--lead .pcard__title { font-size: 21px; margin-top: 10px; }
  .pgrid:not(.pgrid--flat) .pcard--lead .pcard__text { display: none; }
  .pgrid:not(.pgrid--flat) .pcard--lead .pcard__more { margin-top: auto; padding-top: 18px; font-size: 14px; }
  .js-motion .pgrid:not(.pgrid--flat) .rv { opacity: 1; transform: none; }
}
@media (max-width: 420px) {
  .shots, .shots--2, .shots--3 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .pcard__link, .stage .frame, .stickycta, .shot__button { transition: none; }
  .chat__typing i, .dash__pill--live::before { animation: none; }
}
