:root {
  color-scheme: dark;
  --bg: #0b1220;
  --bg-alt: #101a2e;
  --surface: #16233c;
  --border: #233350;
  --text: #e8eef7;
  --muted: #9db0c9;
  --accent: #4f8cff;
  --accent-2: #38d39f;
  --accent-soft: rgba(79, 140, 255, .12);
  --radius: 14px;
  --maxw: 1120px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Nav ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 18, 32, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; letter-spacing: .3px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; font-size: .95rem; font-weight: 800; color: #06101f;
}
.nav-links { display: flex; gap: 28px; align-items: center; font-size: .95rem; }
.nav-links a { color: var(--muted); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 10px;
  font-weight: 600; font-size: .95rem; cursor: pointer; border: none;
  transition: transform .12s ease, box-shadow .12s ease, background .15s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px rgba(79,140,255,.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(79,140,255,.45); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; border-radius: 12px; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 80px;
  background:
    radial-gradient(700px 340px at 15% 0%, rgba(79,140,255,.18), transparent 60%),
    radial-gradient(600px 300px at 90% 10%, rgba(56,211,159,.12), transparent 60%);
}
.hero-inner { max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(79,140,255,.35);
  padding: 6px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  line-height: 1.15; font-weight: 800; letter-spacing: -.5px;
}
.hero h1 em { font-style: normal; color: transparent; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; }
.hero p.sub { margin: 22px 0 34px; font-size: 1.15rem; color: var(--muted); max-width: 640px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 64px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
}
.stat b { display: block; font-size: 1.7rem; color: var(--accent-2); }
.stat span { font-size: .88rem; color: var(--muted); }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.4px; }
.section-head p { color: var(--muted); margin-top: 12px; }
.alt-bg { background: var(--bg-alt); }

/* CFDI feature */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-list { list-style: none; margin-top: 20px; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 12px; align-items: flex-start; }
.check {
  flex: none; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%;
  background: rgba(56,211,159,.15); border: 1px solid rgba(56,211,159,.5);
  display: grid; place-items: center;
}
.check svg { width: 12px; height: 12px; stroke: var(--accent-2); stroke-width: 3; fill: none; }
.mockup {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.mockup-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--border); font-size: .92rem; }
.mockup-row:last-child { border-bottom: none; }
.pill { font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.pill-ok { background: rgba(56,211,159,.15); color: var(--accent-2); border: 1px solid rgba(56,211,159,.4); }
.pill-blue { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(79,140,255,.4); }

/* Modules grid */
.grid-modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.module-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: transform .15s ease, border-color .15s ease;
}
.module-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.module-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.module-card p { font-size: .87rem; color: var(--muted); }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: var(--accent); margin-bottom: 10px;
}

/* Ops list */
.ops-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.op-card {
  display: flex; gap: 16px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
}
.op-icon {
  flex: none; width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid rgba(79,140,255,.35);
  display: grid; place-items: center;
}
.op-icon svg { width: 22px; height: 22px; stroke: var(--accent); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.op-card h3 { font-size: 1rem; margin-bottom: 4px; }
.op-card p { font-size: .88rem; color: var(--muted); }

/* Tech strip */
.tech-strip { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 10px 20px; font-size: .9rem; color: var(--muted);
}
.chip b { color: var(--text); font-weight: 600; }

/* CTA final */
.cta-box {
  text-align: center; padding: 64px 32px;
  background: linear-gradient(135deg, rgba(79,140,255,.16), rgba(56,211,159,.10));
  border: 1px solid var(--border); border-radius: 20px;
}
.cta-box h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }
.cta-box p { color: var(--muted); margin: 14px auto 30px; max-width: 520px; }

footer {
  border-top: 1px solid var(--border); padding: 36px 0;
  color: var(--muted); font-size: .88rem;
}
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Carousel hero ---------- */
.carousel {
  position: relative; margin-top: 56px;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.carousel-track { display: flex; transition: transform .45s ease; }
.carousel-slide {
  flex: 0 0 100%; margin: 0; cursor: zoom-in; position: relative;
}
.carousel-slide img { width: 100%; height: auto; display: block; }
.carousel-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 34px 22px 14px;
  font-size: .9rem; color: var(--text);
  background: linear-gradient(transparent, rgba(4,8,16,.88));
}
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(11,18,32,.72); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.car-btn:hover { background: var(--accent); border-color: var(--accent); }
.car-prev { left: 14px; }
.car-next { right: 14px; }
.car-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.car-nav {
  display: flex; gap: 8px; justify-content: center;
  padding: 12px; background: var(--surface); border-top: 1px solid var(--border);
}
.car-dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0; border: none; cursor: pointer;
  background: rgba(255,255,255,.28);
  transition: background .15s, transform .15s;
}
.car-dot.active { background: var(--accent); transform: scale(1.3); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(4,8,16,.92); backdrop-filter: blur(6px);
  display: none; place-items: center; padding: 32px;
}
.lightbox.open { display: grid; }
.lightbox figure { margin: 0; text-align: center; max-width: 94vw; }
.lightbox img {
  max-width: min(1200px, 94vw); max-height: 80vh; width: auto;
  border-radius: 10px; border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.lb-caption { color: var(--muted); margin-top: 14px; font-size: .95rem; }
.lb-close {
  position: absolute; top: 20px; right: 24px; z-index: 201;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.08); border: 1px solid var(--border);
  color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lb-close:hover { background: rgba(255,255,255,.18); }

/* ---------- WhatsApp ---------- */
.btn-wa {
  background: #25d366; color: #06281a;
  box-shadow: 0 6px 20px rgba(37,211,102,.35);
}
.btn-wa:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(37,211,102,.45); }
.btn-wa svg {
  display: inline-block; vertical-align: -5px; margin-right: 10px;
  width: 20px; height: 20px; fill: currentColor;
}
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(37,211,102,.45);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
@media (max-width: 860px) { .wa-float { right: 16px; bottom: 16px; } }

@media (max-width: 860px) {
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); padding: 12px 24px 20px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; }
  .hamburger { display: block; }
  .feature-split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
