/* Sitio comercial — CSS puro, sin build step (coherente con el resto del repo: no hay
   toolchain de frontend para HTML estatico). Paleta y tipografia de la identidad MUREQO
   (brand/README.md, generada por brand/build.mjs): las mismas que usa la app
   (Microservice.Client/Infrastructure/Theme/BrandTheme.cs), para que la transicion a
   app.{DOMAIN} no se sienta como otro producto. */

/* Manrope (SIL OFL), servida desde el propio origen: el CSP del apex es font-src 'self'.
   font-display: swap pinta el texto enseguida con la fuente del sistema y cambia al cargar
   (~25 KB), asi que no retrasa el LCP. */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("/fonts/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --brand: #0F5B52;        /* Pino */
    --brand-dark: #0A443D;
    --brand-contrast: #ffffff;

    --bg: #ffffff;
    --bg-alt: #F4F7F6;       /* Niebla */
    --text: #0B1A18;         /* Tinta */
    --text-muted: #475955;
    --border: #DCE4E2;
    --ok: #2e7d32;
    --wait: #b26a00;
    --focus: #0F5B52;
    --logo-ink: #0B1A18;     /* letras del logotipo; la cola de la Q usa --brand */

    --radius: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 8px 24px -12px rgba(16, 24, 32, .12);
    --maxw: 1120px;

    color-scheme: light;
}

/* Modo oscuro. Por defecto sigue al sistema; el switch del header (js/tema.js) fija la eleccion con
   data-theme en <html>. Los tokens van dos veces a proposito: "sistema oscuro y no eligio claro" y
   "eligio oscuro" — CSS no tiene forma de compartir un bloque entre los dos selectores. Si se cambia
   un color, cambiarlo en los dos. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --brand: #6FE0C3;    /* Menta: sobre oscuro el primario pasa a ser el acento */
        --brand-dark: #9BEAD6;
        --brand-contrast: #0B1A18;

        --bg: #0B1A18;       /* Tinta */
        --bg-alt: #112421;
        --text: #E7EFED;
        --text-muted: #A3B6B2;
        --border: #24403B;
        --ok: #6cc26c;
        --wait: #e0a640;
        --focus: #6FE0C3;
        --logo-ink: #FFFFFF;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);

        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --brand: #6FE0C3;
    --brand-dark: #9BEAD6;
    --brand-contrast: #0B1A18;

    --bg: #0B1A18;
    --bg-alt: #112421;
    --text: #E7EFED;
    --text-muted: #A3B6B2;
    --border: #24403B;
    --ok: #6cc26c;
    --wait: #e0a640;
    --focus: #6FE0C3;
    --logo-ink: #FFFFFF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);

    color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Manrope", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
}

h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: 0 0 .4em; }
h3 { font-size: 1.15rem; margin: 0 0 .35em; }
p { margin: 0 0 1em; color: var(--text-muted); }

a { color: var(--brand); }

img { max-width: 100%; display: block; }

code {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: .1em .4em;
    font-size: .9em;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--brand);
    color: var(--brand-contrast);
    padding: .75em 1.25em;
    z-index: 100;
    border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 1.25rem;
}
.wrap-narrow { max-width: 780px; }
.center { text-align: center; }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: .85rem;
    padding-bottom: .85rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: var(--text);
    margin-right: auto;
}
/* Logotipo MUREQO en curvas (sin isotipo: la marca es la palabra). Header y footer lo usan inline
   con <use href="/img/logo-sprite.svg#logotipo">: asi las letras toman --logo-ink y la cola de la Q
   --brand, y el logo sigue al switch de tema. Un <img src="logo.svg"> no podria: adentro de una
   imagen solo se ve la preferencia del sistema, no el data-theme de la pagina. El sprite lo genera
   brand/build.mjs. 21px de alto = mayusculas de ~20px, el peso visual del header anterior. */
.brand-logo, .footer-logo { display: block; width: auto; color: var(--logo-ink); }
.brand-logo { height: 21px; }
@media (max-width: 400px) {
    .brand-logo { height: 19px; }
}
.footer-logo { height: 18px; }

.nav {
    display: flex;
    gap: 1.5rem;
}
.nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: .95rem;
}
.nav a:hover { color: var(--text); }

@media (max-width: 720px) {
    .nav { display: none; }
}

/* ── Botones ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .7em 1.4em;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }

.btn-primary { background: var(--brand); color: var(--brand-contrast); }
.btn-primary:hover { opacity: .92; }

.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }

/* "Ingresar" del header. Es el CTA del cliente que YA tiene cuenta: se lee como boton
   (borde y color de marca, no texto suelto) pero queda por debajo del solido del hero,
   que es el de adquisicion. Va aca y no en la seccion Header porque su :hover tiene que
   pisar al de .btn-outline, y eso lo decide el orden del archivo. */
.header-cta {
    flex-shrink: 0;
    border-color: var(--brand);
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, transparent);
}
.header-cta:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-contrast);
}

/* ── Switch de modo claro / oscuro ────────────────────────────────────── */
/* Boton del header (js/tema.js). Arranca con hidden y lo muestra el script: sin JS el sitio sigue al
   sistema y no queda un boton que no hace nada. Luna en claro (pasar a oscuro), sol en oscuro, con
   los mismos selectores que los tokens de color de arriba. */
.theme-toggle {
    flex-shrink: 0;
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg {
    grid-area: 1 / 1;
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.theme-icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-moon { display: none; }
    :root:not([data-theme="light"]) .theme-icon-sun { display: block; }
}
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }

/* En mobile el header es logo + switch + Ingresar: con el gap de desktop no entra a 360 px. */
@media (max-width: 720px) {
    .header-inner { gap: .75rem; }
}

.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 .75rem; }
.cta-center { justify-content: center; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding: 4.5rem 0 3rem; }
.hero-inner { max-width: 760px; }
.eyebrow {
    color: var(--brand);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .8rem;
    margin: 0 0 .75em;
}
.hero .lead { font-size: 1.15rem; }
.hero-note { color: var(--text-muted); font-size: .9rem; margin: 0; }
.br-desktop { display: none; }
@media (min-width: 640px) { .br-desktop { display: inline; } }

/* ── Tira de valor ────────────────────────────────────────────────────── */
.strip { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.strip-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 2rem 1.25rem;
}
.strip-item { display: flex; flex-direction: column; gap: .2rem; }
.strip-item strong { font-size: 1.02rem; }
.strip-item span { color: var(--text-muted); font-size: .92rem; }

/* ── Secciones ────────────────────────────────────────────────────────── */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { max-width: 640px; font-size: 1.05rem; }
.definition { font-size: 1.08rem; }

/* ── Cards de funciones ───────────────────────────────────────────────── */
.cards {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
}
.card p { margin: 0; font-size: .93rem; }

/* ── Capturas ─────────────────────────────────────────────────────────── */
/* Una sola columna, a proposito. Son capturas de pantalla completa (1920px de
   origen) y el ancho de la tarjeta decide si el texto de la UI se lee o no.
   Medido componiendo las capturas al tamano real de render:
     344px (3 col) -> reduccion 1:5.6, ilegible
     528px (2 col) -> se distingue que hay una factura, no se lee el CAE
    1080px (1 col) -> reduccion 1:1.78, se leen CAE, importes y nombres
   Las 4 comparten relacion de aspecto (1400x642), asi que quedan parejas sin
   necesidad del align-items: start que habia aca. */
.screenshots {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 1.5rem;
}
.screenshot {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
/* La captura enlaza a si misma en tamano real: agranda sin JavaScript y sin
   tocar el CSP 'self' del sitio. */
.screenshot a { display: block; border-bottom: 1px solid var(--border); }
.screenshot a:hover img,
.screenshot a:focus-visible img { opacity: .85; }
.screenshot img { width: 100%; height: auto; display: block; transition: opacity .15s ease; }
.screenshot p { margin: 0; padding: 1rem 1.25rem; font-size: .93rem; }
.screenshot strong { display: block; margin-bottom: .2rem; }

/* Video de demo, arriba de las capturas. Mismo tratamiento visual que .screenshot para que
   se lea como parte de la misma serie, pero sin el <a> ni el hover: el video ya es
   interactivo por su cuenta (atributo controls), envolverlo en un link seria una trampa.
   El sitio no tiene una linea de JS y esto tampoco la necesita: controls, poster y preload
   son atributos del elemento. No autoplaya a proposito: con preload="metadata" el navegador
   baja solo la cabecera del archivo, asi que el video no le cuesta ancho de banda al que no
   lo abre — que es la mayoria. */
.demo {
    margin: 2rem 0 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.demo video {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--border);
    /* Si la relacion de aspecto real del archivo no coincide con el width/height declarado,
       las bandas salen de este color y no del negro default del <video>. */
    background: var(--bg-alt);
}

.demo figcaption { margin: 0; padding: 1rem 1.25rem; font-size: .93rem; }
.demo figcaption strong { display: block; margin-bottom: .2rem; }

/* ── Split (offline) ──────────────────────────────────────────────────── */
.split {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 3rem;
    align-items: center;
}
@media (max-width: 800px) {
    .split { grid-template-columns: 1fr; }
}
.checklist { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .65rem; }
.checklist li {
    padding-left: 1.6em;
    position: relative;
    color: var(--text);
}
.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--ok);
    font-weight: 700;
}

.panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem 1.25rem;
}
.panel-row {
    display: flex;
    align-items: center;
    gap: .6em;
    padding: .55em 0;
    border-bottom: 1px dashed var(--border);
    font-size: .92rem;
}
.panel-row:last-of-type { border-bottom: none; }
.dot { width: .55em; height: .55em; border-radius: 50%; flex-shrink: 0; }
.dot-ok { background: var(--ok); }
.dot-wait { background: var(--wait); }
.panel-foot { margin: .75rem 0 0; font-size: .8rem; color: var(--text-muted); }

/* ── Pasos ────────────────────────────────────────────────────────────── */
.steps {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.75rem;
    counter-reset: step;
}
.step-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--brand);
    color: var(--brand-contrast);
    font-weight: 700;
    margin-bottom: .75rem;
}
.steps p { font-size: .93rem; margin: 0; }

/* ── Planes ───────────────────────────────────────────────────────────── */
.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    align-items: stretch;
}
.plan {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
}
.plan-featured { border-color: var(--brand); box-shadow: var(--shadow); }
.plan-soon { opacity: .82; }
.plan-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .3em .7em;
    border-radius: 999px;
    background: var(--brand);
    color: var(--brand-contrast);
    margin-bottom: .75rem;
}
.plan-badge-soon { background: var(--text-muted); }
.plan-price { margin: 0 0 .25em; }
.plan-price .amount { font-size: 1.6rem; font-weight: 800; }
.plan-price .amount-ask { font-size: 1.15rem; font-weight: 700; color: var(--text-muted); }
.plan-price .period { font-size: .85rem; color: var(--text-muted); margin-left: .3em; }
/* Bloque de oferta: renglon tachado + badge de descuento arriba del precio vigente.
   Se renderiza solo si hay precio de lista configurado (ver web/index.html). */
.plan-list-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    font-size: .88rem;
    color: var(--text-muted);
    margin-bottom: .2rem;
}
.plan-list-price s { text-decoration-thickness: 2px; }
.plan-discount {
    background: var(--ok);
    color: var(--brand-contrast);
    font-weight: 700;
    font-size: .78rem;
    line-height: 1.6;
    padding: 0 .55em;
    border-radius: 999px;
    white-space: nowrap;
}
.plan-offer-note { font-size: .85rem; color: var(--text-muted); margin: .35rem 0 0; }
.plan-for { font-size: .9rem; margin-bottom: 1rem; }
.plan ul { list-style: none; margin: 0 0 1.5rem; padding: 0; flex-grow: 1; display: grid; gap: .55rem; }
.plan li {
    font-size: .92rem;
    padding-left: 1.4em;
    position: relative;
}
.plan li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--brand);
    font-weight: 700;
}
/* Nota al pie de la tarjeta Pro. No lleva flex-grow: de empujar el boton al fondo ya se
   encarga el <ul> de arriba, que si lo tiene. */
.plan-soon-note { font-size: .85rem; margin-bottom: 1.25rem; }

.plans-note { color: var(--text-muted); font-size: .85rem; text-align: center; margin-top: -.5rem; }

/* ── Tabla comparativa ────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; margin-top: 2.5rem; }
.compare {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
    min-width: 480px;
}
.compare caption {
    text-align: left;
    font-weight: 700;
    margin-bottom: .75rem;
}
.compare th, .compare td {
    border: 1px solid var(--border);
    padding: .65em .9em;
    text-align: left;
}
.compare thead th { background: var(--bg-alt); }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare td.no { color: var(--text-muted); }
.th-soon { font-weight: 400; color: var(--text-muted); font-size: .8em; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
details {
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}
details:first-of-type { border-top: 1px solid var(--border); }
summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.02rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
    content: "+";
    font-size: 1.3rem;
    color: var(--brand);
    flex-shrink: 0;
}
details[open] summary::after { content: "–"; }
details p { margin: .75rem 0 0; }

/* ── CTA final ────────────────────────────────────────────────────────── */
.section-cta { text-align: center; }

/* ── Formulario de leads ──────────────────────────────────────────────── */
.lead-form {
    display: grid;
    gap: 1rem;
    max-width: 480px;
    margin: 2rem auto 0;
    text-align: left;
}
.lead-form-row { display: grid; gap: .35rem; }
.lead-form-row label { font-size: .88rem; font-weight: 600; }
.lead-form-row input {
    font: inherit;
    padding: .7em .9em;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) / 2);
    background: var(--bg);
    color: var(--text);
}
.lead-form-row input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

/* Honeypot: oculto de forma visual + fuera del arbol de accesibilidad (aria-hidden en el HTML) y
   del tab order (tabindex="-1") — un humano real, use mouse, teclado o lector de pantalla, nunca
   llega a este campo. clip-rect en vez de left:-9999px: ese truco viejo puede agrandar el area
   scrolleable de la pagina; esto no. */
.hp-field {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lead-form-alt { text-align: center; font-size: .9rem; color: var(--text-muted); margin: 1.25rem 0 0; }
.lead-form-alt + .lead-form-alt { margin-top: .4rem; }
.lead-form-alt a { color: var(--brand); }

/* ── CTA fijo (mobile) ────────────────────────────────────────────────── */
.sticky-cta { display: none; }
@media (max-width: 720px) {
    .sticky-cta {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
        background: var(--bg);
        border-top: 1px solid var(--border);
        box-shadow: 0 -8px 24px -12px rgba(16, 24, 32, .12);
    }
    .sticky-cta .btn { width: 100%; }
    /* Sin esto el footer queda parcialmente tapado detras de la barra fija. */
    .site-footer { padding-bottom: 4.5rem; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; }
.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 2rem;
}
@media (max-width: 640px) {
    .footer-inner { grid-template-columns: 1fr; }
}
.footer-note { font-size: .85rem; margin: .4em 0 0; }
.footer-inner nav, .footer-contact { display: flex; flex-direction: column; gap: .5rem; }
.footer-inner nav a, .footer-contact a { color: var(--text-muted); text-decoration: none; font-size: .9rem; }
.footer-inner nav a:hover, .footer-contact a:hover { color: var(--brand); }

/* ── Subpáginas (verticales, intención de búsqueda, ayuda) ──────────────── */
.breadcrumbs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: .4em;
    margin: 0 0 1.5rem;
    padding: 0;
    font-size: .85rem;
    color: var(--text-muted);
}
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: .4em; color: var(--border); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs li:last-child { color: var(--text); }

.page-hero { padding: 2.5rem 0 1rem; }
.page-hero h1 { margin-top: 0; }

/* ── 404 ──────────────────────────────────────────────────────────────── */
.error-page { padding: 6rem 0; }
