/* One Compass Ventures. Sistema de diseño basado en los valores extraídos de apple.com/mx */
:root {
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --bg: #fff;
  --bg-alt: #f5f5f7;
  --border: #d2d2d7;
  --link: #0066cc;
  --accent: #1f883d;        /* verde de botones (estilo GitHub), texto blanco legible */
  --accent-hover: #1a7f37;
  --accent-active: #176f30;
  --accent-text: #1a7f37;   /* borde y texto de botones secundarios */
  --accent-on-dark: #3fb950; /* botones secundarios sobre fondo oscuro */
  --dark: #000;
  --dark-2: #1d1d1f;
  --on-dark: #f5f5f7;
  --link-dark: #2997ff;

  /* Fuentes del sistema: no se carga nada de servidores externos (mejor para la ley alemana de privacidad) */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --green: #30d158;
  --amber: #ff9f0a;
  --sand: #d9822b;

  --ease: cubic-bezier(.4, 0, .6, 1);
  --ease-out: cubic-bezier(.25, .1, .3, 1);
  --dur-fast: 120ms;
  --dur: 240ms;
  --dur-md: 320ms;
  --dur-slow: 800ms;
  --stagger: 20ms;

  --nav-h: 60px;
  /* Un solo contenedor para toda la página: menú, hero, tarjetas, bloques negros, carrusel y pie */
  --container: 1200px;
  --gutter: 24px;
  --content: calc(var(--container) - 2 * var(--gutter)); /* ancho útil: 1152px */
  --gap: 12px;
  --radius: 22px;

  /* Escala de tipografía: un tamaño por nivel, en toda la página */
  --fs-display: 56px;  /* solo el título del hero */
  --fs-h2: 48px;       /* títulos de sección: Automatización, En qué trabajamos, Cuéntanos */
  --fs-h3: 40px;       /* títulos de tarjetas: Mantenimiento, Proyectos, IA, Soporte */
  --fs-h4: 32px;       /* tarjetas de carrusel: WordPress, Nuevos contactos al CRM */
  --fs-lead-lg: 24px;  /* subtítulo del hero y del cierre */
  --fs-lead: 21px;     /* subtítulos de secciones y tarjetas */
  --fs-body: 17px;     /* texto normal y de las tarjetas del carrusel */
  --fs-small: 15px;    /* menú, registro, correo, enlaces del pie */
  --fs-caption: 13px;  /* etiquetas (NUEVO, 01, EJEMPLO), idiomas, copyright */
  --lh-tight: 1.08;    /* títulos */
  --lh-lead: 1.3;      /* subtítulos */
  --lh-body: 1.47;
  --btn-lg: 44px;      /* texto 17px: hero y cierre */
  --btn-sm: 36px;      /* texto 15px: menú, tarjetas y carrusel */
  --space-section: 56px; /* espacio superior de todas las tarjetas y bloques */
  --pad-side: 48px;    /* espacio lateral dentro de tarjetas y bloques */
  /* Alturas: pocas medidas que se repiten */
  --h-tile: 620px;     /* las 4 tarjetas de servicios */
  --h-band: 640px;     /* bloques negros: Automatización y Cierre */
  --h-gallery: 560px;  /* tarjetas de "En qué trabajamos" */
  --visual-h: 300px;   /* caja de imagen o panel dentro de cada tarjeta */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: -.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
/* Palabras largas (sobre todo en alemán) se cortan con guion en vez de desbordar */
h1, h2, h3 { overflow-wrap: break-word; }
:lang(de) :is(.headline, .promo-headline, .gallery-copy h3) { hyphens: auto; -webkit-hyphens: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(250, 250, 252, .8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  transition: background var(--dur) var(--ease);
}
.nav.is-open { background: rgba(250, 250, 252, 1); }
.nav-content {
  width: calc(100% - 2 * var(--gutter)); max-width: var(--content); height: 100%; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { color: var(--text); display: flex; align-items: center; gap: 7px; opacity: .85; transition: opacity var(--dur) var(--ease); }
.logo-text { display: block; font-weight: 700; font-size: 19px; line-height: 27px; letter-spacing: -0.01em; white-space: nowrap; }
.nav-logo:hover { text-decoration: none; }
.nav-logo:hover { opacity: 1; }
.nav-list { display: flex; gap: 32px; }
@media (max-width: 1068px) { .nav-list { gap: 20px; } .nav-right { gap: 12px; } }
.nav-item a, .nav-cta {
  font-size: var(--fs-small); font-weight: 500; letter-spacing: -.01em; color: rgba(0, 0, 0, .8);
  transition: color var(--dur-md) var(--ease);
}
.nav-item a:hover, .nav-cta:hover { color: #000; text-decoration: none; }
/* "Escríbenos" del menú: botón con relleno */
.nav-cta {
  font-weight: 500; color: #fff !important; background: var(--accent);
  display: inline-flex; align-items: center; height: var(--btn-sm); padding: 0 16px; line-height: 1; border-radius: 980px; transition: background-color var(--dur) var(--ease);
}
.nav-cta:hover { background: var(--accent-hover); }
.nav-right { display: flex; align-items: center; gap: 18px; }

/* Selector de idioma */
.lang-switch { display: flex; gap: 2px; padding: 2px; border-radius: 980px; background: rgba(0, 0, 0, .05); }
.lang-switch button {
  border: 0; background: transparent; cursor: pointer; font: inherit; font-size: var(--fs-caption); font-weight: 600;
  letter-spacing: .02em; color: rgba(0, 0, 0, .56); padding: 4px 8px; border-radius: 980px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-switch button:hover { color: #000; }
.lang-switch button[aria-pressed="true"] { background: #fff; color: #000; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.nav-burger { display: none; }

/* Submenú: el panel cambia de altura y los enlaces entran en cascada */
.flyout {
  position: absolute; left: 0; right: 0; top: var(--nav-h);
  height: 0; overflow: hidden;
  background: rgba(250, 250, 252, 1);
  transition: height var(--dur) var(--ease) 120ms;
}
.nav.is-open .flyout { transition-delay: 0s; }
.flyout-panel {
  display: none; max-width: var(--container); margin: 0 auto; padding: 40px var(--gutter) 64px;
  gap: 88px;
}
.flyout-panel.is-active { display: flex; }
.flyout-group { display: flex; flex-direction: column; gap: 8px; }
.flyout-group h3 { font-size: var(--fs-caption); font-weight: 400; color: var(--text-2); margin-bottom: 6px; }
.flyout-group a { font-size: var(--fs-small); color: var(--text); font-weight: 600; }
.flyout-group a.flyout-big { font-size: 24px; letter-spacing: .009em; line-height: 1.17; }
.flyout-group > * {
  opacity: 0; transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.nav.is-open .flyout-group > * {
  opacity: 1; transform: none;
  transition-delay: calc(var(--i, 0) * var(--stagger));
  transition-duration: min(calc(160ms + var(--i, 0) * 20ms), 240ms);
}
.scrim {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(232, 232, 237, .4);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-md) var(--ease), visibility var(--dur-md) step-end;
}
.scrim.is-visible { opacity: 1; visibility: visible; transition: opacity var(--dur-md) var(--ease), visibility var(--dur-md) step-start; }
.mobile-menu { display: none; }

/* ---------- Cinta ---------- */
.ribbon {
  background: var(--bg-alt); text-align: center; font-size: var(--fs-small); letter-spacing: -.016em;
  padding: 16px 22px; overflow: hidden;
}
.ribbon p { animation: ribbon-drop var(--dur-slow) var(--ease) both; }
@keyframes ribbon-drop { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Tarjetas ---------- */
main { display: flex; flex-direction: column; gap: var(--gap); padding-bottom: var(--gap); }
.tile {
  position: relative; overflow: clip; text-align: center;
  background: var(--bg-alt); padding: var(--space-section) var(--pad-side) 0;
}
.tile-copy { position: relative; z-index: 2; }
.headline { font-size: var(--fs-h2); line-height: var(--lh-tight); font-weight: 600; letter-spacing: -.005em; }
.subhead { font-size: var(--fs-lead); line-height: var(--lh-lead); font-weight: 400; letter-spacing: .007em; margin-top: 6px; }
.tagline { font-size: var(--fs-lead); color: var(--text-2); margin-top: 10px; letter-spacing: .011em; }
.ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 980px;
  background: var(--accent); color: #fff; border: 1px solid transparent;
  font-size: var(--fs-body); line-height: 1.18; letter-spacing: -.022em;
  min-height: var(--btn-lg); padding: 0 21px; min-width: 28px;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { background: var(--accent-active); transform: scale(.98); }
.btn-secondary { background: transparent; color: var(--accent-text); border-color: var(--accent-text); }
.btn-secondary:hover { background: var(--accent-hover); color: #fff; border-color: var(--accent-hover); }
.btn-on-dark { color: var(--accent-on-dark); border-color: var(--accent-on-dark); }
.btn-sm { font-size: var(--fs-small); min-height: var(--btn-sm); padding: 0 16px; }
.btn-light { background: #fff; color: var(--text); }
.btn-light:hover { background: rgba(255, 255, 255, .85); }

.tile-hero .headline { font-size: var(--fs-display); }
.tile-hero { padding-bottom: 0; }
.hero-subhead { max-width: 780px; margin: 12px auto 0; font-size: var(--fs-lead-lg); line-height: var(--lh-lead); color: var(--text-2); }

/* Video del hero: tarjeta redondeada como las del carrusel */
.hero-video {
  position: relative; margin: 48px auto 0; max-width: 980px; aspect-ratio: 1366 / 768;
  transform-origin: 50% 100%; will-change: transform;
}
/* La entrada va en el video; el contenedor queda libre para el efecto de scroll */
.hero-video video {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: 22px; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .35);
  animation: hero-in 1.2s var(--ease-out) .3s both;
}
.video-replay {
  position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: grid; place-items: center; cursor: pointer; transition: background-color 100ms linear;
}
.video-replay[hidden] { display: none; }
.video-replay:hover { background: rgba(255, 255, 255, .92); }
.video-replay svg { width: 22px; height: 22px; fill: var(--text); }

/* PRUEBA: video detrás del texto del hero, semitransparente */
.hero-stage.video-behind {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  /* Ocupa toda la pantalla al cargar: alto visible menos la barra y la cinta de arriba */
  min-height: max(640px, calc(100svh - var(--nav-h) - var(--ribbon-h, 52px))); margin: -60px -22px 0; padding: 60px 22px;
}
.video-behind .hero-video {
  position: absolute; inset: 0; z-index: 0; margin: 0; max-width: none; aspect-ratio: auto;
  pointer-events: none;
  transform: none !important; /* como fondo no se achica al hacer scroll (solo se desvanece) */
}
.video-behind .hero-video video {
  border-radius: 0; box-shadow: none;
  animation: video-bg-in 1.2s var(--ease-out) .3s both;
}
@keyframes video-bg-in { from { opacity: 0; } to { opacity: 1; } }
/* Al terminar, el video se desvanece y queda solo el fondo */
.video-behind .hero-video.is-done video { animation: video-bg-out 1.4s var(--ease-out) .4s forwards; }
@keyframes video-bg-out { from { opacity: 1; } to { opacity: 0; } }
/* Con "reducir movimiento" no se muestra el video de fondo */
@media (prefers-reduced-motion: reduce) { .video-behind .hero-video { display: none; } }
/* Velo del color de la página: da la transparencia y funde los bordes del video con el fondo */
.video-behind .hero-video::after {
  content: ""; position: absolute; inset: -2px;
  background:
    linear-gradient(to bottom, #f5f5f7 0%, rgba(245, 245, 247, 0) 18%, rgba(245, 245, 247, 0) 66%, #f5f5f7 96%),
    rgba(245, 245, 247, .62);
}
.video-behind .video-replay { display: none; }

/* Hero en dos columnas: el video se ve con todo su contraste, como los renders del resto de la página */
.tile-hero:has(.hero-split) { padding: 0 var(--gutter); }
/* Mismo ancho que el menú, el pie y "En qué trabajamos" (--content) */
.hero-stage.hero-split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 40px;
  width: 100%; max-width: var(--content); margin: 0 auto; padding: 32px 0 48px;
}
.hero-split .tile-copy { text-align: left; }
.tile-hero .hero-split .headline { text-wrap: balance; hyphens: manual; -webkit-hyphens: manual; }
/* En alemán las palabras son más largas: un poco más chico para que quede en 3 líneas */
@media (min-width: 1069px) { :lang(de) .tile-hero .hero-split .headline { font-size: 48px; } }
.hero-split .hero-subhead { margin-left: 0; max-width: 520px; }
.hero-split .ctas { justify-content: flex-start; }
.hero-split .hero-video { margin: 0; max-width: none; aspect-ratio: 4 / 3; transform-origin: 50% 50%; }
/* El fondo del video es el mismo gris del header (#f5f5f7): sin borde ni sombra para que se funda */
.hero-split .hero-video video {
  border-radius: 0; box-shadow: none;
  object-fit: cover; background: var(--bg-alt);
  /* Bordes difuminados: la compresión deja el fondo apenas distinto y así no se ve el rectángulo */
  -webkit-mask-image: radial-gradient(closest-side, #000 75%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 75%, transparent 100%);
}

/* Entrada al cargar: aparece y sube un poco, como en Apple */
@keyframes hero-in { from { opacity: 0; transform: translateY(40px) scale(.98); } to { opacity: 1; transform: none; } }

/* Tarjeta oscura */
.tile-dark { background: var(--dark); color: var(--on-dark); }
/* Bloques negros: todos con el mismo margen lateral y esquinas que las tarjetas */
#automation, .tile-cta-dark { width: calc(100% - 2 * var(--gutter)); max-width: var(--content); margin: 0 auto; border-radius: 22px; }
.tile-dark .subhead { color: var(--on-dark); }
.parallax-wrap { margin: 48px auto 0; max-width: 720px; padding-bottom: 72px; }
/* Registro de mantenimiento: panel de vidrio oscuro */
.log {
  text-align: left; border-radius: 22px; padding: 26px 28px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 100px -40px rgba(48, 209, 88, .35);
  transform: translateY(var(--py, 0px)); will-change: transform;
}
.log-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: var(--fs-small); color: rgba(245, 245, 247, .6); }
.log-head b { font-size: var(--fs-lead); color: var(--on-dark); font-weight: 600; }
.log-list { margin-top: 14px; }
.log-list li { display: flex; gap: 18px; align-items: baseline; padding: 15px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.log-list time { font-size: var(--fs-small); font-weight: 600; color: var(--green); font-variant-numeric: tabular-nums; min-width: 22px; }
.log-list p { font-size: var(--fs-body); color: var(--on-dark); }
/* Registro de mantenimiento en tarjeta clara */
.log-light { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 24px 60px -24px rgba(0, 0, 0, .2); }
.log-light .log-head { color: var(--text-2); }
.log-light .log-head b { color: var(--text); }
.log-tag { font-style: normal; font-size: var(--fs-caption); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 2px 7px; margin-left: 6px; border-radius: 980px; border: 1px solid currentColor; opacity: .75; vertical-align: 2px; }
.log-light .log-list li { border-color: rgba(0, 0, 0, .07); }
.log-light .log-list time { color: #1f8a3d; }
.log-light .log-list p { color: var(--text); font-size: var(--fs-small); }
.anchor { position: absolute; top: 0; }
.tile-dark .badge { display: block; }
/* Carrusel de automatizaciones dentro de la tarjeta negra: mismo diseño que "En qué trabajamos" */
.gallery-dark { margin: 0 calc(-1 * var(--pad-side)); padding: 28px 0 44px; text-align: left; }
.gallery-dark .dotnav { background: rgba(255, 255, 255, .12); }
.gallery-dark .dot { background: rgba(255, 255, 255, .45); }
.gallery-dark .dot:hover { background: rgba(255, 255, 255, .7); }
.gallery-dark .dot.is-current { background: rgba(255, 255, 255, .22); }
.gallery-dark .dot .fill { background: rgba(255, 255, 255, .85); }
.gallery-dark .play-toggle { background: rgba(255, 255, 255, .12); }
.gallery-dark .play-toggle:hover { background: rgba(255, 255, 255, .2); }
.gallery-dark .play-toggle svg { fill: var(--on-dark); }
.gallery-item.has-visual::after { display: none; }
/* Encabezado de la tarjeta de automatización más compacto */
/* Tarjetas más chicas que las de "En qué trabajamos" */
.gallery-dark .gallery-item { flex-basis: min(620px, 78vw); height: min(330px, 40vw); min-height: 280px; border-radius: 18px; }
.gallery-dark .gallery-copy { padding: 26px; max-width: 330px; }
.gallery-dark .gallery-copy p { margin-bottom: 14px; }
.gallery-dark .auto-visual { width: min(240px, 36%); padding: 18px 18px; right: 5%; }
.gallery-dark .auto-steps { gap: 13px; }
.gallery-dark .auto-steps li { font-size: var(--fs-small); }
/* Flujo de 3 pasos a la derecha de cada tarjeta, en un panel de vidrio */
.auto-visual {
  position: absolute; right: 7%; top: 50%; transform: translateY(-50%); width: min(340px, 38%);
  border-radius: 22px; padding: 28px 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 30px 60px -30px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.auto-steps { position: relative; display: flex; flex-direction: column; gap: 22px; }
.auto-steps::before {
  content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 2px;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .5) 0 4px, transparent 4px 8px);
  background-size: 2px 16px; animation: flow-dash 1.2s linear infinite;
}
.auto-steps li { position: relative; padding-left: 30px; font-size: 18px; line-height: 1.3; color: rgba(255, 255, 255, .85); }
.auto-steps li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border-radius: 50%;
  background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5);
  transition: background .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
/* En la tarjeta activa, los puntos se encienden en verde uno tras otro */
.is-current .auto-steps li::before { background: var(--green); box-shadow: 0 0 0 5px rgba(48, 209, 88, .22); }
.is-current .auto-steps li:nth-child(1)::before { transition-delay: .3s; }
.is-current .auto-steps li:nth-child(2)::before { transition-delay: .9s; }
.is-current .auto-steps li:nth-child(3)::before { transition-delay: 1.5s; }
.auto-steps li:last-child { color: #fff; font-weight: 600; }


/* Rejilla 2×2 */
.grid > * { min-width: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.tile-promo { border-radius: var(--radius); min-height: 580px; padding-top: var(--space-section); display: flex; flex-direction: column; align-items: center; }
.tile-promo-dark { background: var(--dark-2); color: var(--on-dark); }
.promo-headline { font-size: var(--fs-h3); line-height: var(--lh-tight); font-weight: 600; }
.promo-subhead { font-size: var(--fs-lead); line-height: var(--lh-lead); margin-top: 4px; letter-spacing: .011em; }
.tile-promo .ctas { margin-top: 18px; }
.promo-visual { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; position: relative; }

.promo-visual:has(.promo-image) { align-items: flex-end; }
/* Imagen de tarjeta: pegada abajo, bordes difuminados y entrada suave al aparecer */
.promo-image {
  display: block; width: 100%; max-width: 520px; height: auto; margin-top: 24px;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent),
                      linear-gradient(to bottom, transparent, #000 8%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent),
                      linear-gradient(to bottom, transparent, #000 8%);
          mask-composite: intersect;
  opacity: 0; transform: translateY(40px);
  transition: opacity .8s var(--ease-out) .15s, transform .8s var(--ease-out) .15s;
}
.is-visible .promo-image { opacity: 1; transform: none; }

/* Ilustraciones de las tarjetas, hechas en HTML (se pueden traducir) */
.promo-visual:has(.promo-art) { align-items: center; padding: 32px 0 44px; }
.promo-art {
  width: 100%; max-width: 420px; text-align: left;
  opacity: 0; transform: translateY(40px);
  transition: opacity .8s var(--ease-out) .15s, transform .8s var(--ease-out) .15s;
}
.is-visible .promo-art { opacity: 1; transform: none; }
.tile-promo.is-visible:hover .promo-art { transform: scale(1.03); transition-delay: 0s; }

.badge {
  display: inline-block; font-size: var(--fs-caption); font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: var(--sand); margin-bottom: 8px;
}

/* Chat de soporte */
/* Chat de soporte: ventana tipo app, con encabezado, avatares y horas */
.chat {
  background: rgba(255, 255, 255, .86); border-radius: 22px; overflow: hidden; text-align: left;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04), 0 24px 60px -24px rgba(0, 0, 0, .22);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.chat-head { display: flex; align-items: center; gap: 11px; padding: 14px 18px; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.chat-title { display: flex; flex-direction: column; line-height: 1.25; }
.chat-title b { font-size: 14px; font-weight: 600; }
.chat-title > span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.online { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(48, 209, 88, .18); }
.chat-avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.chat-avatar-dw { width: 34px; height: 34px; background: var(--text); color: #fff; }
.chat-avatar-dw svg { width: 16px; height: 16px; fill: currentColor; }
.chat-avatar-client { background: linear-gradient(135deg, #e9d8c4, #d8b48f); color: #6b4a2b; }
.chat-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 6px; }
.msg { display: flex; gap: 9px; align-items: flex-end; }
.msg.us { flex-direction: row-reverse; text-align: right; }
.msg > div { max-width: 80%; display: flex; flex-direction: column; gap: 4px; }
.msg.us > div { align-items: flex-end; }
.msg.follow { margin-top: -8px; }
.msg-meta { font-size: 11px; color: var(--text-3); letter-spacing: 0; }
.bubble { margin: 0; padding: 10px 14px; border-radius: 18px; font-size: 14px; line-height: 1.4; text-align: left; }
.msg.them .bubble { background: #f2f2f5; color: var(--text); border-bottom-left-radius: 6px; }
.msg.us .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.chat-resolved {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 18px 16px; padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, .06); font-size: 12px; font-weight: 600; color: #1f8a3d;
}
.chat-resolved svg { width: 15px; height: 15px; fill: currentColor; }

/* Animación: cada mensaje entra a su tiempo; antes de la respuesta, "escribiendo…" */
.chat .msg, .chat-resolved { opacity: 0; transform: translateY(8px); }
.chat.is-playing .msg, .chat.is-playing .chat-resolved { animation: msg-in .45s var(--ease-out) both; }
.chat.is-playing .msg.them { animation-delay: .3s; }
.chat .msg.reply { position: relative; opacity: 1; transform: none; }
.chat .msg.reply > div { opacity: 0; transform: translateY(8px); }
.chat.is-playing .msg.reply { animation: none; }
.chat.is-playing .msg.reply > div { animation: msg-in .45s var(--ease-out) 2.2s both; }
.chat.is-playing .msg.follow { animation-delay: 3.1s; }
.chat.is-playing .chat-resolved { animation-delay: 3.9s; }
.typing {
  position: absolute; right: 0; bottom: 0; display: flex; gap: 4px; padding: 12px 14px;
  border-radius: 18px; border-bottom-right-radius: 6px; background: #f2f2f5; opacity: 0;
}
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #a1a1a6; animation: typing-dot 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.chat.is-playing .typing { animation: typing-show 1.3s ease both .9s; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes typing-show { 0% { opacity: 0; transform: translateY(6px); } 15%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes typing-dot { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }

/* Consultoría de IA: veredictos */
.tile-ai { background: linear-gradient(180deg, #1d1d1f, #120f1a); }
.verdicts { border-radius: 20px; padding: 22px 22px 8px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.verdicts-title { font-size: 17px; font-weight: 600; margin-bottom: 10px; }
/* Ventana que muestra unas 5 filas; la lista sube sola en bucle y se difumina arriba y abajo */
.verdicts-window {
  height: 230px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 82%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 82%, transparent);
}
.verdicts-list { will-change: transform; }
.verdicts.is-scrolling .verdicts-list { animation: verdicts-scroll var(--scroll-dur, 30s) ease-in-out infinite; }
.verdicts:hover .verdicts-list { animation-play-state: paused; }
/* Quieto arriba → sube hasta el final → pausa en "Replacing your whole team" → se desvanece y vuelve al inicio */
@keyframes verdicts-scroll {
  0%, 6%   { transform: translateY(0); opacity: 1; }
  84%      { transform: translateY(var(--scroll-dist, -300px)); opacity: 1; }
  93%      { transform: translateY(var(--scroll-dist, -300px)); opacity: 1; }
  96%      { transform: translateY(var(--scroll-dist, -300px)); opacity: 0; }
  97%      { transform: translateY(0); opacity: 0; }
  100%     { transform: translateY(0); opacity: 1; }
}
.verdicts li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: var(--fs-small); color: rgba(245, 245, 247, .85); }
.verdicts b { flex: none; font-size: var(--fs-caption); font-weight: 600; padding: 4px 10px; border-radius: 980px; }
.verdicts .yes { color: var(--green); background: rgba(48, 209, 88, .14); }
.verdicts .no { color: #ff6961; background: rgba(255, 69, 58, .14); }

/* Automatización: flujo de pasos */
.flow ol { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.flow li {
  position: relative; width: 74%; text-align: center; padding: 13px 16px; border-radius: 14px;
  background: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px -12px rgba(0, 0, 0, .18);
}
.flow li + li::before {
  content: ""; position: absolute; left: 50%; top: -22px; width: 2px; height: 22px; margin-left: -1px;
  background: repeating-linear-gradient(to bottom, var(--accent) 0 4px, transparent 4px 8px);
  background-size: 2px 16px; animation: flow-dash 1s linear infinite;
}
.flow li:last-child { background: var(--accent); color: #fff; }
.flow-meta { margin-top: 18px; text-align: center; font-size: 14px; color: var(--text-2); }
@keyframes flow-dash { to { background-position: 0 16px; } }

/* Video de chat tipo app: es una pantalla, así que va como ventana con esquinas y sombra, sin difuminar */
.promo-image.chat-app-video {
  max-width: 600px; margin-bottom: 44px; border-radius: 14px;
  -webkit-mask-image: none; mask-image: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 30px 60px -28px rgba(0, 0, 0, .4);
}
.tile-projects { background: #0b0b0e; } /* mismo tono que el fondo de su imagen */
/* El fondo de la imagen de los cubos es algo más claro arriba y a los lados: difuminado más amplio */
.tile-projects .promo-image {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent),
                      linear-gradient(to bottom, transparent, #000 22%);
          mask-image: linear-gradient(to right, transparent, #000 20%, #000 80%, transparent),
                      linear-gradient(to bottom, transparent, #000 22%);
}
/* Al pasar el cursor, la imagen se acerca un poco */
.tile-promo.is-visible:hover .promo-image { transform: scale(1.03); transition-delay: 0s; }



/* Títulos y subtítulos de tarjetas en líneas parejas */
.promo-headline, .promo-subhead, .section-headline { text-wrap: balance; }

/* ---------- Carrusel ---------- */
.section-headline { font-size: var(--fs-h2); font-weight: 600; line-height: var(--lh-tight); text-align: center; margin-bottom: 64px; }
.gallery-section { padding: var(--space-section) 0; overflow: hidden; }
.gallery-section .section-headline { margin-bottom: 48px; padding: 0 22px; }
.gallery-viewport { overflow: hidden; }
.gallery-track { display: flex; gap: 20px; transition: transform var(--slide-transition, 480ms) ease-in-out; will-change: transform; }
.gallery-item {
  flex: 0 0 min(var(--content), calc(100vw - 2 * var(--gutter))); height: min(550px, 60vw); min-height: 380px; border-radius: 22px;
  background: radial-gradient(120% 120% at 80% 10%, var(--c2), var(--c1) 70%);
  position: relative; display: flex; align-items: flex-end; overflow: hidden;
  opacity: .5; transition: opacity var(--slide-transition, 480ms) ease-in-out;
}
.gallery-item.is-current { opacity: 1; }
/* Tarjeta con foto: la foto cubre la tarjeta y un degradado a la izquierda mantiene legible el texto */
.gallery-item.has-image {
  background:
    linear-gradient(to right, var(--c1) 0%, var(--c1) var(--fade-solid, 0%), rgba(0, 0, 0, 0) var(--fade, 45%)),
    var(--img) right center / cover no-repeat,
    var(--c1);
}
.gallery-item.has-image::after { display: none; }
.gallery-item.has-image .gallery-copy { max-width: 470px; }
.gallery-item.has-image .gallery-copy p { max-width: var(--copy-w, none); }
/* Imagen ancha y clara: va más chica a la derecha, con los bordes fundidos en el fondo oscuro */
.gallery-item.has-image.img-inset { background: radial-gradient(120% 120% at 80% 10%, #4a3a30, var(--c1) 70%); }
.img-inset::before {
  content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 66%; aspect-ratio: 1672 / 941; background: var(--img) center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%), linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 22%), linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
          mask-composite: intersect;
}
.img-inset .gallery-copy { position: relative; z-index: 1; max-width: 340px; }
.gallery-copy { padding: 40px; color: #fff; text-align: left; max-width: 560px; }
.gallery-copy > * {
  opacity: 0; transform: translateY(10px);
  transition: opacity 160ms ease-in-out, transform 160ms ease-in-out;
}
.is-current .gallery-copy > * { opacity: 1; transform: none; }
.is-current .gallery-copy > :nth-child(1) { transition-delay: 200ms; }
.is-current .gallery-copy > :nth-child(2) { transition-delay: 280ms; }
.is-current .gallery-copy > :nth-child(3) { transition-delay: 360ms; }
.is-current .gallery-copy > :nth-child(4) { transition-delay: 440ms; }
.is-current .gallery-copy > :nth-child(5) { transition-delay: 520ms; }
/* Logo de la tecnología (marca de su dueño; solo identifica con qué trabajamos) */
.stack-logo { display: block; width: 44px; height: 44px; fill: #fff; margin-bottom: 16px; }
.eyebrow { display: block; font-size: var(--fs-caption); font-weight: 600; opacity: .8; }
.gallery-copy h3 { font-size: var(--fs-h4); line-height: var(--lh-tight); font-weight: 600; margin: 6px 0; }
.gallery-copy p { font-size: var(--fs-body); line-height: var(--lh-lead); margin-bottom: 18px; }
.gallery-item::after {
  content: ""; position: absolute; right: 8%; top: 14%; width: 38%; aspect-ratio: 4 / 3; border-radius: 16px;
  background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  backdrop-filter: blur(10px);
}

.gallery-controls { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; }
.dotnav { display: flex; gap: 12px; align-items: center; padding: 18px 20px; border-radius: 980px; background: rgba(232, 232, 237, .7); backdrop-filter: blur(20px); }
.dot {
  position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 980px;
  background: rgba(0, 0, 0, .42); cursor: pointer; overflow: hidden;
  transition: width 250ms linear, background-color 100ms linear;
}
.dot:hover { background: rgba(0, 0, 0, .64); }
.dot.is-current { width: 48px; background: rgba(0, 0, 0, .2); }
.dot .fill { position: absolute; inset: 0; background: rgba(0, 0, 0, .64); transform: scaleX(0); transform-origin: left; border-radius: inherit; }
.dot.is-current .fill { animation: dot-progress var(--slide-ms, 5000ms) linear forwards; }
.dot.is-current.no-progress .fill { animation: none; transform: scaleX(1); }
.gallery-section.is-paused .dot.is-current .fill { animation-play-state: paused; }
@keyframes dot-progress { to { transform: scaleX(1); } }
.play-toggle { width: 56px; height: 56px; border: 0; border-radius: 50%; background: rgba(232, 232, 237, .7); cursor: pointer; display: grid; place-items: center; transition: background-color 100ms linear; }
.play-toggle:hover { background: rgba(210, 210, 215, .9); }
.play-toggle svg { width: 24px; height: 24px; fill: var(--text); }
.play-toggle .i-play, .gallery-section.is-paused .i-pause { display: none; }
.gallery-section.is-paused .i-play { display: block; }

.tile-cta { padding-bottom: 24px; }
/* Imagen del cable roto: los bordes se funden con el gris de la sección */
.contact-visual {
  margin: 28px auto 0; max-width: 560px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
                      linear-gradient(to bottom, transparent, #000 8%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent),
                      linear-gradient(to bottom, transparent, #000 8%, #000 88%, transparent);
          mask-composite: intersect;
}
.contact-visual video { display: block; width: 100%; height: auto; opacity: .5; }
.contact-visual img { display: block; width: 100%; height: auto; }
/* Contacto en negro: el video tiene fondo negro y así se funde sin bordes */
.tile-cta-dark { background: var(--dark); color: var(--on-dark); }
.contact-email { margin-top: 14px; font-size: var(--fs-small); }
.tile-cta-dark .contact-email a { color: rgba(245, 245, 247, .75); }
.tile-cta-dark .subhead { color: rgba(245, 245, 247, .75); }
/* Subtítulos más angostos y en líneas parejas (sin palabras sueltas al final) */
.tile-cta .subhead { font-size: var(--fs-lead-lg); max-width: 640px; margin-left: auto; margin-right: auto; text-wrap: balance; }
.hero-subhead { text-wrap: balance; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); font-size: var(--fs-small); line-height: 1.4; letter-spacing: -.01em; color: var(--text-2); }
.footer-content { width: calc(100% - 2 * var(--gutter)); max-width: var(--content); margin: 0 auto; padding: 17px 0 21px; }
.footer-brand { display: inline-block; color: var(--text); padding: 8px 0 16px; }
.footer-logo { font-size: 17px; line-height: 24px; }
.footnote { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.directory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0; }
.directory h3 { font-size: var(--fs-small); font-weight: 600; color: var(--text); margin-bottom: 12px; }
.directory a { display: block; color: #424245; margin-bottom: 10px; }
.legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; font-size: var(--fs-caption); }
.legal a { color: #424245; }

/* ---------- Aviso de cookies ---------- */
.cookie-banner {
  position: fixed; z-index: 200; left: 50%; bottom: 20px; width: min(560px, calc(100% - 24px));
  transform: translate(-50%, 16px); opacity: 0;
  background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-radius: 18px; padding: 20px 22px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 24px 60px -20px rgba(0, 0, 0, .35);
  transition: opacity var(--dur-md) var(--ease-out), transform var(--dur-md) var(--ease-out);
}
.cookie-banner.is-open { opacity: 1; transform: translate(-50%, 0); }
.cookie-title { font-size: 17px; font-weight: 600; }
.cookie-text { font-size: 14px; color: var(--text-2); margin-top: 4px; }
.cookie-text a { white-space: nowrap; }
/* Aceptar y Rechazar con el mismo tamaño y peso: elegir debe ser igual de fácil */
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.cookie-actions .btn { min-width: 112px; }
@media (max-width: 734px) {
  .cookie-banner { bottom: 12px; padding: 16px 18px; }
  .cookie-actions .btn { flex: 1; }
}

/* ---------- Aparición al hacer scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--d, 0) * 80ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsivo (mismos cortes que Apple) ---------- */
@media (max-width: 1068px) {
  :root { --fs-display: 44px; --fs-h2: 40px; --fs-h3: 32px; --fs-h4: 28px; --fs-lead-lg: 21px; --fs-lead: 19px; }
}
@media (max-width: 834px) {
  :root { --nav-h: 56px; }
  .logo-text { font-size: 17px; line-height: 24px; }
  .nav-list, .nav-cta { display: none; }
  .nav-right { gap: 8px; }
  .nav-burger { display: flex; flex-direction: column; gap: 6px; background: none; border: 0; padding: 10px; cursor: pointer; }
  .nav-burger span { width: 17px; height: 1.5px; background: var(--text); transition: transform var(--dur) var(--ease); }
  .nav.is-mobile-open .nav-burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.is-mobile-open .nav-burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .mobile-menu {
    display: flex; flex-direction: column; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
    background: var(--bg); padding: 24px 48px; visibility: hidden; transition: visibility var(--dur) step-end;
  }
  .mobile-menu a { font-size: 28px; font-weight: 600; color: var(--text); padding: 6px 0; opacity: 0; transform: translateY(-8px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); }
  .nav.is-mobile-open .mobile-menu { visibility: visible; transition: visibility var(--dur) step-start; }
  .nav.is-mobile-open .mobile-menu a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * var(--stagger)); }
  .flyout { display: none; }
}
@media (max-width: 734px) {
  :root { --gutter: 16px; }
}
@media (max-width: 734px) {
  :root { --fs-display: 40px; --fs-h2: 32px; --fs-h3: 28px; --fs-h4: 24px; --fs-lead-lg: 19px; --fs-lead: 17px; --space-section: 44px; }
  .ctas { gap: 11px; }
  .grid { grid-template-columns: 1fr; }
  .tile-promo { min-height: 500px; }
  .tile-hero { padding-bottom: 0; }
  .tile-hero .headline br { display: none; } /* en celular el título se acomoda solo */
  /* En celular: texto centrado arriba y el video debajo de los botones */
  .hero-stage.hero-split { grid-template-columns: 1fr; gap: 8px; padding: 28px 0 32px; }
  .hero-split .tile-copy { text-align: center; }
  .hero-split .hero-subhead { margin: 10px auto 0; }
  .hero-split .ctas { justify-content: center; }
  .hero-split .hero-video { margin: 16px 0 0; }
  :lang(de) .tile-hero .headline { font-size: 34px; hyphens: manual; -webkit-hyphens: manual; }
  .hero-split .hero-video video { border-radius: 18px; }
  .hero-video { margin-top: 32px; }
  .hero-video video { border-radius: 18px; }
  .video-replay { right: 10px; bottom: 10px; width: 36px; height: 36px; }
  .parallax-wrap { margin-top: 32px; padding-bottom: 44px; }
  .log { padding: 20px 18px 6px; }
  /* En celular: el flujo arriba y el texto abajo */
  .gallery-dark { padding: 24px 0 40px; }
  .gallery-dark .gallery-item { height: 360px; min-height: 0; flex-basis: 80vw; }
  .gallery-dark .auto-visual { top: 18px; left: 18px; right: 18px; width: auto; padding: 16px 18px; transform: none; }
  .gallery-dark .auto-steps { gap: 10px; }
  .gallery-dark .auto-steps li { padding-left: 26px; }
  .gallery-dark .auto-steps li::before { width: 12px; height: 12px; top: 3px; }
  .gallery-dark .auto-steps::before { left: 5px; }
  .gallery-dark .gallery-copy { padding: 20px; }
  .gallery-dark .gallery-copy p { font-size: var(--fs-small); }
  .auto-visual { top: 22px; right: 22px; left: 22px; width: auto; transform: none; padding: 20px; }
  .auto-steps { gap: 14px; }
  .auto-steps li { font-size: 15px; }
  .promo-visual:has(.promo-art) { padding: 28px 0 36px; }
  /* En celular el cable se ve muy fino: agrandamos y recortamos los costados */
  .contact-visual { margin-top: 12px; max-width: 75%; }
  .contact-visual video, .contact-visual img { width: 100%; }
  .gallery-copy { padding: 24px; }
  .stack-logo { width: 34px; height: 34px; margin-bottom: 10px; }
  .gallery-item::after { display: none; }
  .gallery-item { height: 500px; }
  .img-inset::before { top: 0; transform: none; width: 100%; }
  /* En celular: foto arriba a la derecha y texto abajo sobre el color sólido */
  .gallery-item.has-image {
    background:
      linear-gradient(to top, var(--c1) 46%, rgba(0, 0, 0, 0) 66%),
      var(--img) 80% top / 175% auto no-repeat,
      var(--c1);
  }
  .directory { grid-template-columns: 1fr 1fr; }
  .legal { flex-direction: column; gap: 8px; }
}

/* Respeta a quien pidió menos movimiento en su sistema */

/* ---------- Páginas legales ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 64px 22px 100px; }
.legal-page .back { display: inline-block; font-size: 14px; margin-bottom: 28px; }
.legal-page h1 { font-size: 48px; line-height: 1.08; font-weight: 600; margin-bottom: 10px; }
.legal-page .lead { color: var(--text-2); font-size: 17px; margin-bottom: 36px; }
.legal-page h2 { font-size: 24px; font-weight: 600; margin: 40px 0 10px; letter-spacing: .009em; }
.legal-page h3 { font-size: 17px; font-weight: 600; margin: 22px 0 6px; }
.legal-page p, .legal-page li { font-size: 17px; color: #333336; }
.legal-page p + p { margin-top: 10px; }
.legal-page ul { list-style: disc; padding-left: 22px; margin: 8px 0; }
.legal-page address { font-style: normal; }
/* Datos que el cliente debe completar */
.ph { background: #fff4d6; color: #7a4b00; border-radius: 4px; padding: 0 4px; }
.legal-warning { background: #fff4d6; color: #7a4b00; border-radius: 14px; padding: 14px 18px; font-size: 14px; margin-bottom: 32px; }
@media (max-width: 734px) { .legal-page h1 { font-size: 36px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .reveal, .promo-art, .promo-image { opacity: 1; transform: none; }
  /* El chat se muestra completo, sin "escribiendo…" */
  .chat .msg, .chat .msg > div, .chat-resolved { animation: none !important; opacity: 1 !important; transform: none !important; }
  .typing { display: none; }
  /* La lista de IA no se mueve: se puede recorrer con el dedo o la rueda */
  .verdicts-window { overflow-y: auto; -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Sistema de medidas (tablet y computadora) ---------- */
@media (max-width: 1068px) { :root { --pad-side: 32px; } .promo-art { max-height: none !important; } }
@media (max-width: 734px) { :root { --pad-side: 22px; } }
@media (min-width: 735px) {
  /* Las 4 tarjetas con la misma altura; el visual va en una caja igual en todas, abajo */
  .grid { grid-auto-rows: 1fr; }
  .tile-promo { min-height: var(--h-tile); }
  .promo-visual, .promo-visual:has(.promo-art), .promo-visual:has(.promo-image) { align-items: flex-end; padding: 16px 0 var(--pad-side); min-height: 0; }
  .tile-projects .promo-visual { padding-bottom: 0; } /* el render se funde con el fondo y llega hasta abajo */
  .promo-art { max-width: 100%; max-height: var(--visual-h); }
  .promo-image, .promo-image.chat-app-video { width: auto; height: auto; max-width: 100%; max-height: var(--visual-h); margin: 0; }
  .tile-projects .promo-image { max-height: calc(var(--visual-h) + var(--pad-side) - 16px); }

  /* Automatización: tarjetas más anchas, las vecinas asoman a los lados */
  #automation { min-height: var(--h-band); }
  .gallery-dark { padding: 28px 0 32px; }
  .gallery-dark .gallery-item { flex-basis: min(760px, 66vw); height: 330px; }
  .gallery-dark .gallery-copy { max-width: 380px; }

  /* En qué trabajamos */
  .gallery-item { height: min(var(--h-gallery), 60vw); }

  /* Cierre: misma altura que Automatización; el cubo ocupa lo que queda y su reflejo toca el borde */
  .tile-cta-dark { height: var(--h-band); padding-bottom: 0; display: flex; flex-direction: column; }
  .tile-cta-dark .contact-visual { flex: 1; min-height: 0; width: 100%; max-width: 480px; margin: 16px auto 0; display: flex; align-items: flex-end; }
  .tile-cta-dark .contact-visual img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
  /* Sin difuminado abajo: el reflejo del cubo llega hasta el borde del bloque */
  .tile-cta-dark .contact-visual {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 8%);
            mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 8%);
  }
}
