/* ============================================================
   Next Solution — estilos propios (complementan assets/tw.css)
   Paleta del brandbook: marino #002D57, azul #0044F1,
   azul claro #7FA1F8, gris #EAEAEA. Arquitecta como familia única.
   ============================================================ */

/* Tipografía. Brandbook: Arquitecta (Latinotype). Arquitecta Regular no trae hinting y
   en Windows se dibuja irregular a tamaños de texto, así que:
   - Arquitecta Black → títulos, botones, etiquetas, cifras (donde luce la marca).
   - Poppins (sustituto oficial acordado) → párrafos y texto pequeño, autohospedada. */
@font-face { font-family: "Arquitecta"; font-style: normal; font-weight: 600 900; font-display: swap; src: url("fonts/ArquitectaBlack.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/Poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/Poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/Poppins-600.woff2") format("woff2"); }

:root {
  --navy-950: oklch(20% 0.06 255);
  --navy-900: oklch(25% 0.08 255);
  --navy-800: #002D57;
  --blue-600: #0038cc;
  --blue-500: #0044F1;
  --blue-300: #7FA1F8;
  --blue-100: oklch(94% 0.03 262);
  --paper:    oklch(98.5% 0.006 255);
  --ink:      oklch(22% 0.03 255);
  --ink-2:    oklch(45% 0.03 255);
  --line:     oklch(88% 0.01 255);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-padding-top: 84px; }
body { -webkit-font-smoothing: antialiased; font-size: 1rem; }
/* Familia de display: todo lo que sea título, botón o etiqueta */
.font-display, h1, h2, h3, .h2, .h3, .eyebrow, .btn-primary, .btn-outline, .btn-ghost, .btn-outline-light, .tag, .plan-name, .plan-price, .plan-badge, .plan-check, .period-btn, .step-n, .proc-n, .proc-t, .service-n, .app-modal-title, .nav-link, .mobile-link, .foot-link, .label, .faq summary, .code-tab { font-family: "Arquitecta", "Poppins", system-ui, sans-serif; }
.nav-link, .mobile-link, .foot-link, .label, .faq summary, .btn-ghost { font-weight: 700; }
.code-tab { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }

/* Accesibilidad */
.skip-link {
  position: absolute; left: 0; top: -100px; z-index: 100;
  padding: .5rem 1rem; background: var(--blue-500); color: #fff; border-radius: 0 0 .5rem 0;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }

/* Tipografía fluida */
.text-display { font-size: clamp(2.4rem, 4.8vw, 3.9rem); }
.h2 { font-weight: 900; letter-spacing: -0.01em; line-height: 1.1; color: var(--navy-800); font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.h2.text-white { color: #fff; }
.section-tint { background: color-mix(in oklab, var(--blue-100) 55%, var(--paper)); }
.section-tint-soft { background: color-mix(in oklab, var(--blue-100) 35%, var(--paper)); }
.h3 { font-weight: 900; font-size: 1.2rem; color: var(--ink); }
.eyebrow { font-size: .8rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }

/* Secciones */
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }

/* Navbar */
.nav-bar { background: color-mix(in oklab, var(--paper) 92%, transparent); backdrop-filter: saturate(160%) blur(8px); transition: border-color .3s, background-color .3s; }
#nav.is-scrolled .nav-bar { border-color: var(--line); background: color-mix(in oklab, var(--paper) 94%, transparent); }
.nav-link { font-size: .9rem; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.nav-link:hover { color: var(--navy-800); }
.mobile-link { display: block; padding: .7rem .75rem; border-radius: .5rem; font-weight: 500; color: var(--ink); }
.mobile-link:hover { background: var(--blue-100); }

/* Botones */
.btn-primary, .btn-outline, .btn-ghost, .btn-outline-light {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .625rem 1.1rem; border-radius: .75rem; font-weight: 700; font-size: .95rem;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease-out);
  line-height: 1.2;
}
.btn-lg { padding: .95rem 1.4rem; font-size: 1.05rem; }
.btn-primary { background: var(--blue-500); color: #fff; }
.btn-primary:hover { background: var(--blue-600); }
.btn-primary:active { transform: translateY(1px); }
.btn-outline { border: 1.5px solid var(--navy-800); color: var(--navy-800); background: transparent; }
.btn-outline:hover { background: var(--navy-800); color: #fff; }
.btn-outline-light { border: 1.5px solid color-mix(in oklab, #fff 40%, transparent); color: #fff; }
.btn-outline-light:hover { background: color-mix(in oklab, #fff 10%, transparent); border-color: #fff; }
.btn-ghost { color: var(--ink); font-weight: 600; }
.btn-ghost:hover { color: var(--blue-500); }

.link { color: var(--blue-500); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--blue-500); }
.link-arrow::after { content: "→"; transition: transform .2s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(3px); }

.text-soft-light { color: color-mix(in oklab, #fff 84%, var(--blue-300)); }
.check-dot { flex: none; width: .55rem; height: .55rem; margin-top: .45rem; border-radius: 999px; background: var(--blue-300); }
.tag { display: inline-block; padding: .2rem .55rem; border-radius: 999px; background: var(--blue-100); color: var(--blue-600); font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* Hero: micro-pruebas */
.hero-proofs { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }
.hero-proofs li { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; font-weight: 500; letter-spacing: .01em; color: color-mix(in oklab, #fff 90%, var(--blue-300)); white-space: nowrap; }
.hero-proofs svg { color: var(--blue-300); }
@media (max-width: 639px) { .hero-proofs { flex-direction: column; gap: .55rem; } .hero-proofs li { white-space: normal; } }

/* Proceso: pasos */
.proc-steps { display: grid; gap: .5rem; }
.proc-step { display: grid; grid-template-columns: 2.4rem 1fr; gap: .9rem; align-items: start; padding: .9rem 1rem; border-radius: 14px; cursor: pointer; transition: background-color .25s, transform .25s var(--ease-out); }
.proc-step:hover { background: color-mix(in oklab, var(--blue-100) 60%, var(--paper)); }
.proc-step:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }
.proc-step.is-active { background: var(--blue-100); }
.proc-n { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); color: var(--navy-800); font-weight: 900; transition: background-color .25s, color .25s, border-color .25s; }
.proc-step.is-active .proc-n { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.proc-t { font-weight: 900; font-size: 1.05rem; color: var(--navy-800); }
.proc-p { margin-top: .2rem; font-size: .95rem; line-height: 1.55; color: var(--ink-2); max-width: 44ch; }

/* Proceso: editor de código */
.code-editor { min-width: 0; max-width: 100%; overflow: hidden; border-radius: 16px; background: oklch(18% 0.05 255); color: oklch(88% 0.02 255); box-shadow: 0 30px 60px -30px oklch(30% 0.09 255 / 55%), 0 0 0 1px oklch(30% 0.06 255 / 40%); font-family: ui-monospace, "Cascadia Code", "Consolas", "SF Mono", Menlo, monospace; }
.code-tabs { display: flex; gap: .15rem; overflow-x: auto; padding: .5rem .6rem 0; background: oklch(14% 0.04 255); scrollbar-width: none; }
.code-tabs::-webkit-scrollbar { display: none; }
.code-tab { flex: none; padding: .5rem .85rem; border-radius: 8px 8px 0 0; font-size: .78rem; color: oklch(70% 0.02 255); white-space: nowrap; transition: background-color .2s, color .2s; }
.code-tab:hover { color: #fff; }
.code-tab.is-active { background: oklch(18% 0.05 255); color: #fff; }
.code-body { display: grid; grid-template-columns: 2.6rem 1fr; min-height: 21rem; max-height: 21rem; overflow: auto; scrollbar-width: none; scroll-behavior: smooth; }
.code-body::-webkit-scrollbar { display: none; }
.code-gutter { margin: 0; padding: 1rem .4rem 1rem 0; text-align: right; font-size: .8rem; line-height: 1.6; color: oklch(45% 0.03 255); user-select: none; }
.code-text { min-width: 0; margin: 0; padding: 1rem 1rem 1rem .6rem; font-size: .8rem; line-height: 1.6; white-space: pre; overflow: hidden; tab-size: 2; }
.code-text .k { color: var(--blue-300); } .code-text .s { color: oklch(80% 0.12 150); } .code-text .c { color: oklch(58% 0.02 255); font-style: italic; } .code-text .f { color: oklch(85% 0.08 80); } .code-text .n { color: oklch(80% 0.1 30); } .code-text .t { color: oklch(85% 0.06 200); }
.code-cursor { display: inline-block; width: .55em; height: 1.05em; margin-left: 1px; vertical-align: -0.15em; background: var(--blue-300); animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.code-status { display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; background: oklch(14% 0.04 255); font-size: .75rem; color: oklch(75% 0.02 255); }
.code-dot { width: .55rem; height: .55rem; border-radius: 999px; background: var(--blue-300); box-shadow: 0 0 0 3px oklch(70% 0.1 262 / 25%); }
.code-dot.is-ok { background: oklch(75% 0.17 150); box-shadow: 0 0 0 3px oklch(75% 0.17 150 / 25%); }
.code-progress { margin-left: auto; width: 6rem; height: .3rem; border-radius: 999px; background: oklch(28% 0.04 255); overflow: hidden; }
.code-progress span { display: block; height: 100%; width: 0; background: var(--blue-500); transition: width .3s linear; }
@media (prefers-reduced-motion: reduce) { .code-cursor { animation: none; } }
@media (max-width: 639px) { .code-body { min-height: 17rem; max-height: 17rem; } .code-text, .code-gutter { font-size: .72rem; } }

/* Capturas del producto */
.shot-frame {
  overflow: hidden; border-radius: 14px; background: var(--navy-950);
  box-shadow: 0 30px 60px -30px oklch(30% 0.09 255 / 55%), 0 0 0 1px oklch(30% 0.06 255 / 35%);
}
.shot-bar { display: flex; align-items: center; gap: .4rem; padding: .5rem .75rem; background: oklch(24% 0.06 255); }
.shot-bar span { width: .6rem; height: .6rem; border-radius: 999px; background: oklch(60% 0.03 255 / 45%); }
.shot-bar em { margin-left: .5rem; font-style: normal; font-size: .7rem; color: oklch(80% 0.03 255 / 75%); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* Logos de clientes */
.logo-tile { display: flex; align-items: center; justify-content: center; height: 5.5rem; padding: 1rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.logo-tile img { max-height: 3.25rem; width: auto; object-fit: contain; }
.logo-tile-dark { background: var(--navy-800); border-color: var(--navy-800); }

/* Servicios: lista numerada */
.service { display: grid; grid-template-columns: 3.25rem 1fr; gap: .5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.service-n { font-weight: 800; font-size: 1.1rem; color: var(--blue-300); letter-spacing: .02em; padding-top: .1rem; }
.service-p { margin-top: .5rem; max-width: 46ch; color: var(--ink-2); line-height: 1.6; }
.service-featured .service-n { color: var(--blue-500); }

/* Expediente */
.feature-list { display: grid; gap: 1.1rem; }
.feature-list li { position: relative; padding-left: 1.6rem; color: var(--ink-2); line-height: 1.6; max-width: 48ch; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .55rem; width: .7rem; height: .7rem; border-radius: 999px; background: var(--blue-500); }
.feature-list strong { color: var(--ink); }
.step { display: grid; grid-template-columns: 2.5rem 1fr; gap: .75rem; color: var(--ink-2); line-height: 1.6; }
.step strong { color: var(--ink); }
.step-n { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--navy-800); color: #fff; font-weight: 800; }

/* Precios */
.plan { position: relative; display: flex; flex-direction: column; padding: 1.75rem; border-radius: 18px; border: 1.5px solid var(--line); background: var(--paper); cursor: pointer; transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s; }
.plan:hover { transform: translateY(-4px); border-color: var(--blue-300); box-shadow: 0 18px 36px -22px oklch(30% 0.09 255 / 45%); }
.plan:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; }
.plan.is-selected { border-color: var(--blue-500); box-shadow: 0 0 0 4px oklch(55% 0.2 262 / 18%), 0 18px 36px -22px oklch(30% 0.09 255 / 45%); }
.plan-featured.is-selected { border-color: var(--blue-300); box-shadow: 0 0 0 4px oklch(75% 0.12 262 / 35%), 0 18px 36px -22px oklch(30% 0.09 255 / 55%); }
.plan-check { position: absolute; top: 1rem; right: 1rem; display: none; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; background: var(--blue-500); color: #fff; font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.plan-check::before { content: "\2713"; }
.plan.is-selected .plan-check { display: inline-flex; }
.plan-featured .plan-check { background: #fff; color: var(--navy-800); }
.plan-featured { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.plan-featured .plan-name, .plan-featured .plan-price { color: #fff; }
.plan-featured .plan-for, .plan-featured .plan-list, .plan-featured .plan-per { color: color-mix(in oklab, #fff 78%, var(--blue-300)); }
.plan-featured .plan-list li::before { background: var(--blue-300); }
.plan-badge { position: absolute; top: -.8rem; left: 1.5rem; padding: .3rem .7rem; border-radius: 999px; background: var(--blue-500); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.plan-name { font-weight: 800; font-size: 1.15rem; color: var(--navy-800); }
.plan-for { margin-top: .15rem; font-size: .9rem; color: var(--ink-2); }
.plan-price { margin-top: 1.25rem; font-weight: 800; font-size: 2.1rem; letter-spacing: -0.02em; color: var(--navy-800); line-height: 1; }
.plan-per { margin-left: .2rem; font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.plan-list { margin: 1.25rem 0 1.5rem; display: grid; gap: .5rem; font-size: .9rem; color: var(--ink-2); }
.plan-list li { position: relative; padding-left: 1.25rem; }
.plan-list li::before { content: ""; position: absolute; left: 0; top: .5rem; width: .5rem; height: .5rem; border-radius: 999px; background: var(--blue-500); }
.period-btn { padding: .45rem .9rem; border-radius: 999px; color: var(--ink-2); display: inline-flex; align-items: center; }
.period-btn.is-active { background: var(--navy-800); color: #fff; }
.period-btn.is-active span { background: color-mix(in oklab, #fff 15%, transparent); color: #fff; }

/* FAQ */
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; font-weight: 600; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; color: var(--blue-500); font-size: 1.4rem; line-height: 1; transition: transform .25s var(--ease-out); }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 0 1.1rem; max-width: 62ch; color: var(--ink-2); line-height: 1.65; }

/* Formularios */
.label { display: block; margin-bottom: .35rem; font-size: .875rem; font-weight: 600; color: var(--ink); }
.input {
  width: 100%; padding: .75rem .9rem; border-radius: .75rem; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: oklch(65% 0.02 255); }
.input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 4px oklch(55% 0.2 262 / 15%); }
.hp { position: absolute; left: -9999px; top: 0; width: 0; height: 0; overflow: hidden; }

/* Acceso a sistemas */
.acceso-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.4rem; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); transition: border-color .2s, transform .2s var(--ease-out); }
.acceso-card:hover { border-color: var(--blue-500); transform: translateY(-2px); }
.acceso-ico { display: grid; place-items: center; flex: none; width: 3rem; height: 3rem; border-radius: .9rem; background: var(--blue-100); color: var(--blue-600); }
.acceso-card svg.arrow { flex: none; color: var(--blue-300); transition: transform .2s var(--ease-out), color .2s; }
.acceso-card:hover svg.arrow { transform: translateX(3px); color: var(--blue-500); }

/* Contacto */
.contact-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; }
a.contact-row:hover .contact-ico { background: var(--blue-100); }
.contact-ico { display: grid; place-items: center; flex: none; width: 2.75rem; height: 2.75rem; border-radius: .75rem; border: 1px solid var(--line); transition: background-color .2s; }

/* Modal de avisos */
.app-modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1rem; }
.app-modal.hidden { display: none !important; }
.app-modal-backdrop { position: absolute; inset: 0; background: oklch(20% 0.06 255 / 55%); backdrop-filter: blur(3px); }
.app-modal-card {
  position: relative; width: 100%; max-width: 30rem; padding: 2rem 1.75rem 1.75rem; border-radius: 20px;
  background: var(--paper); box-shadow: 0 40px 80px -30px oklch(20% 0.08 255 / 60%);
  animation: modal-in .35s var(--ease-out);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.app-modal-x { position: absolute; top: .9rem; right: .9rem; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 999px; color: var(--ink-2); }
.app-modal-x:hover { background: var(--blue-100); color: var(--navy-800); }
.app-modal-icon { display: grid; place-items: center; width: 4rem; height: 4rem; margin: 0 auto .5rem; border-radius: 999px; }
.app-modal-icon.is-success { background: oklch(93% 0.08 155); color: oklch(45% 0.16 155); }
.app-modal-icon.is-info { background: var(--blue-100); color: var(--blue-600); }
.app-modal-icon.is-error { background: oklch(94% 0.06 25); color: oklch(50% 0.2 25); }
.app-modal-title { margin-top: .75rem; text-align: center; font-weight: 900; font-size: 1.5rem; line-height: 1.15; color: var(--navy-800); }
.app-modal-body { margin-top: .75rem; color: var(--ink-2); line-height: 1.6; }
.app-modal-body p + p { margin-top: .6rem; }
.app-modal-body strong { color: var(--ink); }
.app-modal-steps { margin-top: .9rem; display: grid; gap: .6rem; }
.app-modal-steps li { display: grid; grid-template-columns: 1.75rem 1fr; gap: .6rem; align-items: start; }
.app-modal-steps .n { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--navy-800); color: #fff; font-size: .8rem; font-weight: 900; }
.app-modal-actions { margin-top: 1.5rem; display: grid; gap: .6rem; }
.app-modal-actions .hidden { display: none !important; }
@media (min-width: 480px) { .app-modal-actions { grid-template-columns: 1fr 1fr; } .app-modal-actions > :only-child { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .app-modal-card { animation: none; } }

/* Banner de cookies */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60;
  display: flex; flex-direction: column; gap: .9rem;
  padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); box-shadow: 0 24px 48px -24px oklch(30% 0.09 255 / 45%);
}
.cookie-banner.hidden { display: none !important; }
.cookie-banner .btn-outline, .cookie-banner .btn-primary { padding: .5rem .9rem; font-size: .875rem; }
@media (min-width: 768px) {
  .cookie-banner { left: auto; right: 1.5rem; bottom: 5.5rem; max-width: 26rem; }
}

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 999px;
  background: #25D366; color: #fff; box-shadow: 0 12px 24px -8px oklch(40% 0.15 150 / 55%);
  transition: transform .2s var(--ease-out);
}
.wa-float:hover { transform: translateY(-2px); }
@media (min-width: 1024px) { .wa-float { right: 1.5rem; bottom: 1.5rem; } }

/* Footer */
.foot-link { display: block; padding: .25rem 0; color: color-mix(in oklab, #fff 75%, var(--blue-300)); }
.foot-link:hover { color: #fff; }

/* Reveal al scroll */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .link-arrow::after { transition: none; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue-300); }
