/* Mismo sistema visual que nexkai-agency.com y la página de Trabajos: fondo claro, Inter y el degradado azul solo en las acciones. */
/* Inter servida desde esta web (licencia OFL), sin conexión con Google. Subconjunto latino: incluye tildes, ñ y €. */
@font-face {
  font-family: Inter;
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ground: #f8fafc;
  --surface: #eef3fb;
  --paper: #ffffff;
  --ink: #0f1729;
  --soft: #4a5a72;
  --blue: #2463eb;
  --light: #61a6fa;
  --brand: var(--blue);
  /* Cinco pasos de escala: nada entre medias. */
  --t-display: clamp(46px, 6.4vw, 104px);
  --t-head: clamp(30px, 3.4vw, 52px);
  --t-lead: clamp(20px, 1.7vw, 24px);
  --t-body: 18px;
  --t-small: 15px;
  --night: #0b1222;
  --margin: clamp(20px, 3.4vw, 48px);
  --gap: clamp(72px, 6.6vw, 96px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* Cuatro radios y nada mas: controles, tarjetas, paneles y marcos de aparato.
     La pildora (999px) queda solo en los botones y en la barra de progreso. */
  --r-control: 10px;
  --r-card: 16px;
  --r-panel: 20px;
  --r-device: 32px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 400 18px/1.55 Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--light); outline-offset: 3px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.035em; text-wrap: balance; }
h2 { font-size: var(--t-display); line-height: 1.02; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: 500 var(--t-body)/1 Inter, system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.2s, transform 0.25s var(--ease);
}
.button:hover { filter: brightness(1.06); transform: translateY(-2px); }
.button:active { transform: translateY(0) scale(0.98); }
.button-dark { background: var(--night); }
.button-dark:hover { filter: none; background: #1b2740; }

.button-large { min-height: 64px; padding: 0 32px; }

.top {
  position: absolute;
  inset: 0 auto auto 0;
  width: 58%;
  display: flex;
  align-items: center;
  padding: 32px var(--margin);
  z-index: 2;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--t-lead);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.wordmark b { color: var(--blue); font-weight: inherit; }
.top-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-weight: 500;
  color: var(--soft);
}
.top-links a { text-decoration: none; transition: color 0.2s; }
.top-links a:hover { color: var(--ink); }

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 58fr 42fr;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px var(--margin) 64px;
}
.hero h1 {
  font-size: var(--t-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
/* Keeps the sector keywords inside the h1 without breaking the two-line headline. */
.hero h1 .h1-sub { display: block; max-width: 30ch; margin-top: 0.5em; font-size: var(--t-head); font-weight: 400; line-height: 1.2; letter-spacing: -0.015em; color: var(--soft); }
.hero-note { max-width: 38ch; margin-top: 32px; font-size: var(--t-lead); line-height: 1.35; }
.hero-action { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 40px; }
.hero-action p { color: var(--soft); }

.hero-demo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 40px 24px;
  background: var(--night);
}
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.45); }
.phone { position: relative; width: min(100%, 370px); color: var(--ink); }
.phone-screen { overflow: hidden; border: 10px solid var(--night); border-radius: var(--r-device); background: var(--night); }
.chat-head { padding: 16px 20px; background: var(--night); color: #fff; font-size: var(--t-body); font-weight: 500; line-height: 1.25; }
.chat-head span { display: block; color: #b4c0d6; font-size: var(--t-small); font-weight: 400; }
.chat { display: flex; flex-direction: column; gap: 8px; min-height: 440px; padding: 16px 12px 20px; background: var(--paper); font-size: var(--t-small); line-height: 1.3; }
.msg { max-width: 86%; padding: 8px 12px; border-radius: var(--r-card); }
.msg time { display: block; margin-top: 4px; font-size: var(--t-small); opacity: 0.75; text-align: right; font-variant-numeric: tabular-nums; }
.msg-in { align-self: flex-start; background: var(--surface); }
.msg-out { align-self: flex-end; background: var(--blue); color: #fff; }
.chat-state { margin-top: auto; padding: 12px; border-radius: var(--r-card); background: var(--night); color: #fff; font-weight: 500; text-align: center; }
.phone figcaption { margin-top: 16px; color: #fff; font-size: var(--t-small); text-align: center; }

.pains { padding: var(--gap) var(--margin); background: var(--paper); color: var(--ink); }
.pains h2 { max-width: 14ch; font-size: var(--t-display); line-height: 1; letter-spacing: -0.045em; }
.pains dl { margin-top: clamp(56px, 7vw, 104px); }
.pain { display: grid; grid-template-columns: 7fr 5fr; align-items: baseline; gap: 12px 48px; padding: 28px 0; }
.pain dt { font-size: var(--t-head); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; }
.pain dd { margin: 0; font-size: var(--t-body); line-height: 1.4; color: var(--soft); }

.line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.line > span { display: block; }

.ticket { display: grid; grid-template-columns: 6fr 1fr 5fr; align-items: center; padding: var(--gap) var(--margin); background: var(--surface); }
.ticket-text { grid-column: 1; }
.ticket h2 { max-width: 14ch; font-size: var(--t-display); line-height: 1; letter-spacing: -0.045em; }
.ticket h2 span { display: block; color: var(--blue); }
.ticket-text > p { max-width: 40ch; margin-top: 24px; font-size: var(--t-lead); line-height: 1.45; }
.ticket-text .ticket-note { margin-top: 20px; font-size: var(--t-small); color: var(--soft); }
.ticket .button { margin-top: 28px; }
.ticket-img { grid-column: 3; justify-self: center; width: min(100%, 440px); margin: 0; }
.ticket-img img { display: block; width: 100%; height: auto; border-radius: var(--r-panel); }

.watch { display: grid; grid-template-columns: 6fr 1fr 5fr; align-items: center; padding: var(--gap) var(--margin); background: var(--night); color: #fff; }
.watch-text { grid-column: 1; }
.watch-text > p { max-width: 36ch; margin-top: 24px; font-size: var(--t-lead); line-height: 1.4; }
.outcomes { display: grid; gap: 12px; margin-top: 36px; padding: 0; list-style: none; }
.outcomes li { padding: 16px 20px; border-radius: var(--r-card); background: #16203a; color: #d3dcea; }
.outcomes b { display: block; margin-bottom: 2px; font-size: var(--t-body); font-weight: 500; }
.outcomes .ok b { color: #4ade80; }
.outcomes .wait b { color: #fbbf24; }
.outcomes .other b { color: var(--light); }
.watch-text .watch-note { margin-top: 28px; font-size: var(--t-small); color: #9fb0c8; }
.watch-video { grid-column: 3; justify-self: center; width: min(100%, 360px); }
.watch-video video { display: block; width: 100%; height: auto; border: 8px solid #1b2740; border-radius: var(--r-device); background: #000; }
.watch-video figcaption { margin-top: 12px; color: #9fb0c8; font-size: var(--t-small); text-align: center; }

.faq { padding: var(--gap) var(--margin); background: var(--surface); }
.faq-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); align-content: start; gap: 12px; margin: clamp(40px, 5vw, 64px) 0; }
.faq details { padding: 4px 28px; border-radius: var(--r-panel); background: var(--paper); }
.faq summary { display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; font-size: var(--t-lead); font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; color: var(--blue); font-size: var(--t-lead); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 64ch; padding-bottom: 24px; color: var(--soft); }


.flow { padding: var(--gap) var(--margin); background: var(--blue); color: #fff; }
.flow-head p { max-width: 52ch; margin-top: 20px; font-size: var(--t-lead); color: #fff; }
.flow-steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: clamp(40px, 5vw, 64px) 0; padding: 0; list-style: none; }
.flow-steps li { position: relative; display: flex; flex-direction: column; padding: 28px 24px; border-radius: var(--r-panel); background: var(--paper); color: var(--ink); }
.flow-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -16px;
  z-index: 1;
  width: 12px;
  height: 12px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: translateY(-50%) rotate(45deg);
}
.flow-steps h3 { font-size: var(--t-lead); }
.flow-steps p { margin-top: 8px; color: var(--soft); }
.flow-steps .flow-out { margin-top: auto; padding-top: 16px; color: var(--blue); font-weight: 500; font-size: var(--t-small); }
.js .flow-steps li.reveal:nth-child(2) { transition-delay: 0.08s; }
.js .flow-steps li.reveal:nth-child(3) { transition-delay: 0.16s; }
.js .flow-steps li.reveal:nth-child(4) { transition-delay: 0.24s; }

.check { display: grid; grid-template-columns: 5fr 1fr 6fr; padding: var(--gap) var(--margin); }
.check-intro { grid-column: 1; align-self: start; position: sticky; top: 48px; }
.check-intro > p { max-width: 36ch; margin-top: 28px; }
.note { color: var(--soft); font-size: var(--t-small); }
.check-work { grid-column: 3; }
.name { display: block; font-size: var(--t-body); font-weight: 500; }
.name input {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  padding: 0 16px;
  border: 2px solid #d6e0f0;
  border-radius: var(--r-control);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 18px;
  font-weight: 400;
  transition: border-color 0.2s;
}
.name input:focus { border-color: var(--blue); outline: 0; }
fieldset { display: flex; flex-wrap: wrap; gap: 8px; margin: 44px 0 0; padding: 0; border: 0; }
legend { padding: 0; margin-bottom: 16px; font-size: var(--t-body); font-weight: 500; letter-spacing: 0; line-height: 1.35; }
fieldset label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 20px 0 16px;
  border: 2px solid #d6e0f0;
  border-radius: var(--r-control);
  background: var(--paper);
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.2s var(--ease);
}
fieldset label::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #a8b6cc;
  border-radius: 50%;
  background: var(--paper);
  transition: border-color 0.15s, background 0.15s;
}
fieldset label:hover { border-color: var(--light); transform: translateY(-1px); }
fieldset input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
fieldset label:has(input:checked) { border-color: var(--blue); background: #eaf1ff; color: var(--ink); }
fieldset label:has(input:checked)::before { border-color: var(--blue); background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
fieldset label:has(input:focus-visible) { outline: 3px solid var(--light); outline-offset: 3px; }
.hint { flex-basis: 100%; margin: -4px 0 8px; color: var(--soft); font-size: var(--t-small); }
form .button { margin-top: 48px; width: 100%; }

.js-only { display: none; }
.js .js-only:not([hidden]) { display: block; }
.result { padding: 44px; border-radius: var(--r-panel); background: var(--surface); }
.result:focus { outline: 0; }
.result h3 { font-size: var(--t-head); line-height: 1.05; }
.result p { max-width: 42ch; margin: 16px 0 32px; }
.result p:last-child { margin-bottom: 0; }

#calendario { width: 100%; min-height: 640px; margin-bottom: 16px; overflow: auto; }
#calendario[hidden] { display: none; }
.text-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.cookies {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--margin);
  background: var(--night);
  color: #fff;
}
.cookies[hidden] { display: none; }
.cookies-actions { display: flex; gap: 8px; flex-shrink: 0; }
#cookies-no { background: #1b2740; }

.end { overflow: hidden; padding: var(--gap) var(--margin) 32px; background: var(--night); color: #fff; }
.end-top { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(40px, 6vw, 96px); }
.end-claim { max-width: 24ch; font-size: var(--t-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.end-pitch .button { margin-top: 28px; }
.end-cols { display: grid; grid-template-columns: 1.4fr 1.3fr 1fr 1.1fr; gap: 32px; }
.end li a { white-space: nowrap; }
.end-title { font-size: var(--t-small); font-weight: 500; letter-spacing: 0; color: #9cc4ff; }
.end ul { margin-top: 16px; padding: 0; list-style: none; display: grid; gap: 12px; }
.end li a { color: #d3dcea; text-decoration: none; transition: color 0.2s; }
.end li a:hover { color: #fff; }
.social a { display: inline-flex; align-items: center; gap: 8px; }
.social svg { flex-shrink: 0; width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: #1b2740; color: #fff; transition: background 0.2s, transform 0.25s var(--ease); }
.social a:hover svg { background: var(--blue); transform: translateY(-2px); }
.end-brand { display: inline-flex; align-items: center; gap: 16px; margin-top: clamp(48px, 6vw, 80px); font-size: var(--t-head); font-weight: 600; letter-spacing: -0.03em; text-decoration: none; }
.end-brand b { color: var(--light); }
.end-row { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; margin-top: 32px; color: #8b9ab3; font-size: var(--t-small); }
.end-row a, .end-row button:not([hidden]) { min-height: 44px; display: inline-flex; align-items: center; color: #d3dcea; text-underline-offset: 4px; }

/* Botón fijo solo en el móvil, donde no hay menú. */
.mobile-cta { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .js .line > span { animation: rise 1s var(--ease) both; }
  .js .line:nth-child(2) > span { animation-delay: 0.09s; }
  .js .hero-note, .js .hero-action, .js .top > * { animation: fade 0.9s 0.25s var(--ease) both; }
  .msg, .chat-state { animation: bubble 0.55s var(--d) var(--ease) both; }
  .js .phone:not(.seen) .msg, .js .phone:not(.seen) .chat-state { animation-play-state: paused; }
  /* Solo desplazamiento, sin opacidad: el contenido nunca queda invisible si el observador no llega a dispararse. */
  .js .reveal { translate: 0 24px; transition: translate 0.8s var(--ease); }
  .js .reveal.seen { translate: 0 0; }
  .result:not([hidden]) { animation: fade 0.6s var(--ease) both; }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fade { from { opacity: 0; } }
@keyframes bubble { from { opacity: 0; transform: translateY(12px) scale(0.97); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Los enlaces de la cabecera comparten fila con el nombre, y por debajo de 1150px
   ya no caben: se partian en dos lineas y chocaban con la marca. Se esconden antes. */
@media (max-width: 1150px) {
  .top-links { display: none; }
}

@media (max-width: 1000px) {
  .top { width: 100%; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding-top: 112px; padding-bottom: 48px; }
  .hero h1 { font-size: clamp(52px, 10vw, 92px); }
  .pain { grid-template-columns: 1fr; }
  .check, .watch, .ticket { display: block; }
  .ticket-img { margin-top: 56px; }
  .end-cols { grid-template-columns: 1fr 1fr; }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .flow-steps li:not(:last-child)::after { display: none; }
  .watch-video { margin-top: 56px; }
  .check-intro { position: static; }
  .check-work { margin-top: 56px; }
}

@media (max-width: 720px) {
  .hero h1 { font-size: 12vw; }
  .hero-copy { padding-top: 96px; padding-bottom: 40px; }
  .hero-note { margin-top: 24px; font-size: var(--t-body); }
  .hero-action { margin-top: 28px; }
  .hero-action .button { width: 100%; }
  .hero-demo { padding: 36px 20px; }
  .top { padding-top: 20px; }
  .flow-steps { grid-template-columns: 1fr; }
  .flow .button { width: 100%; }
  .ticket .button { width: 100%; }
  fieldset label { flex: 1 1 100%; }
  .result { padding: 28px 20px; }
  #calendario { width: auto; margin-inline: -20px; }
  .cookies { flex-direction: column; align-items: stretch; gap: 16px; }
  .cookies-actions .button { flex: 1; }
  .end-top, .end-cols { grid-template-columns: 1fr; }
  .end { padding-bottom: 104px; }
  /* Escondido de verdad, no solo transparente: si no, sigue tapando el texto que pasa por debajo
     y sigue entrando en el orden de tabulacion. */
  .mobile-cta { position: fixed; inset: auto 16px 16px; z-index: 9; display: flex; visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(16px); transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0s 0.25s; }
  .mobile-cta.on { visibility: visible; opacity: 1; pointer-events: auto; transform: none; transition-delay: 0s; }
}

/* Bandas fotográficas: una imagen real a sangre completa entre dos secciones. */
.band { position: relative; margin: 0; }
.band img { display: block; width: 100%; height: clamp(320px, 46vw, 620px); object-fit: cover; }
.band figcaption { padding: 16px var(--margin); background: var(--night); color: #9fb0c8; font-size: var(--t-small); }

.route-photo { margin: 32px 0 0; }
.route-photo img { display: block; width: 100%; height: 260px; object-fit: cover; border-radius: var(--r-card); }
.route-photo figcaption { margin-top: 8px; color: var(--soft); font-size: var(--t-small); }

/* La calculadora: lo único vivo de la página. */
.calc { display: grid; gap: 28px; margin-top: 36px; padding: 32px; border-radius: var(--r-panel); background: var(--paper); }
.calc-rows { display: grid; gap: 24px; }
.calc-row { display: grid; gap: 8px; }
.calc-row span { font-weight: 500; font-size: var(--t-body); }
.calc-row input { width: 100%; accent-color: var(--blue); }
.calc-row output { color: var(--blue); font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-out { display: grid; gap: 8px; }
.calc-out b { font-size: var(--t-display); line-height: 0.95; letter-spacing: -0.045em; color: var(--blue); font-variant-numeric: tabular-nums; }
.calc-out span { color: var(--soft); font-size: var(--t-small); }
.calc .button { justify-self: start; }

.proof { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 28px; padding: 0; list-style: none; color: var(--soft); font-size: var(--t-small); }

@media (max-width: 720px) {
  .calc { padding: 24px 20px; }
  .faq-list { grid-template-columns: 1fr; }
}

.credits { grid-column: 1 / -1; margin-top: 28px; color: #8b9ab3; font-size: var(--t-small); line-height: 1.5; }
.credits a { text-decoration: underline; }

/* El formulario avanza paso a paso: una pregunta por pantalla, con lo contestado a la vista. */
.js .step:not(.on) { display: none; }
.js .step { margin-top: 0; }
.progreso { display: flex; align-items: center; gap: 16px; margin-bottom: 36px; color: var(--soft); font-size: var(--t-small); }
.progreso-barra { flex: 1; height: 8px; border-radius: 999px; background: #d9e3f3; }
.progreso-barra > span { display: block; width: 17%; height: 100%; border-radius: 999px; background: var(--blue); transition: width 0.35s var(--ease); }
.paso-titulo { margin-bottom: 20px; font-size: var(--t-body); font-weight: 500; }
.form-nav { display: flex; align-items: center; gap: 24px; margin-top: 44px; }
.form-nav .button { flex: 1; margin-top: 0; }
.js .step .name + .name { margin-top: 24px; }

/* .button es inline-flex, y una clase gana al atributo: sin esto, un botón con [hidden] se sigue viendo. */
[hidden] { display: none !important; }

/* En escritorio las cabeceras se ponían solas, en una franja a todo lo ancho con la mitad
   derecha vacía. Pasan a la columna izquierda, junto a su contenido, con la misma geometría
   que ya usan el recorrido y el formulario. Por debajo de 1001px no cambia nada. */
@media (min-width: 1001px) {
  .pains, .faq, .flow { display: grid; grid-template-columns: 5fr 1fr 6fr; align-items: start; }
  .pains > h2, .faq > h2, .flow-head { grid-column: 1; }
  .pains dl, .faq-list, .flow-steps { grid-column: 3; margin: 0; }
  .pains dl { display: grid; gap: 4px; }
  .pain { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .faq-list { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr 1fr; }
  .flow-steps li:not(:last-child)::after { display: none; }
  .faq > .button, .flow > .button { grid-column: 1; margin-top: 32px; }
}
