/* =========================================================
   JFC Soluciones · Landing Licencia de Funcionamiento Cusco
   Mobile first. Rojo solo para acción y énfasis.
   ========================================================= */

:root {
  /* Rojo de marca JFC (rojo puro #FE0000, oscurecido un punto para que el texto blanco se lea bien) */
  --red: #E60000;
  --red-dark: #BF0000;
  --red-soft: #FDEBEB;

  --ink: #111113;
  --ink-2: #3A3A40;
  --muted: #6B6B73;
  --line: #E6E4E1;
  --bg: #FFFFFF;
  --bg-soft: #F6F5F3;
  --dark: #111113;
  --dark-2: #1C1C1F;
  --dark-line: #2E2E33;
  --on-dark: #F4F3F1;
  --on-dark-muted: #A6A6AE;
  --wa: #25D366;
  --wa-dark: #1DA851;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(17 17 19 / .05), 0 2px 8px rgb(17 17 19 / .04);
  --shadow-lg: 0 2px 4px rgb(17 17 19 / .04), 0 24px 60px -12px rgb(17 17 19 / .18);
  --header-h: 64px;

  /* Curvas de animación (las integradas de CSS son demasiado suaves) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent; /* sin destello gris al tocar; cada control tiene su :active */
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; font-weight: 800; }
p { margin: 0; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

.ico { width: 1.25em; height: 1.25em; flex: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%; max-width: 1160px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Controles: respuesta inmediata al tocar y sin selección de texto con pulsación larga */
.btn, .chip, .wa-float, .faq-list summary, .main-nav a, .logo {
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* ---------- Tipografía de sección ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow:has(.ico)::before { display: none; }
.eyebrow .ico { width: 16px; height: 16px; }
.eyebrow-light { color: #FF5252; }

h2 { font-size: clamp(1.75rem, 5.5vw, 2.75rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.015em; font-weight: 700; }
.body-lg { font-size: 1.125rem; color: var(--ink-2); }
.section-head { max-width: 720px; margin-bottom: 40px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 24px;
  font: inherit; font-size: 17px; font-weight: 700; letter-spacing: .01em;
  text-decoration: none; text-align: center; line-height: 1.2;
  border: 2px solid transparent; border-radius: 12px; cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.btn .ico { transition: transform 200ms var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn-primary:active { background: var(--red-dark); }
.btn-outline:active { background: var(--bg-soft); }
.btn-wa:active { background: var(--wa-dark); }
.btn-primary {
  background: var(--red); color: #fff; text-transform: uppercase; letter-spacing: .04em;
  box-shadow: 0 8px 20px -8px rgb(230 0 0 / .55);
}
.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-outline .ico-wa { color: var(--wa-dark); }
.btn-wa { background: var(--wa); color: #0B2915; text-transform: uppercase; letter-spacing: .04em; }
.btn-lg { min-height: 58px; font-size: 16.5px; padding: 16px 18px; }
.btn-sm { min-height: 44px; padding: 10px 14px; font-size: 14px; box-shadow: none; white-space: nowrap; }
.btn-block { width: 100%; }
.btn .ico { width: 20px; height: 20px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; color: var(--red); text-decoration: none;
}
.link-arrow .ico { transition: transform 200ms var(--ease-out); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: rgb(255 255 255 / .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px -12px rgb(17 17 19 / .2); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo-text { font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.logo-light { color: var(--on-dark); }
.main-nav { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 12px 0 64px; overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 8.4vw, 3.9rem); letter-spacing: -0.035em; margin-bottom: 18px; }
.hero h1 .hl { color: var(--red); }

/* Entrada del hero al cargar: una sola vez, escalonada */
.hero-copy > * { animation: rise-in 600ms var(--ease-out) backwards; }
.hero-copy > :nth-child(2) { animation-delay: 60ms; }
.hero-copy > :nth-child(3) { animation-delay: 120ms; }
.hero-copy > :nth-child(4) { animation-delay: 180ms; }
.hero-copy > :nth-child(5) { animation-delay: 240ms; }
.hero-visual { animation: rise-in 700ms var(--ease-out) 200ms backwards; }
/* La frase clave se "enciende" en rojo cuando el titular ya llegó */
.hero h1 .hl { animation: key-in 400ms ease 520ms backwards; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes key-in { from { color: var(--ink); } }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 560px; }
.cta-group { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.trust-list { display: grid; gap: 10px; margin-top: 26px; font-size: 17px; font-weight: 600; color: var(--ink-2); }
.trust-list li { display: flex; align-items: center; gap: 10px; }
.trust-list .ico { color: var(--red); width: 20px; height: 20px; padding: 3px; background: var(--red-soft); border-radius: 50%; }
.trust-light { color: var(--on-dark); }
.trust-light .ico { background: rgb(255 82 82 / .15); color: #FF5252; }

.hero { position: relative; }
.hero::before { /* trama sutil de fondo */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 85% 20%, rgb(230 0 0 / .07), transparent 70%),
    radial-gradient(circle at 1px 1px, rgb(17 17 19 / .06) 1px, transparent 0) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
.hero-visual { position: relative; width: min(100%, 300px); margin: 0 auto; }
.phone {
  position: relative; border-radius: 34px; padding: 8px; background: var(--ink);
  box-shadow: 0 30px 70px -20px rgb(17 17 19 / .45), 0 0 0 1px rgb(255 255 255 / .08) inset;
}
.hero-video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 27px; background: #222; }
.phone-tag {
  position: absolute; left: 20px; bottom: 20px; right: 20px;
  display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: calc(100% - 40px);
  padding: 8px 12px; border-radius: 999px; background: rgb(17 17 19 / .72); color: #fff;
  font-size: 15px; font-weight: 600; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #FF5252; flex: none; animation: pulse 1.8s ease-out infinite; }
.float-note {
  position: absolute; right: -14px; top: 36px;
  display: flex; align-items: center; gap: 10px; max-width: 190px;
  background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line);
  font-size: 15px; line-height: 1.35; box-shadow: var(--shadow-lg);
  animation: floaty 6s var(--ease-in-out) infinite alternate;
}
.float-note .ico { color: var(--red); width: 22px; height: 22px; }
.float-stat {
  position: absolute; left: -14px; bottom: 84px;
  display: grid; gap: 0; max-width: 150px;
  background: var(--red); color: #fff; padding: 12px 16px; border-radius: 14px;
  box-shadow: 0 18px 40px -14px rgb(230 0 0 / .6);
  animation: floaty 7s var(--ease-in-out) 1s infinite alternate;
}
.float-stat strong { font-size: 30px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.float-stat span { font-size: 15px; font-weight: 600; line-height: 1.3; opacity: .95; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgb(255 82 82 / .6); }
  100% { box-shadow: 0 0 0 10px rgb(255 82 82 / 0); }
}
@keyframes floaty { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* Barra de progreso de lectura (solo navegadores con animaciones ligadas al scroll) */
.scroll-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    display: block; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
    background: var(--red); transform-origin: 0 50%;
    animation: progress linear both; animation-timeline: scroll(root);
  }
}
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }


/* Clientes */
.clients { padding: 8px 0 48px; }
.clients-title { font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; margin-bottom: 20px; line-height: 1.5; }
.clients-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.clients-grid li {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden;
}
.clients-grid img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Con JS: los logos pasan a una cinta en movimiento continuo */
.clients-marquee {
  overflow: hidden; margin-inline: -20px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.clients-marquee .clients-grid {
  display: flex; gap: 12px; width: max-content; grid-template-columns: none;
  animation: marquee 48s linear infinite;
}
.clients-marquee .clients-grid li { width: 132px; flex: none; }
.clients-marquee:hover .clients-grid, .clients-marquee:focus-within .clients-grid { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }

/* Cifras */
.stats { background: var(--dark); color: var(--on-dark); padding: 36px 0; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 16px; }
.stats-grid li { display: grid; gap: 4px; align-content: start; }
.stats-grid strong { font-size: clamp(2.4rem, 9vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats-grid li > span { font-size: 16px; color: var(--on-dark-muted); line-height: 1.35; max-width: 18ch; }
.stats-grid li:first-child strong { color: #FF5252; }

/* ---------- Secciones ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--dark); color: var(--on-dark); }
.section-dark .body-lg { color: var(--on-dark-muted); }
.center-cta { display: flex; justify-content: center; margin-top: 40px; }
.center-cta .btn { width: 100%; max-width: 420px; }

/* Problema */
.pain-grid { display: grid; gap: 12px; }
.pain {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; font-weight: 600; font-size: 18px;
}
.pain-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); flex: none; }
.pain-ico .ico { width: 16px; height: 16px; }
.pain-close { margin-top: 40px; display: grid; gap: 12px; }
.statement { font-size: clamp(1.6rem, 5vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }

/* Solución */
.split { display: grid; gap: 40px; align-items: center; }
.split-copy h2 { margin-bottom: 18px; }
.split-copy .btn { margin-top: 28px; }
.duo { display: grid; gap: 12px; }
.duo-col { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.duo-label { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 14px; }
.duo-col ul li { padding: 8px 0 8px 22px; position: relative; color: var(--ink-2); font-size: 17px; }
.duo-col ul li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--muted); }
.duo-us { background: var(--ink); color: #fff; border-color: var(--ink); }
.duo-us .duo-label { color: #FF5252; }
.flow { display: grid; gap: 4px; counter-reset: f; }
.flow li { display: flex; align-items: center; gap: 14px; padding: 10px 0; font-weight: 600; position: relative; }
.flow li .ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--dark-2); border: 1px solid var(--dark-line); color: #fff; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 50px; height: 12px; width: 2px; background: var(--red); }

/* Qué incluye */
.include-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inc-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; transition: border-color .2s, transform .2s, box-shadow .2s; }
.inc-card .ico { width: 26px; height: 26px; color: var(--red); margin-bottom: 14px; }
.inc-card h3 { font-size: 17.5px; margin-bottom: 4px; }
.inc-card p { font-size: 16px; color: var(--muted); line-height: 1.45; }
.price-card {
  grid-column: 1 / -1;
  background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px;
  display: grid; gap: 4px; align-content: center;
}
.price-label { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--on-dark-muted); }
.price { font-size: 44px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.price .cur { font-size: 22px; margin-right: 6px; vertical-align: 14px; color: var(--on-dark-muted); }
.price-note { font-size: 16px; color: var(--on-dark-muted); margin-bottom: 16px; }
.price-card .btn { padding-left: 12px; padding-right: 12px; }

/* Beneficios */
.benefits { display: grid; border-top: 1px solid var(--line); }
.benefits li { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.b-num { font-size: 16px; font-weight: 800; color: var(--red); padding-top: 3px; min-width: 24px; font-variant-numeric: tabular-nums; }
.benefits h3 { margin-bottom: 4px; font-size: 1.15rem; }
.benefits p { color: var(--muted); font-size: 17.5px; }

/* Proceso */
.steps { display: grid; gap: 14px; counter-reset: s; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; position: relative; }
.step-n {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 18px;
}
.step:last-child .step-n { background: var(--red); }
.step h3 { margin-bottom: 6px; font-size: 1.15rem; }
.step p { color: var(--muted); font-size: 17px; }

/* Garantía */
.guarantee {
  display: grid; gap: 24px;
  border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: 32px 24px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #fff, var(--bg-soft));
}
.guarantee::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--red); }
.g-seal { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 0 0 8px var(--red-soft); }
.g-seal .ico { width: 34px; height: 34px; }
.g-badge { width: 150px; height: auto; mix-blend-mode: multiply; margin: -8px 0 -8px -12px; }
.g-body h2 { margin-bottom: 18px; }
.guarantee blockquote { margin: 0 0 18px; font-size: 1.15rem; font-weight: 600; line-height: 1.5; color: var(--ink); }
.g-note { font-size: 17px; color: var(--muted); }
.g-link { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--ink); }

/* Experiencia */
.exp-grid { display: grid; gap: 40px; }
.exp-grid h2 { margin-bottom: 28px; }
.exp-stat { display: flex; align-items: baseline; gap: 14px; font-size: 18px; font-weight: 600; color: var(--on-dark-muted); }
.exp-stat span { font-size: clamp(4.5rem, 18vw, 7.5rem); font-weight: 800; letter-spacing: -0.06em; line-height: .9; color: #fff; }
.exp-list { display: grid; gap: 4px; }
.exp-list li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--dark-line); }
.exp-list .ico { width: 24px; height: 24px; color: #FF5252; margin-top: 2px; }
.exp-list strong { display: block; font-size: 17px; }
.exp-list span { color: var(--on-dark-muted); font-size: 17px; }
.photo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
.photo-row .photo:first-child { grid-column: 1 / -1; }
.photo { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--dark-2); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgb(0 0 0 / .75));
  color: #fff; font-size: 15.5px; font-weight: 600;
}
.photo-slot {
  margin: 0; aspect-ratio: 4 / 3; border-radius: var(--radius);
  border: 1.5px dashed var(--dark-line); background: var(--dark-2);
  display: grid; place-content: center; justify-items: center; gap: 10px; padding: 20px; text-align: center;
  color: var(--on-dark-muted); font-size: 15px;
}
.photo-slot .ico { width: 32px; height: 32px; }
.testimonials { display: grid; gap: 12px; margin-top: 12px; }
.testimonial { margin: 0; background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius); padding: 24px; }
.testimonial blockquote { margin: 0 0 16px; font-size: 17px; line-height: 1.5; }
.testimonial figcaption { display: grid; font-size: 16px; }
.testimonial figcaption span { color: var(--on-dark-muted); }
.testimonial.is-placeholder { border-style: dashed; color: var(--on-dark-muted); }

/* Licencias y certificados gestionados */
.section-sub { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }
.doc-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 64%; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin-inline: -20px; padding: 4px 20px 12px; scroll-padding-inline: 20px;
  scrollbar-width: none;
}
.doc-grid::-webkit-scrollbar { display: none; }
.doc { scroll-snap-align: start; display: grid; gap: 12px; align-content: start; }
.doc[hidden] { display: none; }
.doc-open {
  position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; background: #fff; cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease;
  touch-action: manipulation;
}
.doc-open img { width: 100%; height: auto; aspect-ratio: 560 / 788; object-fit: cover; }
.doc-open:active { transform: scale(.98); }
.doc-zoom {
  position: absolute; right: 10px; top: 10px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(17 17 19 / .72); color: #fff;
}
.doc-zoom .ico { width: 18px; height: 18px; }
.doc-body h3 { margin: 2px 0 2px; font-size: 1.05rem; }
.doc-body .case-loc { font-size: 16px; color: var(--muted); align-items: flex-start; margin-top: 4px; }
.doc-body .case-loc .ico { margin-top: 3px; }
.doc-note { margin-top: 20px; font-size: 15.5px; color: var(--muted); }

.section-dark .section-sub, .section-dark .doc-note, .section-dark .doc-body .case-loc { color: var(--on-dark-muted); }
.section-dark .case-type { color: #FF5252; }
.section-dark .doc-open { border-color: var(--dark-line); }

/* Visor */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(92vw, 720px); max-height: 92dvh;
  overflow: visible;
}
.lightbox::backdrop { background: rgb(10 10 11 / .86); }
.lightbox img { max-width: 100%; max-height: 82dvh; width: auto; margin: 0 auto; border-radius: 10px; background: #fff; }
.lightbox p { color: #fff; text-align: center; font-weight: 600; font-size: 17px; margin-top: 12px; }
.lightbox-close {
  position: absolute; right: 0; top: -52px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer;
  touch-action: manipulation;
}
.lightbox[open] { animation: lightbox-in 200ms var(--ease-out); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(.96); } }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: -16px 0 28px; }
.tag-list li { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 16px; font-weight: 600; color: var(--ink-2); }

/* Casos en video (reels verticales) */
.reel-hint { color: var(--muted); font-size: 17px; margin: -24px 0 20px; }
.reel-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  margin-inline: -20px; padding: 0 20px 8px; scroll-padding-inline: 20px;
  scrollbar-width: none;
}
.reel-grid::-webkit-scrollbar { display: none; }
.reel { scroll-snap-align: start; display: grid; gap: 12px; align-content: start; }
.reel-media { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink); aspect-ratio: 9 / 16; }
.reel-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  border: 0; padding: 0; cursor: pointer; color: #fff;
  background: linear-gradient(180deg, transparent 55%, rgb(0 0 0 / .35));
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.reel-play .ico {
  width: 64px; height: 64px; padding: 18px 16px 18px 20px; border-radius: 50%;
  background: rgb(255 255 255 / .92); color: var(--red);
  box-shadow: 0 10px 30px rgb(0 0 0 / .3);
  transition: transform 160ms ease-out;
}
.reel-play:active .ico { transform: scale(.92); }
.reel.is-playing .reel-play { display: none; }
.reel-body h3 { margin: 2px 0 2px; }
.reel-body p { font-size: 16.5px; color: var(--muted); }

/* Casos */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 24px; scrollbar-width: none; overscroll-behavior-x: contain; }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 42px; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: all .2s;
}
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.case-grid { display: grid; gap: 14px; }
.case { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.case[hidden] { display: none; }
.case-img { aspect-ratio: 16 / 10; background: var(--bg-soft); display: grid; place-items: center; color: #BDBAB5; }
.case-img .ico { width: 40px; height: 40px; }
.case-img img { width: 100%; height: 100%; object-fit: cover; }
.case-body { padding: 18px 20px 20px; }
.case-type { display: inline-block; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); margin-bottom: 6px; }
.case-body h3 { margin-bottom: 4px; }
.case-body p { font-size: 16.5px; color: var(--muted); }
.case-loc { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.case-loc .ico { width: 16px; height: 16px; }
.case.is-placeholder { border-style: dashed; }
.empty-filter { text-align: center; color: var(--muted); padding: 24px 0; }

/* FAQ */
.faq-grid { display: grid; gap: 32px; }
.faq-aside h2 { margin-bottom: 16px; }
.faq-aside p { color: var(--muted); margin-bottom: 14px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s; }
.faq-list details[open] { border-color: #CFCBC6; }
.faq-list summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 20px; font-weight: 700; font-size: 18px; min-height: 56px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; width: 12px; height: 12px; flex: none; margin-right: 4px;
  border-right: 2.5px solid var(--red); border-bottom: 2.5px solid var(--red);
  transform: rotate(45deg) translateY(-3px); transition: transform .25s;
}
.faq-list details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-list details p { padding: 0 20px 20px; color: var(--ink-2); font-size: 17.5px; }

/* CTA final + formulario */
.final { padding-bottom: 96px; }
.final-grid { display: grid; gap: 40px; align-items: start; }
.final-copy h2 { margin-bottom: 18px; }
.final-copy .trust-list { margin-top: 22px; }
.final-alt { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--dark-line); display: grid; gap: 12px; }
.final-alt p { color: var(--on-dark-muted); font-size: 17px; }
.final-alt .phone { font-weight: 700; color: #fff; font-size: 17px; letter-spacing: .02em; }
.form-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 28px 22px; box-shadow: 0 30px 80px -20px rgb(0 0 0 / .6); }
.form-title { font-size: 1.4rem; margin-bottom: 4px; }
.form-sub { color: var(--muted); font-size: 17px; margin-bottom: 22px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.field .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 14px;
  font: inherit; font-size: 18px; color: var(--ink);
  background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: 10px;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23111113' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgb(17 17 19 / .08); }
.field.has-error input, .field.has-error select { border-color: var(--red); background: #fff; }
.err { color: var(--red); font-size: 15px; font-weight: 600; margin-top: 5px; min-height: 0; }
.err:empty { display: none; }
.form-card .btn-primary { margin-top: 8px; }
.form-legal { font-size: 15px; color: var(--muted); text-align: center; margin-top: 12px; line-height: 1.45; }
.form-success { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 20px 0; }
.form-success[hidden] { display: none; }
.form-success:focus { outline: none; }
.ok-ico { width: 64px; height: 64px; border-radius: 50%; background: #E8F9EF; color: var(--wa-dark); display: grid; place-items: center; }
.ok-ico .ico { width: 30px; height: 30px; }
.form-success h3 { font-size: 1.4rem; }
.form-success p { color: var(--muted); font-size: 17px; }

/* Footer */
.footer-inner { display: grid; gap: 22px; }
.footer-inner .logo { margin-bottom: 8px; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { text-decoration: none; cursor: pointer; }
.copy { font-size: 15px; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  width: 60px; height: 60px; justify-content: center; padding: 0;
  background: var(--wa); color: #0B2915; border-radius: 999px;
  font-weight: 700; font-size: 16.5px; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 30px -6px rgb(29 168 81 / .55), 0 2px 6px rgb(0 0 0 / .12);
  transition: transform .2s, box-shadow .2s;
  animation: wa-in .5s .8s backwards cubic-bezier(.2, .9, .3, 1.2);
}
.wa-float .ico { width: 32px; height: 32px; }
.wa-float:active { transform: scale(.96); }
.chip:active { transform: scale(.96); }
@keyframes wa-in { from { opacity: 0; transform: translateY(20px) scale(.9); } to { opacity: 1; transform: none; } }

/* Aparición al hacer scroll */
.js .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 50ms); /* hermanos de una misma cuadrícula entran escalonados */
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Títulos de sección: el texto se descubre de arriba abajo, una sola vez */
.js .section-head.reveal h2,
.js .reveal > h2 {
  clip-path: inset(0 0 100% 0);
  transform: translateY(.3em);
  transition: clip-path 700ms var(--ease-in-out) 80ms, transform 700ms var(--ease-out) 80ms;
}
.js .section-head.reveal.is-visible h2,
.js .reveal.is-visible > h2 { clip-path: inset(0 0 -.2em 0); transform: none; }

/* ================= Tablet ================= */
@media (min-width: 640px) {
  .container { padding: 0 32px; }
  .cta-group { flex-direction: row; flex-wrap: wrap; }
  .btn-lg { font-size: 18px; padding: 16px 28px; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .stats { padding: 48px 0; }
  .clients-grid { grid-template-columns: repeat(4, 1fr); }
  .clients-marquee { margin-inline: -32px; }
  .clients-marquee .clients-grid li { width: 156px; }
  .hero-visual { width: 320px; }
  .pain-grid { grid-template-columns: 1fr 1fr; }
  .include-grid { grid-template-columns: repeat(3, 1fr); }
  .price-card { grid-column: span 2; }
  .benefits { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .photo-row { grid-template-columns: repeat(3, 1fr); }
  .photo-row .photo:first-child { grid-column: auto; }
  .testimonials { grid-template-columns: 1fr 1fr; }
  .case-grid { grid-template-columns: 1fr 1fr; }
  .doc-grid { grid-auto-columns: 34%; margin-inline: -32px; padding-inline: 32px; scroll-padding-inline: 32px; }
  .reel-grid { grid-auto-columns: 38%; margin-inline: -32px; padding-inline: 32px; scroll-padding-inline: 32px; }
  .guarantee { grid-template-columns: auto 1fr; padding: 44px 40px 44px 48px; gap: 32px; align-items: center; }
  .g-badge { width: 200px; margin: 0; }
  .form-card { padding: 36px 32px; }
  .center-cta .btn { width: auto; }
  .duo { grid-template-columns: 1fr 1.2fr; }
}

/* ================= Desktop ================= */
@media (min-width: 1000px) {
  :root { --header-h: 76px; }
  body { font-size: 19px; }
  .main-nav { display: flex; gap: 32px; }
  .main-nav a.is-active { color: var(--red); }
  .main-nav a { text-decoration: none; font-size: 17px; font-weight: 600; color: var(--ink-2); transition: color .2s; }
  .btn-sm { min-height: 48px; padding: 12px 22px; font-size: 15px; }
  .logo-text { font-size: 15px; letter-spacing: .2em; }

  .hero { padding: 16px 0 80px; }
  .hero-visual { width: 340px; }
  .float-note { right: -56px; }
  .float-stat { left: -56px; }
  .clients { padding-bottom: 64px; }
  .clients-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; gap: 64px; }
  .section { padding: 112px 0; }
  .section-head { margin-bottom: 56px; }
  .pain-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .pain-close { grid-template-columns: auto auto; justify-content: space-between; align-items: center; margin-top: 56px; }

  .split { grid-template-columns: 1fr 1.1fr; gap: 80px; }
  .include-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .price-card { grid-column: span 1; }
  .inc-card { padding: 26px 22px; }

  .benefits { column-gap: 80px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .step:not(:last-child)::after {
    content: ""; position: absolute; top: 45px; left: calc(24px + 44px + 12px); right: -8px; height: 2px;
    background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
  }

  .exp-grid { grid-template-columns: 1fr 1fr; gap: 80px; align-items: end; }
  .case-grid { grid-template-columns: repeat(3, 1fr); }
  .doc-grid { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin-inline: 0; padding: 0; gap: 24px 20px; }
  .doc-grid-3 { grid-template-columns: repeat(3, 1fr); max-width: 960px; }
  .reel-grid.reel-grid-5 { grid-template-columns: repeat(5, 1fr); }
  .reel-grid { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; margin-inline: 0; padding: 0; gap: 16px; }
  .faq-grid { grid-template-columns: .8fr 1.2fr; column-gap: 80px; row-gap: 16px; align-items: start; }
  .faq-grid > .ver-todos { grid-column: 2; margin-top: 0; justify-content: flex-start; }
  .faq-aside { position: sticky; top: calc(var(--header-h) + 32px); }
  .final-grid { grid-template-columns: 1fr 1fr; gap: 80px; }
  .final-copy { position: sticky; top: calc(var(--header-h) + 32px); }
  .form-card { padding: 40px; }

  .footer-inner { grid-template-columns: 1fr auto; align-items: start; }
  .copy { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--dark-line); }
}

/* Hover solo con mouse: en táctil el :hover queda "pegado" tras tocar */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--red-dark); }
  .btn-outline:hover { background: var(--ink); color: #fff; }
  .btn-outline:hover .ico-wa { color: var(--wa); }
  .btn-wa:hover { background: #3DE07A; }
  .link-arrow:hover .ico { transform: translateX(4px); }
  .inc-card:hover { border-color: #D4D1CC; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
  .chip:hover { border-color: var(--ink); }
  .main-nav a:hover { color: var(--red); }
  .footer-links a:hover { color: #fff; }
  .wa-float:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -6px rgb(29 168 81 / .65); }
  .wa-float:hover:active { transform: scale(.96); }
  .reel-media video { transition: transform 400ms var(--ease-out); }
  .reel:not(.is-playing):hover .reel-media video { transform: scale(1.04); }
  .reel:not(.is-playing):hover .reel-play .ico { transform: scale(1.08); }
  .doc-open:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
  .doc-open:hover:active { transform: scale(.98); }
  .btn-primary:hover { box-shadow: 0 12px 26px -8px rgb(230 0 0 / .6); }
  .btn:hover .ico-arrow { transform: translateX(3px); } /* la flecha del CTA avanza */
  .btn-outline:hover .ico-wa,
  .btn-wa:hover .ico { transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Menos movimiento, no cero: se mantienen los fundidos, se quitan desplazamientos y escalas */
  .hero-copy > *, .hero-visual, .wa-float { animation-name: fade-only; }
  .hero h1 .hl, .live-dot, .float-note, .float-stat, .scroll-progress { animation: none; }
  .clients-marquee { overflow-x: auto; }
  .clients-marquee .clients-grid { animation: none; }
  .lightbox[open] { animation-name: fade-only; }
  .js .reveal { transform: none; transition: opacity 300ms ease; }
  .js .section-head.reveal h2, .js .reveal > h2 { clip-path: none; transform: none; transition: none; }
  .btn:active, .chip:active, .wa-float:active, .wa-float:hover, .wa-float:hover:active,
  .inc-card:hover, .doc-open:hover, .doc-open:active, .reel-play:active .ico, .btn .ico, .link-arrow .ico { transform: none !important; }
}
@keyframes fade-only { from { opacity: 0; } }

/* ---------- Redes sociales ---------- */
.social-grid { display: grid; gap: 14px; }
.social-card {
  display: grid; gap: 4px; align-content: start;
  padding: 24px; border-radius: var(--radius-lg);
  background: var(--dark-2); border: 1px solid var(--dark-line);
  text-decoration: none; color: var(--on-dark);
  transition: transform 200ms var(--ease-out), border-color 200ms ease, background-color 200ms ease;
}
.social-card:active { transform: scale(.98); }
.social-ico {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 14px;
  border-radius: 14px; color: #fff;
}
.social-ico .ico { width: 26px; height: 26px; }
.social-tiktok { background: #000; box-shadow: inset 0 0 0 1.5px #3A3A40, -2px -2px 0 #25F4EE, 2px 2px 0 #FE2C55; }
.social-instagram { background: linear-gradient(45deg, #F9A431 0%, #E1306C 50%, #6B3FD4 100%); }
.social-facebook { background: #1877F2; }
.social-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.015em; }
.social-handle { font-size: 16px; font-weight: 600; color: var(--on-dark-muted); }
.social-text { margin-top: 8px; font-size: 17px; color: var(--on-dark-muted); }
.social-go {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-weight: 700; font-size: 16px; color: #fff;
}
.social-go .ico { width: 18px; height: 18px; transition: transform 200ms var(--ease-out); }
@media (min-width: 640px) {
  .social-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (hover: hover) and (pointer: fine) {
  .social-card:hover { transform: translateY(-3px); border-color: #4A4A52; background: #222226; }
  .social-card:hover .social-go .ico { transform: translateX(4px); }
}

.social-grid > li { display: flex; flex-direction: column; gap: 14px; }
.social-grid > li > .social-card { flex: none; }
.social-feed {
  height: 440px; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--dark-2); border: 1px solid var(--dark-line);
  display: grid; place-items: stretch;
}
.social-feed > iframe, .social-feed > blockquote { width: 100%; }
.social-feed-tiktok { overflow-y: auto; background: #fff; }
.social-feed-wait { align-self: center; justify-self: center; margin: 0; color: var(--on-dark-muted); font-size: 15px; }

/* Galerías con "Ver todos" */
.is-extra { display: none !important; }
.ver-todos[hidden] { display: none; }
.faq-grid > .ver-todos { margin-top: -18px; }
@media (max-width: 639px) {
  .doc-grid.is-open, .reel-grid.is-open {
    grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); grid-auto-columns: auto;
    overflow: visible; margin-inline: 0; padding-inline: 0; scroll-snap-type: none;
  }
}

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 479px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding-inline: 13px; font-size: 14px; }
  .hide-xs { display: none; }
}
@media (max-width: 359px) {
  .logo-text { display: none; }
}

/* Franja destacada: licencia en menos de 20 días */
.promo-band { background: var(--dark); color: #fff; padding: clamp(56px, 9vw, 112px) 0; text-align: center; }
.promo-title { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #fff; }
.promo-title span { display: block; }
.promo-top { font-size: clamp(1.7rem, 5.2vw, 3.4rem); }
.promo-big { font-size: clamp(2.3rem, 8.6vw, 5.6rem); margin: .12em 0 .2em; letter-spacing: -0.01em; }
.promo-bottom { font-size: clamp(1.7rem, 5.2vw, 3.4rem); }
.promo-hl { display: inline-block; background: var(--red); color: #fff; padding: 0 .22em; line-height: 1.12; }

/* Contacto y ubicación */
.contacto { padding: clamp(48px, 7vw, 88px) 0; }
.contacto-grid { display: grid; gap: 36px; }
.contacto-col h2 { font-size: 1.4rem; margin: 0 0 18px; color: #fff; }
.contacto-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contacto-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--on-dark-muted); line-height: 1.5; }
.contacto-list .ico { width: 22px; height: 22px; flex: none; color: var(--red); margin-top: 2px; }
.contacto-list a { color: #fff; text-decoration: none; }
.contacto-list a:hover { text-decoration: underline; }
.contacto-mapa iframe { width: 100%; height: 280px; border: 0; border-radius: var(--radius-lg); background: var(--dark-2); display: block; }
.contacto-cta p { color: var(--on-dark-muted); margin: 0 0 20px; }
.contacto-cta .btn { max-width: 100%; white-space: normal; text-align: center; }
.contacto-redes-t { margin: 30px 0 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); }
.contacto-redes { display: flex; gap: 12px; }
.contacto-redes a { position: relative; width: 48px; height: 48px; border-radius: 50%; background: #1E1E22; border: 1px solid var(--dark-line); display: grid; place-items: center; color: #fff; transition: transform .22s var(--ease-out), background .2s, border-color .2s, box-shadow .2s; }
.contacto-redes .ico { width: 22px; height: 22px; transition: transform .22s var(--ease-out); }
.contacto-redes a:active { transform: scale(.9); }
.contacto-redes a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.contacto-redes a::after { content: attr(data-label); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px); background: #fff; color: #111; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.contacto-redes a:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (hover: hover) {
  .contacto-redes a:hover { transform: translateY(-4px) scale(1.07); }
  .contacto-redes a:hover .ico { transform: rotate(-8deg) scale(1.12); }
  .contacto-redes a:hover::after { opacity: 1; transform: translate(-50%, 0); }
  .contacto-redes .rs-tiktok:hover { background: #000; border-color: #3A3A40; box-shadow: -2px -2px 0 #25F4EE, 2px 2px 0 #FE2C55; }
  .contacto-redes .rs-instagram:hover { background: linear-gradient(45deg, #F9A431 0%, #E1306C 50%, #6B3FD4 100%); border-color: transparent; box-shadow: 0 10px 22px -8px rgb(225 48 108 / .7); }
  .contacto-redes .rs-facebook:hover { background: #1877F2; border-color: transparent; box-shadow: 0 10px 22px -8px rgb(24 119 242 / .7); }
}
@media (prefers-reduced-motion: reduce) { .contacto-redes a, .contacto-redes .ico { transition: none; } .contacto-redes a:hover, .contacto-redes a:hover .ico { transform: none; } }
@media (min-width: 1000px) {
  .contacto-grid { grid-template-columns: 1fr 1.3fr 1fr; gap: 48px; align-items: start; }
  .contacto-mapa iframe { height: 300px; }
}

/* Cotiza en línea */
/* Ventana emergente (se abre desde todos los botones que apuntan a #cotiza) */
.cz-modal { border: 0; padding: 0; margin: auto; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .55); }
.cz-modal::backdrop { background: rgb(17 17 19 / .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.cz-modal[open] { animation: cz-modal-in 240ms var(--ease-out); }
@keyframes cz-modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
body:has(.cz-modal[open]) { overflow: hidden; }
.cotiza-box { position: relative; padding: clamp(22px, 5vw, 32px); padding-top: clamp(26px, 6vw, 36px); }
.cz-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: #F3F2F0; color: var(--ink); cursor: pointer; transition: background .15s, transform .15s; }
.cz-close:hover { background: #E8E6E3; }
.cz-close:active { transform: scale(.94); }
.cz-close .ico { width: 22px; height: 22px; }
.cotiza-title { font-size: clamp(1.45rem, 5.4vw, 2rem); line-height: 1.2; font-weight: 800; color: #000; margin: 0 40px 14px 0; }
.cotiza-hl { display: inline-block; background: var(--red); color: #fff; padding: 0 .25em; }
.cotiza-sub { color: var(--red); font-size: clamp(1.1rem, 3.6vw, 1.35rem); margin: 0 0 16px; }
.cz-progress { margin-bottom: 20px; }
.cz-bar { height: 8px; border-radius: 99px; background: #F1D9D9; overflow: hidden; }
.cz-bar span { display: block; height: 100%; width: 0; background: var(--red); border-radius: 99px; transition: width .35s ease, background .35s; }
.cz-bar.is-full span { background: #22C55E; }
#cz-count { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); }
#cotiza-form { display: grid; gap: 14px; }
.cz-field { position: relative; }
.cz-field > .ico { position: absolute; left: 14px; top: 18px; width: 22px; height: 22px; color: #B9B9C0; transition: color .2s; pointer-events: none; }
.cz-field input { width: 100%; font: inherit; font-size: 17px; padding: 24px 44px 8px 46px; height: 60px; border: 2px solid #E4E4E8; border-radius: 12px; background: #fff; color: var(--ink); transition: border-color .2s, box-shadow .2s, background .2s; }
.cz-field label { position: absolute; left: 46px; top: 18px; font-size: 17px; color: var(--muted); pointer-events: none; transition: all .18s ease; }
.cz-field input:focus + label, .cz-field input:not(:placeholder-shown) + label { top: 8px; font-size: 12.5px; font-weight: 700; color: var(--red); }
.cz-field input:hover { border-color: #F2A5A5; }
.cz-field input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgb(230 0 0 / .12); }
.cz-field:focus-within > .ico { color: var(--red); }
.cz-ok { position: absolute; right: 14px; top: 16px; width: 26px; height: 26px; border-radius: 50%; background: #22C55E; color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; opacity: 0; transform: scale(.4); transition: all .2s; pointer-events: none; }
.cz-field.is-valid input { border-color: #22C55E; }
.cz-field.is-valid .cz-ok { opacity: 1; transform: scale(1); }
.cz-field.is-valid > .ico { color: #22C55E; }
.cz-msg { display: none; color: var(--red); font-size: 14px; font-weight: 600; margin: 5px 0 0 4px; }
.cz-field.has-error input { border-color: var(--red); background: #FFF5F5; animation: czShake .3s; }
.cz-field.has-error .cz-msg { display: block; }
@keyframes czShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.cz-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.cz-chip { font: inherit; font-size: 15px; font-weight: 600; padding: 7px 14px; border-radius: 99px; border: 1.5px solid #E4E4E8; background: #fff; color: var(--ink); cursor: pointer; transition: all .15s; }
.cz-chip:hover { border-color: var(--red); color: var(--red); }
.cz-chip.is-active { background: var(--red); border-color: var(--red); color: #fff; }
.cotiza-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--red); color: #fff; font-weight: 800; letter-spacing: .02em; padding: 17px 28px; margin-top: 6px; width: 100%; border-radius: 12px; opacity: .55; transition: opacity .25s, transform .15s, background .2s; }
.cotiza-btn .ico { width: 22px; height: 22px; }
.cotiza-btn.is-ready { opacity: 1; animation: czPulse 1.8s ease-in-out 2; }
.cotiza-btn:hover { background: #C20000; opacity: 1; transform: translateY(-1px); }
@keyframes czPulse { 50% { box-shadow: 0 0 0 10px rgb(230 0 0 / .15); } }
.cz-note { text-align: center; color: var(--muted); font-size: 15px; margin: 0; }
.cz-sent { text-align: center; background: #ECFDF3; color: #14532D; border-radius: 12px; padding: 12px 14px; margin: 0; font-weight: 600; }
.cz-sent[hidden] { display: none; }
.cz-sent a { color: #14532D; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .cz-field.has-error input, .cotiza-btn.is-ready { animation: none; } }
@media (prefers-reduced-motion: reduce) { .cz-modal[open] { animation: none; } }

/* Galerías: 3 elementos grandes por fila */
@media (max-width: 639px) {
  .doc-grid { grid-auto-columns: 80%; }
  .reel-grid { grid-auto-columns: 80%; }
}
@media (min-width: 640px) {
  .doc-grid, .doc-grid-3, .reel-grid, .reel-grid.reel-grid-5 {
    grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto;
    overflow: visible; margin-inline: 0; padding: 0; gap: 28px 24px; scroll-snap-type: none; max-width: none;
  }
}

.contacto { padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 1000px) { .contacto { padding-bottom: 88px; } }

/* Logos de clientes al final, justo encima de Contacto */
.clients-end { padding: 48px 0 56px; background: #fff; }

/* =========================================================
   Páginas de servicio (ITSE, implementación, construcción),
   bloque de servicios de la portada, pie de página y 404.
   ========================================================= */
.page-hero { padding: 28px 0 56px; }
.page-hero h1 { font-size: clamp(2rem, 7vw, 3.3rem); letter-spacing: -0.035em; margin-bottom: 16px; }
.page-hero h1 .hl { color: var(--red); }
.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.breadcrumbs a { text-underline-offset: 3px; }

.prose { max-width: 800px; }
.prose > h2 { font-size: clamp(1.5rem, 4.6vw, 2.1rem); margin: 48px 0 14px; }
.prose > h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); margin-bottom: 14px; }
.prose ul, .prose ol { color: var(--ink-2); margin: 0 0 16px; padding-left: 24px; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--red-dark); font-weight: 600; text-underline-offset: 3px; }
.answer-box { background: #fff; border-left: 4px solid var(--red); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 18px; box-shadow: var(--shadow-sm); }
.answer-box p { margin: 0; color: var(--ink); }

.cert-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 18px; }
.cert-strip figure { margin: 0; }
.cert-strip img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.cert-strip figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

.cta-panel { background: var(--dark); color: var(--on-dark); border-radius: var(--radius-lg); padding: 32px 24px; margin-top: 56px; }
.cta-panel h2 { font-size: clamp(1.4rem, 4.4vw, 1.9rem); }
.cta-panel p { color: var(--on-dark-muted); margin: 10px 0 0; }
.cta-panel .btn-primary { color: #fff; }

.service-cards { display: grid; gap: 14px; }
.service-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color 200ms, transform 200ms var(--ease-out); }
.service-card strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.service-card span { color: var(--muted); font-size: 16px; }
.service-card:active { transform: scale(.985); }

/* Pie de página */
.site-footer { background: var(--dark-2); color: var(--on-dark-muted); padding: 24px 0 calc(92px + env(safe-area-inset-bottom, 0px)); font-size: 13px; line-height: 1.5; border-top: 1px solid var(--dark-line); }
.footer-top { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; text-align: left; }
.footer-logo { width: 36px; height: 36px; flex: none; border-radius: 9px; }
.footer-brand strong { display: block; font-size: 15px; line-height: 1.2; color: #fff; letter-spacing: -.01em; }
.footer-brand small { display: block; white-space: nowrap; font-size: 12px; color: var(--on-dark-muted); }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.footer-nav a { color: #E9E9EC; text-decoration: none; font-weight: 600; font-size: 12.5px; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--dark-line); transition: border-color .18s, background .18s, color .18s, transform .18s var(--ease-out); }
.footer-nav a:active { transform: scale(.96); }
.footer-bottom { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--dark-line); display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.footer-dir, .footer-copy { margin: 0; }
.footer-dir .ico, .footer-contact .ico { width: 14px; height: 14px; vertical-align: -2px; color: #FF5252; }
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-contact a { color: var(--on-dark); text-decoration: none; font-weight: 600; transition: color .15s; }
.footer-contact a:hover, .footer-contact a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .footer-nav a:hover, .footer-nav a:focus-visible { color: #fff; border-color: var(--red); background: rgb(230 0 0 / .14); } }
@media (min-width: 1000px) {
  .site-footer { padding-bottom: 20px; }
  .site-footer .container { padding-right: 84px; }
  .footer-top { flex-direction: row; justify-content: space-between; text-align: left; gap: 24px; }
  .footer-nav { gap: 6px; }
  .footer-nav a { padding: 5px 11px; font-size: 12px; white-space: nowrap; }
  .footer-nav { justify-content: flex-end; }
  .footer-bottom { flex-direction: row; justify-content: space-between; gap: 24px; }
}


@media (min-width: 640px) {
  .cert-strip { grid-template-columns: repeat(3, 1fr); }
  .cert-strip-5 { grid-template-columns: repeat(5, 1fr); }
  .service-cards { grid-template-columns: repeat(3, 1fr); }
  .cta-panel { padding: 44px 40px; }
}
@media (hover: hover) and (pointer: fine) {
  .service-card:hover { border-color: var(--ink); transform: translateY(-2px); }
}

/* Servicios sobre fondo negro */
.section-dark .service-card { background: var(--dark-2); border-color: var(--dark-line); box-shadow: none; color: var(--on-dark); }
.section-dark .service-card strong { color: #fff; }
.section-dark .service-card span { color: var(--on-dark-muted); }
@media (hover: hover) and (pointer: fine) { .section-dark .service-card:hover { border-color: var(--red); background: #232327; transform: translateY(-3px); } }

/* Videos del mismo tamaño que las imágenes de licencias y certificados */
.reel-media { aspect-ratio: 560 / 788; border-radius: var(--radius); border: 1px solid var(--line); background: #000; box-shadow: var(--shadow-sm); }
.section-dark .reel-media { border-color: var(--dark-line); }
.reel-media video { object-fit: contain; background: #000; }
@media (hover: hover) and (pointer: fine) { .reel:not(.is-playing):hover .reel-media video { transform: none; } }

/* Contáctenos: estado, botón principal con ícono y brillo */
.cta-estado { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7EE2A0; background: rgb(37 211 102 / .12); border: 1px solid rgb(37 211 102 / .3); }
.cta-punto { width: 8px; height: 8px; border-radius: 50%; background: #25D366; animation: cta-pulso 2s ease-out infinite; }
@keyframes cta-pulso { 0% { box-shadow: 0 0 0 0 rgb(37 211 102 / .6); } 70%, 100% { box-shadow: 0 0 0 8px rgb(37 211 102 / 0); } }
.contacto-cta h2 { font-size: clamp(1.6rem, 4vw, 2rem); margin-bottom: 12px; }
.contacto-cta p strong { color: #fff; }
.contacto-cta .btn-cta { position: relative; overflow: hidden; justify-content: space-between; gap: 12px; padding: 12px 18px 12px 12px; text-align: left; box-shadow: 0 14px 32px -12px rgb(37 211 102 / .65); }
.btn-cta-ico { flex: none; width: 42px; height: 42px; border-radius: 50%; background: #0B2915; color: var(--wa); display: grid; place-items: center; }
.btn-cta-ico .ico { width: 22px; height: 22px; }
.btn-cta-txt { flex: 1; line-height: 1.2; }
.btn-cta .btn-cta-flecha { width: 20px; height: 20px; flex: none; transition: transform .2s var(--ease-out); }
.btn-cta::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .38) 50%, transparent 65%); transform: translateX(-130%); animation: cta-brillo 4.5s ease-in-out 1.5s infinite; }
@keyframes cta-brillo { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@media (hover: hover) { .btn-cta:hover .btn-cta-flecha { transform: translateX(5px); } .btn-cta:hover .btn-cta-ico { transform: rotate(-8deg) scale(1.06); } }
.btn-cta .btn-cta-ico { transition: transform .2s var(--ease-out); }
@media (prefers-reduced-motion: reduce) { .btn-cta::after, .cta-punto { animation: none; } }

.contacto-cta .contacto-redes-t { margin: 28px 0 10px; }

/* Contáctenos: botón en dos líneas y redes en una franja propia */
.contacto-cta .btn-cta { justify-content: flex-start; padding-right: 16px; }
.btn-cta-txt { font-size: 15px; letter-spacing: .02em; }
.contacto-seguir { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--dark-line); display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.contacto-cta .contacto-seguir .contacto-redes-t { margin: 0; }
.contacto-seguir .contacto-redes a { width: 46px; height: 46px; }

/* Encabezado: el celular ocupa toda la altura del bloque de texto */
@media (min-width: 1000px) {
  .hero-grid { align-items: stretch; }
  .hero-visual { display: flex; align-self: stretch; max-height: 780px; margin: 0 auto; }
  .hero-visual .phone { flex: 1; display: flex; min-width: 0; }
  .hero-visual .hero-video { flex: 1; min-width: 0; height: auto; aspect-ratio: auto; }
}

/* ===== Transiciones entre secciones ===== */
/* Las secciones se apilan: cada una sube sobre la anterior con el borde superior redondeado. */
main > .section, main > .promo-band, main > .clients {
  position: relative;
  margin-top: -28px;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -16px 36px -22px rgb(0 0 0 / .28);
}
main > .clients { background: #fff; }

/* La línea del título crece al aparecer la sección */
.js .reveal:not(.is-visible) > .eyebrow::before,
.js .section-head.reveal:not(.is-visible) .eyebrow::before { width: 0; }
.eyebrow::before { transition: width 600ms var(--ease-out) 250ms; }

/* Tarjetas que entran escalonadas */
.js .tr-hijo { opacity: 0; transform: translateY(26px) scale(.97); }
.js .tr-visto .tr-hijo {
  opacity: 1; transform: none;
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* Puntos de navegación entre secciones (solo escritorio) */
.puntos-nav { display: none; }
@media (min-width: 1100px) {
  .puntos-nav { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
  .puntos-nav a { position: relative; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
  .puntos-nav a::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: rgb(110 110 120 / .6); box-shadow: 0 0 0 2px rgb(255 255 255 / .85), 0 1px 4px rgb(0 0 0 / .35); transition: transform .25s var(--ease-out), background .2s, height .25s var(--ease-out), border-radius .25s; }
  .puntos-nav a:hover::before { background: var(--red); transform: scale(1.35); }
  .puntos-nav a.is-active::before { background: var(--red); width: 9px; height: 22px; border-radius: 6px; }
  .puntos-nav a::after { content: attr(data-label); position: absolute; right: 30px; top: 50%; transform: translate(6px, -50%); background: #111113; color: #fff; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .2s var(--ease-out); }
  .puntos-nav a:hover::after, .puntos-nav a:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
  .puntos-nav a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  main > .section, main > .promo-band, main > .clients { margin-top: 0; }
  .js .tr-hijo { opacity: 1; transform: none; }
  .eyebrow::before { transition: none; }
}
