:root{
  --brand-red:#ff0000;
  --brand-navy:#0d3145;
  --text:#0b1220;
  --muted:#5b6473;
  --line:#e6e8ec;
  --bg:#ffffff;
  --bg-soft:#f7f8fa;
  --card:#ffffff;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --radius: 18px;
  --max: 1120px;
  --focus: 0 0 0 4px rgba(255,0,0,.18);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
[hidden]{display:none !important}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:linear-gradient(180deg, #fff 0%, #fff 60%, #f9fafb 100%);
}
a{color:inherit}
.container{max-width:var(--max); margin:0 auto; padding:0 20px}
section{padding:56px 0}
.soft{background:var(--bg-soft); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
  padding:12px 16px;
  border-radius:999px;
  border:1px solid transparent;
  font-weight:750;
  text-decoration:none;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  white-space:nowrap;
}
.btn:focus{outline:none; box-shadow:var(--focus)}
.btn:hover{transform: translateY(-1px)}
.btn.primary{background:var(--brand-red); color:#fff; box-shadow:0 12px 24px rgba(255,0,0,.18)}
.btn.secondary{background:rgba(13,49,69,.06); border-color:rgba(13,49,69,.16); color:var(--brand-navy)}
.btn.ghost{background:transparent; border-color:var(--line); color:var(--text)}

.topbar{
  position:sticky; top:0; z-index:30;
  background:rgba(255,255,255,.75);
  backdrop-filter: blur(12px);
  border-bottom:1px solid rgba(230,232,236,.7);
}
.topbar-inner{display:flex; align-items:center; justify-content:space-between; padding:12px 0}
.brand{display:flex; align-items:center; gap:12px; text-decoration:none}
.brand img{height:90px; width:auto}
.brand .name{font-weight:900}
.nav{display:flex; gap:14px}
.nav a{
  text-decoration:none; color:var(--muted); font-weight:700; font-size:14px;
  padding:10px 10px; border-radius:10px;
}
.nav a:hover{background:rgba(13,49,69,.06); color:var(--brand-navy)}
.top-actions{display:flex; gap:10px; flex-wrap:wrap;}
.hamburger{
  display:none;
  width:46px; height:44px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  align-items:center; justify-content:center;
  gap:5px;
  flex-direction:column;
  cursor:pointer;
}
.hamburger span{
  display:block;
  width:22px; height:2px;
  background:var(--brand-navy);
  border-radius:999px;
}
.mobile-menu{
  position:sticky; top:64px; z-index:25;
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:12px 20px 16px;
  display:flex; flex-direction:column; gap:10px;
}
.mobile-menu a{
  text-decoration:none;
  color:var(--brand-navy);
  font-weight:800;
  padding:10px 12px;
  border-radius:10px;
  background:rgba(13,49,69,.05);
}
.mobile-menu a:hover{background:rgba(13,49,69,.1)}
.mobile-actions{display:grid; gap:10px; margin-top:6px}

.pill{
  display:inline-flex; align-items:center; gap:10px;
  padding:8px 12px; border-radius:999px;
  background:rgba(13,49,69,.06);
  border:1px solid rgba(13,49,69,.14);
  color:var(--brand-navy);
  font-weight:800;
  font-size:13px;
}

.hero{padding:56px 0 22px; position:relative; overflow:hidden}
.hero::before{
  content:"";
  position:absolute; inset:-220px -220px auto auto;
  width:560px; height:560px;
  background:radial-gradient(circle at 30% 30%, rgba(255,0,0,.18), rgba(255,0,0,0) 62%);
  transform: rotate(10deg);
  pointer-events:none;
}
.hero-inner{display:grid; grid-template-columns: 1.15fr .85fr; gap:22px; align-items:start}
h1{font-size:44px; line-height:1.06; margin:14px 0}
h2{font-size:30px; line-height:1.15; margin:0 0 12px}
h3{font-size:18px; margin:0 0 8px}
p{margin:0}
.brand-red{color:var(--brand-red)}
.muted{color:var(--muted)}
.small{font-size:12px; font-weight:750}
.lead{font-size:17px; line-height:1.5; max-width:64ch;}
.kicker{color:var(--brand-navy); font-weight:900; letter-spacing:.2px}

.grid{display:grid; gap:16px}
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.card:hover{box-shadow:var(--shadow)}

.hero-actions{display:flex; gap:12px; flex-wrap:wrap; margin-top:16px}
.hero-bullets{margin-top:14px; display:grid; gap:10px}
.bullet{
  display:flex; gap:10px; align-items:flex-start;
  padding:10px 12px; border-radius:14px;
  background:rgba(247,248,250,.9);
  border:1px solid var(--line);
}
.dot{
  width:10px; height:10px; margin-top:6px;
  border-radius:999px; background:var(--brand-red);
  box-shadow:0 0 0 4px rgba(255,0,0,.14);
  flex:0 0 auto;
}

.mock{overflow:hidden; padding:0;}
.mock-top{
  display:flex; gap:6px; align-items:center;
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  background:rgba(13,49,69,.04);
}
.dotw{width:10px; height:10px; border-radius:999px; background:#d9dde5}
.mock-top span{margin-left:8px; font-size:12px; color:var(--muted); font-weight:700}
.mock img{display:block; width:100%; height:auto}

.section-head{display:flex; align-items:flex-end; justify-content:space-between; gap:18px; margin-bottom:14px}
.features{grid-template-columns: repeat(3, 1fr)}
.modules{grid-template-columns: repeat(3, 1fr)}

.chips{display:flex; gap:10px; flex-wrap:wrap; margin:12px 0 18px}
.chip{
  border:1px solid rgba(13,49,69,.16);
  background:rgba(13,49,69,.06);
  color:var(--brand-navy);
  border-radius:999px;
  padding:10px 12px;
  cursor:pointer;
  font-weight:850;
}
.chip:hover{transform: translateY(-1px)}
.chip:focus{outline:none; box-shadow:var(--focus)}
.chip.is-active{
  background:rgba(255,0,0,.08);
  border-color:rgba(255,0,0,.24);
  color:#7a0b0b;
}

.showcase{grid-template-columns: 1.2fr .8fr; gap:18px}
figure{margin:0}
figcaption{padding:12px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:13px}

.cta{
  background:linear-gradient(180deg, rgba(255,0,0,.06), rgba(13,49,69,.05));
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.cta-inner{display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap}

.cta-card{
  display:flex; align-items:center; justify-content:space-between; gap:18px; flex-wrap:wrap;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:18px;
  box-shadow:var(--shadow);
}

footer{padding:22px 0 72px; color:var(--muted)}
.footer-inner{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}
.fine{font-size:13px}

.actions-wrap{display:flex; gap:10px; flex-wrap:wrap}
.mt6{margin-top:6px}
.mt8{margin-top:8px}
.mt10{margin-top:10px}
.mt12{margin-top:12px}
.mt14{margin-top:14px}
.lh16{line-height:1.6}

.contact{grid-template-columns: 1fr 1fr}

.floating{
  position:fixed; left:14px; right:14px; bottom:14px; z-index:40;
  background:rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  border:1px solid rgba(230,232,236,.75);
  border-radius:999px;
  box-shadow:var(--shadow);
  padding:10px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.floating .left{display:flex; flex-direction:column; gap:2px}
.floating .left .t{font-weight:900}
.floating .left .s{font-size:13px; color:var(--muted)}
.floating .right{display:flex; gap:10px}

/* Chat widget */
.chat-btn{
  position:fixed; right:30px; bottom:50px; z-index:45;
  width:80px; height:80px; border-radius:999px;
  border:none;
  background:transparent;
  box-shadow:none;
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  font-weight:900;
  animation:chat-float 2.6s ease-in-out infinite;
  transition:opacity .2s ease, transform .2s ease;
}
.chat-btn img{width:100%; height:100%; display:block}
.chat-btn.is-hidden{opacity:0; transform:scale(.7); pointer-events:none}
.chat{
  position:fixed; right:16px; bottom:30px; z-index:46;
  width:380px; max-width:calc(100vw - 32px);
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  box-shadow:var(--shadow);
  overflow:hidden;
  display:none;
}
.chat.is-open{display:block; animation:chat-pop .22s ease-out}
.chat header{
  padding:14px 14px;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:rgba(13,49,69,.06);
  border-bottom:1px solid rgba(13,49,69,.12);
}
.chat header .title{display:flex; flex-direction:column; gap:2px}
.chat header .title strong{color:var(--brand-navy)}
.chat header .title span{font-size:12px; color:var(--muted)}
.chat header button{
  border:none; background:transparent; cursor:pointer; font-size:18px;
  padding:8px 10px; border-radius:12px;
}
.chat header button:hover{background:rgba(0,0,0,.06)}
.chat .body{
  padding:12px;
  height:320px;
  overflow:auto;
  display:flex; flex-direction:column; gap:10px;
  background:linear-gradient(180deg, #fff, #fbfbfc);
}
.msg{max-width:88%; padding:10px 12px; border-radius:16px; border:1px solid var(--line)}
.msg.bot{background:#fff}
.msg.user{align-self:flex-end; background:rgba(255,0,0,.06); border-color:rgba(255,0,0,.18)}
.chat .composer{
  display:flex; gap:10px;
  padding:12px;
  border-top:1px solid var(--line);
  background:#fff;
}
.chat input{
  flex:1 1 auto;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 12px;
  font-size:14px;
}
.chat input:focus{outline:none; box-shadow:var(--focus); border-color:rgba(255,0,0,.22)}
.chat .send{
  border:none;
  border-radius:14px;
  padding:12px 14px;
  background:var(--brand-navy);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
@keyframes chat-float{
  0%, 100%{transform:translateY(0)}
  50%{transform:translateY(-4px)}
}
@keyframes chat-pop{
  from{opacity:0; transform:translateY(8px) scale(.98)}
  to{opacity:1; transform:translateY(0) scale(1)}
}

@media (max-width: 980px){
  .hero-inner{grid-template-columns: 1fr}
  .features, .modules, .showcase, .contact{grid-template-columns: 1fr}
  h1{font-size:38px}
  .nav{display:none}
  .hamburger{display:inline-flex}
  .top-actions{display:none}
}

@media (max-width: 820px){
  section{padding:48px 0}
  .brand img{height:64px}
  h1{font-size:34px}
  h2{font-size:26px}
  .lead{font-size:16px}
  .hero{padding:44px 0 18px}
}

@media (max-width: 680px){
  .container{padding:0 16px}
  .topbar-inner{flex-direction:row; align-items:center; gap:12px}
  .brand img{height:52px}
  .pill{font-size:12px}
  .hero-actions{flex-direction:column; align-items:stretch}
  .hero-actions .btn{width:100%}
  .hero-bullets .bullet{padding:10px}
  .mock-top span{font-size:11px}
  .cta-card{padding:16px}
  .mobile-menu{top:72px}
}

@media (max-width: 520px){
  section{padding:40px 0}
  h1{font-size:30px}
  h2{font-size:23px}
  h3{font-size:17px}
  .lead{font-size:15px}
  .card{padding:16px}
  .pill{padding:7px 10px}
  .chips, .subchips{gap:8px}
  .chip, .subchip{padding:9px 10px; font-size:12px}
  .floating{flex-direction:column; align-items:flex-start}
  .chat{width: calc(100vw - 32px)}
}

/* Sub-chips (solo para Reportes / Catálogo) */
.subchips{display:flex; gap:10px; flex-wrap:wrap; margin:0 0 16px}
.subchip{
  border:1px solid rgba(255,0,0,.22);
  background:rgba(255,0,0,.06);
  color:#7a0b0b;
  border-radius:999px;
  padding:9px 11px;
  cursor:pointer;
  font-weight:500;
  font-size:13px;
}
.subchip:hover{
  transform: translateY(-1px);
  background:rgba(255,0,0,.12);
  border-color:rgba(255,0,0,.32);
}
.subchip.is-active{
  background:rgba(255,0,0,.18);
  border-color:rgba(255,0,0,.38);
  color:#5b0a0a;
}
