/* =====================================================================
   MAGIA DIGITAL — Hoja de estilos
   ---------------------------------------------------------------------
   Contenido:
     1. Tokens y reset
     2. Base y utilidades
     3. Botones, etiquetas y enlaces
     4. Navbar + menú desplegable + panel móvil
     5. Hero
     6. Barra de confianza
     7. Servicios (bento grid)
     8. Productos personalizados
     9. Cómo funciona
     10. Portafolio + filtros
     11. Por qué elegirnos
     12. Sección oscura de impacto
     13. Testimonios
     14. Para quién trabajamos
     15. Preguntas frecuentes
   16. CTA + formulario
   17. Newsletter (suscripción)
   18. Footer
   19. Elementos flotantes (WhatsApp, volver arriba, lightbox)
   20. Animaciones al hacer scroll
   21. Responsive fino y accesibilidad
   ===================================================================== */

/* ---------- 1. TOKENS Y RESET ------------------------------------- */
:root {
  /* Paleta de marca — muestreada del logotipo original.
     Estos cuatro tonos son la identidad: si el logotipo cambia, se
     actualizan aquí y el sitio entero sigue la misma paleta. */
  --turquesa: #20B7DA;   /* cian del logo    */
  --magenta:  #E6268D;   /* fucsia del logo  */
  --violeta:  #88459F;   /* violeta del logo */
  --indigo:   #29114B;   /* tinta del logo   */
  --crema:    #FCF5EC;   /* fondo del logo   */

  /* Color de énfasis. Sustituye al amarillo #FFD60A.
     El turquesa es el único tono que conserva la relación "superficie de
     color + texto #111111" del diseño original: 7.9:1 -> WCAG AA. */
  --acento:        #20B7DA;   /* superficies, iconos, franjas */
  --acento-fuerte: #0E9BBE;   /* hover/active: se oscurece para separarse del turquesa */
  --acento-tenue:  #E2F6FC;   /* lavado para fondos suaves */

  /* Acento secundario (la "chispa" del logo). El fucsia puro brilla sobre
     fondo oscuro pero sobre blanco baja a 4.2:1, así que hay dos variantes:
     --brillo sobre superficies oscuras y --brillo-texto sobre claro. */
  --brillo:       #EE3A9B;   /* fucsia sobre fondo oscuro (5.0:1) */
  --brillo-texto: #B01263;   /* fucsia como texto/ícono sobre claro (6.7:1) */

  /* Neutros */
  --negro: #111111;
  --blanco: #FFFFFF;
  --gris-claro: #F7F4F2;   /* superficie suave, con el calor de la crema del logo */
  --gris-medio: #6B6B76;

  /* Fondo de las secciones ya oscuras (hero, impacto, pie). Es el índigo
     del logo, un punto más profundo para que el texto claro domine. */
  --noche: #1B0B33;

  /* Derivados */
  --borde: #E4E4E9;
  --negro-70: rgba(17, 17, 17, .70);
  --negro-80: rgba(17, 17, 17, .80);
  /* Tinta de contornos: bordes gruesos y sombras duras (separada del
     color de texto para poder suavizarla en el modo oscuro). */
  --tinta: #29114B;

  /* Cinta de marca: la onda del logotipo (cian -> fucsia -> violeta). */
  --cinta: linear-gradient(90deg, var(--turquesa) 0%, var(--magenta) 50%, var(--violeta) 100%);

  /* Tipografía */
  --font-titulo: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cuerpo: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Escala fluida */
  --fs-hero: clamp(2.4rem, 1.35rem + 5.4vw, 5.25rem);
  --fs-h2: clamp(1.75rem, 1.18rem + 2.6vw, 3rem);
  --fs-h3: clamp(1.1rem, 1rem + .45vw, 1.3rem);
  --fs-lead: clamp(1rem, .96rem + .3vw, 1.15rem);
  --fs-body: clamp(.97rem, .94rem + .16vw, 1.05rem);
  --fs-small: .875rem;

  /* Forma */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-pill: 999px;

  /* Sombras */
  --sombra-sm: 0 1px 2px rgba(17, 17, 17, .05), 0 4px 12px rgba(17, 17, 17, .05);
  --sombra-md: 0 6px 22px rgba(17, 17, 17, .08);
  --sombra-lg: 0 18px 44px rgba(17, 17, 17, .12);
  --sombra-dura: 4px 4px 0 var(--tinta);

  /* Layout */
  --ancho: 1180px;
  --nav-h: 80px;        /* barra de navegación (móvil) */
  --transicion: .22s cubic-bezier(.2, .7, .3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-cuerpo);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--negro);
  background: var(--blanco);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Fallback para navegadores sin soporte de `overflow: clip` */
@supports not (overflow: clip) {
  html,
  body { overflow-x: hidden; }
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-titulo);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

img, svg, video { display: block; max-width: 100%; }
img, video { height: auto; }

/* El atributo [hidden] siempre gana (evita que display:grid/flex lo anule) */
[hidden] { display: none !important; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a { color: inherit; }

/* Foco visible y consistente (accesibilidad) */
:focus-visible {
  outline: 3px solid var(--tinta);
  outline-offset: 3px;
  border-radius: 6px;
}

.impact :focus-visible,
.footer :focus-visible,
.wa-float:focus-visible { outline-color: var(--acento); }

/* Sprite de íconos SVG: oculto pero disponible */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- 2. BASE Y UTILIDADES ---------------------------------- */
.container {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, .9rem + 1.6vw, 2rem);
  min-width: 0;
}
.container--narrow { max-width: 820px; }

.section { padding: clamp(3.5rem, 2.6rem + 4.4vw, 6.5rem) 0; position: relative; overflow-x: clip; }
.section--gray { background: var(--gris-claro); }

/* Separador con curva suave entre secciones */
.section--curve { margin-top: -1px; }
.section--curve::before {
  content: "";
  position: absolute;
  inset: -46px 0 auto 0;
  height: 48px;
  background: var(--gris-claro);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1200v18c-200 26-420 30-600 14S200 6 0 30Z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1200v18c-200 26-420 30-600 14S200 6 0 30Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
}

.section__head {
  max-width: 720px;
  margin: 0 auto clamp(2rem, 1.6rem + 2vw, 3.25rem);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .85rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris-medio);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--cinta);
}
.eyebrow--dark { color: rgba(255, 255, 255, .72); }

.section__title { font-size: var(--fs-h2); margin-bottom: .6rem; }
.section__lead { font-size: var(--fs-lead); color: var(--gris-medio); }

/* Resalte del hero: la palabra clave va en turquesa sobre el fondo oscuro
   del video. Contraste turquesa #20B7DA sobre #1B0B33 = 6.9:1 -> WCAG AA.
   ⚠️ No lo pongas encima del turquesa sólido (se pierde) ni del fucsia. */
.hl {
  color: var(--acento);
  background-color: transparent; /* anula el fondo por defecto de <mark> */
  padding-inline: .06em;
}

/* Variante con marcador turquesa (texto oscuro) para fondos claros.
   Contraste #111111 sobre turquesa #20B7DA = 7.9:1 -> cumple AA. */
.hl--marker {
  color: var(--negro);
  background-image: linear-gradient(to top, var(--acento) 0 42%, transparent 42%);
  background-repeat: no-repeat;
}

/* ---------- 3. BOTONES, ETIQUETAS Y ENLACES ----------------------- */
.btn {
  --shift: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-cuerpo);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  padding: .95rem 1.5rem;
  border-radius: var(--r-sm);
  border: 2px solid var(--tinta);
  box-shadow: var(--sombra-dura);
  transition: transform var(--transicion), box-shadow var(--transicion), background-color var(--transicion);
}
.btn svg { width: 18px; height: 18px; }

/* Botón principal: turquesa de marca con texto casi negro (7.9:1) */
.btn--primary {
  background: var(--acento);
  color: var(--negro);
}
.btn--primary:hover { background: var(--acento-fuerte); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--tinta); }
.btn--primary:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--tinta); }

/* Botón secundario: contorno blanco sobre fondo oscuro */
.btn--ghost {
  background: rgba(255, 255, 255, .08);
  color: var(--blanco);
  border-color: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: var(--blanco);
  color: var(--negro);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(255, 255, 255, .5);
}
.btn--ghost:active { transform: translate(3px, 3px); box-shadow: none; }

.btn--lg { padding: 1.1rem 1.9rem; font-size: 1.02rem; }
.btn--sm { padding: .7rem 1.15rem; font-size: .9rem; box-shadow: 3px 3px 0 var(--tinta); }
.btn--sm:hover { box-shadow: 5px 5px 0 var(--tinta); }
.btn--sm:active { box-shadow: 1px 1px 0 var(--tinta); }
.btn--block { width: 100%; }

/* Etiqueta tipo sticker */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--acento);
  color: var(--negro);
  border: 2px solid var(--tinta);
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--tinta);
  padding: .35rem .8rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  width: fit-content;
}
.sticker svg { width: 14px; height: 14px; }
.sticker--hero { transform: rotate(-2deg); margin-bottom: 1rem; }
.sticker--tag { transform: rotate(-3deg); margin-bottom: .85rem; }
.sticker--alt { transform: rotate(2.5deg); }

/* Enlace con flecha */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  color: var(--negro);
  border-bottom: 2px solid var(--acento);
  padding-bottom: 2px;
  transition: gap var(--transicion), border-color var(--transicion);
}
.link-arrow svg { width: 17px; height: 17px; transition: transform var(--transicion); }
.link-arrow:hover { gap: .75rem; border-color: var(--tinta); }
.link-arrow:hover svg { transform: translateX(2px); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transicion), transform var(--transicion);
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn--wa { color: var(--negro); background: var(--acento); border-color: var(--tinta); box-shadow: 3px 3px 0 var(--tinta); }
.icon-btn--wa:hover { background: var(--blanco); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--tinta); }
.icon-btn--wa:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--tinta); }

/* ---------- 4. NAVBAR --------------------------------------------- */
/* Franja de marca de 3px en el borde inferior: la cinta del logotipo
   aparece en cuanto la barra se despega del inicio. */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--blanco);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transicion), border-color var(--transicion);
}
.nav.is-stuck {
  box-shadow: 0 6px 24px rgba(17, 17, 17, .09);
  border-bottom-color: var(--borde);
  background-image: var(--cinta);
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: bottom left;
}

/* Con el menú móvil abierto el body se bloquea con overflow:hidden
   (ver body.is-locked) y eso rompe el position:sticky: la barra se
   quedaría en su posición del documento y desaparecería de la vista
   al haber scroll, dejando el botón de cierre inalcanzable.
   Fijarla al viewport mientras el panel está abierto garantiza que
   la barra (logo + hamburguesa) siempre quede visible y clicable.
   Al cerrar se vuelve a sticky sin salto visual (ya estaba en top:0). */
.nav.is-open {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

.nav__inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-width: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--negro);
  min-width: 0;
  flex: none;
}
/* El logotipo ya trae "MAGIA DIGITAL" grabado en la imagen, así que no
   hay texto HTML al lado: solo se fija el ALTO y el ancho sale solo de la
   proporción real del recorte (1.623:1).
   Se cargan dos versiones y el tema decide cuál se ve:
   · --on-light: tinta índigo sobre fondo claro.
   · --on-dark : variante con la tinta aclarada (acento intacto). */
.logo__img {
  height: 52px;
  width: auto;
  max-width: none;
  display: block;
}
.logo__img--on-dark { display: none; }
html[data-theme="dark"] .logo__img--on-light { display: none; }
html[data-theme="dark"] .logo__img--on-dark { display: block; }
/* Logo del footer */
.logo__full { width: 190px; height: auto; display: block; }
.logo--footer { color: var(--blanco); }

.nav__menu {
  position: fixed;
  inset: var(--nav-h) 0 0 auto;
  width: min(84vw, 360px);
  background: var(--blanco);
  border-left: 1px solid var(--borde);
  box-shadow: var(--sombra-lg);
  padding: 1.4rem 1.25rem 2.5rem;
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform .3s cubic-bezier(.2, .7, .3, 1);
  visibility: hidden;
}
.nav__menu.is-open { transform: none; visibility: visible; }

.nav__list { display: flex; flex-direction: column; gap: .15rem; }
.nav__link {
  display: flex;
  align-items: center;
  gap: .4rem;
  width: 100%;
  padding: .85rem .6rem;
  font-size: .98rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--negro);
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: left;
  transition: background-color var(--transicion), color var(--transicion);
}
.nav__link:hover,
.nav__link[aria-current="true"] { background: var(--gris-claro); }
.nav__chev { width: 16px; height: 16px; transition: transform var(--transicion); }
.nav__link[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

.nav__actions--mobile { margin-top: 1.5rem; }
.nav__actions--desktop { display: none; }
.nav__mobile-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.nav__burger { color: var(--negro); }
.nav__burger-close { display: none; }
.nav.is-open .nav__burger-open { display: none; }
.nav.is-open .nav__burger-close { display: block; }

.nav-scrim {
  position: fixed;
  /* Empieza debajo de la barra (no en inset:0) para que el velo nunca
     pueda cubrir la cabecera ni interceptar clics en la hamburguesa. */
  inset: var(--nav-h) 0 0 0;
  z-index: 80;
  background: rgba(17, 17, 17, .5);
  opacity: 0;
  transition: opacity var(--transicion);
}
.nav-scrim.is-on { opacity: 1; }

/* Desplegable de servicios */
.dropdown { padding: .25rem 0 .6rem .6rem; }
.dropdown[hidden] { display: none; }
.dropdown__list { display: flex; flex-direction: column; gap: .1rem; }
.dropdown__link {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .65rem .6rem;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--negro);
  transition: background-color var(--transicion);
}
.dropdown__link:hover { background: var(--acento-tenue); }
.dropdown__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--gris-claro);
  color: var(--negro);
}
.dropdown__link:hover .dropdown__ico { background: var(--acento); }
.dropdown__ico svg { width: 18px; height: 18px; }
.dropdown__link strong { display: block; font-size: .93rem; font-weight: 600; line-height: 1.3; }
.dropdown__link small { display: block; font-size: .8rem; color: var(--gris-medio); line-height: 1.35; }

/* ---------- 5. HERO ----------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 1.8rem + 4vw, 4.5rem) 0 clamp(4rem, 3rem + 3vw, 5.5rem);
  overflow: hidden;
  color: var(--blanco);
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -2; }
/* La imagen y el video se apilan en la misma celda; el video queda encima */
.hero__media > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__poster { display: block; }
/* En escritorio se prioriza el video; en móvil solo la imagen estática */
.hero__video { display: none; }
.hero--no-video .hero__video { display: none; }
.hero--no-video .hero__poster { display: block; }

/* Velo del hero: índigo de marca (no negro neutro) para que el video se
   sentiga parte de la identidad y el turquesa del texto destaque. */
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(27, 11, 51, .68), rgba(27, 11, 51, .78)),
    linear-gradient(to right, rgba(27, 11, 51, .76), rgba(27, 11, 51, .34));
}

.hero__content { position: relative; max-width: 620px; min-width: 0; }

/* ----- Hero NUEVO: fondo industrial + collage de maquinaria real ----- */
.hero--nuevo {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(230, 38, 141, .22), transparent 60%),
    radial-gradient(800px 520px at -10% 20%, rgba(32, 183, 218, .20), transparent 60%),
    var(--noche);
  flex-direction: column;
  justify-content: flex-start;
  min-height: auto;
  /* La barra es sticky (ocupa su lugar en el flujo), así que NO se suma
     --nav-h aquí: ese doble conteo era el aire gigante arriba en QHD y móvil. */
  padding: clamp(1.25rem, .75rem + 2vw, 2.75rem) 0 clamp(3.2rem, 2.6rem + 2vw, 4.5rem);
}
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.hero__blob--a { width: 420px; height: 420px; left: -140px; top: -120px; background: rgba(32, 183, 218, .35); }
.hero__blob--b { width: 480px; height: 480px; right: -160px; top: 8%; background: rgba(230, 38, 141, .30); }
.hero__rejilla {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 75% at 50% 35%, #000 30%, transparent 100%);
}
.hero__cinta { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--cinta); }
.hero__inner {
  position: relative; z-index: 1;
  display: grid; gap: clamp(1.5rem, 1.1rem + 2.5vw, 3.5rem);
  align-items: center;
  padding-top: 0;
}
.hero__text { font-size: var(--fs-lead); color: rgba(255,255,255,.88); max-width: 54ch; margin-bottom: 1.7rem; }
.hero--nuevo .hero__title .hl { white-space: nowrap; }
.hero__visual { position: relative; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin: 0 .4rem; padding-top: 1.4rem; padding-bottom: 1.5rem; }
.hero__foto {
  position: relative; margin: 0; overflow: hidden;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: var(--r-lg);
  box-shadow: 7px 7px 0 rgba(32,183,218,.9), 7px 7px 24px rgba(0,0,0,.45);
  background: #241243; min-height: 150px;
}
.hero__foto img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.hero__foto:hover img { transform: scale(1.05); }
.hero__foto--main { grid-column: 1 / -1; height: clamp(300px, 60vw, 430px); }
.hero__foto--b, .hero__foto--c { height: clamp(140px, 28vw, 190px); }
.hero__foto--b { transform: rotate(-1.5deg); }
.hero__foto--c { transform: rotate(1.5deg); }
.hero__foto--main img { animation: heroZoom 14s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero__cap {
  position: absolute; left: .8rem; bottom: .8rem; right: .8rem;
  display: flex; flex-direction: column; gap: .1rem;
  padding: .6rem .8rem; border-radius: var(--r-sm);
  background: rgba(27,11,51,.78); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-size: .85rem;
}
.hero__cap strong { font-size: .95rem; }
.hero__cap span { color: rgba(255,255,255,.75); font-size: .78rem; }
.hero__live {
  position: absolute; top: .8rem; left: .8rem;
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--magenta); color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: .4rem .7rem; border-radius: 999px;
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 3px 3px 0 rgba(0,0,0,.45);
}
.hero__live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: heroPing 1.6s ease-in-out infinite; }
@keyframes heroPing { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.7); } }
.hero__tag {
  position: absolute; left: .7rem; bottom: .7rem;
  background: var(--acento); color: var(--negro);
  font-size: .75rem; font-weight: 800;
  padding: .3rem .6rem; border-radius: 999px;
  border: 2px solid var(--tinta);
  box-shadow: 3px 3px 0 rgba(0,0,0,.5);
}
.hero__badge {
  position: absolute; margin: 0; z-index: 2;
  display: flex; align-items: center; gap: .6rem;
  background: var(--blanco); color: var(--negro);
  border: 2px solid var(--tinta); border-radius: var(--r-md);
  box-shadow: var(--sombra-dura);
  padding: .6rem .8rem; font-size: .8rem; line-height: 1.25;
}
.hero__badge strong { font-size: 1.05rem; }
.hero__badge svg { width: 30px; height: 30px; flex: none; padding: 6px; border-radius: 8px; background: var(--acento); color: var(--negro); }
.hero__badge--top { top: -1.15rem; right: 4%; transform: rotate(5deg); }
.hero__badge--top strong { font-size: 1.5rem; color: var(--brillo-texto); }
.hero__badge--bottom { bottom: -1.25rem; left: 2%; transform: rotate(-3deg); }
.hero__badge--bottom span strong { display: block; font-size: .85rem; }
/* La tira es flex con "safe center": centrada cuando cabe, con scroll
   sin recortar la izquierda cuando desborda. El track ya no usa
   width:fit-content + margin auto (esa combinación falla al haber
   overflow-x:auto) y lleva aire vertical extra para que el relieve de
   la miniatura activa nunca se corte arriba (overflow-x:auto recorta
   el eje vertical). */
.hero__tira { position: relative; z-index: 1; width: 100%; margin-top: clamp(1.1rem, 1rem + 1.2vw, 1.8rem); padding-inline: var(--padx); box-sizing: border-box; display: flex; justify-content: safe center; }
.hero__tira-track { display: flex; gap: .7rem; overflow-x: auto; max-width: 100%; padding: 1rem .3rem 1.25rem; scrollbar-width: none; }
.hero__tira-track::-webkit-scrollbar { display: none; }
.hero__thumb {
  flex: none; width: 128px; height: 84px; padding: 0; cursor: pointer;
  border: 2px solid rgba(255,255,255,.35); border-radius: 12px; overflow: hidden;
  background: #241243;
  transition: transform var(--transicion), border-color var(--transicion), box-shadow var(--transicion);
}
.hero__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero__thumb:hover { transform: translateY(-3px); border-color: #fff; }
.hero__thumb.is-active { border-color: var(--acento); box-shadow: 0 0 0 2px var(--acento), 4px 4px 0 rgba(0,0,0,.5); transform: translateY(-3px); }
.hero__foto--swap img { animation: heroSwap .55s ease; }
@keyframes heroSwap { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
/* El hero nuevo ya es oscuro: en modo oscuro se mantiene igual */
html[data-theme="dark"] .hero--nuevo { color: #fff; }
/* ---------- BANDA MARQUESINA (ticker) ---------- */
.ticker {
  background: var(--acento);
  border-block: 2px solid var(--negro);
  overflow: hidden;
  padding: .8rem 0;
}
.ticker__track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: tickerScroll 42s linear infinite;
}
.ticker__group {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding-right: 1.6rem;
  font-family: var(--font-titulo);
  font-weight: 800;
  font-size: clamp(.92rem, .85rem + .4vw, 1.1rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--negro);
  white-space: nowrap;
}
.ticker__group svg { width: 17px; height: 17px; flex: none; }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }
.ticker:hover .ticker__track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .hero__foto--main img, .hero__live-dot, .hero__foto--swap img { animation: none; }
  .ticker__track { animation: none; }
}
/* Hero compacto en móvil: menos aire arriba y bloque de texto más corto */
@media (max-width: 767px) {
  .hero--nuevo { padding-top: 1rem; }
  .hero__inner { gap: 1.25rem; }
  .hero__title { margin-bottom: .6rem; }
  .hero__text { margin-bottom: 1rem; }
  .hero__buttons { margin-bottom: 1rem; }
  .hero__facts { padding-top: .8rem; gap: .6rem 1rem; }
  .hero__fact { font-size: .88rem; }
  .hero__fact-ico { width: 32px; height: 32px; padding: 7px; }
  .hero__foto--main { height: clamp(230px, 58vw, 320px); }
  .hero__thumb { width: 112px; height: 76px; }
  /* Caption compacto en móvil: una sola línea, más pequeño, para que la
     foto principal se aprecie mejor */
  .hero__cap { left: .55rem; right: auto; bottom: .55rem; flex-direction: row; align-items: baseline; gap: .45rem; padding: .35rem .6rem; font-size: .72rem; max-width: calc(100% - 1.1rem); }
  .hero__cap strong { font-size: .78rem; white-space: nowrap; }
  .hero__cap span { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
/* QHD y pantallas anchas: proporciones contenidas, sin estirar */
@media (min-width: 1600px) {
  .hero--nuevo .hero__inner { gap: 4rem; }
  .hero__foto--main { height: 470px; }
  .hero__foto--b, .hero__foto--c { height: 205px; }
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .9rem;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.hero__text {
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, .88);
  max-width: 560px;
  margin-bottom: 1.7rem;
}

.hero__buttons { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }

.hero__facts {
  display: grid;
  gap: .9rem 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: 1.25rem;
  min-width: 0;
}
.hero__fact { display: flex; align-items: center; gap: .6rem; font-size: .95rem; color: rgba(255, 255, 255, .85); }
.hero__fact strong { color: var(--blanco); font-weight: 600; }
.hero__fact-ico {
  flex: none;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  color: var(--acento);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  translate: -50% 0;
  width: 26px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}
.hero__scroll-line { width: 3px; height: 9px; border-radius: 2px; background: var(--acento); animation: scrollDot 1.9s ease-in-out infinite; }
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  55% { transform: translateY(14px); opacity: .25; }
}

/* Blobs decorativos — posición original de desktop; el desborde lo
   contienen los padres con overflow (hero/section/cta), no moviendo el blob */
.blob { position: absolute; z-index: -1; pointer-events: none; max-width: 100%; }
.blob--hero { width: min(70vw, 460px); right: -8%; top: 8%; opacity: .9; }
.blob--section { width: min(60vw, 340px); right: -10%; top: 6%; }
.blob--cta { width: min(60vw, 380px); left: -12%; bottom: -8%; }
/* hero e impact ya tienen overflow:hidden y contienen sus blobs.
   Solo se contiene el eje X en el resto para no recortar nada vertical. */
.trust,
.cta,
.footer { overflow-x: clip; }

/* ---------- 6. BARRA DE CONFIANZA -------------------------------- */
.trust {
  background: var(--blanco);
  padding: clamp(2.25rem, 1.8rem + 2vw, 3.5rem) 0;
  border-bottom: 1px solid var(--borde);
}
.trust__title {
  text-align: center;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gris-medio);
  margin-bottom: 1.6rem;
}
.trust__logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1rem 2rem;
  margin-bottom: 2.2rem;
}
/* PLACEHOLDER: nombres de cliente; se reemplazan por logos reales */
.trust__logo {
  font-family: var(--font-titulo);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--negro);
  opacity: .42;
  filter: grayscale(1);
  transition: opacity var(--transicion);
  white-space: nowrap;
}
.trust__logo:hover { opacity: .8; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--borde);
  padding-top: 1.8rem;
  text-align: center;
}
.stat__num {
  display: block;
  font-family: var(--font-titulo);
  font-weight: 800;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.4rem);
  letter-spacing: -.03em;
}
.stat__label { font-size: .86rem; color: var(--gris-medio); }

/* ---------- 7. SERVICIOS (BENTO GRID) ---------------------------- */
.bento {
  display: grid;
  gap: clamp(1rem, .8rem + .8vw, 1.5rem);
  grid-template-columns: 1fr;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sombra-sm);
  transition: transform var(--transicion), box-shadow var(--transicion), border-color var(--transicion);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sombra-md); border-color: rgba(17, 17, 17, .18); }

.card__media { position: relative; overflow: hidden; background: var(--gris-claro); }
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}
.card:hover .card__media img { transform: scale(1.05); }

.card__body { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: 1.35rem 1.4rem 1.5rem; flex: 1; }
.card__ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: .7rem;
  border-radius: 12px;
  background: var(--gris-claro);
  color: var(--negro);
}
.card__ico svg { width: 22px; height: 22px; }
.card__title { font-size: var(--fs-h3); margin-bottom: .35rem; }
.card__text { font-size: .95rem; color: var(--gris-medio); margin-bottom: 1rem; }
.card .link-arrow { margin-top: auto; }

/* ---------- 8. PRODUCTOS PERSONALIZADOS -------------------------- */
.grid-products {
  display: grid;
  gap: clamp(1rem, .8rem + .8vw, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  min-width: 0;
}
.product {
  display: flex;
  flex-direction: column;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--r-md);
  padding: 1rem 1rem 1.15rem;
  box-shadow: var(--sombra-sm);
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.product:hover { transform: translateY(-6px); box-shadow: var(--sombra-md); }
.product__media { border-radius: var(--r-sm); overflow: hidden; margin-bottom: 1rem; background: var(--gris-claro); }
.product__media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .3, 1); }
.product:hover .product__media img { transform: scale(1.05); }
.product__title { font-size: 1.08rem; margin-bottom: .3rem; }
.product__text { font-size: .9rem; color: var(--gris-medio); margin-bottom: 1rem; }
.product .btn { margin-top: auto; }

/* ---------- 9. CÓMO FUNCIONA ------------------------------------- */
.steps {
  display: grid;
  gap: clamp(1.4rem, 1rem + 1.6vw, 2rem);
  grid-template-columns: 1fr;
  position: relative;
}
.step { position: relative; padding-top: .5rem; }
.step__num {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: .9rem;
  border-radius: 14px;
  background: var(--acento);
  border: 2px solid var(--tinta);
  box-shadow: 3px 3px 0 var(--tinta);
  font-family: var(--font-titulo);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--negro);
}
.step__title { font-size: 1.12rem; margin-bottom: .35rem; }
.step__text { font-size: .95rem; color: var(--gris-medio); }

/* ---------- 10. PORTAFOLIO --------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  margin-bottom: clamp(1.5rem, 1.2rem + 1vw, 2.2rem);
}
.filter {
  font-family: var(--font-cuerpo);
  font-weight: 500;
  font-size: .9rem;
  padding: .55rem 1.05rem;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--borde);
  background: var(--blanco);
  color: var(--negro);
  cursor: pointer;
  transition: background-color var(--transicion), border-color var(--transicion), transform var(--transicion);
}
.filter:hover { border-color: var(--tinta); background: var(--acento-tenue); transform: translateY(-2px); }
.filter.is-active {
  background: var(--acento);
  border-color: var(--tinta);
  color: var(--negro);
  font-weight: 600;
  box-shadow: 2px 2px 0 var(--tinta);
}

.gallery {
  display: grid;
  gap: clamp(.9rem, .7rem + .7vw, 1.35rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  min-width: 0;
}
.shot { transition: opacity .3s ease, transform .3s ease; }
.shot.is-hidden { display: none; }
.shot__btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--negro);
  cursor: pointer;
  box-shadow: var(--sombra-sm);
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.shot__btn img { width: 100%; aspect-ratio: 9 / 7; object-fit: cover; transition: transform .55s cubic-bezier(.2, .7, .3, 1); }
.shot__btn:hover { transform: translateY(-5px); box-shadow: var(--sombra-md); }
.shot__btn:hover img { transform: scale(1.06); }
.shot__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(17, 17, 17, .88) 0%, rgba(17, 17, 17, .2) 42%, transparent 70%);
  opacity: .92;
}
.shot__meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  padding: 1rem 1.05rem;
  color: var(--blanco);
  text-align: left;
}
.shot__meta strong { display: block; font-family: var(--font-titulo); font-weight: 700; font-size: 1rem; line-height: 1.25; }
.shot__meta em {
  display: inline-block;
  margin-top: .4rem;
  font-style: normal;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--negro);
  background: var(--acento);
  border-radius: var(--r-pill);
  padding: .18rem .6rem;
}
.gallery__empty { text-align: center; color: var(--gris-medio); padding: 2.5rem 0; }

/* ---------- 11. POR QUÉ ELEGIRNOS -------------------------------- */
.grid-why {
  display: grid;
  gap: clamp(1rem, .8rem + .9vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  min-width: 0;
}
.why {
  padding: 1.75rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--gris-claro);
  transition: transform var(--transicion), background-color var(--transicion);
}
.why:hover { transform: translateY(-5px); background: var(--blanco); box-shadow: var(--sombra-md); }
.why__ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  border-radius: 14px;
  background: var(--acento);
  border: 2px solid var(--tinta);
  box-shadow: 3px 3px 0 var(--tinta);
  color: var(--negro);
}
.why__ico svg { width: 25px; height: 25px; }
.why__title { font-size: 1.1rem; margin-bottom: .35rem; }
.why__text { font-size: .93rem; color: var(--gris-medio); }

/* ---------- 12. SECCIÓN OSCURA DE IMPACTO ------------------------ */
.impact {
  position: relative;
  overflow: hidden;
  background: var(--noche);
  color: var(--blanco);
  padding: clamp(3.5rem, 2.6rem + 4.4vw, 6.5rem) 0;
}
.impact__inner { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 3.5rem); align-items: center; }
.impact__title { font-size: var(--fs-h2); margin-bottom: 1rem; text-wrap: balance; }
.impact__title .hl { border-radius: 4px; }
/* En la sección oscura la frase va con marcador turquesa y texto casi
   negro (7.9:1): mantiene el acento sin perder legibilidad. */
.impact__title .hl--dark {
  color: var(--negro);
  background-color: var(--acento);
  background-image: none;
  padding: .02em .18em;
  border-radius: 6px;
}
.impact__text { color: rgba(255, 255, 255, .78); max-width: 54ch; margin-bottom: 1.6rem; }
.impact__list { display: grid; gap: .65rem; margin-bottom: 2.2rem; }
.impact__list li { display: flex; align-items: center; gap: .6rem; font-size: .96rem; color: rgba(255, 255, 255, .88); }
.impact__list svg { flex: none; width: 20px; height: 20px; color: var(--acento); }

.impact__media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  aspect-ratio: 16 / 11;
  background: #000;
}
.impact__media > *:not(.impact__badge) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.impact__video, .impact__poster { width: 100%; height: 100%; object-fit: cover; }
.impact__video { display: block; }
.impact__poster { display: none; }
.impact--no-video .impact__video { display: none; }
.impact--no-video .impact__poster { display: block; }
.impact__badge {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--acento);
  border: 2px solid var(--tinta);
  color: var(--negro);
  box-shadow: 3px 3px 0 rgba(255, 255, 255, .45);
}
.impact__badge svg { width: 22px; height: 22px; }

/* ---------- 13. TESTIMONIOS -------------------------------------- */
.grid-testimonials {
  display: grid;
  gap: clamp(1rem, .8rem + 1vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  min-width: 0;
}
.testimonial {
  display: flex;
  flex-direction: column;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sombra-sm);
  transition: transform var(--transicion), box-shadow var(--transicion);
}
.testimonial:hover { transform: translateY(-6px); box-shadow: var(--sombra-md); }
.testimonial__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.testimonial__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.stars { display: flex; gap: .15rem; color: var(--brillo-texto); }
.stars svg { width: 17px; height: 17px; }
.testimonial__text { font-size: .97rem; color: var(--negro); flex: 1; }
.testimonial__meta { display: flex; flex-direction: column; }
.testimonial__meta strong { font-family: var(--font-titulo); font-weight: 700; font-size: .98rem; }
.testimonial__meta span { font-size: .86rem; color: var(--gris-medio); }

/* ---------- 14. PARA QUIÉN TRABAJAMOS ----------------------------- */
.grid-audience {
  display: grid;
  gap: clamp(.9rem, .7rem + .8vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  min-width: 0;
}
.audience {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--r-md);
  padding: 1.5rem 1.35rem;
  transition: transform var(--transicion), border-color var(--transicion), box-shadow var(--transicion);
}
.audience:hover { transform: translateY(-5px); border-color: rgba(17, 17, 17, .2); box-shadow: var(--sombra-md); }
.audience__ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: .9rem;
  border-radius: 12px;
  background: var(--gris-claro);
  color: var(--brillo-texto);
}
.audience__ico svg { width: 24px; height: 24px; }
.audience__title { font-size: 1.02rem; margin-bottom: .3rem; }
.audience__text { font-size: .92rem; color: var(--gris-medio); }

/* ---------- 15. PREGUNTAS FRECUENTES ----------------------------- */
.faq { display: flex; flex-direction: column; gap: .75rem; }
.faq__item {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--transicion), box-shadow var(--transicion);
}
.faq__item.is-open { border-color: rgba(17, 17, 17, .2); box-shadow: var(--sombra-sm); }
.faq__q { margin: 0; }
.faq__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.3rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-titulo);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--negro);
}
.faq__ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gris-claro);
  color: var(--negro);
  transition: transform var(--transicion), background-color var(--transicion);
}
.faq__ico svg { width: 17px; height: 17px; }
.faq__btn:hover .faq__ico { background: var(--acento); }
.faq__btn[aria-expanded="true"] .faq__ico {
  transform: rotate(135deg);
  background: var(--acento);
  border: 1.5px solid var(--tinta);
}
/* Respuesta: se despliega con transición en lugar de aparecer de golpe.
   Técnica de grid 0fr -> 1fr: la fila pasa de 0 al alto real del texto,
   sin un max-height "mágico" que corte o salte.
   · overflow: hidden en el <p> es lo que permite que la fila llegue a 0.
   · visibility se apaga con retardo, al terminar la transición: así el
     texto cerrado queda oculto también para lectores de pantalla.
   · el relleno inferior vive en el contenedor y sólo aparece abierto: si
     va como margen del <p> se suma a la fila y la cerrada queda con un
     hueco de 1.3rem bajo la pregunta (texto descentrado). */
.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  padding: 0 1.3rem;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows .32s ease, padding-bottom .32s ease, opacity .2s ease, visibility 0s linear .32s;
}
.faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
  padding-bottom: 1.3rem;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows .32s ease, padding-bottom .32s ease, opacity .2s ease .05s, visibility 0s;
}
.faq__a p {
  min-height: 0;
  overflow: hidden;
  margin: 0;
  color: var(--gris-medio);
  font-size: .96rem;
}
/* Sin JS no hay acordeón: se muestra el texto entero. */
html:not(.js) .faq__a {
  grid-template-rows: 1fr;
  padding-bottom: 1.3rem;
  opacity: 1;
  visibility: visible;
}

/* ---------- 16. CTA + FORMULARIO ---------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--gris-claro);
  padding: clamp(3.5rem, 2.6rem + 4.4vw, 6.5rem) 0;
}
.cta__inner { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 3.5rem); align-items: start; }
.cta__title { font-size: var(--fs-h2); margin-bottom: .75rem; text-wrap: balance; }
.cta__text { color: var(--gris-medio); max-width: 46ch; margin-bottom: 1.6rem; }
.cta__points { display: grid; gap: .55rem; margin-bottom: 2rem; }
.cta__points li { display: flex; align-items: center; gap: .6rem; font-size: .95rem; }
.cta__points svg { flex: none; width: 19px; height: 19px; color: var(--negro); }
.cta__contact { display: grid; gap: .55rem; }
.cta__contact p { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: .95rem; }
.cta__contact svg { flex: none; width: 18px; height: 18px; color: var(--brillo-texto); }
.cta__contact a { color: var(--negro); font-weight: 500; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.cta__contact a:hover { color: var(--brillo-texto); }

.quote {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--r-lg);
  padding: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  box-shadow: var(--sombra-md);
}
.quote__title { font-size: 1.3rem; margin-bottom: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.field label { font-size: .88rem; font-weight: 600; }
.field__opt { font-weight: 400; color: var(--gris-medio); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .8rem .95rem;
  border: 1.5px solid var(--borde);
  border-radius: var(--r-sm);
  background: var(--blanco);
  font-size: .95rem;
  transition: border-color var(--transicion), box-shadow var(--transicion);
}
.field textarea { resize: vertical; min-height: 108px; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: rgba(17, 17, 17, .35); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--tinta); }
.field input:user-invalid,
.field textarea:user-invalid { border-color: #C0392B; }
.field__hint { font-size: .8rem; color: var(--gris-medio); }
.field__file {
  font-size: .84rem;
  font-weight: 600;
  background: var(--gris-claro);
  border: 1px dashed rgba(17, 17, 17, .3);
  border-radius: var(--r-sm);
  padding: .6rem .75rem;
  word-break: break-all;
}


  cursor: pointer;
}
.form__error {
  margin: 0 0 1rem;
  font-size: .88rem;
  font-weight: 500;
  color: #B3261E;
  background: #FDECEA;
  border-left: 3px solid #B3261E;
  padding: .6rem .8rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.quote__note { font-size: .8rem; color: var(--gris-medio); text-align: center; margin: .9rem 0 0; }

/* ---------- 17. NEWSLETTER (banda justo encima del footer) --------- */
/* Banda turquesa de alto contraste con una tarjeta blanca tipo .quote,
   para que el formulario mantenga el mismo lenguaje neo-brutalista
   (borde índigo, radio y sombra dura) del resto de la página. */
.newsletter {
  position: relative;
  overflow-x: clip;
  background: var(--acento);
  color: var(--negro);
  padding: clamp(3rem, 2.3rem + 3vw, 4.5rem) 0;
}
.newsletter__grid {
  display: grid;
  gap: clamp(1.75rem, 1.4rem + 1.6vw, 3rem);
  align-items: center;
  min-width: 0;
}
.newsletter__copy .sticker { background: var(--blanco); }
.newsletter__title {
  font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.5rem);
  margin-bottom: .6rem;
  text-wrap: balance;
}
.newsletter__text { color: rgba(17, 17, 17, .78); max-width: 52ch; margin-bottom: 1.1rem; }
.newsletter__list { display: grid; gap: .5rem; }
.newsletter__list li { display: flex; align-items: center; gap: .6rem; font-size: .95rem; font-weight: 500; }
.newsletter__list svg { flex: none; width: 19px; height: 19px; color: var(--negro); }

.newsletter__form {
  display: grid;
  gap: .9rem;
  background: var(--blanco);
  border: 2px solid var(--tinta);
  border-radius: var(--r-lg);
  padding: clamp(1.35rem, 1.05rem + 1.2vw, 1.9rem);
  box-shadow: var(--sombra-dura);
  min-width: 0;
}
.newsletter__form .field { margin-bottom: 0; }
.newsletter__form .form__error { margin: 0; }
.newsletter__form .btn:disabled { opacity: .7; cursor: progress; }
.newsletter__note { font-size: .8rem; color: var(--gris-medio); text-align: center; margin: 0; }
.newsletter__note a { font-weight: 600; color: var(--negro); }

/* Confirmación de la suscripción (variante verde de .form__error) */
.form__ok {
  margin: 0;
  font-size: .88rem;
  font-weight: 600;
  color: #1B5E20;
  background: #E7F6EA;
  border-left: 3px solid #2E7D32;
  padding: .6rem .8rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}

/* ---------- 18. FOOTER ------------------------------------------- */
.footer {
  background: var(--noche);
  color: rgba(255, 255, 255, .74);
  padding: clamp(3rem, 2.2rem + 3vw, 4.5rem) 0 1.75rem;
  position: relative;
}
/* Franja superior con la cinta de marca: es la onda del logotipo
   (turquesa -> fucsia -> violeta) recorriendo todo el ancho. */
.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--cinta);
}
.footer__grid {
  display: grid;
  gap: clamp(1.75rem, 1.4rem + 1.6vw, 3rem);
  grid-template-columns: 1fr;
  padding-bottom: 2.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer__title {
  font-family: var(--font-titulo);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--blanco);
  margin-bottom: 1rem;
}
.footer__desc { font-size: .92rem; margin: 1.1rem 0 1.4rem; max-width: 42ch; }
.footer__col ul { display: grid; gap: .55rem; }
.footer__col a {
  color: rgba(255, 255, 255, .8);
  text-decoration: none;
  transition: color var(--transicion);
}
.footer__col a:hover { color: var(--brillo); }
.footer__contact li { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; }
.footer__contact svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--brillo); }

.social { display: flex; gap: .6rem; }
.social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .22);
  color: var(--blanco);
  transition: background-color var(--transicion), color var(--transicion), transform var(--transicion), border-color var(--transicion);
}
.social a svg { width: 19px; height: 19px; }
.social a:hover { background: var(--acento); border-color: var(--acento); color: var(--negro); transform: translateY(-3px); }

.footer__map {
  position: relative;
  aspect-ratio: 16 / 11;
  min-height: 180px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  transition: border-color var(--transicion), transform var(--transicion), box-shadow var(--transicion);
}
.footer__map iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.footer__map:hover {
  border-color: var(--acento);
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45);
}

/* "Cómo llegar": es el botón primario pequeño del sitio (.btn.btn--sm), con
   tres ajustes porque vive sobre el pie, que es oscuro en ambos temas:
   1. Transición: .footer__col a sobrescribe el transition de .btn con
      "transition: color" (gana por especificidad), así que transform y
      box-shadow saltaban sin animación. Aquí se recupera.
2. Texto fijo en #111111: .footer__col a (blanco) y .footer__col a:hover
      (fucsia) ganan a .btn--primary, y el fucsia sobre turquesa no
      llegaría a 3:1.
   3. Sombra dura en blanco (mismo criterio que .btn--ghost): --tinta es
      el índigo de marca y se funde con el fondo del pie, así que el
      hover no se notaría.
   El borde es el estándar de .btn: ningún contorno blanco. */
/* El color de la sombra es el mismo en reposo, hover y active (var(--cta-sh)):
   solo cambia el desplazamiento, para que el hover no altere el tono. */
.footer__col .footer__map-cta {
  --cta-sh: rgba(255, 255, 255, .35);
  margin-top: .9rem;
  color: #111111;
  transition: transform var(--transicion), box-shadow var(--transicion),
              background-color var(--transicion), color var(--transicion);
  box-shadow: 3px 3px 0 var(--cta-sh);
}
.footer__map-cta svg { width: 17px; height: 17px; }
.footer__col .footer__map-cta:hover,
.footer__col .footer__map-cta:focus-visible {
  color: #111111;
  box-shadow: 5px 5px 0 var(--cta-sh);
}
.footer__col .footer__map-cta:active {
  box-shadow: 1px 1px 0 var(--cta-sh);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem;
  padding-top: 1.5rem;
  font-size: .84rem;
}
.footer__bottom p { margin: 0; }
.footer__legal a { color: rgba(255, 255, 255, .8); }

/* ---------- 19. FLOTANTES Y LIGHTBOX ------------------------------ */
.wa-float {
  position: fixed;
  right: clamp(1rem, .6rem + 1.4vw, 1.75rem);
  bottom: calc(clamp(1rem, .6rem + 1.4vw, 1.75rem) + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  height: 56px;
  max-width: calc(100vw - 2rem);
  padding: 0 16px;
  border-radius: var(--r-sm);
  background: var(--acento);
  border: 2px solid var(--tinta);
  box-shadow: var(--sombra-dura);
  color: var(--negro);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
  white-space: nowrap;
  overflow: hidden;
  animation: waFloat 3.2s ease-in-out infinite;
  transition: transform var(--transicion), box-shadow var(--transicion), background-color var(--transicion);
}
.wa-float svg { width: 26px; height: 26px; flex: none; }
.wa-float:hover { background: var(--acento-fuerte); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--tinta); }
.wa-float:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--tinta); }
.wa-float__label { display: none; }

.to-top {
  position: fixed;
  right: clamp(1rem, .6rem + 1.4vw, 1.75rem);
  bottom: calc(clamp(1rem, .6rem + 1.4vw, 1.75rem) + env(safe-area-inset-bottom, 0px) + 68px);
  z-index: 70;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blanco);
  border: 2px solid var(--tinta);
  box-shadow: 3px 3px 0 var(--tinta);
  color: var(--negro);
  cursor: pointer;
  transition: transform var(--transicion), box-shadow var(--transicion), background-color var(--transicion);
}
.to-top svg { width: 20px; height: 20px; }
.to-top:hover { background: var(--acento); transform: translateY(-2px); }
.to-top:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--tinta); }

.lightbox { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: clamp(1rem, .5rem + 2vw, 2.5rem); overflow-y: auto; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .88); animation: fadeIn .25s ease; }
.lightbox__figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(960px, 100%);
  width: 100%;
  animation: zoomIn .3s cubic-bezier(.2, .7, .3, 1);
}
.lightbox__img {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: var(--r-md);
  background: var(--negro);
}
.lightbox__caption { margin-top: 1rem; text-align: center; color: var(--blanco); }
.lightbox__cat {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--acento);
  color: var(--negro);
  border-radius: var(--r-pill);
  padding: .2rem .7rem;
  margin-bottom: .5rem;
}
.lightbox__title { font-size: 1.2rem; margin: 0; }
.lightbox__close {
  position: absolute;
  top: -52px;
  right: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--acento);
  border: 2px solid var(--tinta);
  color: var(--negro);
  cursor: pointer;
  transition: transform var(--transicion);
}
.lightbox__close:hover { transform: rotate(90deg); }
.lightbox__close svg { width: 20px; height: 20px; }
.lightbox__nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blanco);
  border: 2px solid var(--tinta);
  color: var(--negro);
  cursor: pointer;
  transition: background-color var(--transicion), transform var(--transicion);
}
.lightbox__nav:hover { background: var(--acento); }
.lightbox__nav svg { width: 20px; height: 20px; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
/* En pantallas amplias las flechas pueden ir fuera de la imagen */
@media (min-width: 1100px) {
  .lightbox__nav--prev { left: -58px; }
  .lightbox__nav--next { right: -58px; }
}
.rot-180 { transform: rotate(180deg); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes waFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}

/* ---------- 20. ANIMACIONES AL HACER SCROLL ----------------------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2, .7, .3, 1);
  will-change: opacity, transform;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .reveal[data-reveal-delay="1"] { transition-delay: .08s; }
html.js .reveal[data-reveal-delay="2"] { transition-delay: .16s; }
html.js .reveal[data-reveal-delay="3"] { transition-delay: .24s; }
html.js .reveal[data-reveal-delay="4"] { transition-delay: .32s; }
html.js .reveal[data-reveal-delay="5"] { transition-delay: .40s; }

/* ---------- 21. RESPONSIVE --------------------------------------- */

/* Móvil: la etiqueta flotante de WhatsApp se muestra en pantallas con espacio */
@media (min-width: 480px) {
  .wa-float__label { display: inline; }
}

/* A partir de 640px: dos columnas en varias rejillas */
@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card--wide { grid-column: 1 / -1; flex-direction: row; }
  .card--wide .card__media { flex: 0 0 38%; }
  .card--wide .card__body { justify-content: center; padding: 1.6rem 1.8rem; }
  .card--wide .link-arrow { margin-top: 1rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hero__facts { grid-template-columns: repeat(2, auto); justify-content: start; }
  .cta__inner { grid-template-columns: 1fr 1fr; }
  .newsletter__grid { grid-template-columns: 1.05fr 1fr; }
  .impact__inner { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .section--curve { padding-top: clamp(4rem, 3rem + 4vw, 7rem); }
}

/* A partir de 768px: hero nuevo en dos columnas */
@media (min-width: 768px) {
  .hero--nuevo .hero__inner { grid-template-columns: 1.02fr .98fr; gap: clamp(2rem, 2vw + 1.5rem, 3.5rem); }
  .hero__foto--main { height: clamp(380px, 32vw, 480px); }
  .hero__foto--b, .hero__foto--c { height: clamp(160px, 14vw, 200px); }
  .impact__video { display: block; }
  .impact__poster { display: none; }
  .impact--no-video .impact__video { display: none; }
  .impact--no-video .impact__poster { display: block; }
}

/* A partir de 960px: navegación completa en escritorio */
@media (min-width: 960px) {
  :root { --nav-h: 104px; }

  /* El logotipo (1.623:1) trae el texto dentro: una barra algo más alta
     deja que se lea cómodo a 72px de alto. */
  .logo__img { height: 72px; }

  .nav__menu {
    position: static;
    width: auto;
    inset: auto;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
    visibility: visible;
    transform: none;
    transition: none;
  }
  .nav__list { flex-direction: row; align-items: center; gap: .1rem; }
  .nav__link { width: auto; padding: .55rem .7rem; font-size: .93rem; white-space: nowrap; }
  .nav__mobile-actions, .nav__actions--mobile, .nav-scrim { display: none; }
  .nav__actions--desktop { display: flex; align-items: center; gap: .6rem; }

  /* El desplegable se posiciona respecto al navbar */
  .has-dropdown { position: relative; }
  .dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    translate: -50% 0;
    width: min(430px, 78vw);
    padding: .6rem;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: var(--r-md);
    box-shadow: var(--sombra-lg);
    animation: dropIn .18s cubic-bezier(.2, .7, .3, 1);
  }
  .dropdown__list { flex-direction: column; }

  .wa-float__label { display: inline; }
}

@keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* A partir de 1024px: bento de servicios con tarjetas grandes */
@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(252px, auto);
  }
  .card--lg { grid-column: span 2; grid-row: span 2; }
  .card--lg .card__media img { aspect-ratio: 16 / 11; }
  .card--lg .card__body { padding: 1.6rem 1.7rem 1.8rem; }
  .card--lg .card__title { font-size: 1.5rem; }
  .card--lg .card__text { font-size: 1rem; }

  .steps { grid-template-columns: repeat(4, 1fr); }
  /* Línea que une los 4 pasos */
  .steps::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 6%;
    right: 6%;
    height: 2px;
    background: repeating-linear-gradient(to right, var(--borde) 0 8px, transparent 8px 16px);
  }
  .step { padding-top: 0; }
  .step__num { position: relative; z-index: 1; }

  .gallery { grid-template-columns: repeat(3, 1fr); }
  /* Pie en escritorio: la columna del mapa crece en horizontal
     (1.2fr -> 1.5fr) y el botón "Cómo llegar" casi toca el borde del
     contenedor: solo reserva los 3px que ocupa su sombra dura. */
  .footer__grid { grid-template-columns: 1.5fr 1fr 1.1fr 1.5fr; }
  .footer__col--map .footer__map-cta {
    width: calc(100% - 3px);
    justify-content: center;
  }
  .cta__inner { grid-template-columns: 1fr .9fr; }
  .impact__inner { grid-template-columns: 1.05fr .95fr; }
  /* Los tres datos rápidos del hero en una sola fila */
  .hero__facts { grid-template-columns: repeat(3, auto); justify-content: start; }
}

/* Páginas muy anchas: evita líneas de texto excesivamente largas */
@media (min-width: 1280px) {
  .grid-products { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 22. BLINDAJE ANTI-DESBORDAMIENTO (móvil) --------------- */
/* Corta de raíz el "espacio blanco a la derecha": ningún hijo puede
   ensanchar la página más allá del viewport.
   OJO: solo min-width:0, sin max-width, para no pisar los max-width
   de diseño (.hero__content: 820px, .section__head, etc.). */
img, video, iframe { max-width: 100%; }
.bento, .steps, .grid-products, .gallery, .grid-why,
.grid-testimonials, .grid-audience, .cta__inner,
.impact__inner, .footer__grid, .trust__logos,
.cta__content, .quote, .newsletter__grid, .newsletter__form { min-width: 0; }
p, h1, h2, h3, li, a, span { overflow-wrap: break-word; }

/* En pantallas muy angostas los botones del hero van lado a lado en
   tamaño compacto (mitad y mitad), sin ocupar todo el ancho */
@media (max-width: 479px) {
  .hero__buttons { flex-wrap: nowrap; gap: .6rem; }
  .hero__buttons .btn { flex: 1 1 0; min-width: 0; padding: .85rem .5rem; font-size: .86rem; white-space: nowrap; }
  .wa-float { height: 52px; padding: 0 12px; font-size: .85rem; gap: .45rem; }
  .wa-float svg { width: 22px; height: 22px; }
  .stats { gap: .75rem; }
  .trust__logos { gap: .75rem 1.25rem; }
  .footer__bottom { flex-direction: column; }
}

/* Accesibilidad: sin movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .hero__scroll-line { animation: none; }
}

/* Impresión */
@media print {
  .nav, .wa-float, .to-top, .nav-scrim, .lightbox { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ---------- 23. CRÉDITO BYGROW · shimmer premium --------------------
   Degradado de marca animado + entrada suave al aparecer en pantalla.
   Sin JS: la entrada usa scroll-driven animation (mejora progresiva);
   si el navegador no la soporta, el crédito se ve estático con shimmer. */
.bygrow {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(100deg, var(--turquesa) 20%, #ffffff 50%, var(--magenta) 80%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: bygrow-shine 4.5s ease-in-out infinite;
}
@keyframes bygrow-shine {
  0% { background-position: 110% center; }
  60%, 100% { background-position: -110% center; }
}
@keyframes bygrow-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@supports (animation-timeline: view()) {
  .bygrow-credit {
    animation: bygrow-in 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) both;
    animation-timeline: view();
    animation-range: entry 0% cover 25%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bygrow, .bygrow-credit { animation: none; }
}

/* =====================================================================
   24. TEMA CLARO / OSCURO
   ---------------------------------------------------------------------
   El tema lo controla el atributo data-theme en <html>, que un script
   del <head> fija antes de renderizar (evita el parpadeo). La base de la
   hoja está pensada en claro: aquí solo se sobreescriben los tokens y
   algunos elementos puntuales cuando data-theme="dark".

   Cómo funciona:
   · --blanco  -> pasa a ser el color de superficie (antes "papel").
   · --negro   -> pasa a ser la tinta clara (texto, bordes y sombras).
   · --gris-claro / --gris-medio / --borde -> superficies y textos suaves.
   Las secciones que ya eran oscuras (hero, impacto, footer) y los
   elementos sobre turquesa se ajustan aparte para mantener el contraste.
   ===================================================================== */

/* Switch de tema: pista con borde y sombra dura, pulgar turquesa. */
.theme-switch {
  position: relative;
  flex: none;
  width: 58px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--tinta);
  border-radius: var(--r-pill);
  background: var(--gris-claro);
  box-shadow: 3px 3px 0 var(--tinta);
  cursor: pointer;
  transition: background-color var(--transicion), transform var(--transicion), box-shadow var(--transicion);
}
.theme-switch:hover {
  background: var(--acento-tenue);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--tinta);
}
.theme-switch:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--tinta); }

.theme-switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--acento);
  border: 2px solid var(--tinta);
  color: #111111;
  transition: transform .28s cubic-bezier(.2, .7, .3, 1), background-color var(--transicion);
}
.theme-switch__icon { width: 13px; height: 13px; }
.theme-switch__icon--moon { display: none; }
html[data-theme="dark"] .theme-switch__icon--sun { display: none; }
html[data-theme="dark"] .theme-switch__icon--moon { display: block; }
html[data-theme="dark"] .theme-switch__thumb { transform: translateX(26px); }
html[data-theme="dark"] .theme-switch:hover { background: var(--borde); }

/* Transición suave al cambiar de tema (solo el fondo/texto del body;
   el resto de componentes ya tienen sus propias transiciones). */
html[data-theme] body { transition: background-color .3s ease, color .3s ease; }

/* ---------- Tokens del modo oscuro --------------------------------- */
:root { color-scheme: light; }

html[data-theme="dark"] {
  color-scheme: dark;

  --blanco: #17171f;                     /* superficie / papel */
  --gris-claro: #22222c;                 /* superficie suave / secciones grises */
  --gris-medio: #a4a4b2;                 /* texto secundario */
  --negro: #f1f1f4;                      /* tinta: texto */
  --tinta: #5b5b69;                      /* contornos y sombras duras: gris suave */
  --borde: #2f2f3c;
  --negro-70: rgba(241, 241, 244, .70);
  --negro-80: rgba(241, 241, 244, .80);

  /* Sobre el fondo oscuro el turquesa puro se apaga un poco: se usa una
     versión algo más profunda para no vibrar contra el índigo. */
  --acento: #1BA6C6;
  --acento-fuerte: #108AA6;
  --brillo: #F0559F;
  --noche: #120826;

  --sombra-sm: 0 1px 2px rgba(0, 0, 0, .55), 0 4px 12px rgba(0, 0, 0, .45);
  --sombra-md: 0 6px 22px rgba(0, 0, 0, .55);
  --sombra-lg: 0 18px 44px rgba(0, 0, 0, .60);
}

/* Fondo de página un poco más profundo que las tarjetas */
html[data-theme="dark"] body { background: #0d0718; }

/* El contorno de foco en gris se perdería sobre el fondo oscuro: se usa
   el turquesa de marca, siempre muy visible. */
html[data-theme="dark"] :focus-visible { outline-color: var(--acento); }

/* ---------- Secciones que ya eran oscuras: se mantienen oscuras ----- */
html[data-theme="dark"] .hero { color: #ffffff; }
html[data-theme="dark"] .hero__fact strong { color: #ffffff; }
html[data-theme="dark"] .btn--ghost { color: #ffffff; }
html[data-theme="dark"] .btn--ghost:hover { background: #ffffff; color: #111111; }
html[data-theme="dark"] .impact { background: #0d0518; color: #ffffff; }
html[data-theme="dark"] .footer { background: #0d0518; }
html[data-theme="dark"] .footer__title,
html[data-theme="dark"] .social a,
html[data-theme="dark"] .logo--footer { color: #ffffff; }
html[data-theme="dark"] .lightbox__caption,
html[data-theme="dark"] .shot__meta { color: #ffffff; }
html[data-theme="dark"] .lightbox__img,
html[data-theme="dark"] .shot__btn { background: #0d0518; }

/* El logo ya trae su propia variante para fondo oscuro (tinta aclarada),
   así que no hace falta ningún fondo ni borde artificial debajo. */

/* ---------- Elementos sobre turquesa: el texto debe seguir oscuro ---- */
html[data-theme="dark"] .btn--primary,
html[data-theme="dark"] .sticker,
html[data-theme="dark"] .step__num,
html[data-theme="dark"] .why__ico,
html[data-theme="dark"] .icon-btn--wa,
html[data-theme="dark"] .wa-float,
html[data-theme="dark"] .impact__badge,
html[data-theme="dark"] .lightbox__close,
html[data-theme="dark"] .lightbox__cat,
html[data-theme="dark"] .lightbox__nav:hover,
html[data-theme="dark"] .shot__meta em,
html[data-theme="dark"] .to-top:hover,
html[data-theme="dark"] .footer__map-cta:hover,
html[data-theme="dark"] .social a:hover,
html[data-theme="dark"] .filter.is-active,
html[data-theme="dark"] .impact__title .hl--dark { color: #111111; }

/* Hover del botón de WhatsApp de la navbar: fondo claro + ícono oscuro */
html[data-theme="dark"] .icon-btn--wa:hover { background: #f1f1f4; }

/* Íconos que quedan sobre turquesa al pasar el cursor */
html[data-theme="dark"] .faq__btn:hover .faq__ico,
html[data-theme="dark"] .faq__btn[aria-expanded="true"] .faq__ico,
html[data-theme="dark"] .dropdown__link:hover .dropdown__ico { color: #111111; }

/* ---------- Banda turquesa del newsletter -------------------------- */
html[data-theme="dark"] .newsletter { color: #111111; }
html[data-theme="dark"] .newsletter__title,
html[data-theme="dark"] .newsletter__list svg,
html[data-theme="dark"] .newsletter__note a { color: #111111; }
html[data-theme="dark"] .newsletter__copy .sticker { background: #ffffff; color: #111111; }
/* La tarjeta del formulario sí es superficie oscura: su texto va claro */
html[data-theme="dark"] .newsletter__form { color: var(--negro); }

/* ---------- Bordes de hover escritos con negro fijo --------------- */
html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .audience:hover,
html[data-theme="dark"] .faq__item.is-open { border-color: var(--tinta); }
html[data-theme="dark"] .field input:hover,
html[data-theme="dark"] .field select:hover,
html[data-theme="dark"] .field textarea:hover { border-color: var(--tinta); }

/* ---------- Mensajes de estado del formulario ---------------------- */
html[data-theme="dark"] .form__error {
  background: #3a1e1c;
  color: #ffb3ac;
  border-left-color: #e57373;
}
html[data-theme="dark"] .form__ok {
  background: #123019;
  color: #8fe0a3;
  border-left-color: #4caf50;
}

/* ---------- Blob decorativo gris (se aclara en modo oscuro) -------- */
html[data-theme="dark"] .blob--section path { fill: rgba(255, 255, 255, .05); }

/* =====================================================================
   20. CONSENTIMIENTO DE COOKIES
   ===================================================================== */
.cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 115;
  padding: .9rem clamp(.8rem, .5rem + 1.5vw, 1.25rem) calc(.9rem + env(safe-area-inset-bottom, 0px));
  background: var(--blanco);
  border-top: 2px solid var(--tinta);
  box-shadow: 0 -10px 30px rgba(17, 17, 17, .14);
}
.cookie[hidden] { display: none; }

.cookie__inner {
  max-width: var(--ancho);
  margin: 0 auto;
  display: grid;
  gap: .8rem;
}

/* En escritorio: texto a la izquierda y acciones a la derecha. Las
   categorías, al desplegarse, ocupan todo el ancho debajo. */
@media (min-width: 900px) {
  .cookie__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: clamp(2rem, 5vw, 4rem);
    row-gap: .9rem;
    align-items: center;
  }
  .cookie__body { grid-column: 1; grid-row: 1; }
  .cookie__actions { grid-column: 2; grid-row: 1; }
  .cookie__cats { grid-column: 1 / -1; grid-row: 2; }
  .cookie__text { max-width: 68ch; }
}

.cookie__title {
  font-family: var(--font-titulo);
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 .2rem;
}
.cookie__text {
  font-size: .9rem;
  color: var(--gris-medio);
  margin: 0;
  max-width: 88ch;
}
.cookie__text a,
.cookie__text span { color: var(--negro); font-weight: 600; }
.cookie__text a:hover { color: var(--brillo-texto); }

.cookie__cats {
  display: grid;
  gap: .55rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.cookie__cat {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .65rem;
  align-items: start;
  padding: .7rem .85rem;
  border: 2px solid var(--borde);
  border-radius: var(--r-sm);
  background: var(--gris-claro);
  cursor: pointer;
}
.cookie__cat input {
  margin-top: .2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--acento);
}
.cookie__cat strong { display: block; font-size: .9rem; }
.cookie__cat small { display: block; color: var(--gris-medio); font-size: .8rem; line-height: 1.5; }
.cookie__cat--fixed { cursor: default; opacity: .92; }

.cookie__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .8rem 1.5rem;
}

/* Opciones secundarias: texto pequeño y tenue, separadas de la acción
   principal (la única que se ve como botón) por un filete vertical. */
.cookie__options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem 1.35rem;
}

.cookie__opt {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: .82rem;
  color: var(--gris-medio);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color .2s ease;
}
.cookie__opt:hover { color: var(--negro); }

/* Única llamada a la acción destacada, en el color de énfasis. */
.cookie__actions .cookie__accept {
  flex: 0 0 auto;
  padding: .8rem 1.7rem;
  font-weight: 700;
}

/* Tablet en adelante: separador entre las opciones y el botón. */
@media (min-width: 641px) {
  .cookie__options { padding-right: 1.5rem; border-right: 1px solid var(--borde); }
}

/* Móvil: el botón ocupa todo el ancho y las opciones quedan debajo. */
@media (max-width: 640px) {
  .cookie__actions { flex-direction: column-reverse; align-items: stretch; }
  .cookie__options { justify-content: center; padding-right: 0; border-right: 0; }
  .cookie__actions .cookie__accept { width: 100%; }
}

/* El botón flotante y "volver arriba" no deben tapar el banner */
body.md-consent-open .wa-float,
body.md-consent-open .to-top { display: none; }

/* Enlace "Configurar cookies" en los pies de página */
.cookie-settings-link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.cookie-settings-link:hover { color: var(--acento); }
.lp__cookie { margin: .35rem 0 0; font-size: .78rem; opacity: .75; }

/* Bloque de contenido de terceros pendiente de consentimiento */
.consent-block {
  display: grid;
  gap: .7rem;
  place-items: center;
  text-align: center;
  min-height: 210px;
  padding: 1.25rem;
  border: 2px dashed var(--borde);
  border-radius: var(--r-sm);
  background: var(--gris-claro);
  color: var(--gris-medio);
  font-size: .9rem;
}
.consent-block p { margin: 0; max-width: 44ch; }

@media print {
  .cookie,
  .consent-block { display: none !important; }
}