/* SALOMA proposals — base. Themes override tokens. */
:root {
  --bg: #0f1216;
  --bg-elev: #171b22;
  --text: #e8edf4;
  --muted: #9aa6b5;
  --line: #2a3340;
  --brand: #3b82f6;
  --brand-2: #ef4444;
  --ok: #22c55e;
  --warn: #f59e0b;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0,0,0,.28);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --max: 1100px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: color-mix(in srgb, var(--brand) 80%, white); }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.muted { color: var(--muted); }
.topbar {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  width: min(100% - 2rem, var(--max)); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .85rem 0;
}
.brand {
  display: inline-flex; align-items: center; gap: .65rem;
  color: inherit; text-decoration: none; font-weight: 700; letter-spacing: .04em;
}
.nav { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; font-size: .95rem; }
.nav a { color: var(--text); text-decoration: none; }
.nav a:hover { color: var(--brand); }
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600;
  padding: .7rem 1.1rem; border-radius: 999px;
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--text); border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-wa { background: #128C7E; }
/* Glifo de WhatsApp dentro de los botones: hereda el color del texto (blanco). */
.wa-icon { width: 1.15em; height: 1.15em; flex: none; display: block; }
.hero {
  padding: 2.2rem 0 1.5rem;
  display: grid; gap: 1.5rem; align-items: center;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr .95fr; gap: 2rem; padding: 3rem 0 2rem; }
}
.hero h1 {
  margin: 0 0 .75rem; font-size: clamp(1.8rem, 4.5vw, 2.8rem); line-height: 1.15;
}
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin-bottom: .6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.2rem; }
.hero-photo {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow); background: var(--bg-elev);
}
.hero-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
@media (min-width: 900px) {
  .hero-photo img { aspect-ratio: 4/5; max-height: 560px; }
}
.section { padding: 2.25rem 0; }
.section h2 { margin: 0 0 1rem; font-size: clamp(1.35rem, 3vw, 1.85rem); }
/* División entre Servicios y el proceso 1-2-3 (pedido del cliente, 23-nov):
   línea que se desvanece en los extremos, sin caja ni fondo. Mezcla --line con
   --muted porque --line solo casi no se ve sobre el fondo claro del tema. */
.divider {
  border: 0; height: 1px; margin: 0;
  background: linear-gradient(90deg, transparent,
    color-mix(in srgb, var(--line) 55%, var(--muted) 45%) 14%,
    color-mix(in srgb, var(--line) 55%, var(--muted) 45%) 86%,
    transparent);
}
.grid-3 { display: grid; gap: 1rem; }
@media (min-width: 800px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 800px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}
.card h3 { margin: 0 0 .45rem; font-size: 1.05rem; }
/* Galería en mosaico sin huecos: cada foto es un cuadro con el pie encimado
   abajo; las fotos verticales «g-alta» ocupan dos renglones y el par de la bomba
   se acomoda junto a la foto 5 (escritorio) o en su propio renglón (celular). */
.gallery {
  display: grid; gap: .75rem; grid-auto-flow: dense;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 800px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure {
  position: relative; margin: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #0b1220; aspect-ratio: 1;
}
.gallery figure > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.8rem .7rem .6rem; font-size: .82rem; line-height: 1.3; color: #fff; font-weight: 600;
  background: linear-gradient(180deg, transparent, rgba(8,14,26,.82) 55%);
}
@media (max-width: 599px) { .gallery figcaption { font-size: .72rem; line-height: 1.25; padding: 1rem .45rem .4rem; } }
.gallery .g-alta { grid-row: span 2; aspect-ratio: auto; }
@media (min-width: 800px) { .gallery .g-alta-escritorio { grid-row: span 2; aspect-ratio: auto; } }
.notice {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: .85rem 1rem; background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
  font-size: .92rem;
}
.site-footer {
  margin-top: 2rem; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line);
  font-size: .9rem;
}
.footer-grid {
  width: min(100% - 2rem, var(--max)); margin: 0 auto;
  display: grid; gap: 1rem;
}
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.form label { display: block; font-weight: 600; margin: .7rem 0 .3rem; }
.form input, .form textarea, .form select {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: .7rem .8rem;
}
.form textarea { min-height: 120px; resize: vertical; }
.form .err { color: #fecaca; font-size: .85rem; margin: .25rem 0 0; }
.form .field-error input, .form .field-error textarea { border-color: #ef4444; }
.banner {
  padding: .85rem 1rem; border-radius: 10px; margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.banner.ok { background: color-mix(in srgb, var(--ok) 18%, var(--bg)); }
.banner.warn { background: color-mix(in srgb, var(--warn) 18%, var(--bg)); }
.missing { font-style: italic; color: var(--muted); }
.skip-link {
  position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: .5rem 1rem;
}
.skip-link:focus { left: 0; z-index: 50; }


/* Two-line brand lockup (option C): SALOMA above Reparaciones Industriales.
   The opening S is larger than ALOMA, same font-weight (same stroke, not bolder),
   matching the official PDF wordmark. Ratio ~1.4 like the logo glyphs. */
.brand-lockup {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
  line-height: 1.15;
}
.brand-name {
  font-weight: 800;
  letter-spacing: .06em;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: baseline;
  -webkit-align-items: baseline;
  align-items: baseline;
  line-height: 1;
}
.brand-name .brand-initial {
  font-size: 1.4em;
  font-weight: inherit;
  line-height: 1;
}
.brand-name .brand-rest {
  font-weight: inherit;
  line-height: 1;
}
.brand-lockup .brand-line {
  font-weight: 600;
  font-size: .62em;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--muted);
}
.footer-brand .brand-lockup { display: -webkit-flex; display: flex; }
/* Logo con protagonismo (pedido del cliente, nov 20): dibujo del PDF de marca
   en SVG, grande en portada y pie, y más presente en el encabezado. */
.brand-logo { width: auto; height: 46px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.topbar .brand-lockup .brand-name { font-size: 1.15rem; }
.topbar .brand-lockup .brand-line { font-size: .74rem; }
@media (min-width: 800px) {
  .brand-logo { height: 60px; }
  .topbar .brand-lockup .brand-name { font-size: 1.45rem; }
  .topbar .brand-lockup .brand-line { font-size: .86rem; }
}
.hero-brand {
  display: -webkit-flex; display: flex;
  -webkit-box-align: center; -webkit-align-items: center; align-items: center;
  gap: clamp(.9rem, 2.5vw, 1.5rem);
  margin: 0 0 1.4rem;
}
.hero-logo { width: auto; height: clamp(130px, 18vw, 190px); -webkit-flex-shrink: 0; flex-shrink: 0; }
.hero-lockup {
  display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  gap: .2rem; margin: 0; line-height: 1.05;
}
.hero-lockup .brand-name {
  font-size: clamp(2.1rem, 5.4vw, 3.4rem); letter-spacing: .08em;
  color: var(--brand-2);
}
.hero-lockup .brand-line {
  font-size: clamp(1.05rem, 2.3vw, 1.5rem); font-weight: 700; letter-spacing: .02em;
  color: var(--brand);
}
.hero h1 { font-size: clamp(1.55rem, 3.6vw, 2.35rem); margin-bottom: .45rem; }
.hero-sub { margin: 0 0 .7rem; font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 600; color: var(--brand); }

/* Pie con logo */
.footer-brand { display: flex; align-items: center; gap: 1rem; margin: 0 0 .6rem; }
.footer-logo { width: auto; height: 104px; flex-shrink: 0; }

/* Galería: tarjeta con dos fotos del mismo trabajo.
   < 800px: renglón completo, altura natural (lado a lado; apiladas < 600px), pie abajo.
   >= 800px: ocupa 2 columnas junto a la foto 5 y llena la altura del renglón. */
.gallery .gallery-pair { grid-column: 1 / -1; aspect-ratio: auto; }
.pair-photos { display: flex; gap: 4px; }
.gallery .pair-photos img { flex-basis: 0; flex-shrink: 1; min-width: 0; width: 0; height: auto; object-fit: cover; }
.gallery .gallery-pair figcaption { position: static; background: #0b1220; padding: .6rem .7rem .7rem; }
@media (max-width: 599px) {
  .pair-photos { flex-direction: column; }
  .gallery .pair-photos img { width: 100%; flex-grow: 0 !important; }
  .gallery .pair-photos img:first-child { aspect-ratio: 3 / 4 !important; object-position: 50% 58%; }
}
@media (min-width: 800px) {
  .gallery .gallery-pair { grid-column: span 2; }
  .gallery .gallery-pair .pair-photos { position: absolute; inset: 0; }
  .gallery .gallery-pair .pair-photos img { height: 100%; aspect-ratio: auto !important; }
  .gallery .gallery-pair figcaption {
    position: absolute; background: linear-gradient(180deg, transparent, rgba(8,14,26,.82) 55%);
    padding: 1.8rem .7rem .6rem;
  }
}

/* Clientes: cinta rotativa de nombres (sin JS).
   Evita gap/max-content (Chrome < 84 no tiene gap en flex) y usa márgenes +
   inline-flex para que el renglón no se rompa en tabletas viejas.
   Con «reducir movimiento» (ahorro de batería o «quitar animaciones» en
   Android) no se vuelve una lista: queda un renglón que se puede deslizar. */
.clientes {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 7%, var(--bg)), var(--bg));
  border-block: 1px solid var(--line);
}
.marquee {
  overflow: hidden; padding: .4rem 0 .6rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track {
  display: -webkit-inline-flex;
  display: inline-flex;
  white-space: nowrap;
  vertical-align: top;
  -webkit-animation: marquee 45s linear infinite;
  animation: marquee 45s linear infinite;
}
.marquee:hover .marquee-track {
  -webkit-animation-play-state: paused;
  animation-play-state: paused;
}
.client-list {
  display: inline-block; /* si el navegador no entiende flex, sigue en un renglón */
  display: -webkit-inline-flex;
  display: inline-flex;
  margin: 0;
  padding: 0;
  list-style: none;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  vertical-align: top;
  white-space: nowrap;
}
.client-chip {
  display: inline-block;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  white-space: nowrap;
  margin: 0 .85rem 0 0;
  padding: .8rem 1.3rem; border-radius: 999px; background: var(--bg-elev);
  border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(21,32,51,.07);
  font-weight: 800; font-size: 1rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand);
  vertical-align: middle;
}
.client-chip::before {
  content: "";
  display: inline-block;
  width: .5rem; height: .5rem; border-radius: 2px;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  background: var(--brand-2);
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  margin-right: .6rem;
}
@-webkit-keyframes marquee { to { -webkit-transform: translateX(-50%); transform: translateX(-50%); } }
@keyframes marquee { to { -webkit-transform: translateX(-50%); transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    -webkit-mask-image: none;
    mask-image: none;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .marquee-track {
    -webkit-animation: none;
    animation: none;
  }
  .client-list-dup { display: none; }
  .client-chip {
    -webkit-scroll-snap-align: start;
    scroll-snap-align: start;
  }
}

/* Encabezado en celular: marca arriba, menú en un renglón propio */
@media (max-width: 699px) {
  .topbar-inner { flex-wrap: wrap; gap: .45rem; padding: .55rem 0 .6rem; }
  .nav { width: 100%; justify-content: space-between; gap: .4rem; font-size: .92rem; }
  .nav .btn { padding: .45rem .9rem; }
  .client-chip { font-size: .86rem; padding: .6rem 1rem; }
}
/* En pantallas muy angostas el botón de WhatsApp del menú se oculta:
   está justo abajo en la portada y en Contacto. */
@media (max-width: 459px) { .nav .btn-wa { display: none; } }
/* «Contáctanos» es más largo que «WhatsApp»: en el menú angosto queda sólo el glifo
   (el texto sigue en el aria-label, así que lectores de pantalla no pierden nada). */
@media (max-width: 799px) { .nav .btn-wa .wa-text { display: none; } }
/* Contraste de botones: los enlaces del menú no deben teñir el texto del botón */
.nav a.btn, .nav a.btn:hover { color: #fff; }

/* Galería ampliada (30-nov): el mosaico muestra fotos al azar; al tocar una se
   abre una ventana encima de la página con todas las fotos en cinta. Las fotos
   con descripción la muestran; las que no tienen, no llevan caja vacía. */
.gallery .g-tile { position: absolute; inset: 0; display: block; }
.gallery .g-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery .g-tile:hover img, .gallery .g-tile:focus-visible img { transform: scale(1.03); }
.gallery .g-tile:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.gallery figure.g-con-texto figcaption { pointer-events: none; }
@media (max-width: 799px) { .gallery figure:nth-child(n+9) { display: none; } }
.gallery-more { margin: 1rem 0 0; text-align: center; }
html.lb-abierto { overflow: hidden; }
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(8,12,20,.96); color: #fff;
}
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: rgba(8,12,20,.85); }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; }
.lb-count { font-size: .9rem; color: #c9d3e0; }
.lb-close, .lb-nav {
  appearance: none; border: 0; cursor: pointer; color: #fff; font: inherit;
  background: rgba(255,255,255,.12); border-radius: 999px;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem; line-height: 1;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.24); }
.lb-close:focus-visible, .lb-nav:focus-visible, .lb-thumb:focus-visible { outline: 3px solid #7fb0ff; outline-offset: 2px; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 0 .6rem; }
.lb-figure { margin: 0; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lb-img { max-width: 100%; max-height: 100%; min-height: 0; width: auto; height: auto; object-fit: contain; border-radius: 8px; flex: 0 1 auto; }
.lb-caption {
  margin-top: .7rem; max-width: 46rem; text-align: center; font-size: .98rem; line-height: 1.4;
  background: rgba(255,255,255,.08); padding: .55rem .9rem; border-radius: 8px;
  max-height: 30vh; overflow-y: auto; flex: none; text-align: left; white-space: pre-line;
}
.lb-caption[hidden] { display: none; }
.lb-strip {
  display: flex; gap: 6px; overflow-x: auto; padding: .6rem 1rem .9rem;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.lb-thumb {
  flex: none; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden;
  background: #1b2332; cursor: pointer; opacity: .6; scroll-snap-align: center;
}
.lb-thumb img { width: 96px; height: 72px; object-fit: cover; }
.lb-thumb[aria-current="true"] { border-color: #fff; opacity: 1; }
.lb-thumb:hover { opacity: .9; }
@media (max-width: 599px) {
  .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(0,0,0,.45); }
  .lb-prev { left: .4rem; } .lb-next { right: .4rem; }
  .lb-stage { position: relative; padding: 0; }
  .lb-caption { font-size: .9rem; margin: .6rem .6rem 0; max-height: 35vh; }
  .lb-thumb img { width: 72px; height: 54px; }
}
@media (prefers-reduced-motion: reduce) { .gallery .g-tile img { transition: none; } }

/* Contacto (2-dic): correo y botón de WhatsApp juntos, sin teléfono visible.
   El correo se puede partir en pantallas angostas para que se vea completo. */
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1rem 0; }
.contact-links .contact-mail { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.card { min-width: 0; }
.card a[href^="mailto:"] { overflow-wrap: anywhere; word-break: break-word; }
