/* Piel base: tipografías, estructura de página y piezas comunes. Medidas de SatcontrolWeb (493548b). */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/archivo-latin-800-normal.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; scroll-padding-top: calc(var(--alto-cabecera) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body, h1, h2, h3, h4, p, figure, ul, ol, dl, dd { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }

body {
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.04; letter-spacing: -.02em; overflow-wrap: break-word; }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2.35rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: 18px; }
h3, .h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; letter-spacing: -.01em; margin-bottom: 6px; }
h1 em, h2 em { font-style: normal; color: var(--azul); }
p + p { margin-top: 12px; }

/* ---------- Estructura ---------- */

.contenedor { max-width: 1100px; margin: 0 auto; padding-inline: 34px; }
@media (max-width: 600px) { .contenedor { padding-inline: 16px; } }

main { isolation: isolate; }
.seccion { padding-block: 56px; }
.seccion-hero { padding-block: 72px 56px; }
.seccion-hero, main > .seccion { position: relative; }
/* Fondo a todo lo ancho con la marca de agua de JM2; las secciones pares, en blanco y en espejo. */
.seccion-hero::before,
main > .seccion::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  pointer-events: none;
  background: var(--fondo) url("/assets/img/marca/clara.svg") center / cover no-repeat;
}
main > .seccion:nth-of-type(even)::before {
  background: var(--blanco) url("/assets/img/marca/blanca.svg") center / cover no-repeat;
  transform: scaleX(-1);
}
main > .seccion:has(.texto-legal)::before { background-image: none; }
/* Sin rayas entre secciones (petición del titular, 2026-10-09): cuando una sección va pegada a otra (o a la
   parte de arriba), su fondo, color y marca de agua, se funde en ese borde con el gris de la página, así
   que el blanco y el gris pasan de uno a otro sin corte. Junto a la cinta, las letras gigantes, la franja
   de clientes o el cierre no se funde: esas piezas hacen de corte. En una sección baja, como mucho un 30 %. */
main > .seccion::before, .seccion-hero::before { -webkit-mask-image: linear-gradient(transparent, #000 var(--fundido-arriba, 0px), #000 calc(100% - var(--fundido-abajo, 0px)), transparent); mask-image: linear-gradient(transparent, #000 var(--fundido-arriba, 0px), #000 calc(100% - var(--fundido-abajo, 0px)), transparent); }
:is(.seccion-hero, .seccion) + .seccion::before { --fundido-arriba: min(140px, 30%); }
:is(.seccion-hero, .seccion):has(+ .seccion)::before { --fundido-abajo: min(140px, 30%); }
/* Sección con su color de fondo pero sin las líneas de la marca (petición del titular: «Nuestros productos»,
   «Algunos de nuestros trabajos» y «Cuéntanos qué necesitas» de la portada). */
main > .seccion.seccion--sin-marca::before { background-image: none; }

/* ---------- Texto ---------- */

.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--naranja-texto); margin-bottom: 16px; }
.entradilla { color: var(--tinta-2); font-size: 1.08rem; max-width: 60ch; margin-top: 18px; }
h2 + .entradilla { margin-top: 0; }
.micro { display: block; font-size: .82rem; color: var(--tinta-2); }
.micro a { color: var(--azul); }
.enlace-flecha { color: var(--azul); font-weight: 600; text-decoration: none; }
.enlace-flecha:hover, .enlace-flecha:focus-visible { text-decoration: underline; }

/* ---------- Botones ---------- */

.btn { display: inline-block; font-weight: 600; font-size: .9rem; line-height: 1.3; padding: 11px 22px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; text-align: center; }
.btn-primario { background: linear-gradient(135deg, var(--azul), var(--azul-hondo)); color: var(--sobre-azul); }
.btn-primario:hover { background: var(--azul-hondo); }
.btn-fantasma { background: var(--blanco); color: var(--azul); border-color: var(--azul); }
.btn-fantasma:hover { background: var(--halo); }
.btn-blanco { background: var(--blanco); color: var(--azul-hondo); }
.btn-fantasma-blanco { background: transparent; color: var(--sobre-azul); border-color: var(--sobre-azul); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Tarjetas y rejillas ---------- */

.tarjeta { min-width: 0; overflow-wrap: break-word; background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: 22px 22px 24px; box-shadow: var(--sombra-suave); }
.tarjeta p { color: var(--tinta-2); font-size: .95rem; }
.rejilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); margin-top: 28px; }
.punto { display: inline-block; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; background: var(--color, var(--azul)); }

.lista-puntos { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 16px; }
.lista-puntos li { position: relative; padding-left: 24px; }
.lista-puntos li::before { content: ""; position: absolute; left: 0; top: .5em; width: 11px; height: 11px; border-radius: 50%; background: var(--naranja); }

.tarjeta-servicio, .tarjeta-caso { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit; transition: box-shadow .15s ease, transform .15s ease; }
.tarjeta-servicio:hover, .tarjeta-caso:hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.tarjeta-servicio h3, .tarjeta-caso h3 { margin: 0; }
.tarjeta-servicio .enlace-flecha { margin-top: auto; }
.numero { font-family: var(--display); font-weight: 800; font-size: 1.05rem; color: var(--naranja-texto); }
.tarjeta-caso { position: relative; overflow: hidden; padding-left: 28px; }
.tarjeta-caso::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--azul); }
.sector { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--naranja-texto); }
@media (prefers-reduced-motion: reduce) {
  .tarjeta-servicio, .tarjeta-caso { transition: none; }
  .tarjeta-servicio:hover, .tarjeta-caso:hover { transform: none; }
}

/* ---------- Franja de clientes: dos copias de la lista que se desplazan; quieta si se pide menos movimiento ---------- */

.desfile { overflow: hidden; margin-top: 36px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
/* La duración la pone la plantilla (2 s por nombre), para que vaya igual de despacio con más clientes. */
.desfile-pista { display: flex; width: max-content; animation: desfile var(--desfile-duracion, 45s) linear infinite; }
.desfile:hover .desfile-pista { animation-play-state: paused; }
.desfile-lista { display: flex; gap: 36px; margin: 0; padding: 0 36px 0 0; list-style: none; }
.desfile-lista li { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--gris-marca); white-space: nowrap; }
@keyframes desfile { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .desfile { mask-image: none; }
  .desfile-pista { animation: none; width: auto; }
  .desfile-lista { flex-wrap: wrap; gap: 10px 24px; padding-right: 0; }
  .desfile-lista[aria-hidden="true"] { display: none; }
}

/* ---------- Piezas de página ---------- */

.producto h2 { display: flex; align-items: center; gap: 12px; }
.producto .punto { width: 22px; height: 22px; }

.servicio-cuerpo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .servicio-cuerpo { grid-template-columns: 1fr; } }

.pasos { list-style: none; padding: 0; counter-reset: paso; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-top: 24px; }
.pasos li { counter-increment: paso; background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; padding: 20px; }
.pasos li::before { content: "0" counter(paso); display: block; font-family: var(--display); font-weight: 800; color: var(--naranja-texto); margin-bottom: 8px; }
.pasos p { color: var(--tinta-2); font-size: .95rem; }

/* Preguntas frecuentes de cada servicio: abiertas o cerradas sin JavaScript (<details>). */
.preguntas { display: grid; gap: 12px; max-width: 860px; margin-top: 8px; }
.pregunta { background: var(--blanco); border: 1px solid var(--linea); border-radius: 14px; box-shadow: var(--sombra-suave); }
.pregunta summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--tinta); }
.pregunta summary::-webkit-details-marker { display: none; }
.pregunta summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--halo); color: var(--azul); font-size: 1.2rem; line-height: 1; transition: rotate .2s ease; }
.pregunta[open] summary::after { rotate: 45deg; }
.pregunta summary:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; border-radius: 14px; }
.pregunta p { padding: 0 22px 20px; color: var(--tinta-2); }
@media (prefers-reduced-motion: reduce) { .pregunta summary::after { transition: none; } }

.homologacion { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.homologacion img { height: 140px; width: auto; }

/* Las cifras que cuentan desde cero al aparecer (movimiento.js): el «20» de la portada y las de /nosotros/. */
.cifra { display: block; font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; letter-spacing: -.02em; color: var(--azul); margin-bottom: 6px; }

/* El mapa propio de la oficina (scripts/mapa/generar-mapa.py), en /contacto/ y en /nosotros/. */
.mapa { margin: 0; }
.mapa-enlace { position: relative; display: block; overflow: hidden; border-radius: 16px; border: 1px solid var(--linea); box-shadow: var(--sombra-suave); }
.mapa-enlace img { display: block; width: 100%; height: auto; transition: scale .4s ease; }
.mapa-enlace:hover img { scale: 1.03; }
.mapa-enlace:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }
.mapa-boton { position: absolute; left: 16px; bottom: 16px; padding: 9px 16px; border-radius: 999px; background: var(--azul); color: var(--sobre-azul); font-weight: 600; font-size: .9rem; box-shadow: var(--sombra); }
.mapa figcaption { margin-top: 8px; font-size: .78rem; color: var(--tinta-2); }
.mapa figcaption a { color: var(--tinta-2); }
@media (prefers-reduced-motion: reduce) { .mapa-enlace img { transition: none; } .mapa-enlace:hover img { scale: none; } }

/* ---------- Textos legales ---------- */

.texto-legal { max-width: 75ch; }
.texto-legal h2 { font-size: 1.25rem; margin: 28px 0 10px; }
.texto-legal p { color: var(--tinta-2); }
.texto-legal a { color: var(--azul); }
.texto-legal table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: .92rem; }
.texto-legal th, .texto-legal td { border: 1px solid var(--linea); padding: 8px 10px; text-align: left; vertical-align: top; }
.datos-identificativos { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; }
.datos-identificativos dt { font-weight: 600; }
@media (max-width: 520px) {
  .datos-identificativos { grid-template-columns: 1fr; gap: 2px; }
  .datos-identificativos dd { margin-bottom: 10px; }
}
