/* ============================================================
   InsightX Facturación — sitio corporativo
   Estilo: corporativo tech (azul confianza)
   Sin recursos externos (CSP default-src 'self'): fuentes del
   sistema, SVG inline, CSS/JS propios.
   ============================================================ */

:root {
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --blue-deep:   #1e3a8a;
  --navy:        #0f1f3d;
  --ink:         #0f172a;
  --slate:       #475569;
  --muted:       #64748b;
  --line:        #e2e8f0;
  --bg:          #ffffff;
  --bg-soft:     #f8fafc;
  --bg-tint:     #eff4ff;
  --green:       #16a34a;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-lg:   0 20px 50px rgba(30,58,138,.16);
  --maxw:        1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--slate); }
a  { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; display: block; }
ul { color: var(--slate); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: .9rem;
}

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #e2e8f0; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section--navy p { color: #aebfd6; }
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-head p { font-size: 1.08rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: 1rem;
  padding: 13px 24px; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.28); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 10px 26px rgba(37,99,235,.36); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-light { background: #fff; color: var(--blue-deep); }
.btn-light:hover { background: #eef3ff; color: var(--blue-deep); }
.btn-lg { padding: 16px 30px; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.18rem; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand .mark { width: 30px; height: 30px; }
.brand .sub { color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--slate); font-weight: 500; font-size: .97rem; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, #dbe7ff 0%, rgba(219,231,255,0) 60%),
    radial-gradient(700px 500px at 0% 0%, #eef4ff 0%, rgba(238,244,255,0) 55%),
    var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center;
  padding: 86px 0 76px;
}
.hero h1 span { color: var(--blue); }
.hero .lead { font-size: 1.18rem; max-width: 560px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 18px; }
.hero-trust { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 7px; }

/* tarjeta mock del producto */
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 22px; transform: rotate(.4deg);
}
.hero-card .hc-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.hero-card .hc-title { font-weight: 700; font-size: .95rem; }
.hc-pill { font-size: .72rem; font-weight: 700; color: var(--green); background: #dcfce7; padding: 4px 10px; border-radius: 999px; }
.hc-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.hc-row:last-child { border-bottom: 0; }
.hc-row .muted { color: var(--muted); }
.hc-row .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.hc-status { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-weight: 600; font-size: .82rem; }

/* ---------- Logos / stats band ---------- */
.band { padding: 30px 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; text-align: center; }
.stat .num { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: var(--blue-deep); letter-spacing: -.03em; }
.stat .lbl { color: var(--muted); font-size: .92rem; }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center;
  background: var(--bg-tint); margin-bottom: 18px;
}
.card .ico svg { width: 26px; height: 26px; stroke: var(--blue); fill: none; stroke-width: 1.8; }
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; font-size: .97rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .n {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 16px;
  box-shadow: 0 8px 18px rgba(37,99,235,.3);
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: .94rem; margin: 0; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split + .split { margin-top: 64px; }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.checklist li { position: relative; padding: 8px 0 8px 34px; color: var(--slate); }
.checklist li svg { position: absolute; left: 0; top: 11px; width: 20px; height: 20px; stroke: var(--green); fill: none; stroke-width: 2.4; }
.panel {
  background: linear-gradient(160deg, #f3f7ff, #ffffff);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow);
}
.panel .pline { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.panel .pline:last-child { border-bottom: 0; }
.panel .pdot { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-tint); display: grid; place-items: center; flex: 0 0 auto; }
.panel .pdot svg { width: 18px; height: 18px; stroke: var(--blue); fill: none; stroke-width: 1.9; }
.panel .pl-main { font-weight: 600; font-size: .95rem; }
.panel .pl-sub { color: var(--muted); font-size: .85rem; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 860px; margin: 0 auto; align-items: stretch; }
.price-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.price-card.featured { border: 2px solid var(--blue); box-shadow: var(--shadow-lg); position: relative; }
.price-card .tag { position: absolute; top: -13px; left: 36px; background: var(--blue); color: #fff; font-size: .73rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; letter-spacing: .04em; }
.price-card h3 { font-size: 1.15rem; }
.price-card .amount { font-size: 2.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; margin: 6px 0 2px; }
.price-card .amount small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-card .note { color: var(--muted); font-size: .9rem; min-height: 1.4em; }
.price-card .checklist { flex: 1; }
.price-card .btn { width: 100%; justify-content: center; margin-top: 18px; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 22px; margin-bottom: 14px; box-shadow: var(--shadow);
}
.faq summary {
  list-style: none; cursor: pointer; font-weight: 600; color: var(--ink);
  padding: 20px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { width: 20px; height: 20px; stroke: var(--blue); fill: none; stroke-width: 2.2; flex: 0 0 auto; transition: transform .2s ease; }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .ans { padding: 0 0 22px; color: var(--slate); }
.faq .ans p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  border-radius: 24px; padding: 56px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; }
.cta p { color: #dbe7ff; max-width: 560px; margin: 0 auto 26px; font-size: 1.08rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-info .ci-item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-info .ci-item svg { width: 22px; height: 22px; stroke: var(--blue); fill: none; stroke-width: 1.8; flex: 0 0 auto; margin-top: 3px; }
.contact-info .ci-item .l { font-weight: 600; }
.contact-info .ci-item .v { color: var(--muted); font-size: .95rem; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.form-msg { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius-sm); font-size: .94rem; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.form-msg.err { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Page hero (interior) ---------- */
.page-hero { padding: 72px 0 28px; text-align: center; background: var(--bg-tint); border-bottom: 1px solid var(--line); }
.page-hero p { max-width: 640px; margin: 0 auto; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #aebfd6; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.site-footer .brand { color: #fff; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #aebfd6; font-size: .94rem; }
.site-footer a:hover { color: #fff; }
.footer-about { max-width: 320px; font-size: .94rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .86rem; color: #8499b8; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { transform: none; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split .panel { order: 2; }
}
@media (max-width: 680px) {
  .section { padding: 60px 0; }
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 0;
    box-shadow: var(--shadow);
  }
  .nav-links.open li { width: 100%; }
  .nav-links.open a { display: block; padding: 14px 24px; }
  .nav-toggle { display: block; }
  .grid-3, .grid-2, .steps, .pricing, .stats, .field-row, .footer-grid { grid-template-columns: 1fr; }
  .stats { gap: 24px; }
  .cta { padding: 40px 24px; }
}
