/* Sitio comercial de KUBIK. Misma identidad que la app (app/styles/tokens.css):
   azul noche de navegación, azul de acción, celeste = datos, naranja = oportunidad,
   verde = resultado, rojo = pérdida, violeta = IA. Cada color significa siempre lo mismo. */

@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/plus-jakarta-sans.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  --navy: #0f1b33; --navy-2: #16264a; --navy-line: #24365c;
  --blue: #2563eb; --blue-strong: #1d4ed8; --blue-soft: #eaf1ff; --blue-ink: #1e40af;
  --sky: #0284c7; --sky-bright: #38bdf8;
  --orange: #ea580c; --orange-bright: #fb923c; --orange-soft: #fff0e5;
  --green: #16a34a; --green-ink: #15803d; --green-soft: #e6f6ec;
  --red: #dc2626; --red-ink: #b91c1c; --red-soft: #fdeaea;
  --violet: #7c3aed; --violet-soft: #f1eafe;
  --teal: #0d9488; --indigo: #4f46e5;
  --bg: #f4f6fa; --surface: #fff; --line: #dfe5ec; --line-2: #c7d0db;
  --text: #152030; --text-2: #526073; --text-3: #7a8699;
  --nav-text: #c9d4e8;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --wrap: 1180px;
  --r: 10px; --r-lg: 16px; --r-xl: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1rem/1.6 var(--font); color: var(--text); background: var(--surface); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-ink); }
h1, h2, h3 { font-family: var(--display); color: inherit; margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
svg.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--r); font: 600 1rem/1 var(--font); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .9375rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--text-3); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Barra superior */
.top { position: sticky; top: 0; z-index: 20; background: rgb(15 27 51 / 96%); backdrop-filter: blur(8px); color: #fff; border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.is-scrolled { border-bottom-color: var(--navy-line); }
.top-in { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 1.375rem/1 var(--display); letter-spacing: -0.02em; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--nav-text); text-decoration: none; font-weight: 500; font-size: .9375rem; padding: 10px 12px; border-radius: 8px; }
.nav a:hover { color: #fff; background: var(--navy-2); }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; color: #fff; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; }
.menu-btn svg { width: 26px; height: 26px; }

/* Presentación */
.hero { background: var(--navy); color: #fff; padding: 72px 0 96px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 3.75rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; max-width: 13ch; }
.lead { margin-top: 24px; font-size: 1.1875rem; line-height: 1.55; color: var(--nav-text); max-width: 34em; }
.hero .actions { margin-top: 32px; }
.hero .btn-ghost { color: #fff; border-color: #3a4f7a; }
.hero .btn-ghost:hover { border-color: #8796b3; }
.hero-diff { margin-top: 32px; padding-left: 16px; border-left: 3px solid var(--orange-bright); color: #e3e9f4; max-width: 32em; }
.hero-trial { margin-top: 16px; display: flex; align-items: center; gap: 8px; color: #86efac; font-weight: 500; font-size: .9375rem; }
.hero-visual { position: relative; margin: 0; padding-bottom: 40px; }
.screen { border-radius: var(--r-lg); overflow: hidden; background: #fff; box-shadow: 0 40px 80px -24px rgb(0 0 0 / 55%), 0 0 0 1px rgb(255 255 255 / 8%); }
.screen-bar { display: flex; gap: 6px; padding: 10px 12px; background: #e8edf3; }
.screen-bar i { width: 10px; height: 10px; border-radius: 50%; background: #c7d0db; }
.hero .screen { width: 118%; }
.phone { position: absolute; right: -2%; bottom: -8px; width: 27%; border-radius: 26px; overflow: hidden; border: 6px solid #0a1222; background: #0a1222; box-shadow: 0 30px 60px -20px rgb(0 0 0 / 70%); }
.phone img { border-radius: 20px; }
.signal { position: absolute; left: -36px; bottom: 64px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; color: var(--text);
  border-radius: 14px; border-left: 4px solid var(--orange); box-shadow: 0 24px 48px -12px rgb(0 0 0 / 45%); max-width: 360px; }
.signal-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--orange-soft); color: var(--orange); }
.signal-text { display: grid; gap: 2px; font-size: .875rem; line-height: 1.3; }
.signal-text span { color: var(--orange); font-weight: 600; }
.signal-action { font-size: .8125rem; font-weight: 600; color: var(--blue); white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: var(--blue-soft); }
.hero-visual figcaption { position: absolute; left: 0; bottom: -28px; font-size: .8125rem; color: #8796b3; }

/* Datos → decisiones → resultados: la pieza que identifica al sitio */
.flow { background: var(--navy); color: #fff; padding: 8px 0 96px; }
.flow-title { font-size: clamp(1.5rem, 1rem + 2vw, 2.25rem); max-width: 22ch; }
.flow-steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; position: relative; }
.flow-steps::before { content: ""; position: absolute; top: 9px; left: 10px; right: 10px; height: 2px;
  background: linear-gradient(90deg, var(--sky-bright), var(--orange-bright) 50%, #4ade80); opacity: .7; }
.step { position: relative; padding-top: 40px; }
.step-dot { position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%; border: 4px solid var(--navy); box-shadow: 0 0 0 2px currentColor; background: currentColor; }
.step-data { color: var(--sky-bright); } .step-decision { color: var(--orange-bright); } .step-result { color: #4ade80; }
.step h3 { font-size: 1.5rem; font-weight: 800; }
.step p { margin-top: 10px; color: var(--nav-text); max-width: 30em; }
@media (prefers-reduced-motion: no-preference) {
  .flow-steps.is-ready .step { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  .flow-steps.is-ready .step-decision { animation-delay: .25s; }
  .flow-steps.is-ready .step-result { animation-delay: .5s; }
  .flow-steps.is-ready::before { animation: draw 1.1s cubic-bezier(.4, 0, .2, 1) both; transform-origin: left; }
  .flow-steps.is-waiting .step, .flow-steps.is-waiting::before { opacity: 0; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Encabezados de sección */
section { padding: 96px 0; }
.sec-head { max-width: 46rem; margin-bottom: 48px; }
.sec-head p { margin-top: 14px; color: var(--text-2); font-size: 1.125rem; }
.sec-head-center { text-align: center; margin-left: auto; margin-right: auto; }

/* Problemas: pérdida (rojo) frente a respuesta (verde) */
.prob-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.prob { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 22px 0; border-top: 1px solid var(--line); }
.prob-q { font: 700 1.125rem/1.35 var(--display); letter-spacing: -0.01em; padding-left: 18px; position: relative; }
.prob-q::before { content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.prob-a { color: var(--text-2); padding-left: 18px; }

/* Módulos */
.modules { background: var(--bg); }
.mod-groups { display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto 1fr; gap: 24px; }
.mod-group:first-child { grid-row: span 2; align-self: start; }
.mod-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.mod-group h3 { font-size: 1rem; color: var(--text-2); font-weight: 600; margin-bottom: 8px; }
.mod-group-intel { border-color: #f6c9a8; background: linear-gradient(180deg, #fff 0, #fff 60%, #fff8f2 100%); }
.mod-list { list-style: none; margin: 0; padding: 0; }
.mod-list li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.mod-list li:first-child { border-top: 0; }
.mod-list svg { width: 22px; height: 22px; margin-top: 2px; color: var(--c, var(--blue)); }
.mod-list strong { display: block; font-weight: 600; }
.mod-list span { display: block; color: var(--text-2); font-size: .9375rem; line-height: 1.5; }
.c-green { --c: var(--green); } .c-sky { --c: var(--sky); } .c-teal { --c: var(--teal); } .c-red { --c: var(--red); }
.c-indigo { --c: var(--indigo); } .c-orange { --c: var(--orange); } .c-violet { --c: var(--violet); }
.soon { display: inline-block; font-style: normal; font-size: .75rem; font-weight: 600; color: var(--violet); background: var(--violet-soft); padding: 2px 8px; border-radius: 999px; margin-left: 4px; }
.showcase { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; align-items: center; margin-top: 80px; }
.showcase-copy h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem); font-weight: 800; letter-spacing: -0.025em; }
.showcase-copy p { margin-top: 16px; color: var(--text-2); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks svg { color: var(--green); margin-top: 3px; }
.showcase .screen { box-shadow: 0 30px 60px -24px rgb(16 24 40 / 35%), 0 0 0 1px var(--line); }

/* Planes */
.period { display: flex; width: max-content; margin: 0 auto; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.period button { min-height: 44px; padding: 0 24px; border: 0; border-radius: 9px; background: none; font: 600 .9375rem/1 var(--font); color: var(--text-2); cursor: pointer; }
.period button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgb(16 24 40 / 14%); }
.period-note { text-align: center; color: var(--text-3); font-size: .875rem; margin-top: 10px; min-height: 1.6em; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; align-items: stretch; }
.plan { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; background: var(--surface); }
.plan-name { font-size: 1.375rem; font-weight: 800; }
.plan-concept { margin-top: 6px; font-weight: 600; color: var(--blue-ink); }
.plan-for { margin-top: 10px; color: var(--text-2); font-size: .9375rem; min-height: 4.8em; }
.plan-price { margin: 22px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.plan-price strong { display: block; font: 800 1.5rem/1.2 var(--display); letter-spacing: -0.02em; }
.plan-price span { display: block; margin-top: 4px; color: var(--text-3); font-size: .875rem; }
.plan-base { font-weight: 600; font-size: .9375rem; margin-bottom: 8px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 10px; font-size: .9375rem; }
.plan li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.plan li svg { color: var(--green); margin-top: 1px; }
.plan .plan-soon { margin: -8px 0 24px; font-size: .875rem; color: var(--text-2); }
.plan .plan-soon b { color: var(--violet); font-weight: 600; }
.plan .btn { margin-top: auto; width: 100%; }
.plan-pro { background: var(--navy); color: #fff; border-color: var(--navy); position: relative; box-shadow: 0 30px 60px -28px rgb(15 27 51 / 60%); }
.plan-pro .plan-concept { color: var(--orange-bright); }
.plan-pro .plan-for, .plan-pro .plan-price span { color: var(--nav-text); }
.plan-pro .plan-price { border-color: var(--navy-line); }
.plan-pro li svg { color: #4ade80; }
.plan-pro .plan-soon { color: var(--nav-text); }
.plan-pro .plan-soon b { color: #c4b5fd; }
.plan-badge { position: absolute; top: -13px; left: 28px; background: var(--orange-bright); color: var(--navy); font-weight: 700; font-size: .8125rem; padding: 4px 12px; border-radius: 999px; }
.plans-foot { text-align: center; margin-top: 24px; color: var(--text-2); font-size: .9375rem; }

.compare { margin-top: 72px; }
.compare h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 20px; }
.compare-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.compare table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9375rem; }
.compare th, .compare td { padding: 12px 16px; text-align: center; border-top: 1px solid var(--line); }
.compare thead th { border-top: 0; font: 700 1rem/1.3 var(--display); background: var(--bg); }
.compare thead th.is-pro { background: var(--navy); color: #fff; }
.compare th[scope="row"] { text-align: left; font-weight: 500; position: sticky; left: 0; background: var(--surface); }
.compare td.is-pro { background: #f5f8ff; }
.compare .grp th { text-align: left; font: 700 .875rem/1.3 var(--font); color: var(--text-2); background: var(--bg); }
.compare td svg { width: 20px; height: 20px; }
.compare .yes { color: var(--green); }
.compare .no { color: var(--line-2); }
.compare .txt { font-size: .8125rem; font-weight: 600; color: var(--violet); }

/* Condiciones */
.terms { background: var(--bg); }
.cond-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 40px; margin: 0; }
.cond-grid dt { font: 700 1.0625rem/1.3 var(--display); }
.cond-grid dd { margin: 8px 0 0; color: var(--text-2); }

/* Preguntas */
.faq-in { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; padding: 20px 36px 20px 0; font: 600 1.0625rem/1.4 var(--display); list-style: none; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq-list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-list details p { padding: 0 0 20px; color: var(--text-2); max-width: 44em; }

/* Cierre y pie */
.closing { background: var(--navy); color: #fff; text-align: center; }
.closing-in { display: grid; justify-items: center; gap: 18px; }
.closing p { color: var(--nav-text); font-size: 1.125rem; max-width: 34em; }
.closing .actions { justify-content: center; margin-top: 8px; }
.closing .btn-ghost { color: #fff; border-color: #3a4f7a; }
.foot { background: #0a1222; color: var(--nav-text); padding: 48px 0; font-size: .9375rem; }
.foot-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.foot-brand { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; color: #fff; font: 800 1.25rem/1 var(--display); }
.foot-brand svg { width: 30px; height: 30px; }
.foot-brand p { grid-column: 1 / -1; margin-top: 10px; font: 400 .9375rem/1.5 var(--font); color: #8796b3; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; align-content: start; }
.foot-links a { color: var(--nav-text); text-decoration: none; }
.foot-links a:hover { color: #fff; text-decoration: underline; }

/* Páginas legales */
.doc { max-width: 46rem; padding: 64px 24px 96px; margin: 0 auto; }
.doc h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem); font-weight: 800; letter-spacing: -0.03em; }
.doc .doc-meta { margin-top: 10px; color: var(--text-3); }
.doc .draft { margin-top: 24px; padding: 14px 16px; border-radius: var(--r); background: var(--orange-soft); color: #9a3412; }
.doc h2 { font-size: 1.25rem; margin-top: 36px; }
.doc p { margin-top: 10px; color: var(--text-2); }
.doc .btn { margin-top: 28px; }

/* Tablet */
@media (max-width: 1023px) {
  .hero-in { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { max-width: 16ch; }
  .hero .screen { width: 100%; }
  .signal { left: 12px; }
  .showcase { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .plan-pro { order: -1; }
  .plan-for { min-height: 0; }
  .cond-grid { grid-template-columns: 1fr 1fr; }
  .faq-in { grid-template-columns: 1fr; gap: 24px; }
}

/* Celular */
@media (max-width: 759px) {
  section { padding: 72px 0; }
  .wrap { padding: 0 20px; }
  .menu-btn { display: inline-grid; place-items: center; }
  .top-cta { display: none; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 8px 12px 16px; background: var(--navy); border-bottom: 1px solid var(--navy-line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 12px; font-size: 1.0625rem; }
  .hero { padding: 48px 0 72px; }
  .lead { font-size: 1.0625rem; }
  .hero .actions .btn { flex: 1 1 100%; }
  .hero-visual { padding-bottom: 0; }
  .phone { display: none; }
  .signal { position: relative; left: auto; bottom: auto; margin: -28px 12px 0; max-width: none; }
  .hero-visual figcaption { position: static; margin-top: 14px; }
  .flow { padding-top: 24px; }
  .flow-steps { grid-template-columns: 1fr; gap: 28px; padding-left: 36px; }
  .flow-steps::before { top: 10px; bottom: 10px; left: 9px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--sky-bright), var(--orange-bright) 50%, #4ade80); }
  .step { padding-top: 0; }
  .step-dot { left: -36px; }
  @media (prefers-reduced-motion: no-preference) { .flow-steps.is-ready::before { animation: none; } }
  .prob-list { grid-template-columns: 1fr; }
  .mod-groups { grid-template-columns: 1fr; }
  .mod-group:first-child { grid-row: auto; }
  .cond-grid { grid-template-columns: 1fr; }
  .closing .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
