/* Kustio · web comercial. Manual de marca: docs/marca.md (no cambiar los tokens aquí sin cambiar la guía).
   Marino #0B1F4D, cian #1EC3E0 (solo acentos, foco y el check), noche #081634, niebla #F4F6F9; Sora + IBM Plex Mono servidas en local (fonts.css). */
:root {
  --brand: #0B1F4D;
  --brand-strong: #081634;
  --brand-soft: #E4F7FB;
  --accent: #1EC3E0;
  --link: #1A6F8A;
  --heading: #0B1F4D;
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --text: #33415F;
  --muted: #4A5A7A;
  --line: #DCE2EA;
  --ok: #15803D;
  --warn: #B45309;
  --bad: #B91C1C;
  --on-dark: #E6ECF5;
  --on-dark-muted: #B4C0D8;
  --dark-line: #1E3360;
  --placeholder-bg: #FFF4D6;
  --placeholder-text: #6B4A00;
  --radius: 8px;
  --radius-lg: 16px;
  --font: 'Sora', system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #1EC3E0;
    --brand-strong: #050E24;
    --brand-soft: rgba(30, 195, 224, .14);
    --link: #63D6EC;
    --heading: #FFFFFF;
    --bg: #081634;
    --surface: #0E1F45;
    --text: #DCE4F2;
    --muted: #9AA9C7;
    --line: #22365F;
    --ok: #4ADE80;
    --warn: #FBBF24;
    --bad: #F87171;
    --dark-line: #22365F;
    --placeholder-bg: #3a2e0c;
    --placeholder-text: #FBD27A;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.55; font-size: 16px; }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--heading); }
/* a:hover en mode fosc: --heading (blanc) */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
summary { cursor: pointer; }
h1, h2, h3 { margin: 0; color: var(--text); line-height: 1.15; letter-spacing: -0.01em; }
h1, h2, h3 { color: var(--heading); }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }
code { font-family: var(--mono); font-size: .92em; background: var(--brand-soft); padding: 1px 6px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); color: var(--text); padding: 10px 14px; border-radius: var(--radius); z-index: 100; }
.skip:focus { left: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 600px) { .wrap, .wrap-narrow { padding-left: 16px; padding-right: 16px; } }

.pad { padding-top: 88px; padding-bottom: 88px; }
.pad-sm { padding-top: 56px; padding-bottom: 56px; }
.pad-b { padding-bottom: 88px; }
@media (max-width: 600px) { .pad { padding-top: 56px; padding-bottom: 56px; } .pad-b { padding-bottom: 56px; } }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 20px; } .mb-6 { margin-bottom: 32px; } .mb-8 { margin-bottom: 48px; } .m0 { margin: 0; }
.narrow { max-width: 680px; }
.center { text-align: center; }
.center .narrow { margin-left: auto; margin-right: auto; }

.eyebrow { margin: 0 0 12px; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--link); }
.lead { font-size: 1.18rem; line-height: 1.6; color: var(--muted); margin: 0; }
.micro { font-size: 14px; color: var(--muted); margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--brand-soft); color: var(--brand); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Botones (marca: primario relleno, secundario con borde, radio de 8 px, peso 600, altura mínima 36 px) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: var(--radius); border: 1.5px solid transparent; font: inherit; font-weight: 600; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 17px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn-secondary { background: transparent; border-color: var(--brand); color: var(--brand); }
.btn-secondary:hover { background: var(--brand-soft); color: var(--brand); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #0B1F4D; }
.btn-accent:hover { filter: brightness(.95); color: #0B1F4D; }
.btn-light { background: transparent; border-color: #fff; color: #fff; }
.btn-light:hover { background: rgba(255,255,255,.12); color: #fff; }
@media (prefers-color-scheme: dark) {
  .btn-primary { color: #081634; } .btn-primary:hover { background: #52D2EA; border-color: #52D2EA; color: #081634; }
}
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.center { justify-content: center; }

/* Cabecera */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; gap: 24px; padding-top: 12px; padding-bottom: 12px; min-height: 68px; }
/* Logotip a 30 px d'alçada de símbol (manual: 28–32 px), versió sobre fosc en mode fosc i al peu */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand picture, .brand img { display: block; height: 30px; width: auto; }
.brand small { padding-left: 12px; border-left: 1px solid var(--line); line-height: 16px; font-size: 13px; font-weight: 400; color: var(--muted); }
.site-footer .brand small { border-left-color: var(--dark-line); color: var(--on-dark-muted); }
.nav { display: flex; align-items: center; gap: 22px; flex: 1; }
.nav-links { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; }
.nav-links li { margin: 0; }
.nav-links a { display: inline-block; padding: 8px 0; color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; border-bottom: 2px solid transparent; }
.nav-links a:hover { color: var(--brand); }
.nav-links a[aria-current="page"] { color: var(--heading); font-weight: 600; border-bottom-color: var(--accent); }
.nav-cta { margin-left: auto; }
.nav-toggle { display: none; margin-left: auto; min-height: 44px; min-width: 44px; padding: 8px 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; }
.nav-toggle svg { vertical-align: middle; }
@media (max-width: 960px) {
  .bar { flex-wrap: wrap; gap: 12px; }
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .nav { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding-bottom: 8px; }
  .js .nav { display: none; }
  .js .nav.open { display: flex; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a[aria-current="page"] { border-bottom-color: var(--line); box-shadow: inset 3px 0 0 var(--accent); padding-left: 12px; }
  .nav-cta { margin-left: 0; }
  .nav-cta .btn { width: 100%; }
}

/* Hero */
.hero { padding-top: 72px; padding-bottom: 72px; }
.split { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.split > * { flex: 1 1 440px; min-width: 0; }
@media (max-width: 600px) { .hero { padding-top: 40px; padding-bottom: 48px; } .split { gap: 36px; } .split > * { flex-basis: 100%; } }
.page-hero { padding-top: 72px; padding-bottom: 48px; text-align: center; }
.page-hero .lead { max-width: 720px; margin: 16px auto 0; }
.page-hero .row { justify-content: center; margin-top: 28px; }
@media (max-width: 600px) { .page-hero { padding-top: 44px; padding-bottom: 32px; } }

/* Esquema del flujo de firma */
.flow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: 0 24px 60px rgba(8,43,79,.10); }
.flow-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600;
 margin-bottom: 18px; }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.flow li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; padding: 12px 0 20px; margin: 0; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 56px; bottom: 0; width: 2px; background: var(--line); }
.flow .ico { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.flow .ico svg { width: 22px; height: 22px; }
.flow li.key .ico { background: var(--brand-strong); color: var(--accent); }
.flow b { display: block; }
.flow span.d { display: block; font-size: 14px; color: var(--muted); }
.flow .ok { display: flex; align-items: center; gap: 10px; margin-top: 4px; padding: 12px 14px; border-radius: 10px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); font-weight: 600; font-size: 15px; }
.flow-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* Tarjetas y rejillas */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
@media (max-width: 400px) { .grid, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.card h3 { margin-bottom: 8px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .icon { width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.card .icon svg { width: 24px; height: 24px; }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-link:hover { border-color: var(--brand); color: inherit; }
.card-link .more { margin-top: 12px; }
.num { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-strong); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; margin-bottom: 18px; }
.more { display: inline-block; font-weight: 600; text-decoration: none; padding: 8px 0; }
.more::after { content: " →"; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; margin: 0; }
.checks li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--ok) 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/12px no-repeat; }
.crosses li::before { background-color: var(--muted); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 7l10 10M17 7L7 17' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Franjas */
.band-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-soft { background: var(--brand-soft); }
.band-dark { background: var(--brand-strong); color: var(--on-dark); }
.band-dark h2, .band-dark h3 { color: #fff; }
.band-dark .eyebrow { color: var(--accent); }
.band-dark .lead, .band-dark .micro { color: var(--on-dark-muted); }
.band-dark a:not(.btn) { color: #fff; }
.band-dark .card { background: rgba(255,255,255,.05); border-color: var(--dark-line); color: var(--on-dark); }
.band-dark .card p { color: var(--on-dark-muted); }
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band .lead { max-width: 640px; margin: 0 auto 28px; }

/* Aplicaciones compatibles */
.apps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); list-style: none; margin: 0; padding: 0; }
.apps li { margin: 0; padding: 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; }
.apps li span { display: block; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 2px; }
.band-dark .apps li { background: rgba(255,255,255,.05); border-color: var(--dark-line); color: #fff; }
.band-dark .apps li span { color: var(--on-dark-muted); }

/* Comparativa */
.compare { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.compare .card.before { background: transparent; border-style: dashed; }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
thead th { border-top: 0; background: var(--brand-soft); font-weight: 600; }
caption { text-align: left; padding: 12px 16px; font-weight: 600; }

/* Avisos y marcadores pendientes */
.note { border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; padding: 18px 20px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.note p:last-child { margin: 0; }
.note-info { border-left-color: var(--brand); }
.ph { display: inline-block; background: var(--placeholder-bg); color: var(--placeholder-text); border: 1px dashed currentColor; border-radius: 4px; padding: 0 6px; font-weight: 600; font-size: .95em; }

/* Pasos numerados */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: step; position: relative; padding: 18px 20px 18px 68px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 18px; top: 16px; width: 34px; height: 34px; border-radius: 8px; background: var(--brand-strong); color: var(--accent); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps > li b { display: block; margin-bottom: 4px; }
.steps > li p { margin: 0; color: var(--muted); }

/* Descargas */
.dl { display: flex; flex-direction: column; gap: 12px; }
.dl .fmt { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dl .btn { align-self: flex-start; }
.dl .ph { align-self: flex-start; font-size: 13px; }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 18px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { font-size: 1.08rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p, .faq details ul { margin: 12px 0 0; color: var(--muted); }
.faq h2 { margin: 48px 0 12px; font-size: 1.4rem; }
.faq h2:first-child { margin-top: 0; }

/* Pie */
.site-footer { background: var(--brand-strong); color: var(--on-dark-muted); font-size: 15px; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-cols { display: grid; gap: 32px; grid-template-columns: 1.6fr repeat(3, 1fr); padding-top: 56px; padding-bottom: 40px; }
@media (max-width: 800px) { .foot-cols { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
.foot-brand .brand { margin-bottom: 12px; }
.foot-brand .brand small { color: var(--on-dark-muted); }
.foot-h { color: #fff; font-weight: 600; margin-bottom: 12px; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-list li { margin: 0; }
.foot-bottom { border-top: 1px solid var(--dark-line); padding-top: 20px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 14px; }
.site-footer .ph { font-size: 13px; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media print { .site-header, .site-footer, .cta-band { display: none; } body { background: #fff; } }

/* Utilidades adicionales */
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.lic-card { border-radius: 20px; padding: 40px; gap: 32px; }
.lic-card > .row { flex: 0 1 auto; justify-content: flex-start; }
@media (max-width: 600px) { .lic-card { padding: 24px; } }
.faq-more { margin: 24px 0 0; }
tbody th { width: 34%; font-weight: 600; }
[id] { scroll-margin-top: 88px; }

/* Formulario de contacto */
.lead-form { display: grid; gap: 16px; text-align: left; }
.lead-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.lead-form input:not([type=checkbox]), .lead-form textarea { font: inherit; font-weight: 400; padding: 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; }
.lead-form .chk { display: flex; gap: 10px; font-weight: 400; align-items: flex-start; }
.lead-form .hp { position: absolute; left: -9999px; }
.lead-form button { justify-self: start; cursor: pointer; }
