/*
 * Página de inicio pública (home.HomeView). Hoja propia: no carga Tabler ni
 * app.css. En la línea de FreeAgent: inicio azul con las capturas a un lado,
 * pestañas de carpeta por tipo de usuario, funciones en pestañas de píldora,
 * franja durazno con tarjetas blancas y tarjetas de color al final.
 *
 * Azul de los botones del sistema y el ámbar del logo para la acción
 * principal. El CSP no deja estilos en línea ni scripts: las pestañas son
 * radios con :checked.
 */
:root {
    --ink: #14202E; --text: #3B4654; --muted: #6E747C; --line: #E6E8EC;
    --blue: #3969EF; --blue-hover: #2B55CA; --blue-deep: #2448B8; --navy: #102449;
    --amber: #F5B10A; --amber-hover: #E3A200; --green: #16A34A; --red: #B91C1C;
    --peach: #FCEDE3; --amber-soft: #FFE7A6; --mint: #CFF1E4; --sky: #DCE7FF; --yellow: #FFE07A;
    --app-bg: #FBFAF9;
    --head: "Poppins", system-ui, sans-serif; --body: "Barlow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { color: var(--text); background: #FFFFFF; font-family: var(--body); font-size: 17px; line-height: 1.55; overflow-x: clip; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--head); color: var(--ink); letter-spacing: -.025em; line-height: 1.12; }
.wrap { width: min(74rem, 100% - 2rem); margin-inline: auto; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1.25rem; border-radius: 10px; border: 2px solid transparent; font-size: 1rem; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn-big { padding: .9rem 1.6rem; font-size: 1.08rem; }
.btn-amber { color: var(--ink); background: var(--amber); box-shadow: 0 4px 0 rgba(20, 32, 46, .18); }
.btn-amber:hover { background: var(--amber-hover); }
.btn-blue { color: #FFFFFF; background: var(--blue); }
.btn-blue:hover { background: var(--blue-hover); }
.btn-ghost { color: #FFFFFF; border-color: rgba(255, 255, 255, .7); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.link-arrow { color: #FFFFFF; font-weight: 700; text-decoration: none; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow.dark { color: var(--blue); }

/* Barra */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--blue); box-shadow: 0 1px 0 rgba(255, 255, 255, .12); }
.nav { display: flex; align-items: center; gap: 2rem; padding: .7rem 0; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: #FFFFFF; font-family: var(--head); font-size: 1.25rem; font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 1.6rem; }
.nav-links a { color: #FFFFFF; font-weight: 600; text-decoration: none; opacity: .92; }
.nav-links a:hover { opacity: 1; text-decoration: underline; }
.nav-actions { display: flex; gap: .5rem; margin-inline-start: auto; }
.nav-actions .btn { padding: .5rem 1rem; }
.short { display: none; }

/* Inicio azul */
.hero-band { color: #FFFFFF; background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%); }
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3rem; align-items: center; padding: 3.5rem 0 3rem; }
.hero-copy { order: 2; }
.devices { order: 1; position: relative; padding: 1rem 3.5rem 2.5rem 0; }
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 1rem; font-size: .95rem; font-weight: 600; opacity: .95; }
.stars { padding: .15rem .6rem; border-radius: 6px; color: var(--ink); background: var(--amber); font-weight: 700; }
.hero h1 { margin-bottom: 1.2rem; color: #FFFFFF; font-size: clamp(2.4rem, 4.4vw, 3.6rem); font-weight: 700; line-height: 1.05; }
.hero-copy > p:not(.trust) { margin: 0 0 1.8rem; font-size: 1.15rem; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.phone.hero-phone { position: absolute; right: 0; bottom: 0; width: 11.5rem; }
.phone.hero-phone .screen { height: 23rem; }
.burst { position: absolute; top: -1rem; right: 1.5rem; z-index: 3; display: grid; place-items: center; align-content: center; width: 7rem; height: 7rem; border-radius: 50%; color: #FFFFFF; background: #E5484D; font-family: var(--head); font-size: .85rem; font-weight: 600; line-height: 1.1; text-align: center; transform: rotate(10deg); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); }
.burst b { display: block; font-size: 1.05rem; }

/* Pestañas de carpeta pegadas al panel blanco */
/* Fijo: al enfocarlo con el clic en la pestaña el navegador no mueve la página. */
.tab-input { position: fixed; top: 0; left: 0; opacity: 0; pointer-events: none; }
.folder-tabs { display: flex; justify-content: center; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.folder-tabs label { flex: 0 0 auto; padding: .95rem 1.8rem; border-radius: 12px 12px 0 0; color: #FFFFFF; background: rgba(9, 25, 70, .35); font-weight: 700; cursor: pointer; }
.folder-tabs label:hover { background: rgba(9, 25, 70, .5); }
#a-dir:checked ~ .hero-band [for="a-dir"], #a-ofi:checked ~ .hero-band [for="a-ofi"], #a-cam:checked ~ .hero-band [for="a-cam"] { color: var(--ink); background: #FFFFFF; }
.audience-panels { padding: 4.5rem 0 3rem; }
.audience-panel { display: none; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem; align-items: center; }
#a-dir:checked ~ .audience-panels .p-dir, #a-ofi:checked ~ .audience-panels .p-ofi, #a-cam:checked ~ .audience-panels .p-cam { display: grid; }
.audience-panel h2 { margin-bottom: 1rem; font-size: clamp(2rem, 3.6vw, 2.9rem); }
.audience-panel p { margin: 0 0 1.2rem; font-size: 1.12rem; }
.art { position: relative; display: flex; justify-content: center; align-items: center; min-height: 23rem; padding: 2.5rem; border-radius: 28px; }
.art.amber { background: var(--amber-soft); } .art.mint { background: var(--mint); } .art.sky { background: var(--sky); }
.art .laptop { width: 100%; max-width: 32rem; }
.stamp { position: absolute; top: -1.2rem; left: -1.2rem; z-index: 3; display: grid; place-items: center; align-content: center; width: 6.6rem; height: 6.6rem; border-radius: 50%; color: var(--ink); background: #FFFFFF; border: 3px dashed var(--ink); font-family: var(--head); font-size: .8rem; font-weight: 600; line-height: 1.05; text-align: center; text-transform: uppercase; transform: rotate(-12deg); box-shadow: 0 0 0 6px #FFFFFF; }
.stamp b { display: block; font-size: 1.05rem; font-weight: 700; }

.checks { margin: 0 0 1.6rem; padding: 0; list-style: none; }
.checks li { position: relative; padding: .35rem 0 .35rem 2rem; color: var(--ink); font-weight: 600; }
.checks li::before { content: ""; position: absolute; left: 0; top: .55rem; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--green); }
.checks li::after { content: ""; position: absolute; left: .38rem; top: .82rem; width: .5rem; height: .28rem; border-left: 2px solid #FFFFFF; border-bottom: 2px solid #FFFFFF; transform: rotate(-45deg); }

/* Laptop y teléfono con capturas reales */
.laptop .lid { padding: 8px 8px 12px; border-radius: 16px 16px 5px 5px; background: #0E141B; box-shadow: 0 30px 50px -25px rgba(10, 20, 40, .55); }
.laptop .display { overflow: hidden; border-radius: 8px; background: var(--app-bg); }
.laptop .display img { display: block; width: 100%; height: auto; }
.laptop .base { height: 12px; margin: 0 -4%; border-radius: 0 0 16px 16px; background: linear-gradient(#D4D7DB, #9EA3AA); }
.phone { width: 15rem; padding: 8px; border-radius: 38px; background: #0E141B; box-shadow: 0 30px 50px -25px rgba(10, 20, 40, .6), inset 0 0 0 2px #2A313B; }
.phone .screen { overflow: hidden; height: 30rem; border-radius: 31px; background: var(--app-bg); }
.phone .screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Funciones en pestañas de píldora */
.features { padding: 4rem 0 5rem; border-top: 1px solid var(--line); }
.features h2 { max-width: 44rem; margin: 0 auto .8rem; font-size: clamp(2rem, 3.6vw, 2.9rem); text-align: center; }
.lead { max-width: 38rem; margin: 0 auto 2rem; font-size: 1.12rem; text-align: center; }
.segmented { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 3rem; padding: .3rem; gap: .25rem; border-radius: 12px; background: #EEF1F5; overflow-x: auto; scrollbar-width: none; }
.segmented label { flex: 0 0 auto; padding: .6rem 1.2rem; border-radius: 9px; color: var(--ink); font-weight: 600; cursor: pointer; }
.segmented label:hover { background: rgba(255, 255, 255, .7); }
#f-avances:checked ~ .segmented [for="f-avances"], #f-costos:checked ~ .segmented [for="f-costos"],
#f-estimaciones:checked ~ .segmented [for="f-estimaciones"], #f-bitacora:checked ~ .segmented [for="f-bitacora"] { color: #FFFFFF; background: var(--ink); }
.feature-panel { display: none; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; align-items: center; }
#f-avances:checked ~ .x-avances, #f-costos:checked ~ .x-costos, #f-estimaciones:checked ~ .x-estimaciones, #f-bitacora:checked ~ .x-bitacora { display: grid; }
.feature-panel h3 { margin-bottom: 1.2rem; font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.shot { display: flex; justify-content: center; align-items: center; min-height: 24rem; padding: 2.5rem; border-radius: 24px; background: #F2F5FA; }
.shot .laptop { width: 100%; }
.shot.tall { padding: 2rem; }

/* Hecho en México: franja durazno con tarjetas blancas */
.mx { padding: 4.5rem 0 5rem; background: var(--peach); }
.mx h2 { margin-bottom: 1rem; font-size: clamp(2rem, 3.6vw, 2.9rem); text-align: center; }
.inline-checks { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; margin: 0 0 2.5rem; padding: 0; list-style: none; color: var(--ink); font-weight: 600; }
.inline-checks li::before { content: "✓ "; color: var(--blue); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.fact { padding: 1.6rem; border-radius: 18px; background: #FFFFFF; box-shadow: 0 1px 2px rgba(20, 32, 46, .06), 0 10px 30px -18px rgba(20, 32, 46, .25); }
.fact-tag { display: inline-block; margin-bottom: 1rem; padding: .15rem .6rem; border-radius: 6px; color: var(--blue-deep); background: var(--sky); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fact b { display: block; margin-bottom: .4rem; color: var(--ink); font-family: var(--head); font-size: 1.25rem; letter-spacing: -.02em; }
.fact p { margin: 0; }

/* Tarjetas de color del final */
.promos { padding: 4.5rem 0 1rem; }
.promo-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.promo { position: relative; padding: 2.5rem; border-radius: 28px; overflow: hidden; }
.promo h3 { margin-bottom: .8rem; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.promo p { margin: 0 0 1.4rem; font-size: 1.08rem; }
.promo.mint { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: end; padding-bottom: 0; background: var(--mint); }
.promo.mint > div { padding-bottom: 2.5rem; }
.phone.promo-phone { width: 11rem; margin-bottom: -6rem; transform: rotate(6deg); }
.phone.promo-phone .screen { height: 22rem; }
.promo.yellow { padding-right: 10rem; background: var(--yellow); }
.promo .stamp.big { top: 1.6rem; right: 1.6rem; left: auto; width: 7.4rem; height: 7.4rem; background: var(--yellow); box-shadow: none; transform: rotate(12deg); }

/* Demo */
.demo { padding: 4.5rem 0 5rem; }
.demo-box { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3rem; align-items: start; padding: 3.5rem; border-radius: 28px; color: #FFFFFF; background: linear-gradient(160deg, var(--blue) 0%, var(--blue-deep) 100%); }
.demo h2 { margin-bottom: 1rem; color: #FFFFFF; font-size: clamp(2rem, 3.6vw, 2.9rem); }
.demo-box > div > p { margin: 0 0 1.5rem; font-size: 1.15rem; }
.demo-box .checks li { color: #FFFFFF; }
.form { padding: 1.8rem; border-radius: 20px; color: var(--ink); background: #FFFFFF; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field { margin-bottom: 1rem; }
/* Gracias después de pedir la demo (reemplaza al formulario sin recargar). */
.demo-thanks { text-align: center; padding: 3rem 1.8rem; outline: none; }
.demo-thanks h3 { margin: 1rem 0 .5rem; font-size: 1.5rem; }
.demo-thanks p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.demo-thanks-icon { width: 3.5rem; height: 3.5rem; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: #15803D; color: #FFFFFF; font-size: 1.8rem; font-weight: 700; }
.btn[disabled] { opacity: .7; cursor: wait; }
.field label { display: block; margin-bottom: .35rem; font-size: .92rem; font-weight: 700; }
.field label small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: .72rem .9rem; border: 2px solid var(--line); border-radius: 10px; background: #FFFFFF; font: inherit; color: var(--ink); }
.field textarea { min-height: 5.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; }
.field .is-invalid { border-color: var(--red); }
.invalid-feedback { margin-top: .3rem; color: var(--red); font-size: .88rem; font-weight: 600; }
.form .btn { width: 100%; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

footer { padding: 2rem 0 3rem; color: rgba(255, 255, 255, .7); background: var(--navy); }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; }
footer a { color: #FFFFFF; font-weight: 600; }

.btn:focus-visible, .link-arrow:focus-visible, .nav a:focus-visible { outline: 3px solid rgba(245, 177, 10, .8); outline-offset: 2px; }
#a-dir:focus-visible ~ .hero-band [for="a-dir"], #a-ofi:focus-visible ~ .hero-band [for="a-ofi"], #a-cam:focus-visible ~ .hero-band [for="a-cam"],
#f-avances:focus-visible ~ .segmented [for="f-avances"], #f-costos:focus-visible ~ .segmented [for="f-costos"],
#f-estimaciones:focus-visible ~ .segmented [for="f-estimaciones"], #f-bitacora:focus-visible ~ .segmented [for="f-bitacora"] { outline: 3px solid var(--amber); outline-offset: -3px; }

@media (max-width: 980px) {
    .nav-links { display: none; }
    .hero, .audience-panel, .feature-panel, .demo-box, .promo-grid { grid-template-columns: minmax(0, 1fr); }
    .hero { gap: 2.5rem; padding-top: 2.5rem; }
    .hero-copy, .devices { order: 0; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .folder-tabs { justify-content: flex-start; }
}
@media (max-width: 600px) {
    body { font-size: 16px; }
    .nav { gap: 1rem; }
    .nav-actions .btn { padding: .45rem .8rem; font-size: .95rem; }
    .long { display: none; } .short { display: inline; }
    .segmented { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    .segmented label { text-align: center; }
    .folder-tabs { justify-content: center; }
    .devices { padding: .5rem 2.5rem 2rem 0; }
    .phone.hero-phone { width: 8.5rem; padding: 6px; border-radius: 28px; }
    .phone.hero-phone .screen { height: 17rem; border-radius: 23px; }
    .burst { width: 5.4rem; height: 5.4rem; right: .5rem; font-size: .7rem; }
    .burst b { font-size: .85rem; }
    .folder-tabs label { padding: .8rem 1.1rem; }
    .audience-panels { padding-top: 3rem; }
    .art, .shot { min-height: 0; padding: 1.8rem 1.2rem; }
    .stamp { width: 5.2rem; height: 5.2rem; top: -1rem; left: -.4rem; font-size: .68rem; }
    .stamp b { font-size: .85rem; }
    .facts, .row2 { grid-template-columns: minmax(0, 1fr); }
    .promo, .demo-box { padding: 1.6rem; border-radius: 22px; }
    .promo.mint { grid-template-columns: minmax(0, 1fr); }
    .promo.mint > div { padding-bottom: 0; }
    .phone.promo-phone { justify-self: center; }
    .promo.yellow { padding-right: 1.6rem; padding-top: 7.5rem; }
    .promo .stamp.big { top: 1.2rem; left: 1.4rem; right: auto; width: 5.6rem; height: 5.6rem; }
    footer .wrap { flex-direction: column; }
}

/* Asistente con IA: franja oscura con la laptop y el celular del panel */
.ai-pill { display: inline-flex; align-items: center; gap: .55rem; margin: -.6rem 0 1.6rem; padding: .35rem .9rem .35rem .4rem; border-radius: 999px; color: #FFFFFF; background: rgba(9, 25, 70, .35); font-weight: 600; text-decoration: none; }
.ai-pill:hover { background: rgba(9, 25, 70, .5); }
.ai-spark { display: inline-grid; place-items: center; padding: .1rem .5rem; border-radius: 999px; color: var(--ink); background: linear-gradient(135deg, #FFD54A, #F5B10A); font-family: var(--head); font-size: .78rem; font-weight: 700; }
.ai { padding: 5rem 0; color: rgba(255, 255, 255, .85); background: radial-gradient(60rem 30rem at 85% 20%, rgba(57, 105, 239, .35), transparent 60%), var(--navy); }
.ai-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3.5rem; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; margin-bottom: 1rem; color: #FFFFFF; font-weight: 700; }
.ai h2 { margin-bottom: 1rem; color: #FFFFFF; font-size: clamp(2rem, 3.6vw, 2.9rem); }
.ai-copy > p { margin: 0 0 1.4rem; font-size: 1.12rem; }
.ai .checks li { color: #FFFFFF; }
.ai-visual { position: relative; padding: 3rem 4rem 3rem 0; }
.phone.ai-phone { position: absolute; right: 0; bottom: 0; width: 11.5rem; }
.phone.ai-phone .screen { height: 23rem; }
.ask { position: absolute; z-index: 3; padding: .55rem .95rem; border-radius: 16px 16px 4px 16px; color: #FFFFFF; background: var(--blue); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); font-size: .92rem; font-weight: 600; white-space: nowrap; }
.ask-1 { top: 0; left: 8%; }
.ask-2 { top: 42%; left: -1.5rem; }
.ask-3 { bottom: .5rem; left: 22%; }
@media (max-width: 980px) {
    .ai-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .ai { padding: 3.5rem 0; }
    .ai-pill { font-size: .9rem; }
    .ai-visual { padding: 2.5rem 2.5rem 2rem 0; }
    .phone.ai-phone { width: 8.5rem; padding: 6px; border-radius: 28px; }
    .phone.ai-phone .screen { height: 17rem; border-radius: 23px; }
    .ask { font-size: .78rem; padding: .4rem .7rem; }
    .ask-2 { display: none; }
    .ask-1 { left: 0; }
    .ask-3 { left: 0; bottom: 0; }
}
