/* ==========================================================================
   TMS upgrade — capa premium acotada por sección.
   Dirección: taller de precisión. Grafito #2b2b2b, blanco, gris acero,
   rojo láser como único acento. Oswald para controles, Poppins para texto.
   Cargar AL FINAL del <head>. Todo va con prefijo de sección (#id / .tms-*).
   ========================================================================== */
:root {
  /* Paleta TMS: grafito + acero + rojo láser */
  --tms-ink: #2b2b2b;          /* grafito: nav, footer, texto fuerte */
  --tms-ink-deep: #1c1c1c;     /* grafito profundo: tarjetas oscuras */
  --tms-text: #2b2b2b;
  --tms-text-muted: #4b5057;   /* acero oscuro: texto secundario (contraste 8:1) */
  --tms-text-body: #2f3237;    /* texto de lectura sobre claro */
  --tms-text-on-dark: #dcdcdc; /* texto de lectura sobre grafito */
  --tms-font-body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --tms-steel: #8a8a8a;        /* acero */
  --tms-mist: #f2f2f0;         /* gris niebla: fondo alterno de secciones */
  --tms-hairline: #e3e3e0;     /* líneas finas sobre claro */
  --tms-line: rgba(255, 255, 255, 0.1); /* líneas finas sobre oscuro */
  --tms-laser: #e10600;        /* único acento */
  --tms-laser-dark: #b80500;
  --tms-section-y: clamp(56px, 6vw, 88px);
  --tms-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --tms-radius: 6px;           /* cantos: casi rectos, como pieza maquinada */
  --tms-chamfer: 18px;         /* chaflán de esquina para imágenes y medios */
}

/* ---------- Hero: igual al original; solo accesibilidad en tarjetas ---------- */
#hero .card-two .title { text-transform: uppercase; }
#hero .icon-box .title span { color: #000; transition: 0.3s; } /* antes era <a> sin destino */
#hero .icon-box:hover .title span,
#hero .icon-box:focus-visible .title span,
#hero .icon-box:focus-visible .icon { color: #fff; } /* igual que el hover original */
#hero .icon-box:focus-visible { background: #222; }
@media (max-width: 1279px) { .mobile-nav-toggle { min-width: 28px; min-height: 28px; } } /* sin salto al cargar el ícono */
#hero .icon-box { cursor: pointer; }
#hero .icon-box:focus-visible { outline: 3px solid var(--tms-laser); outline-offset: 4px; }

/* ---------- Ritmo de secciones: misma respiración, fondos alternos ----------
   blanco (about) → grafito (láser) → niebla (ubicación) → blanco (servicios)
   → niebla (trabajos) → blanco (contacto) → niebla (marcas) → grafito (footer) */
#about, #ubicacion, #servicios, #galeria, #faq {
  padding-top: var(--tms-section-y);
  padding-bottom: var(--tms-section-y);
  margin-top: 0 !important;
}
/* servicios y galería son .container: fondo a todo el ancho sin tocar el markup */
#servicios, #galeria {
  box-shadow: 0 0 0 100vmax var(--tms-bg);
  clip-path: inset(0 -100vmax);
}
#about, #faq, #servicios { --tms-bg: #fff; background: #fff; }
#ubicacion, #galeria { --tms-bg: var(--tms-mist); background: var(--tms-mist); }
.tms-brands { background: var(--tms-mist); border-top: 1px solid var(--tms-hairline); padding-top: 48px !important; padding-bottom: 56px !important; }
#faq { border-top: 1px solid var(--tms-hairline); }
#about { padding-top: 24px; padding-bottom: 24px; } /* arriba: como el original; abajo: lo sigue la onda */
#about .content h3 { margin-top: 28px; }
#about .content h3:first-child { margin-top: 0; }
#servicios .service-icon { min-height: 236px; }

/* Encabezados de sección: un solo sistema (Oswald + barra láser) */
#about .section-header h2,
#ubicacion .section-header h2,
#servicios > h2,
#galeria > h2,
#faq h2,
.tms-brands > h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  color: var(--tms-text);
  margin: 0 0 16px;
  padding-bottom: 18px;
  position: relative;
  text-align: center;
}
#about .section-header h2::after,
#ubicacion .section-header h2::after,
#servicios > h2::after,
#galeria > h2::after,
#faq h2::after,
.tms-brands > h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--tms-laser);
  transform: translateX(-50%);
}
#about .section-header,
#ubicacion .section-header { padding-bottom: 40px; }
#about .section-header p,
#ubicacion .section-header p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--tms-text-muted);
  font-size: 17px;
  line-height: 1.6;
  opacity: 1;
}
#servicios > h2, #galeria > h2 { margin-bottom: 48px !important; }
#faq h2 { margin-bottom: 32px; }


/* ---------- Servicios: tarjeta legible sin depender del hover ----------
   icono → título → descripción → acción (Ver más / Cotizar), misma altura por fila */
#servicios .row > [class*="col-"] { display: flex; }
#servicios .service-icon {
  flex: 1;
  min-height: 0;
  justify-content: flex-start;
  gap: 10px;
  padding: 28px 22px 20px;
  background: #fff;
  border: 1px solid var(--tms-hairline);
  border-radius: var(--tms-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s var(--tms-ease), box-shadow 0.3s ease, border-color 0.3s ease;
}
#servicios .service-icon:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.35);
}
#servicios .service-icon i { font-size: 30px; margin: 0 0 4px; color: var(--tms-ink); }
#servicios .service-icon h3 { margin: 0; padding: 0; width: 100%; font-size: 19px; font-weight: 700; line-height: 1.2; }
#servicios .service-icon p {
  position: static;
  transform: none;
  width: auto;
  height: auto;
  display: block;
  padding: 0;
  margin: 0;
  opacity: 1;
  backdrop-filter: none;
  color: var(--tms-text-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
}
#servicios .service-icon:hover h3,
#servicios .service-icon:hover i,
#servicios .service-icon.active h3,
#servicios .service-icon.active i { transform: none; opacity: 1; }
#servicios .service-icon:hover p { top: auto; transform: none; }
/* Móvil: 13 tarjetas apiladas eran ~3700px; carrusel deslizable con la siguiente asomando */
@media (max-width: 575px) {
  #servicios .row {
    flex-wrap: nowrap;
    justify-content: flex-start !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    margin-inline: -12px;
    padding: 4px 16px 20px;
    gap: 12px;
    scrollbar-width: none;
  }
  #servicios .row::-webkit-scrollbar { display: none; }
  #servicios .row > [class*="col-"] {
    flex: 0 0 82%;
    max-width: 82%;
    padding: 0;
    margin-bottom: 0 !important;
    scroll-snap-align: start;
  }
  #servicios > h2 { margin-bottom: 28px !important; }
}
/* Tarjetas con página propia: toda la tarjeta es el enlace; una flecha discreta lo indica */
#servicios .service-icon:has(> a.tms-card-link) { cursor: pointer; }
#servicios .service-icon > a.tms-card-link {
  position: static;          /* el ::before se ancla a la tarjeta (position: relative) */
  margin: 0 !important;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0;              /* el nombre lo da aria-label */
}
#servicios .service-icon > a.tms-card-link::before { /* área clicable = toda la tarjeta */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
#servicios .service-icon > a.tms-card-link::after {  /* flecha en la esquina */
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--tms-hairline);
  background: #fff;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
#servicios .service-icon:has(> a.tms-card-link)::after {
  content: "";
  position: absolute;
  top: 27px;
  right: 27px;
  width: 14px;
  height: 14px;
  background: var(--tms-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M5.5 4H12v6.5' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M5.5 4H12v6.5' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: background-color 0.25s ease;
  pointer-events: none;
}
#servicios .service-icon:has(> a.tms-card-link):hover > a.tms-card-link::after,
#servicios .service-icon > a.tms-card-link:focus-visible::after {
  border-color: var(--tms-laser);
  background: var(--tms-laser);
}
#servicios .service-icon:has(> a.tms-card-link):hover::after,
#servicios .service-icon:has(> a.tms-card-link:focus-visible)::after { background: #fff; }
#servicios .service-icon > a.tms-card-link:focus-visible { outline: none; }
#servicios .service-icon:has(> a.tms-card-link:focus-visible) { outline: 2px solid var(--tms-laser); outline-offset: 3px; }

/* Un solo CTA al cierre de la sección */
.tms-services-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  /* franja de lado a lado: sale del .container y cierra la sección contra "Nuestros trabajos" */
  margin: 48px calc(50% - 50vw) 0;
  padding: 32px max(24px, calc((100vw - 1296px) / 2 + 12px));
  border-top: 3px solid var(--tms-laser);
  background: var(--tms-ink);
}
html, body { overflow-x: clip; } /* las franjas a 100vw no generan scroll horizontal */
#servicios { overflow: visible !important; padding-bottom: 0 !important; } /* la franja cierra la sección */
.tms-services-cta p {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: #d7d7d7;
  opacity: 1;
}
.tms-services-cta strong { color: #fff; font-weight: 500; }
@media (max-width: 575px) {
  .tms-services-cta { padding: 28px 20px; margin-top: 32px; }
  .tms-services-cta .tms-btn { flex: 1 1 100%; }
}

/* ---------- Sección láser: marco de la tira de grabados + botón play ---------- */


#laser-section .play-button { display: none; } /* el grabado se reproduce solo al entrar a la vista */
#laser-section canvas { max-width: none; }
#laser-section .laser-container { margin-top: 56px; }


/* ---------- Visítanos: mapa de lado a lado con corte diagonal ---------- */
#ubicacion {
  padding-bottom: 0;
  overflow-x: clip;
  /* el triángulo bajo el corte inferior toma el blanco de la sección siguiente */
  background: linear-gradient(to bottom, var(--tms-mist) calc(100% - 80px), #fff calc(100% - 80px));
}
#ubicacion .tms-map {
  --cut: clamp(28px, 5vw, 72px);
  position: relative;
  display: grid;
  margin: 8px calc(50% - 50vw) 0;   /* rompe el contenedor: ancho completo */
  clip-path: polygon(0 var(--cut), 100% 0, 100% calc(100% - var(--cut)), 0 100%);
  background: #d9d9d6;
}
#ubicacion .tms-map::before { /* filo láser que sigue el corte superior */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: calc(var(--cut) + 3px);
  background: var(--tms-laser);
  clip-path: polygon(0 var(--cut), 100% 0, 100% 3px, 0 calc(var(--cut) + 3px));
  z-index: 2;
  pointer-events: none;
}
#ubicacion .tms-map__frame {
  grid-area: 1 / 1;
  height: clamp(420px, 42vw, 600px);
}
#ubicacion .tms-map__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.6s ease;
}
#ubicacion .tms-map__frame:hover iframe,
#ubicacion .tms-map__frame:focus-within iframe { filter: none; }

/* El panel se alinea con el contenido de la página, no con el borde de la pantalla */
#ubicacion .tms-map__panel {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: start;
  width: min(400px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - 1296px) / 2));
  padding: 28px;
  border-radius: 16px;
  background: rgba(28, 28, 28, 0.95);
  border: 1px solid var(--tms-line);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.6);
  color: #fff;
  position: relative;
  z-index: 1;
}
#ubicacion .tms-map__panel p {
  margin: 0 0 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  opacity: 1;
  color: #fff;
}
#ubicacion .tms-map__panel p + p { color: #c9c9c9; margin-bottom: 20px; }
#ubicacion .tms-map__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.tms-btn--primary { background: var(--tms-laser); color: #fff; border: 1px solid var(--tms-laser); }
.tms-btn--primary:hover { background: #b80500; border-color: #b80500; color: #fff; }
.tms-btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); }
.tms-btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.06); }
.tms-btn:focus-visible { outline: 2px solid var(--tms-laser); outline-offset: 3px; }
.tms-btn--outline { background: transparent; color: var(--tms-ink); border: 1px solid rgba(43, 43, 43, 0.3); }
.tms-btn--outline:hover { border-color: var(--tms-ink); color: #fff; background: var(--tms-ink); }

/* ---------- Contacto ---------- */
#faq .accordion-button { gap: 10px; }
#faq .phone-number { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- WhatsApp flotante: siempre visible y del tamaño de un dedo ---------- */
#whatsapp-float {
  right: 20px;
  bottom: 96px;
  transform: none;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.45);
  color: #fff;
  text-decoration: none;
}
#whatsapp-float:hover { right: 20px; transform: scale(1.06); color: #fff; }
#whatsapp-float i { margin: 0; opacity: 1; font-size: 28px; }
#whatsapp-float:focus-visible { outline: 3px solid var(--tms-ink); outline-offset: 3px; }
@media (max-width: 768px) { #whatsapp-float { width: 52px; height: 52px; bottom: 84px; } }

/* ---------- Detalle de tarjetas del hero (<dialog> nativo) ---------- */
html:has(dialog[open]) { overflow: hidden; }
.tms-dialog {
  position: fixed;
  inset: 0;
  margin: auto; /* algún reset global quita el centrado nativo del <dialog> */
  height: fit-content;
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  color: var(--tms-text);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.55);
}
.tms-dialog[open] {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  animation: tms-dialog-in 0.35s var(--tms-ease);
}
.tms-dialog::backdrop { background: rgba(20, 20, 20, 0.62); backdrop-filter: blur(4px); }
.tms-dialog__media { background: var(--tms-ink-deep); min-height: 100%; }
.tms-dialog__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tms-dialog__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(28px, 4vw, 48px);
  overflow-y: auto;
}
.tms-dialog .tms-eyebrow {
  margin: 0;
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tms-laser);
  opacity: 1;
}
.tms-dialog h2 {
  margin: 0;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  color: var(--tms-text);
}
.tms-dialog #modalDescription {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--tms-text-muted);
  opacity: 1;
}
.tms-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tms-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--tms-ink);
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.tms-dialog__close:hover { background: var(--tms-ink); color: #fff; }
.tms-dialog__close:focus-visible { outline: 2px solid var(--tms-laser); outline-offset: 2px; }
@keyframes tms-dialog-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 767px) {
  .tms-dialog[open] { grid-template-columns: 1fr; grid-template-rows: 200px auto; }
  .tms-dialog__actions .tms-btn { flex: 1 1 100%; }
}

@media (max-width: 767px) {
  #ubicacion .tms-map { --cut: 28px; }
  #ubicacion .tms-map__frame { grid-area: auto; height: 340px; }
  #ubicacion .tms-map__panel {
    grid-area: auto;
    width: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 20px calc(24px + var(--cut));
  }
  #ubicacion .tms-btn { flex: 1 1 140px; }
}

/* ---------- Nuestros trabajos: carrusel ---------- */
#galeria .gallery-carousel {
  display: flex;
  flex-direction: column;
  padding: 8px 0 0;
  border-radius: 0;
}
#galeria .gallery-track {
  gap: 0;
  touch-action: pan-y;
  transition: transform 0.6s var(--tms-ease);
}
/* Ancho exacto por página (sin gap) para que translateX(-100%·n) de gallery.js cuadre. */
#galeria .gallery-slide { flex: 0 0 33.3333%; padding: 0 10px 48px; }
@media (max-width: 768px) { #galeria .gallery-slide { flex-basis: 50%; } }
@media (max-width: 576px) { #galeria .gallery-slide { flex-basis: 100%; padding-inline: 4px; } }

#galeria .gallery-item {
  border-radius: 16px;
  background: var(--tms-ink);
  box-shadow: 0 20px 30px -20px rgba(0, 0, 0, 0.5); /* alcance lateral 10px = padding del slide: sin cortes */
  transition: box-shadow 0.4s ease;
}
#galeria .gallery-item:hover { transform: none; box-shadow: 0 24px 30px -20px rgba(0, 0, 0, 0.6); }
#galeria .gallery-img-wrapper { padding-bottom: 120%; background: #e9e9e9; }
#galeria .gallery-img-wrapper img { transition: transform 0.8s var(--tms-ease); }
#galeria .gallery-item:hover .gallery-img-wrapper img { transform: scale(1.05); }

#galeria .gallery-overlay {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18) 55%, rgba(0, 0, 0, 0.05));
  font-size: 16px;
}
#galeria .gallery-overlay i {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
#galeria .tms-cap {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
#galeria .gallery-item:focus-visible { outline: 3px solid var(--tms-laser); outline-offset: -3px; }
#galeria .gallery-item:focus-visible .gallery-overlay { opacity: 1; }
@media (hover: none) {
  #galeria .gallery-overlay { opacity: 0; }
  #galeria .gallery-item:has(.tms-cap) .gallery-overlay { opacity: 1; background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 45%); }
  #galeria .gallery-item:has(.tms-cap) .gallery-overlay i { display: none; }
}

/* Controles debajo: ‹ • • • › */
#galeria .carousel-controls {
  order: 2;
  position: static;
  transform: none;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  pointer-events: auto;
}
#galeria .carousel-btn {
  width: 44px;
  height: 44px;
  opacity: 1;
  background: transparent;
  border: 1px solid rgba(43, 43, 43, 0.35);
  box-shadow: none;
  color: var(--tms-ink);
  font-size: 14px;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
#galeria .carousel-btn:hover:not(:disabled) { background: var(--tms-ink); border-color: var(--tms-ink); color: #fff; transform: none; }
#galeria .carousel-btn:disabled { opacity: 0.3; }
#galeria .carousel-btn:focus-visible,
#galeria .tms-dot:focus-visible { outline: 2px solid var(--tms-laser); outline-offset: 2px; }

#galeria .tms-dots { display: flex; align-items: center; }
#galeria .tms-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
}
#galeria .tms-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(43, 43, 43, 0.25);
  transition: width 0.35s var(--tms-ease), background-color 0.35s ease;
}
#galeria .tms-dot:hover::before { background: rgba(43, 43, 43, 0.5); }
#galeria .tms-dot[aria-current="true"]::before { width: 22px; background: var(--tms-laser); }
#galeria .tms-counter {
  display: none;
  min-width: 64px;
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--tms-ink);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 576px) {
  #galeria .tms-dots { display: none; }
  #galeria .tms-counter { display: block; }
}

/* ---------- Marcas: muro de logos, sin movimiento ---------- */
.tms-brands .carousel-container { width: min(1100px, 100%); padding: 0; margin-top: 8px; }
.tms-brands .carousel {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px !important;
  width: 100%;
  margin: 0 !important;
  animation: none !important; /* css/index.css lo animaba como carrusel */
  transform: none !important;
  border: 1px solid var(--tms-hairline);
  border-radius: 16px;
  overflow: hidden;
  background: var(--tms-hairline); /* el gap de 1px dibuja la retícula */
}
.tms-brands .carousel-img {
  display: grid;
  place-items: center;
  width: auto !important;
  height: 104px !important;
  margin: 0;
  padding: 26px 22px;
  background: #fff;
  transition: background-color 0.3s ease;
}
.tms-brands .carousel-img img {
  max-height: 40px;
  mix-blend-mode: multiply; /* los logos JPG con fondo blanco se integran */
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.tms-brands .carousel-img:hover { background: #fafaf8; }
.tms-brands .carousel-img:hover img { filter: none; opacity: 1; }
@media (max-width: 767px) {
  .tms-brands .carousel { grid-template-columns: repeat(2, 1fr); }
  .tms-brands .carousel-img { height: 84px !important; padding: 18px; }
  .tms-brands .carousel-img img { max-height: 32px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  #galeria .gallery-track,
  #galeria .gallery-img-wrapper img,
  #ubicacion .tms-map__frame iframe,
  #servicios .service-icon > a.tms-card-link::after { transition: none; }
  .tms-dialog[open] { animation: none; }
  html { scroll-behavior: auto; }
  #whatsapp-float { animation: none; }
  [data-aos] { opacity: 1 !important; transform: none !important; }
  #servicios .service-icon { transition: none; }
  #servicios .service-icon:hover { transform: none; }
  #galeria .gallery-item:hover .gallery-img-wrapper img { transform: none; }
}


/* ==========================================================================
   Lenguaje "pieza maquinada": chaflanes en las imágenes, cortes diagonales con
   filo láser entre secciones, etiquetas Oswald numeradas. Se repite en galería,
   acordeón láser, mapa y divisores para que el contenido se lea como un sistema.
   ========================================================================== */
.tms-brands .carousel,
.tms-services-cta,
#ubicacion .tms-map__panel { border-radius: var(--tms-radius); }
.tms-dialog { border-radius: 10px; }

/* ---------- Divisor diagonal (Sobre nosotros → láser) ---------- */
.section-divider { height: clamp(56px, 8vw, 110px); }
.section-divider .wave-divider { height: 100%; }

/* ---------- Nuestros trabajos: fichas con chaflán y número ---------- */
#galeria .gallery-slide { padding-bottom: 28px; }
#galeria .gallery-item {
  position: relative;
  display: block;
  border-radius: 0;
  box-shadow: none;
  background: var(--tms-ink);
  clip-path: polygon(0 0, calc(100% - var(--tms-chamfer)) 0, 100% var(--tms-chamfer), 100% 100%, var(--tms-chamfer) 100%, 0 calc(100% - var(--tms-chamfer)));
}
#galeria .gallery-item:hover { box-shadow: none; }
#galeria .gallery-img-wrapper { padding-bottom: 125%; border-radius: 0; }
#galeria .gallery-img-wrapper img { filter: saturate(0.9) contrast(1.04); }
/* número de ficha */
#galeria .gallery-item::before {
  content: attr(data-index);
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  padding: 10px 16px 10px calc(var(--tms-chamfer) + 4px);
  background: var(--tms-ink);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  letter-spacing: 0.12em;
  line-height: 1;
}
/* filo láser que recorre la base al pasar el cursor */
#galeria .gallery-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 3px;
  background: var(--tms-laser);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--tms-ease);
}
#galeria .gallery-item:hover::after,
#galeria .gallery-item:focus-visible::after { transform: scaleX(1); }
#galeria .gallery-overlay { background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 50%); }
#galeria .gallery-overlay i {
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: var(--tms-radius);
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
@media (hover: none) { #galeria .gallery-overlay { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  #galeria .gallery-item::after { transition: none; }
}


/* ==========================================================================
   Tipografía de contenido: Barlow (industrial, misma familia visual que Oswald)
   sustituye a Arial; color sólido sin la opacidad 0.8 global de style.css.
   El hero queda intacto (está fuera de <main>).
   ========================================================================== */
main p, main li, main .accordion-body, main .content,
.tms-dialog #modalDescription, .tms-services-cta p, #ubicacion .tms-map__panel p, .footer {
  font-family: var(--tms-font-body);
}
main p { opacity: 1; }

/* Sobre nosotros: párrafos de lectura */
#about .content p { font-size: 18px; line-height: 1.6; color: var(--tms-text-body); }
#about .content h3 { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: 26px; letter-spacing: 0.01em; color: var(--tms-ink); }
#about .section-header p,
#ubicacion .section-header p { font-size: 19px; font-weight: 500; color: var(--tms-text-muted); }

/* Sección láser (sobre grafito) */
#laser-section .laser-info p { font-size: 19px; line-height: 1.65; color: var(--tms-text-on-dark); opacity: 1 !important; } /* el <p> trae opacity 0.9 en línea */

/* Servicios */
#servicios .service-icon p { font-size: 15.5px; line-height: 1.55; color: var(--tms-text-muted); }

/* Contacto */
#faq .accordion-body { font-size: 17px; line-height: 1.6; color: var(--tms-text-body); }
#faq .accordion-button { font-family: 'Oswald', sans-serif; font-size: 18px; letter-spacing: 0.02em; }

/* Paneles y franjas oscuras */
.tms-services-cta p { font-size: 19px; color: var(--tms-text-on-dark); }
.tms-services-cta strong { font-weight: 600; }
#ubicacion .tms-map__panel p { font-size: 16.5px; }
.tms-dialog #modalDescription { font-size: 17px; color: var(--tms-text-muted); }


/* ---------- Muestras de grabado láser: rejilla de fichas con chaflán ----------
   Solo imágenes y transform/opacity en hover (todo en compositor): no traba. */
.tms-engraves {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: min(1200px, calc(100% - 32px));
  margin: 8px auto 0;
}
.tms-engrave {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--tms-ink-deep);
  clip-path: polygon(0 0, calc(100% - var(--tms-chamfer)) 0, 100% var(--tms-chamfer), 100% 100%, var(--tms-chamfer) 100%, 0 calc(100% - var(--tms-chamfer)));
}
.tms-engrave img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.15);
  transition: transform 0.6s var(--tms-ease);
}
.tms-engrave:hover img,
.tms-engrave:focus-visible img { transform: scale(1.06); }
.tms-engrave__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px calc(var(--tms-chamfer) + 4px);
  background: var(--tms-ink);
  color: #fff;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tms-engrave__tag b { color: var(--tms-laser); font-weight: 500; font-size: 13px; letter-spacing: 0.12em; }
.tms-engrave::after { /* filo láser al pasar el cursor, igual que la galería */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--tms-laser);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--tms-ease);
}
.tms-engrave:hover::after,
.tms-engrave:focus-visible::after { transform: scaleX(1); }
.tms-engrave:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Tablet: 2×2. Móvil: tira deslizable con la siguiente ficha asomando */
@media (max-width: 991px) { .tms-engraves { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) {
  .tms-engraves {
    display: flex;
    gap: 12px;
    width: auto;
    margin: 8px 0 0;
    padding: 0 16px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }
  .tms-engraves::-webkit-scrollbar { display: none; }
  .tms-engrave { flex: 0 0 78%; scroll-snap-align: start; }
}
@media (prefers-reduced-motion: reduce) {
  .tms-engrave img, .tms-engrave::after { transition: none; }
}

/* ---------- Sobre nosotros: el texto cambia con el scroll (solo escritorio) ----------
   .tms-about__stage queda fija (sticky) mientras pasan 3 marcadores; un IntersectionObserver
   pone data-step 0/1/2 y el CSS cruza los bloques con opacity/transform. */
#about { overflow: clip !important; } /* clip: recorta sin romper el sticky */
.tms-lupa { display: block; margin: 0 auto; width: 100%; max-width: 440px; height: auto; overflow: visible; }
.tms-about__num {
  display: block;
  margin-bottom: 6px;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--tms-laser);
}
.tms-about__progress { display: none; }

@media (min-width: 992px) {
  .tms-about__stage {
    position: sticky;
    top: 110px;
    min-height: calc(100vh - 160px);
    max-height: 640px;
  }
  /* el contenedor da el recorrido: ~2 pantallas extra; la escena queda fija dentro */
  .tms-about { position: relative; height: calc(100vh + 120vh); }
  .tms-about__marker { position: absolute; left: 0; right: 0; height: 33.4%; pointer-events: none; }
  .tms-about__marker[data-i="0"] { top: 0; }
  .tms-about__marker[data-i="1"] { top: 33.3%; }
  .tms-about__marker[data-i="2"] { top: 66.6%; }

  .tms-about__steps { position: relative; display: grid; }
  .tms-about__step {
    grid-area: 1 / 1;                 /* los tres bloques en la misma celda */
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.5s var(--tms-ease), transform 0.5s var(--tms-ease);
    pointer-events: none;
  }
  .tms-about[data-step="0"] .tms-about__step:nth-child(1),
  .tms-about[data-step="1"] .tms-about__step:nth-child(2),
  .tms-about[data-step="2"] .tms-about__step:nth-child(3) {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .tms-about__step h3 { font-size: clamp(34px, 3.2vw, 46px) !important; margin: 0 0 18px !important; }
  .tms-about__step p { font-size: 20px !important; line-height: 1.6 !important; max-width: 46ch; }

  /* indicador de avance: tres segmentos, el activo en rojo láser */
  .tms-about__progress { display: flex; gap: 8px; margin-top: 36px; }
  .tms-about__progress i { width: 44px; height: 3px; background: var(--tms-hairline); transition: background-color 0.4s ease, width 0.4s var(--tms-ease); }
  .tms-about[data-step="0"] .tms-about__progress i:nth-child(1),
  .tms-about[data-step="1"] .tms-about__progress i:nth-child(2),
  .tms-about[data-step="2"] .tms-about__progress i:nth-child(3) { background: var(--tms-laser); width: 72px; }

}
@media (prefers-reduced-motion: reduce) {
  .tms-about__step, .tms-about__progress i { transition: none !important; }
}
@media (max-width: 991px) {
  .tms-lupa { max-width: 300px; }
  #about .tms-about__step h3 { margin: 4px 0 10px; }
  .tms-about__step + .tms-about__step { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--tms-hairline); }
}


/* ---------- Lupa de inspección (SVG) ----------
   Ligada al scroll de .tms-about (timeline con nombre: la escena es sticky y su
   propia vista no cambia). Solo transform/opacity. Sin soporte: estática. */
.tms-about { view-timeline: --about block; }
.tms-lupa .lupa-nums text { font: 500 11px 'Oswald', sans-serif; fill: #9a9a96; text-anchor: middle; letter-spacing: 0.05em; }
.tms-lupa .tk-l { stroke: #2b2b2b; stroke-width: 1.6; }
.tms-lupa .lupa-tag { font: 500 24px 'Oswald', sans-serif; fill: #2b2b2b; letter-spacing: 0.08em; }
.tms-lupa .lupa-dim { font: 500 14px 'Barlow', sans-serif; fill: #e10600; letter-spacing: 0.06em; }
.tms-lupa .lupa-tag,
.tms-lupa .lupa-dim { opacity: 0; transition: opacity 0.4s ease; }
.tms-about[data-step="0"] .tms-lupa .lupa-tag--0,
.tms-about[data-step="1"] .tms-lupa .lupa-tag--1,
.tms-about[data-step="2"] .tms-lupa .lupa-tag--2 { opacity: 1; }

.tms-lupa .lupa-dial,
.tms-lupa .lupa-logo,
.tms-lupa .lupa-scan,
.tms-lupa .lupa-reticle { transform-box: view-box; transform-origin: 200px 200px; }
.tms-lupa .lupa-logo { transition: transform 0.7s var(--tms-ease); }
.tms-about[data-step="1"] .tms-lupa .lupa-logo { transform: scale(1.1) rotate(-6deg); }
.tms-about[data-step="2"] .tms-lupa .lupa-logo { transform: scale(1.18) rotate(4deg); }
.tms-lupa .lupa-reticle { transition: transform 0.7s var(--tms-ease); }
.tms-about[data-step="1"] .tms-lupa .lupa-reticle { transform: rotate(45deg); }
.tms-about[data-step="2"] .tms-lupa .lupa-reticle { transform: rotate(90deg) scale(0.9); }
.tms-lupa .lupa-scan { opacity: 0; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tms-lupa .lupa-dial {
      animation: lupa-dial linear both;
      animation-timeline: --about;
      animation-range: contain 0% contain 100%;
    }
    .tms-lupa .lupa-scan {
      opacity: 1;
      animation: lupa-scan linear both;
      animation-timeline: --about;
      animation-range: contain 0% contain 100%;
    }
    .tms-lupa {
      animation: lupa-tilt linear both;
      animation-timeline: --about;
      animation-range: contain 0% contain 100%;
    }
  }
}
@keyframes lupa-dial { from { transform: rotate(0deg); } to { transform: rotate(240deg); } }
/* tres barridos del lente, uno por paso */
@keyframes lupa-scan {
  0%    { transform: translateY(-40px); }
  33.3% { transform: translateY(190px); }
  33.4% { transform: translateY(-40px); }
  66.6% { transform: translateY(190px); }
  66.7% { transform: translateY(-40px); }
  100%  { transform: translateY(190px); }
}
@keyframes lupa-tilt { from { transform: rotate(-3deg) translateY(10px); } to { transform: rotate(3deg) translateY(-10px); } }
@media (prefers-reduced-motion: reduce) {
  .tms-lupa .lupa-logo, .tms-lupa .lupa-reticle, .tms-lupa .lupa-tag, .tms-lupa .lupa-dim { transition: none; }
}

/* Móvil: la lupa se queda pegada bajo el header mientras el texto pasa por debajo,
   así el dial, el barrido y la cota se ven cambiar con cada bloque */
@media (max-width: 991px) {
  .tms-about__media {
    position: sticky;
    top: 80px;
    z-index: 2;
    padding: 8px 0 12px;
    background: linear-gradient(#fff 85%, rgba(255, 255, 255, 0));
  }
  .tms-lupa { max-width: 210px; margin: 0 auto; transition: translate 0.45s var(--tms-ease); }
  .tms-about__media.is-stuck .tms-lupa { translate: calc(50vw - 50% - 34px) 0; } /* translate (no transform): no choca con la animación del scroll */ /* fija: a la derecha, libre del logo */
  .tms-about__step { opacity: 0.35; transition: opacity 0.4s ease; }
  .tms-about[data-step="0"] .tms-about__step:nth-child(1),
  .tms-about[data-step="1"] .tms-about__step:nth-child(2),
  .tms-about[data-step="2"] .tms-about__step:nth-child(3) { opacity: 1; }
}
