/* ================================================================
   QFStack — rediseño de prueba (estructura inspirada en un modelo SaaS/IA)
   Hero oscuro con glow, secciones claras, tarjetas blancas redondeadas,
   etiquetas en píldora, acento violeta + colores de la familia de productos.
   ================================================================ */

:root {
  --accent: #2f6fe0;
  --accent-d: #2358bd;
  --accent-soft: #e6efff;
  --ink: #14141b;
  --text: #494851;
  --mute: #7a7985;
  --line: #e7e8ee;
  --grey: #f6f7fa;
  --white: #ffffff;
  --night: #121217;
  --night-2: #1b1b23;

  /* colores de la familia de productos */
  --c-doo: #276bb8;
  --c-nexo: #14b8a6;
  --c-tal: #e7796d;
  --c-sand: #e9d8b4;
  --c-sage: #a8c0b2;

  --pink: #fbe9e6;
  --blue: #dcebf8;
  --green: #def5ee;
  --ice: #e1ebfb;
  --sand-soft: #f7efdc;

  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --maxw: 1200px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.03em; text-wrap: balance; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- botones y chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border-radius: 99px;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { background: #f0f0f5; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-sm { height: 40px; padding: 0 20px; font-size: 14px; }

.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 99px; background: #fff;
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.chip-dark { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #fff; }

.sec-head { text-align: center; display: grid; justify-items: center; gap: 18px; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.1; font-weight: 600; max-width: 20ch; }
.sec-head p { max-width: 60ch; color: var(--text); font-size: 17px; }
.section { padding: 130px 0; }
.grey { background: var(--grey); }

/* ---------- header ---------- */
.header { position: fixed; top: 14px; left: 0; right: 0; z-index: 100; padding: 0 var(--gutter); }
.nav {
  max-width: var(--maxw); margin: 0 auto; height: 66px; padding: 0 14px 0 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-radius: 99px; color: #fff;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.header.scrolled .nav { background: #fff; color: var(--ink); border-color: transparent; box-shadow: 0 10px 34px rgba(20,20,40,.12); }
.brand img { height: 40px; width: auto; }
.brand .logo-dark { display: none; }
.header.scrolled .brand .logo-light { display: none; }
.header.scrolled .brand .logo-dark { display: block; }
.nav-links { display: flex; gap: 34px; font-size: 15px; font-weight: 500; }
.nav-links a { opacity: .88; transition: opacity .15s ease; }
.nav-links a:hover { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang { display: flex; border: 1px solid currentColor; border-color: rgba(255,255,255,.28); border-radius: 99px; padding: 3px; }
.header.scrolled .lang { border-color: var(--line); }
.lang button { border: 0; background: transparent; color: inherit; font: 600 12px "Inter", sans-serif; padding: 5px 10px; border-radius: 99px; cursor: pointer; opacity: .7; }
.lang button.active { background: var(--accent); color: #fff; opacity: 1; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: inherit; cursor: pointer; align-items: center; justify-content: center; font-size: 20px; }
.header.scrolled .nav-toggle { background: var(--grey); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: 200px 0 90px; background: var(--night);
}
.hero::before {
  content: ""; position: absolute; inset: -10%;
  background:
    radial-gradient(48% 55% at 88% 8%, rgba(47,111,224,.62), transparent 65%),
    radial-gradient(46% 55% at 82% 98%, rgba(40,196,204,.55), transparent 65%),
    radial-gradient(30% 40% at 102% 55%, rgba(30,170,215,.34), transparent 70%),
    radial-gradient(40% 40% at 10% 110%, rgba(39,107,184,.28), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(transparent, var(--night)); pointer-events: none; }
@keyframes drift { to { transform: translate3d(-3%, 2%, 0) scale(1.06); } }
.hero > .container { position: relative; z-index: 1; }
.hero { padding-bottom: 70px; text-align: center; }
.hero-grid { max-width: 1040px; margin: 0 auto; }
.hero-label { font-size: 14px; color: rgba(255,255,255,.72); margin-bottom: 18px; display: block; }
.hero h1 { color: #fff; font-size: clamp(36px, 5.2vw, 68px); line-height: 1.02; font-weight: 600; letter-spacing: -0.045em; }
.hero h1 .row { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.hero p.lead { color: rgba(255,255,255,.78); font-size: 19px; max-width: 48ch; margin: 26px auto 36px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.trusted { text-align: center; margin-top: 90px; }



.trusted { position: relative; z-index: 1; margin-top: 30px; }
.trusted p { font-size: 15px; color: rgba(255,255,255,.75); margin-bottom: 20px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.logos { display: flex; align-items: center; width: max-content; }
.logos > * { margin-right: 56px; flex-shrink: 0; }
.logos img { height: 30px; width: auto; opacity: .85; filter: brightness(0) invert(1); }
.logos img.native { filter: none; }
.logos .tal { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; font-size: 24px; letter-spacing: -.05em; opacity: .9; }
.logos .tal img { height: 26px; filter: none; opacity: 1; }

/* ---------- intro ---------- */
.intro-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 70px; align-items: center; }
.intro h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; font-weight: 600; margin: 18px 0 20px; }
.intro p { font-size: 17px; max-width: 50ch; }
.intro .cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 30px 0 26px; }
.checks { display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--ink); }
.checks .ico { color: var(--ink); font-size: 16px; }
.stat-panel { background: var(--grey); border-radius: var(--r-lg); padding: 34px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { background: #fff; border-radius: var(--r); padding: 26px 24px; box-shadow: 0 12px 30px rgba(20,30,60,.06); display: grid; gap: 6px; }
.stat strong { font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -.04em; color: var(--ink); }
.stat strong i { font-style: normal; color: var(--accent); }
.stat span { font-size: 14px; color: var(--mute); }

/* ---------- industrias ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border-radius: var(--r-lg); padding: 14px 14px 30px; box-shadow: 0 0 0 1px rgba(20,20,40,.03); }
.card .panel { border-radius: 20px; aspect-ratio: 16 / 9; background-color: #e6f0fd; position: relative; overflow: hidden; margin-bottom: 26px; }
.card .panel img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card h3 { font-size: 20px; font-weight: 600; padding: 0 14px; margin-bottom: 8px; }
.card p { font-size: 15px; padding: 0 14px; color: var(--text); }
.p-dots { background-image: radial-gradient(rgba(31,78,168,.14) 1px, transparent 1.4px); background-size: 12px 12px; }

/* ---------- IA: recorrido con dos carriles (IA y Equipo) ---------- */
.ai-sec { position: relative; overflow: hidden; background: #eaf1fe; }
.ai-sec::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(47,111,224,.18) 1px, transparent 1.5px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(75% 65% at 50% 35%, #000, transparent 100%); mask-image: radial-gradient(75% 65% at 50% 35%, #000, transparent 100%); pointer-events: none; }
.ai-sec > .container { position: relative; }
.pipe { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pipe-line { position: absolute; top: 19px; left: 12.5%; right: 12.5%; height: 2px; border-radius: 2px; background: rgba(47,111,224,.22); overflow: hidden; }
.pipe-line::after { content: ""; position: absolute; top: 0; bottom: 0; left: -140px; width: 140px; background: linear-gradient(90deg, transparent, var(--accent), #14b8a6, transparent); }
.stage { position: relative; display: flex; flex-direction: column; gap: 16px; }
.node { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 14px; position: relative; z-index: 1; box-shadow: 0 0 0 7px rgba(47,111,224,.16); }
.stage-card { flex: 1; display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 24px; padding: 22px; box-shadow: 0 20px 44px -28px rgba(30,60,130,.4); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.stage:hover .stage-card { transform: translateY(-6px); box-shadow: 0 30px 56px -26px rgba(30,60,130,.5); }
.stage-card h3 { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.lane { border-radius: 16px; padding: 14px 16px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.lane-ia { background: #eaf2ff; }
.lane-eq { background: #fdf0ee; }
.who { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.who .ico { font-size: 14px; }
.lane-ia .who { color: var(--accent-d); }
.lane-eq .who { color: #b8483a; }
.handoff { align-self: center; color: var(--mute); font-size: 16px; line-height: 0; }
.handoff .ico { transform: rotate(90deg); }
.gate { position: relative; margin-top: 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px 34px; border-radius: 28px; color: #fff; background: linear-gradient(120deg, #12315e, #1f4ea8 70%, #2a6fd0); overflow: hidden; }
.gate::before { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(20,184,166,.4), transparent 65%); }
.gate > * { position: relative; }
.gate-main { display: flex; align-items: center; gap: 18px; }
.gate-ico { width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.gate h3 { color: #fff; font-size: 22px; font-weight: 600; }
.gate p { color: rgba(255,255,255,.78); font-size: 15px; max-width: 54ch; margin-top: 4px; }
.avatars { display: flex; }
.avatars span { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); border: 3px solid #1f4ea8; margin-left: -10px; }
.avatars span:first-child { margin-left: 0; }

/* ---------- productos (oscuro) ---------- */
.products { position: relative; background: var(--night); color: #fff; overflow: hidden; }
.products::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 300px; background: linear-gradient(90deg, rgba(40,120,200,.65), rgba(47,111,224,.6), rgba(20,184,166,.5)); opacity: .9; mask-image: linear-gradient(#000, transparent); -webkit-mask-image: linear-gradient(#000, transparent); }
.products > .container { position: relative; }
.products .sec-head h2 { color: #fff; }
.products .sec-head p { color: rgba(255,255,255,.7); }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pc { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-lg); padding: 30px; display: flex; flex-direction: column; gap: 18px; min-height: 330px; transition: border-color .2s ease, transform .2s ease, background .2s ease; position: relative; overflow: hidden; }
.pc::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--pc, var(--accent)); }
a.pc:hover, a.pc:focus-visible { border-color: var(--pc, var(--accent)); background: rgba(255,255,255,.08); transform: translateY(-3px); }
.pc .logo { height: 44px; display: flex; align-items: center; }
.pc .logo img { height: 40px; width: auto; max-width: 190px; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }
.pc .logo img.native { filter: none; }
.pc .logo .tal { display: inline-flex; align-items: center; gap: 10px; font-size: 31px; font-weight: 600; letter-spacing: -.055em; color: #f2f4ef; line-height: 1; }
.pc .logo .tal img { height: 36px; filter: none; }
.pc .logo .wm { font-size: 28px; font-weight: 700; letter-spacing: -.04em; color: #fff; }
.pc p { color: rgba(255,255,255,.72); font-size: 15px; flex: 1; }
.pc .more { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; display: flex; align-items: center; gap: 8px; }
.pc .more.soft { color: rgba(255,255,255,.45); }
.pc.cta-card { background: linear-gradient(160deg, var(--accent), #1e3f94); border: 0; justify-content: space-between; }
.pc.cta-card::before { display: none; }
.pc.cta-card h3 { color: #fff; font-size: 26px; font-weight: 600; }
.pc.cta-card p { color: rgba(255,255,255,.85); flex: 0; }

/* ---------- integraciones ---------- */
.int-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 70px; align-items: center; }
.int-copy { display: grid; gap: 18px; justify-items: start; }
.int-copy h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; font-weight: 600; }
.int-copy p { max-width: 44ch; font-size: 17px; }
.int-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 14%, #000 86%, transparent); max-height: 420px; overflow: hidden; }
.int-col { display: block; }
.int-col .int { margin-bottom: 12px; }
.int { background: #fff; border-radius: 14px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 24px rgba(20,30,60,.06); }
.int .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; color: var(--ink); flex-shrink: 0; }
.int b { font-weight: 500; color: var(--ink); font-size: 15px; }
.int .bar { height: 5px; width: 80%; border-radius: 4px; background: var(--grey); margin-top: 6px; }
.int .lbl { flex: 1; min-width: 0; }

/* ---------- casos ---------- */

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .9fr 1.2fr; gap: 70px; align-items: start; }
.faq-grid .sec-head { text-align: left; justify-items: start; margin-bottom: 0; position: sticky; top: 110px; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { background: var(--grey); border-radius: 18px; padding: 0 26px; }
.faq-list summary { list-style: none; cursor: pointer; padding: 22px 0; font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; transition: transform .2s ease; }
.faq-list details[open] summary::after { content: "–"; background: var(--accent); color: #fff; }
.faq-list details p { padding: 0 0 24px; max-width: 60ch; }

/* ---------- contacto / footer ---------- */
.footer { position: relative; background: var(--night); color: rgba(255,255,255,.72); overflow: hidden; padding: 110px 0 36px; }
.footer::before { content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%; background: radial-gradient(50% 60% at 50% 100%, rgba(47,111,224,.35), transparent 70%); pointer-events: none; }
.footer > .container { position: relative; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; padding-bottom: 80px; border-bottom: 1px solid rgba(255,255,255,.1); }
.contact-grid h2 { color: #fff; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; font-weight: 600; margin: 18px 0 18px; }
.contact-grid > div > p { font-size: 17px; max-width: 44ch; }
.channels { margin-top: 34px; display: grid; gap: 0; }
.channel { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.1); }
.channel:last-child { border-bottom: 1px solid rgba(255,255,255,.1); }
.channel .ic { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.08); display: grid; place-items: center; color: #fff; font-size: 18px; flex-shrink: 0; }
.channel small { display: block; font-size: 12.5px; color: rgba(255,255,255,.5); }
.channel span { color: #fff; font-size: 15.5px; }
.form { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 34px; color: rgba(255,255,255,.75); background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.12); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 34px 70px -34px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.08); }
.form::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #276bb8, var(--accent), #14b8a6); }
.form h3 { color: #fff; font-size: 24px; font-weight: 600; margin-bottom: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.82); }
.field input, .field select, .field textarea { font: inherit; font-size: 15px; color: #fff; color-scheme: dark; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.13); border-radius: 12px; padding: 13px 16px; transition: border-color .15s ease, background .15s ease; width: 100%; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.4); }
.field select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.field select option { background: #1b1b23; color: #fff; }
.field input:-webkit-autofill, .field textarea:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: #fff; box-shadow: 0 0 0 100px #1e2433 inset; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255,255,255,.24); }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: #5a96ee; background: rgba(255,255,255,.1); }
.form .btn { width: 100%; }
.form-msg { margin-top: 14px; font-size: 14px; color: #7ee5d8; background: rgba(20,184,166,.14); border: 1px solid rgba(20,184,166,.32); border-radius: 10px; padding: 10px 14px; }
.foot-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding: 60px 0 40px; }
.foot-cols img { height: 44px; width: auto; margin-bottom: 18px; }
.foot-cols p { font-size: 15px; max-width: 34ch; }
.foot-cols h4 { color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 16px; letter-spacing: -.01em; }
.foot-cols li { margin-bottom: 10px; font-size: 15px; }
.foot-cols a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: rgba(255,255,255,.5); padding-top: 26px; border-top: 1px solid rgba(255,255,255,.1); }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .hero-grid, .intro-grid, .int-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .cards-3, .pgrid { grid-template-columns: 1fr 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .faq-grid .sec-head { position: static; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-open .nav-links { display: grid; position: absolute; left: var(--gutter); right: var(--gutter); top: 84px; background: #fff; color: var(--ink); border-radius: 24px; padding: 18px 26px; gap: 14px; box-shadow: 0 20px 50px rgba(20,20,40,.2); }
}
@media (max-width: 760px) {
  .section { padding: 84px 0; }
  .hero { padding: 150px 0 60px; }
  .cards-3, .pgrid { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .stat-panel { padding: 18px; }
  .stat strong { font-size: 36px; }
  .nav-right .btn { display: none; }
  .nav { padding-left: 18px; }
  .int-list { max-height: 360px; }
}
@media (max-width: 480px) {
  .foot-cols { grid-template-columns: 1fr; }
  .logos { gap: 26px; }
}
/* ================================================================
   MOVIMIENTO Y EFECTOS
   Todo lo que oculta contenido hasta animarlo cuelga de html.js
   (se activa solo si hay JavaScript y no se pidió reducir movimiento).
   ================================================================ */
:root { --ease: cubic-bezier(.2, .7, .2, 1); }

/* barra de progreso de lectura */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, #276bb8, var(--accent), #14b8a6); }

/* enlaces del menú: subrayado y sección activa */
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { opacity: 1; }
.header:not(.scrolled) .nav-links a::after { background: #fff; }

/* botones: brillo al pasar y flecha */
.btn { position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%); transform: translateX(-130%); transition: transform .7s var(--ease); pointer-events: none; }
.btn:hover::after { transform: translateX(130%); }
.btn:active { transform: scale(.97); }
.btn-primary { box-shadow: 0 10px 28px -10px rgba(47,111,224,.7); }
.btn-primary:hover { box-shadow: 0 16px 34px -10px rgba(47,111,224,.85); }

/* hero: entrada escalonada */
@keyframes rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@keyframes cardIn { from { opacity: 0; translate: 0 50px; scale: .95; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes slideIn { from { opacity: 0; translate: 40px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes twinkle { 0%, 100% { opacity: .25; scale: .7; rotate: 0deg; } 50% { opacity: 1; scale: 1.15; rotate: 25deg; } }
@keyframes shimmer { to { background-position: -250% 0; } }
.hero-label { animation: rise .8s .05s var(--ease) both; }
/* titular rotativo: las frases comparten la misma celda para que la altura no salte */
@keyframes phraseIn { from { opacity: 0; translate: 0 34px; filter: blur(12px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }
@keyframes phraseOut { from { opacity: 1; translate: 0 0; filter: blur(0); } to { opacity: 0; translate: 0 -30px; filter: blur(12px); } }
.rotator { display: grid; }
.phrase { grid-area: 1 / 1; visibility: hidden; opacity: 0; }
.phrase.is-active, .phrase.is-leaving { visibility: visible; opacity: 1; }
.hero h1 .row:nth-child(2) {
  background: linear-gradient(90deg, #fff 0%, #fff 38%, #a9c8ff 50%, #8ce8ee 62%, #fff 74%, #fff 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; margin-inline: auto;
}
.phrase.is-active .row:nth-child(1) { animation: phraseIn .85s .05s var(--ease) both; }
.phrase.is-active .row:nth-child(2) { animation: phraseIn .85s .2s var(--ease) both, shimmer 7s 1.4s linear infinite; }
.phrase.is-leaving .row:nth-child(1) { animation: phraseOut .45s ease-in both; }
.phrase.is-leaving .row:nth-child(2) { animation: phraseOut .45s .06s ease-in both, shimmer 7s linear infinite; }
.hero p.lead { animation: rise .9s .42s var(--ease) both; }
.hero-cta { animation: rise .9s .55s var(--ease) both; }
.trusted { animation: rise .9s .8s var(--ease) both; }
.hero::before { translate: var(--gx, 0) var(--gy, 0); transition: translate .6s ease-out; }


/* marquesina de logos */
@keyframes marq { to { transform: translateX(-50%); } }
.js .logos { animation: marq 30s linear infinite; }
.js .marquee:hover .logos { animation-play-state: paused; }
.logos img { transition: opacity .25s ease, transform .25s ease; }
.logos > *:hover img, .logos img:hover { opacity: 1; transform: scale(1.06); }

/* revelado al hacer scroll */
@keyframes reveal { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
.js [data-reveal] { opacity: 0; }
.js [data-reveal].in { animation: reveal .85s var(--d, 0s) var(--ease) both; }

/* industrias: ilustraciones y tarjetas que reaccionan */
@keyframes dots { to { background-position: 24px 24px; } }
.p-dots { animation: dots 10s linear infinite; }
.card { position: relative; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card:hover { transform: translateY(-8px); box-shadow: 0 28px 56px -22px rgba(40,30,110,.28); }
.card::after, .pc::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.card::after { background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(47,111,224,.08), transparent 60%); }
.pc::after { background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(255,255,255,.12), transparent 60%); }
.card:hover::after, .pc:hover::after { opacity: 1; }

/* estadísticas */
.stat { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.stat:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(20,30,60,.12); }


/* productos: degradado que se mueve */
@keyframes sheen { to { background-position: 100% 0; } }
.products::before { background-size: 200% 100%; animation: sheen 14s ease-in-out infinite alternate; }
.pc .logo img { transition: transform .35s var(--ease); }
a.pc:hover .logo img, a.pc:hover .logo .tal { transform: translateX(4px); }
.pc .more .ico { transition: transform .3s var(--ease); }
a.pc:hover .more .ico { transform: translateX(6px); }
.pc.cta-card { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.pc.cta-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -16px rgba(47,111,224,.6); }
.pc[style*="--pc"] { transition: transform .3s var(--ease), border-color .3s ease, background .3s ease; }
.pc:not(a):not(.cta-card):hover { border-color: var(--pc); }

/* integraciones: columnas que se desplazan */
@keyframes vmarq { to { transform: translateY(-50%); } }
.js .int-col { animation: vmarq 26s linear infinite; }
.js .int-col:nth-child(2) { animation-direction: reverse; }
.js .int-list:hover .int-col { animation-play-state: paused; }
.int { transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.int:hover { transform: translateX(6px); box-shadow: 0 14px 30px rgba(20,30,60,.12); }

/* casos */

/* preguntas */
@keyframes faqIn { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }
.faq-list details { transition: background .3s ease, box-shadow .3s ease; }
.faq-list details:hover { background: #eff0f6; }
.faq-list details[open] { background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(40,30,110,.25); }
.faq-list details[open] p { animation: faqIn .4s var(--ease) both; }
.faq-list summary::after { transition: background .25s ease, color .25s ease, transform .3s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(180deg); }

/* contacto */
@keyframes aurora { 0%, 100% { opacity: .7; translate: -4% 0; } 50% { opacity: 1; translate: 4% -4%; } }
.footer::before { animation: aurora 9s ease-in-out infinite; }
.channel { transition: padding-left .3s var(--ease); }
.channel:hover { padding-left: 8px; }
.channel .ic { transition: background .3s ease, transform .3s var(--ease); }
.channel:hover .ic { background: var(--accent); transform: rotate(-6deg) scale(1.06); }
.field input, .field select, .field textarea { transition: border-color .2s ease, background .2s ease, box-shadow .2s ease; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: 0 0 0 4px rgba(90,150,238,.22); }
.foot-cols a { transition: color .2s ease, padding-left .25s var(--ease); }
.foot-cols a:hover { padding-left: 5px; }

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

/* ---------- IA e industrias: movimiento y adaptación ---------- */
@keyframes travel { from { left: -140px; } to { left: 100%; } }
@keyframes nodeGlow { 0%, 22%, 100% { box-shadow: 0 0 0 7px rgba(47,111,224,.16); } 8% { box-shadow: 0 0 0 13px rgba(47,111,224,.34); } }
.pipe-line::after { animation: travel 6s linear infinite; }
.node { animation: nodeGlow 6s ease-out infinite; animation-delay: calc(var(--i, 0) * 1.35s); }
.card:hover .panel img { transform: scale(1.07); }
.gate-ico { animation: nodeGlow 3.2s ease-out infinite; }

@media (max-width: 1060px) {
  .pipe { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .pipe-line { display: none; }
}
@media (max-width: 760px) {
  .pipe { grid-template-columns: 1fr; }
  .node { margin: 0; }
  .gate { padding: 24px 22px; }
  .gate-main { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .pipe-line::after { display: none; }
}
@media (min-width: 1061px) { .lane-ia { min-height: 142px; } }
.hero p.lead strong { color: #fff; font-weight: 600; }

/* ---------- casos: filtros y tarjetas ---------- */
.cases { background: var(--grey); padding-top: 0; }
.cases .sec-head { margin-bottom: 30px; }
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter { font: 600 14px "Inter", sans-serif; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 99px; height: 42px; padding: 0 22px; cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s var(--ease), box-shadow .25s ease; }
.filter:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.filter.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(47,111,224,.7); }

.case-row { display: flex; gap: 22px; overflow-x: auto; cursor: grab; scrollbar-width: none;
  padding: 10px var(--gutter) 34px max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter))); }
.case-row::-webkit-scrollbar { display: none; }
.case-row.dragging { cursor: grabbing; user-select: none; }
.case[hidden] { display: none; }
.case { --cc: #276bb8; --cs: #e3eefb; --ct: #1d5a9c;
  position: relative; overflow: hidden; flex: 0 0 360px; display: flex; flex-direction: column; gap: 14px;
  background: #fff; border-radius: var(--r-lg); padding: 28px 28px 34px;
  box-shadow: 0 1px 0 rgba(20,30,60,.04), 0 18px 40px -26px rgba(30,50,110,.35);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.case[data-cat="health"] { --cc: #e7796d; --cs: #fbe9e6; --ct: #b8483a; }
.case[data-cat="mgmt"] { --cc: #14b8a6; --cs: #def5ee; --ct: #0f766e; }
.case[data-cat="log"] { --cc: #d49b2c; --cs: #f7efdc; --ct: #8a6a1e; }
.case::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--cc); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.case:hover { transform: translateY(-8px); box-shadow: 0 1px 0 rgba(20,30,60,.04), 0 30px 56px -24px rgba(30,50,110,.45); }
.case:hover::after { transform: scaleX(1); }
.case-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.case-ic { width: 58px; height: 58px; border-radius: 18px; background: var(--cs); color: var(--ct); display: grid; place-items: center; font-size: 28px; flex-shrink: 0; transition: transform .45s cubic-bezier(.3, 1.5, .5, 1); }
.case-ic .ico { stroke-width: 1.7; }
.case:hover .case-ic { transform: rotate(-6deg) scale(1.08); }
.case .tg { font-size: 13px; font-weight: 600; padding: 6px 15px; border-radius: 99px; background: var(--cs); color: var(--ct); }
.case h3 { font-size: 21px; font-weight: 600; line-height: 1.22; }
.case p { font-size: 15px; color: var(--text); }
@media (max-width: 760px) { .case { flex-basis: 300px; padding: 24px 24px 30px; } .filter { height: 38px; padding: 0 18px; font-size: 13.5px; } }
.sec-head h2.wide { max-width: none; }

/* ---------- formulario: validación, Turnstile y envío ---------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.turnstile-wrap { margin: 4px 0 18px; min-height: 65px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #f08a7e; background: rgba(240,138,126,.08); }
.field.invalid label { color: #f4a79d; }
.form-msg.err { color: #ffb4ab; background: rgba(240,138,126,.12); border-color: rgba(240,138,126,.4); }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn.is-loading::before { content: ""; width: 16px; height: 16px; margin-right: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn:disabled { cursor: progress; }

/* ---------- consentimiento de analítica ---------- */
.analytics-consent { position: fixed; z-index: 100; right: 24px; bottom: 24px; width: min(440px, calc(100vw - 32px)); padding: 22px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: #171d35; color: #fff; box-shadow: 0 20px 60px rgba(10,16,38,.35); }
.analytics-consent p { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.84); }
.analytics-consent-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.analytics-consent .btn { min-height: 40px; padding: 0 16px; border: 1px solid transparent; }
.analytics-consent .btn-outline { color: #fff; border-color: rgba(255,255,255,.45); background: transparent; }
.analytics-preferences { margin-left: auto; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 600px) { .analytics-consent { right: 16px; bottom: 16px; } .analytics-consent-actions .btn { flex: 1; } .foot-bottom { gap: 12px; } .analytics-preferences { margin-left: 0; } }
