/* ============================================================
   AM Software & Solutions by Pixlo — styles.css
   Paleta oficial: navy #0D1B2A · azul #0A84FF · teal #00C2C7
   carbón #2A2F36 · gris claro #F2F4F7 · blanco
   ============================================================ */

:root {
  --navy: #0D1B2A;
  --navy-2: #12233a;
  --blue: #0A84FF;
  --teal: #00C2C7;
  --carbon: #2A2F36;
  --light: #F2F4F7;
  --white: #FFFFFF;
  --line: rgba(13, 27, 42, 0.10);
  --line-dark: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 30px rgba(13, 27, 42, 0.10);
  --radius: 14px;
  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--carbon);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 700; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-block;
  margin-bottom: 14px;
}
.on-light .eyebrow { color: var(--blue); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(10, 132, 255, 0.4); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.35); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost-dark { background: transparent; color: var(--navy); border-color: rgba(13,27,42,0.25); }
.btn-ghost-dark:hover { border-color: var(--blue); color: var(--blue); }
.btn-wa { background: #1fb355; color: var(--white); }
.btn-wa:hover { box-shadow: 0 8px 24px rgba(31,179,85,0.4); transform: translateY(-2px); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13, 27, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  color: rgba(255,255,255,0.85); font-family: var(--font-display);
  font-weight: 600; font-size: 0.92rem; transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--teal); }
.nav-cta { padding: 10px 20px; font-size: 0.85rem; }
.nav-burger {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; position: relative;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--white);
  margin: 5px auto; transition: transform .3s, opacity .3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  padding: 170px 0 110px;
  overflow: hidden;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero h1 .hl { color: var(--teal); }
.hero p.lead {
  font-size: 1.12rem; color: rgba(255,255,255,0.82);
  margin-bottom: 34px; max-width: 620px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.type-line {
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--teal);
  margin-top: 44px; min-height: 1.4em; letter-spacing: 0.06em;
}
.type-line::after { content: '▌'; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Franja de confianza ---------- */
.trustbar { background: var(--navy-2); border-top: 1px solid var(--line-dark); padding: 22px 0; }
.trust-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.trust-brands {
  font-family: var(--font-display); font-weight: 700;
  color: rgba(255,255,255,0.6); letter-spacing: 0.04em; font-size: 0.95rem;
}
.trust-brands b { color: rgba(255,255,255,0.9); }
.badge {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--teal);
  border: 1px solid rgba(0,194,199,0.4); border-radius: 999px;
  padding: 6px 14px; white-space: nowrap;
}
.trust-badges { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section.light { background: var(--light); }
.section.dark { background: var(--navy); color: var(--white); }
.section.dark h2, .section.dark h3 { color: var(--white); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head p { color: rgba(42,47,54,0.75); margin-top: 12px; }
.section.dark .section-head p { color: rgba(255,255,255,0.75); }

/* ---------- Scroll-telling líneas ---------- */
.linea {
  display: grid; grid-template-columns: 90px 1fr; gap: 28px;
  padding: 44px 0; border-top: 1px solid var(--line);
  opacity: 0; transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.linea.visible { opacity: 1; transform: none; }
.linea-num {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--blue);
  letter-spacing: 0.12em; padding-top: 6px;
}
.linea h3 { font-size: 1.5rem; margin-bottom: 10px; }
.linea p { color: rgba(42,47,54,0.8); max-width: 640px; }
.linea .cred {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--teal);
  background: var(--navy); border-radius: 8px; padding: 4px 10px;
  display: inline-block; margin-top: 12px;
}
.linea a.mini {
  display: inline-block; margin-top: 14px; font-family: var(--font-display);
  font-weight: 700; font-size: 0.9rem;
}
.linea a.mini:hover { text-decoration: underline; }

/* ---------- CFDI destacado ---------- */
.cfdi-card {
  background: linear-gradient(120deg, var(--navy) 55%, #0e3742 100%);
  border: 1px solid rgba(0,194,199,0.35);
  border-radius: 20px; padding: 56px 48px; color: var(--white);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.cfdi-card h2 { color: var(--white); margin-bottom: 14px; }
.cfdi-card p { color: rgba(255,255,255,0.8); }
.cfdi-tag {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  color: var(--teal); text-transform: uppercase; display: block; margin-bottom: 14px;
}
.cfdi-side { text-align: center; }
.cfdi-side .big {
  font-family: var(--font-mono); font-size: 2rem; color: var(--teal); font-weight: 700;
}
.cfdi-side small { color: rgba(255,255,255,0.6); display: block; margin: 8px 0 22px; }

/* ---------- Calculadora ---------- */
.calc {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 20px; padding: 44px; box-shadow: var(--shadow);
}
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.slider-block { margin-bottom: 30px; }
.slider-block label {
  display: flex; justify-content: space-between; font-family: var(--font-display);
  font-weight: 700; font-size: 0.95rem; color: var(--navy); margin-bottom: 12px;
}
.slider-block label output { font-family: var(--font-mono); color: var(--blue); }
input[type="range"] {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 3px; background: var(--light); outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); cursor: pointer; border: 4px solid var(--white);
  box-shadow: 0 2px 8px rgba(13,27,42,0.3);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--blue);
  cursor: pointer; border: 3px solid var(--white); box-shadow: 0 2px 8px rgba(13,27,42,0.3);
}
.calc-results { border-left: 1px solid var(--line); padding-left: 48px; }
.res-item { margin-bottom: 24px; }
.res-item .res-label {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(42,47,54,0.6); margin-bottom: 6px;
}
.res-item .res-value { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
.res-value.bajo { color: var(--teal); }
.res-value.medio { color: var(--blue); }
.res-value.alto { color: var(--navy); }
.res-bar { height: 8px; border-radius: 4px; background: var(--light); margin-top: 8px; overflow: hidden; }
.res-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--teal), var(--blue)); transition: width .5s ease; }
.calc-note { font-size: 0.85rem; color: rgba(42,47,54,0.6); margin-top: 18px; }

/* ---------- Timeline IDI ---------- */
.idi-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.idi-step {
  background: var(--navy-2); border: 1px solid var(--line-dark);
  border-radius: var(--radius); padding: 34px 28px; position: relative;
  transition: transform .3s ease, border-color .3s ease;
}
.idi-step:hover { transform: translateY(-6px); border-color: var(--teal); }
.idi-step .paso {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  color: var(--teal); display: block; margin-bottom: 16px;
}
.idi-step h3 { color: var(--white); margin-bottom: 10px; }
.idi-step p { color: rgba(255,255,255,0.72); font-size: 0.95rem; }

/* ---------- Cards soluciones ---------- */
.sol-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.sol-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px; transition: box-shadow .3s, transform .3s;
}
.sol-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.sol-card .sol-tag {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--blue); display: block; margin-bottom: 12px;
}
.sol-card h3 { margin-bottom: 12px; }
.sol-card ul { list-style: none; margin: 16px 0; }
.sol-card ul li { padding-left: 22px; position: relative; margin-bottom: 10px; font-size: 0.95rem; color: rgba(42,47,54,0.85); }
.sol-card ul li::before { content: '—'; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.sol-perfiles { font-size: 0.82rem; color: rgba(42,47,54,0.6); font-family: var(--font-mono); margin-bottom: 16px; }

/* ---------- Quiz ---------- */
.quiz-wrap { max-width: 680px; margin: 0 auto; }
.quiz-progress { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.12); margin-bottom: 40px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; background: var(--teal); border-radius: 3px; transition: width .4s ease; }
.quiz-card {
  background: var(--navy-2); border: 1px solid var(--line-dark);
  border-radius: 20px; padding: 48px; min-height: 380px;
}
.quiz-q { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--teal); display: block; margin-bottom: 16px; }
.quiz-card h2 { font-size: 1.5rem; margin-bottom: 28px; color: var(--white); }
.quiz-card p { color: rgba(255,255,255,0.75); }
.quiz-card .field label { color: rgba(255,255,255,0.85); }
.quiz-opts { display: grid; gap: 12px; }
.quiz-opt {
  text-align: left; background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-dark); border-radius: 12px;
  padding: 16px 20px; color: rgba(255,255,255,0.9);
  font-family: var(--font-body); font-size: 0.98rem; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.quiz-opt:hover { border-color: var(--teal); background: rgba(0,194,199,0.08); transform: translateX(4px); }
.quiz-back {
  background: none; border: none; color: rgba(255,255,255,0.5);
  font-family: var(--font-display); font-weight: 600; cursor: pointer;
  margin-top: 22px; font-size: 0.88rem;
}
.quiz-back:hover { color: var(--teal); }

/* Gauge resultado */
.gauge-wrap { text-align: center; margin: 10px 0 26px; }
.gauge { width: 210px; height: 120px; margin: 0 auto; }
.gauge .track { stroke: rgba(255,255,255,0.12); }
.gauge .fill { stroke: url(#gaugeGrad); stroke-linecap: round; transition: stroke-dashoffset 1.2s ease; }
.gauge-nivel { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; color: var(--teal); }
.gauge-sub { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.recs { display: grid; gap: 14px; margin: 26px 0; text-align: left; }
.rec {
  background: rgba(255,255,255,0.05); border-left: 3px solid var(--teal);
  border-radius: 0 10px 10px 0; padding: 16px 20px;
}
.rec b { color: var(--white); font-family: var(--font-display); display: block; margin-bottom: 4px; }
.rec span { color: rgba(255,255,255,0.72); font-size: 0.92rem; }

/* Gate / formularios */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 0.85rem; margin-bottom: 8px;
}
.section.dark .field label { color: rgba(255,255,255,0.85); }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--line); font-family: var(--font-body);
  font-size: 0.95rem; color: var(--carbon); background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
.section.dark .field input, .section.dark .field select, .section.dark .field textarea {
  background: rgba(255,255,255,0.06); border-color: var(--line-dark); color: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10,132,255,0.18);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-final h2 { max-width: 640px; margin: 0 auto 30px; }
.cta-final .hero-ctas { justify-content: center; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: start; }
.contact-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px; margin-bottom: 20px;
}
.contact-card h3 { margin-bottom: 8px; }
.contact-card p { font-size: 0.92rem; color: rgba(42,47,54,0.7); margin-bottom: 16px; }
.agenda-placeholder {
  border: 2px dashed rgba(13,27,42,0.18); border-radius: var(--radius);
  padding: 40px; text-align: center; color: rgba(42,47,54,0.55);
  font-family: var(--font-mono); font-size: 0.8rem;
}

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,0.7); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 44px; margin-bottom: 44px; }
.footer img { height: 44px; width: auto; margin-bottom: 18px; }
.footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer a { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer a:hover { color: var(--teal); }
.footer-legal {
  border-top: 1px solid var(--line-dark); padding-top: 24px;
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
}

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--blue); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(10,132,255,0.45);
  transition: transform .25s ease;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 28px; height: 28px; fill: var(--white); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0;
    background: var(--navy); flex-direction: column; align-items: flex-start;
    padding: 24px; gap: 20px; display: none; border-bottom: 1px solid var(--line-dark);
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .cfdi-card { grid-template-columns: 1fr; padding: 40px 28px; }
  .calc-grid { grid-template-columns: 1fr; }
  .calc-results { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 32px; }
  .idi-steps { grid-template-columns: 1fr; }
  .sol-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .linea { grid-template-columns: 1fr; gap: 8px; }
  .quiz-card { padding: 32px 22px; }
  .calc { padding: 28px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal, .linea { opacity: 1; transform: none; }
}

/* ============================================================
   V2 PREMIUM — Sistema cinematográfico (inspiración: experiencias
   inmersivas tipo capítulos, adaptado a identidad AM)
   ============================================================ */

::selection { background: var(--teal); color: var(--navy); }
html { scrollbar-color: var(--blue) var(--navy); }
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--navy); }
body::-webkit-scrollbar-thumb { background: linear-gradient(var(--blue), var(--teal)); border-radius: 5px; }

/* --- Grano cinematográfico sutil sobre secciones oscuras --- */
.grain::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Hero cinematográfico --- */
.hero { min-height: 100svh; display: flex; align-items: center; padding: 120px 0 80px; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 78% 12%, rgba(10,132,255,.16), transparent 60%),
    radial-gradient(700px 460px at 12% 88%, rgba(0,194,199,.10), transparent 60%);
}
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.04; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 26px;
}
.hero .kicker::before { content: ''; width: 34px; height: 1px; background: var(--teal); }
.stagger > * { opacity: 0; transform: translateY(26px); animation: rise .9s cubic-bezier(.16,1,.3,1) forwards; }
.stagger > *:nth-child(2) { animation-delay: .12s; }
.stagger > *:nth-child(3) { animation-delay: .24s; }
.stagger > *:nth-child(4) { animation-delay: .36s; }
.stagger > *:nth-child(5) { animation-delay: .48s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .3em;
  text-transform: uppercase; color: rgba(255,255,255,.45); z-index: 2;
}
.scroll-hint::after {
  content: ''; display: block; width: 1px; height: 42px; margin: 10px auto 0;
  background: linear-gradient(var(--teal), transparent); animation: drip 2s ease-in-out infinite;
}
@keyframes drip { 0%,100% { transform: scaleY(.4); transform-origin: top; opacity:.4 } 50% { transform: scaleY(1); opacity:1 } }

/* --- Marquee de marcas --- */
.marquee { background: var(--navy-2); border-block: 1px solid var(--line-dark); overflow: hidden; padding: 20px 0; position: relative; }
.marquee::before, .marquee::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--navy-2), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--navy-2), transparent); }
.marquee-track { display: flex; gap: 64px; width: max-content; animation: scrollx 30s linear infinite; }
.marquee-track span {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: rgba(255,255,255,.55); white-space: nowrap; display: flex; align-items: center; gap: 64px;
}
.marquee-track span i { font-style: normal; color: var(--teal); font-size: .7rem; }
@keyframes scrollx { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* --- Capítulos (líneas de negocio full-screen) --- */
.chapters { background: var(--navy); position: relative; }
.chapter {
  min-height: 92svh; display: grid; grid-template-columns: 1fr 1.15fr;
  gap: 48px; align-items: center; max-width: var(--maxw); margin: 0 auto;
  padding: 60px 24px; border-top: 1px solid var(--line-dark); position: relative;
}
.chapter-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(6rem, 16vw, 13rem); line-height: .85; letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.16);
  position: relative; user-select: none; transition: opacity .8s ease;
}
.chapter-num::after {
  content: attr(data-n); position: absolute; inset: 0;
  color: var(--teal); -webkit-text-stroke: 0;
  clip-path: inset(100% 0 0 0); transition: clip-path 1s cubic-bezier(.16,1,.3,1);
}
.chapter.visible .chapter-num::after { clip-path: inset(0 0 0 0); }
.chapter-tag {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 18px;
}
.chapter h3 { color: var(--white); font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 18px; }
.chapter p { color: rgba(255,255,255,.72); max-width: 520px; font-size: 1.05rem; }
.chapter .cred {
  font-family: var(--font-mono); font-size: .7rem; color: var(--teal);
  border: 1px solid rgba(0,194,199,.35); border-radius: 8px; padding: 6px 12px;
  display: inline-block; margin-top: 16px; background: rgba(0,194,199,.06);
}
.chapter a.mini {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 26px;
  font-family: var(--font-display); font-weight: 700; color: var(--white);
  border-bottom: 1px solid var(--teal); padding-bottom: 4px; transition: gap .25s, color .25s;
}
.chapter a.mini:hover { gap: 14px; color: var(--teal); }
.chapter-body { opacity: 0; transform: translateY(30px); transition: opacity .8s ease .15s, transform .8s cubic-bezier(.16,1,.3,1) .15s; }
.chapter.visible .chapter-body { opacity: 1; transform: none; }

/* --- Rail de progreso lateral --- */
.rail {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 80;
}
.rail a { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.25); transition: background .3s, transform .3s; }
.rail a.on { background: var(--teal); transform: scale(1.5); }
body.on-light-page .rail a { background: rgba(13,27,42,.25); }
body.on-light-page .rail a.on { background: var(--blue); }

/* --- Métricas / contadores --- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { border-left: 1px solid var(--line-dark); padding-left: 24px; }
.stat b {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--white); letter-spacing: -.02em; line-height: 1;
}
.stat b em { font-style: normal; color: var(--teal); }
.stat span { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); display: block; margin-top: 10px; }

/* --- Botones con brillo premium --- */
.btn { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -80%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); transition: left .5s ease;
}
.btn-primary:hover::after { left: 130%; }

/* --- Cards premium (glass + glow en hover) --- */
.sol-card, .idi-step, .calc, .cfdi-card, .quiz-card, .form-card, .contact-card { position: relative; }
.idi-step::before, .sol-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(0,194,199,.5), transparent 40%, transparent 60%, rgba(10,132,255,.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s ease;
}
.idi-step:hover::before, .sol-card:hover::before { opacity: 1; }

/* --- CFDI: pulso premium --- */
.cfdi-side .big { position: relative; display: inline-block; }
.cfdi-side .big::after {
  content: ''; position: absolute; inset: -14px -22px; border: 1px solid rgba(0,194,199,.35);
  border-radius: 12px; animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:.35; transform: scale(1);} 50% { opacity:.9; transform: scale(1.04);} }

/* --- Reveal refinado (blur + rise) --- */
.reveal { filter: blur(6px); transition: opacity .8s ease, transform .8s cubic-bezier(.16,1,.3,1), filter .8s ease; }
.reveal.visible { filter: blur(0); }

/* --- Page hero interno con glow --- */
.page-hero { position: relative; overflow: hidden; }
.page-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 400px at 80% 20%, rgba(10,132,255,.15), transparent 60%);
}

/* --- Responsive capítulos/stats/rail --- */
@media (max-width: 900px) {
  .chapter { grid-template-columns: 1fr; min-height: auto; padding: 70px 24px; gap: 18px; }
  .chapter-num { font-size: 5.5rem; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px; }
  .rail { display: none; }
  .hero { min-height: auto; padding: 140px 0 90px; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .stagger > * { animation: none; opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .chapter-num::after { clip-path: inset(0 0 0 0); }
  .chapter-body { opacity: 1; transform: none; }
  .reveal { filter: none; }
  .cfdi-side .big::after { animation: none; }
}

/* ============================================================
   V3 ULTRA — Escenas animadas tipo video por producto
   (estilo showcase Apple/Adobe, 100% código, sin assets externos)
   ============================================================ */

/* --- Contenedor de escena (formato mini-video 16:10) --- */
.scene {
  position: relative; aspect-ratio: 16/10; border-radius: 22px; overflow: hidden;
  background: linear-gradient(150deg, #101f30, #0a1622);
  border: 1px solid var(--line-dark);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
}
.scene::after { /* viñeta cinematográfica */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 0%, transparent 55%, rgba(0,0,0,.35));
}
/* Slot para video real futuro: <video class="scene-video" ...> dentro de .scene */
.scene-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- ESCENA ADOBE: lienzo + trazo bezier + swatches ---------- */
.sc-adobe .blob {
  position: absolute; border-radius: 50%; filter: blur(46px); opacity: .5;
  animation: float 9s ease-in-out infinite;
}
.sc-adobe .b1 { width: 46%; height: 60%; left: -8%; top: -12%; background: var(--blue); }
.sc-adobe .b2 { width: 40%; height: 54%; right: -6%; bottom: -10%; background: var(--teal); animation-delay: -4.5s; }
@keyframes float { 0%,100% { transform: translate(0,0) scale(1);} 50% { transform: translate(4%,6%) scale(1.12);} }
.sc-adobe svg { position: absolute; inset: 12%; width: 76%; height: 76%; }
.sc-adobe .path {
  fill: none; stroke: var(--white); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 640; stroke-dashoffset: 640; animation: drawpath 6s ease-in-out infinite;
}
.sc-adobe .anchor { fill: var(--teal); animation: blinkdot 6s ease-in-out infinite; }
@keyframes drawpath { 0% { stroke-dashoffset: 640; } 45%,70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -640; } }
@keyframes blinkdot { 0%,10% { opacity: 0;} 20%,80% { opacity: 1;} 95%,100% { opacity: 0;} }
.sc-adobe .swatches {
  position: absolute; bottom: 18px; left: 18px; display: flex; gap: 8px;
}
.sc-adobe .swatches i {
  width: 26px; height: 26px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25);
  animation: swpop 6s ease-in-out infinite;
}
.sc-adobe .swatches i:nth-child(1){ background: var(--navy); }
.sc-adobe .swatches i:nth-child(2){ background: var(--blue); animation-delay: .15s; }
.sc-adobe .swatches i:nth-child(3){ background: var(--teal); animation-delay: .3s; }
.sc-adobe .swatches i:nth-child(4){ background: var(--light); animation-delay: .45s; }
@keyframes swpop { 0%,8% { transform: translateY(14px); opacity: 0;} 16%,86% { transform: none; opacity: 1;} 96%,100% { opacity: 0;} }

/* ---------- ESCENA APPLE: laptop con dashboard vivo ---------- */
.sc-apple { display: flex; align-items: center; justify-content: center; }
.laptop { width: 74%; position: relative; }
.laptop .screen {
  aspect-ratio: 16/10; border-radius: 14px 14px 0 0; overflow: hidden;
  border: 2px solid #223247; border-bottom: none; background: #0b1826;
  display: grid; grid-template-columns: 26% 1fr; 
}
.laptop .base {
  height: 12px; background: linear-gradient(#2a3c55, #1a2940);
  border-radius: 0 0 16px 16px; position: relative;
}
.laptop .base::after { content:''; position:absolute; left:44%; right:44%; top:0; height:4px; background:#0d1b2a; border-radius:0 0 8px 8px; }
.ui-side { background: rgba(255,255,255,.04); padding: 10px 8px; display: flex; flex-direction: column; gap: 7px; }
.ui-side i { height: 7px; border-radius: 4px; background: rgba(255,255,255,.14); display: block; animation: shimmer 3.2s ease-in-out infinite; }
.ui-side i:nth-child(2){ width: 80%; animation-delay:.2s } .ui-side i:nth-child(3){ width: 65%; animation-delay:.4s }
.ui-side i:nth-child(4){ width: 85%; animation-delay:.6s } .ui-side i:nth-child(5){ width: 55%; animation-delay:.8s }
@keyframes shimmer { 0%,100% { opacity:.4 } 50% { opacity: 1 } }
.ui-main { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ui-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ui-cards b {
  height: 34px; border-radius: 8px; background: rgba(10,132,255,.18);
  border: 1px solid rgba(10,132,255,.35); animation: cardglow 4s ease-in-out infinite;
}
.ui-cards b:nth-child(2){ animation-delay: 1.3s } .ui-cards b:nth-child(3){ animation-delay: 2.6s }
@keyframes cardglow { 0%,100% { background: rgba(10,132,255,.12);} 50% { background: rgba(0,194,199,.25); border-color: rgba(0,194,199,.5);} }
.ui-graph { flex: 1; position: relative; }
.ui-graph svg { width: 100%; height: 100%; }
.ui-graph .line {
  fill: none; stroke: var(--teal); stroke-width: 2;
  stroke-dasharray: 300; stroke-dashoffset: 300; animation: drawline 5s ease-in-out infinite;
}
@keyframes drawline { 0% { stroke-dashoffset: 300;} 50%,75% { stroke-dashoffset: 0;} 100% { stroke-dashoffset: -300;} }

/* ---------- ESCENA JAMF: flota desplegándose ---------- */
.sc-jamf { display: grid; place-items: center; }
.fleet { display: grid; grid-template-columns: repeat(4, 58px); gap: 14px; }
.dev {
  width: 58px; height: 42px; border-radius: 8px; position: relative;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.15);
  animation: enroll 7s ease-in-out infinite;
}
.dev::after {
  content: '✓'; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--teal); font-weight: 800; font-family: var(--font-mono); opacity: 0;
  animation: check 7s ease-in-out infinite;
}
.dev:nth-child(1), .dev::after { animation-delay: 0s; }
.dev:nth-child(2), .dev:nth-child(2)::after { animation-delay: .35s; }
.dev:nth-child(3), .dev:nth-child(3)::after { animation-delay: .7s; }
.dev:nth-child(4), .dev:nth-child(4)::after { animation-delay: 1.05s; }
.dev:nth-child(5), .dev:nth-child(5)::after { animation-delay: 1.4s; }
.dev:nth-child(6), .dev:nth-child(6)::after { animation-delay: 1.75s; }
.dev:nth-child(7), .dev:nth-child(7)::after { animation-delay: 2.1s; }
.dev:nth-child(8), .dev:nth-child(8)::after { animation-delay: 2.45s; }
@keyframes enroll { 0%,6% { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.05);} 14%,82% { border-color: rgba(0,194,199,.6); background: rgba(0,194,199,.1);} 94%,100% { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.05);} }
@keyframes check { 0%,8% { opacity: 0; transform: scale(.5);} 16%,82% { opacity: 1; transform: scale(1);} 94%,100% { opacity: 0;} }
.sc-jamf .hublabel {
  position: absolute; top: 16px; left: 0; right: 0; text-align: center;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .24em;
  color: rgba(255,255,255,.45); text-transform: uppercase;
}

/* ---------- ESCENA IA: conversación viva ---------- */
.sc-ia { padding: 26px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.msg {
  max-width: 72%; padding: 12px 16px; border-radius: 14px; font-size: .82rem;
  line-height: 1.45; opacity: 0; animation: msgin 8s ease-in-out infinite;
}
.msg.user { align-self: flex-end; background: var(--blue); color: var(--white); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.12); border-bottom-left-radius: 4px; animation-delay: 1.4s; }
.msg.bot2 { align-self: flex-start; background: rgba(0,194,199,.12); color: var(--teal); border: 1px solid rgba(0,194,199,.3); border-bottom-left-radius: 4px; font-family: var(--font-mono); font-size: .7rem; animation-delay: 2.8s; }
@keyframes msgin { 0%,4% { opacity: 0; transform: translateY(14px);} 12%,84% { opacity: 1; transform: none;} 95%,100% { opacity: 0;} }
.typing { align-self: flex-start; display: flex; gap: 5px; opacity: 0; animation: typin 8s ease-in-out infinite; animation-delay: 1s; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); animation: bounce 1.2s ease-in-out infinite; }
.typing i:nth-child(2){ animation-delay: .18s } .typing i:nth-child(3){ animation-delay: .36s }
@keyframes typin { 0%,10% { opacity: 0;} 13%,30% { opacity: 1;} 34%,100% { opacity: 0;} }
@keyframes bounce { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-5px);} }

/* ---------- ESCENA ODOO: métricas + timbrado CFDI ---------- */
.sc-odoo { padding: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 62%; }
.bars i {
  flex: 1; border-radius: 6px 6px 0 0;
  background: linear-gradient(var(--teal), var(--blue));
  transform-origin: bottom; animation: grow 6s ease-in-out infinite;
}
.bars i:nth-child(1){ height: 45%; } .bars i:nth-child(2){ height: 70%; animation-delay:.15s }
.bars i:nth-child(3){ height: 55%; animation-delay:.3s } .bars i:nth-child(4){ height: 88%; animation-delay:.45s }
.bars i:nth-child(5){ height: 66%; animation-delay:.6s }
@keyframes grow { 0%,5% { transform: scaleY(0);} 20%,85% { transform: scaleY(1);} 97%,100% { transform: scaleY(0);} }
.cfdi-stamp {
  border: 1px solid rgba(0,194,199,.4); border-radius: 14px; padding: 18px;
  background: rgba(0,194,199,.06); text-align: center; position: relative; overflow: hidden;
}
.cfdi-stamp b { display:block; font-family: var(--font-mono); color: var(--teal); font-size: 1.1rem; letter-spacing:.08em; }
.cfdi-stamp small { color: rgba(255,255,255,.6); font-size: .68rem; font-family: var(--font-mono); }
.cfdi-stamp .seal {
  display: inline-block; margin-top: 10px; font-family: var(--font-mono); font-size: .62rem;
  color: var(--navy); background: var(--teal); border-radius: 6px; padding: 4px 10px;
  opacity: 0; animation: stamp 6s ease-in-out infinite;
}
@keyframes stamp { 0%,28% { opacity: 0; transform: scale(1.7) rotate(-8deg);} 36%,88% { opacity: 1; transform: scale(1) rotate(-3deg);} 98%,100% { opacity: 0;} }

/* --- Capítulos V3: alternar escena/texto --- */
.chapter { grid-template-columns: 1fr 1fr; }
.chapter:nth-child(even) .chapter-media { order: -1; }
.chapter-media { position: relative; }
.chapter-media .chapter-num {
  position: absolute; top: -34px; left: -14px; z-index: 2;
  font-size: clamp(4rem, 8vw, 6.5rem);
}
.chapter-media .scene { transform: perspective(1200px) rotateY(0deg); transition: transform .8s cubic-bezier(.16,1,.3,1), box-shadow .8s; }
.chapter:hover .chapter-media .scene { transform: perspective(1200px) rotateY(-2.5deg) translateY(-6px); box-shadow: 0 40px 100px rgba(0,0,0,.55); }
.chapter:nth-child(even):hover .chapter-media .scene { transform: perspective(1200px) rotateY(2.5deg) translateY(-6px); }

/* --- Hero scrub (se atenúa al hacer scroll, estilo Apple) --- */
.hero-content, .hero canvas { will-change: transform, opacity; }

@media (max-width: 900px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter:nth-child(even) .chapter-media { order: 0; }
  .chapter-media .chapter-num { top: -22px; font-size: 3.6rem; }
  .sc-odoo { grid-template-columns: 1fr; }
  .fleet { grid-template-columns: repeat(4, 46px); gap: 10px; }
  .dev { width: 46px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-adobe .blob, .sc-adobe .path, .sc-adobe .anchor, .sc-adobe .swatches i,
  .ui-side i, .ui-cards b, .ui-graph .line, .dev, .dev::after,
  .msg, .typing, .typing i, .bars i, .cfdi-stamp .seal { animation: none !important; opacity: 1; transform: none; }
  .sc-adobe .path, .ui-graph .line { stroke-dashoffset: 0; }
}

/* --- V4.1 fixes --- */
/* Footer: columnas alineadas */
.footer-grid { align-items: start; }
.footer ul li { margin-bottom: 12px; line-height: 1.4; }
.footer h4 { margin-bottom: 20px; }

/* Escenas: más luminosas (menos opacidad de fondo) */
.scene {
  background: linear-gradient(150deg, #152537, #0e1f30) !important;
}
.sc-adobe .blob.b1 { opacity: .72 !important; }
.sc-adobe .blob.b2 { opacity: .65 !important; }
.sc-adobe .path { stroke: rgba(255,255,255,.92) !important; }
.sc-apple .ui-side i { opacity: .7; }
.ui-cards b { background: rgba(10,132,255,.28) !important; border-color: rgba(10,132,255,.55) !important; }
.dev { background: rgba(255,255,255,.09) !important; border-color: rgba(255,255,255,.28) !important; }
.dev::after { text-shadow: 0 0 12px var(--teal); }
.msg.user { background: var(--blue) !important; opacity: 1; }
.msg.bot { background: rgba(255,255,255,.13) !important; border-color: rgba(255,255,255,.22) !important; }
.msg.bot2 { background: rgba(0,194,199,.18) !important; border-color: rgba(0,194,199,.45) !important; }
.bars i { background: linear-gradient(var(--teal), var(--blue)) !important; opacity: .92; }
.cfdi-stamp { background: rgba(0,194,199,.12) !important; border-color: rgba(0,194,199,.55) !important; }
.laptop .screen { background: #0f2035 !important; border-color: #2d4a6a !important; }

/* Prev-cards: escenas más brillantes en el index */
.prev-card .scene { background: linear-gradient(150deg, #152537, #0e1f30) !important; }

/* Nav: sin el btn de diagnóstico, alinear links al centro */
.nav-links { gap: 36px; }

/* --- V4.3: Hero más luminoso, nodos más visibles, grano reducido --- */
.hero { background: #0D1B2A !important; }
.hero.grain::before { opacity: .02 !important; } /* grano casi invisible */
.hero::before {
  background:
    radial-gradient(800px 500px at 75% 10%, rgba(10,132,255,.28), transparent 55%),
    radial-gradient(600px 400px at 15% 85%, rgba(0,194,199,.20), transparent 55%) !important;
}
#netcanvas { opacity: 1 !important; }

/* --- V4.4: Hero móvil más luminoso, nodos más grandes en pantallas pequeñas --- */
@media (max-width: 768px) {
  .hero { background: #0e1e30 !important; }
  .hero.grain::before { opacity: 0 !important; }
  .hero::before {
    background:
      radial-gradient(400px 350px at 70% 15%, rgba(10,132,255,.38), transparent 60%),
      radial-gradient(350px 300px at 20% 80%, rgba(0,194,199,.28), transparent 60%) !important;
  }
}
/* Aumentar contraste canvas en todos los tamaños */
#netcanvas { mix-blend-mode: normal; opacity: 1 !important; filter: brightness(1.3); }

/* --- V4.5: Hero máximo brillo — fondo más claro, nodos más visibles --- */
.hero {
  background: linear-gradient(160deg, #0f2540 0%, #0d1e35 50%, #091628 100%) !important;
}
.hero.grain::before { display: none !important; }
.hero::before {
  background:
    radial-gradient(900px 600px at 80% 5%,  rgba(10,132,255,.42), transparent 55%),
    radial-gradient(700px 500px at 5%  90%, rgba(0,194,199,.32), transparent 55%),
    radial-gradient(500px 400px at 50% 50%, rgba(10,132,255,.10), transparent 70%) !important;
}
#netcanvas {
  opacity: 1 !important;
  filter: brightness(1.8) contrast(1.1) !important;
}
@media (max-width: 768px) {
  .hero {
    background: linear-gradient(160deg, #112848 0%, #0e2038 50%, #0a1a2e 100%) !important;
  }
  .hero::before {
    background:
      radial-gradient(500px 400px at 85% 8%,  rgba(10,132,255,.52), transparent 55%),
      radial-gradient(400px 350px at 5%  88%, rgba(0,194,199,.40), transparent 55%) !important;
  }
  #netcanvas { filter: brightness(2.2) contrast(1.2) !important; }
}
