/* =========================================================
   Rio Sub Ltda. — hoja de estilos
   Sistema: tipografía Archivo (ancho variable), azul de marca,
   tonos de estratos de suelo para el corte de pozo.
   ========================================================= */

:root {
  /* Color */
  --agua: #0a93d3;          /* azul del logo */
  --agua-700: #0670a6;      /* azul legible sobre blanco */
  --agua-100: #e3f3fb;
  --abismo: #072536;        /* secciones oscuras */
  --abismo-2: #0d3349;
  --tinta: #102231;         /* texto principal */
  --tinta-2: #3e5261;       /* texto secundario */
  --caliza: #eef3f5;        /* fondo alterno */
  --linea: #d6e0e5;
  --acero: #8d9aa3;
  --blanco: #ffffff;

  /* Estratos (solo ilustración) */
  --suelo: #6b5442;
  --grava: #9a8b78;
  --arcilla: #b4835a;
  --roca: #5e5853;
  --acuifero: #155b82;

  /* Tipografía */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.25rem;
  --fs-lg: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem);
  --fs-xl: clamp(1.9rem, 1.35rem + 2.2vw, 2.9rem);
  --fs-2xl: clamp(2.7rem, 1.2rem + 5.6vw, 5.4rem);

  /* Espacio */
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1240px;
  --section: clamp(64px, 6vw + 32px, 120px);
  --radius: 8px;
  --header-top: 122px;   /* encabezado arriba de la página */
  --header-h: 76px;      /* encabezado al hacer scroll */
  --logo-top: 94px;
  --logo-h: 52px;
}

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

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

body {
  margin: 0;
  padding-top: var(--header-top);
  background: var(--blanco);
  color: var(--tinta);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-stretch: 100%;
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--agua-700); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--tinta); }

h1, h2, h3, h4 {
  margin: 0;
  font-stretch: 118%;
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-2xl); font-stretch: 125%; font-weight: 820; line-height: 0.98; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); font-stretch: 110%; font-weight: 700; line-height: 1.2; letter-spacing: 0; }

p { margin: 0 0 1em; max-width: 64ch; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; }

:focus-visible {
  outline: 3px solid var(--agua);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--abismo);
  color: var(--blanco);
  border-radius: var(--radius);
  font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--blanco); }

.container {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 650;
  font-stretch: 110%;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--agua); color: var(--abismo); }
.btn--primary:hover { background: var(--abismo); color: var(--blanco); }

.btn--outline { border-color: currentColor; color: var(--tinta); background: transparent; }
.btn--outline:hover { background: var(--tinta); border-color: var(--tinta); color: var(--blanco); }

.btn--light { background: var(--blanco); color: var(--abismo); }
.btn--light:hover { background: var(--abismo); color: var(--blanco); }

.on-dark .btn--outline { color: var(--blanco); }
.on-dark .btn--outline:hover { background: var(--blanco); border-color: var(--blanco); color: var(--abismo); }
.on-dark .btn--primary:hover { background: var(--blanco); color: var(--abismo); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  font-stretch: 110%;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}
.link-more svg { width: 16px; height: 16px; }

/* ---------- Encabezado ---------- */
/* Encabezado fijo: arriba muestra el logo grande y al hacer scroll se compacta */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: var(--blanco);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--linea);
  box-shadow: 0 8px 24px -18px rgba(7, 37, 54, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-top);
  transition: height 0.25s ease;
}
.site-header.is-scrolled .header-inner { height: var(--header-h); }

.brand { flex: none; display: block; }
.brand img { height: var(--logo-top); width: auto; transition: height 0.25s ease; }
.site-header.is-scrolled .brand img { height: var(--logo-h); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 4px; list-style: none; }
.site-nav ul a {
  display: block;
  padding: 10px 12px;
  color: var(--tinta);
  font-size: var(--fs-sm);
  font-weight: 560;
  font-stretch: 108%;
  text-decoration: none;
  border-radius: 6px;
}
.site-nav ul a:hover { color: var(--agua-700); }
.site-nav ul a[aria-current="page"] { color: var(--agua-700); box-shadow: inset 0 -2px 0 var(--agua); border-radius: 0; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.tel-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tinta);
  font-weight: 650;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  white-space: nowrap;
}
.tel-link svg { width: 18px; height: 18px; color: var(--agua-700); }
.tel-link:hover { color: var(--agua-700); }

.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tinta);
  cursor: pointer;
  border-radius: 8px;
}
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1040px) {
  .nav-actions .tel-link { display: none; }
}

@media (max-width: 900px) {
  :root { --header-top: 86px; --header-h: 66px; --logo-top: 64px; --logo-h: 46px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - var(--header-top));
    overflow-y: auto;
    padding: 8px var(--gutter) 24px;
    background: var(--blanco);
    border-bottom: 1px solid var(--linea);
    box-shadow: 0 24px 40px -24px rgba(7, 37, 54, 0.35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a {
    padding: 14px 0;
    font-size: var(--fs-md);
    border-bottom: 1px solid var(--linea);
    border-radius: 0;
  }
  .site-nav ul a[aria-current="page"] { box-shadow: none; }
  .nav-actions { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 20px; }
  .nav-actions .tel-link { display: inline-flex; font-size: var(--fs-md); padding: 6px 0; }
}

/* ---------- Secciones ---------- */
.section { padding-block: var(--section); }
.section--tint { background: var(--caliza); }
.section--dark { background: var(--abismo); color: #d3e2ea; }
.section--dark h2, .section--dark h3 { color: var(--blanco); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(36px, 4vw, 56px);
}
.section-head p { color: var(--tinta-2); font-size: var(--fs-md); line-height: 1.5; }
.section--dark .section-head p { color: #a9c1ce; }
.section-head--stack { grid-template-columns: minmax(0, 1fr); max-width: 760px; }

@media (max-width: 800px) {
  .section-head { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Hero (inicio) ---------- */
.hero {
  position: relative;
  padding-top: clamp(32px, 5vw, 72px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.hero-copy { padding-bottom: clamp(40px, 6vw, 96px); }
.hero h1 { color: var(--abismo); }
.hero-lead {
  margin-top: 28px;
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--tinta-2);
  max-width: 34em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 12px 22px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}
.hero-facts li {
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--agua);
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--tinta-2);
}
.hero-facts strong { display: block; color: var(--tinta); font-size: 0.9375rem; font-weight: 700; font-stretch: 110%; text-wrap: balance; }

/* Corte del pozo */
.well {
  position: relative;
  margin: 0;
  align-self: stretch;
  display: flex;
  align-items: flex-end;
}
.well svg { width: 100%; height: auto; border-radius: 14px 14px 0 0; }
.well text { font-family: var(--font); }
.well .lbl { font-size: 13.5px; font-weight: 600; font-stretch: 108%; fill: #fff; }
.well .lbl-dark { fill: var(--abismo); }
.well .lbl-sm { font-size: 12px; font-weight: 500; fill: rgba(255, 255, 255, 0.78); font-variant-numeric: tabular-nums; }
.well .leader { stroke: rgba(255, 255, 255, 0.75); stroke-width: 1; fill: none; }

.well .bore { transform-box: fill-box; transform-origin: 50% 0; }
.well .bore-water { transform-box: fill-box; transform-origin: 50% 100%; }
.well .pump { transform-box: fill-box; transform-origin: 50% 0; }
.well .flow { stroke-dasharray: 6 12; }
.well .callout { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .js .well:not(.is-ready) :is(.bore, .pump, .bore-water, .flow, .callout) { visibility: hidden; }
  .well.is-ready .bore { animation: drill 1.1s cubic-bezier(0.55, 0.05, 0.3, 1) both; }
  .well.is-ready .pump { animation: lower 0.9s cubic-bezier(0.3, 0.7, 0.2, 1) 0.7s both; }
  .well.is-ready .bore-water { animation: rise 0.9s ease-out 1.3s both; }
  .well.is-ready .flow { animation: fade 0.4s ease 1.9s both, flow 1.1s linear 2s 9 both; }
  .well.is-ready .callout { animation: fade 0.5s ease 2.1s both; }
}
@keyframes drill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes lower { from { transform: translateY(-260px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes flow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 36; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero-copy { padding-bottom: 32px; }
  .well { max-width: 560px; }
}
/* En pantallas angostas el SVG se reduce: se agrandan los rótulos para que sigan legibles */
@media (max-width: 600px) {
  .well .lbl { font-size: 20px; }
  .well .lbl-sm { font-size: 19px; }
  .well .lbl.big { font-size: 24px; }
  .well .wide-only { display: none; }
}
@media (max-width: 620px) {
  .hero-facts { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 520px) {
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- Marcas ---------- */
.brands {
  background: var(--caliza);
  padding-block: 36px;
  border-top: 1px solid var(--linea);
}
.brands-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px 48px;
  align-items: center;
}
.brands-title {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: 650;
  font-stretch: 110%;
  color: var(--tinta-2);
  max-width: 14ch;
  line-height: 1.3;
}
.brands-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 28px;
  list-style: none;
}
.brands-list img {
  height: 30px;
  width: auto;
  mix-blend-mode: multiply;
}
.brands-list .tall img { height: 46px; }

@media (max-width: 800px) {
  .brands-inner { grid-template-columns: minmax(0, 1fr); }
  .brands-title { max-width: none; }
  .brands-list { justify-content: flex-start; gap: 20px 28px; }
  .brands-list img { height: 28px; }
  .brands-list .tall img { height: 44px; }
}

/* ---------- Sectores ---------- */
.sectors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 32px);
  list-style: none;
}
.sector img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--caliza);
}
.sector h3 { margin-top: 20px; }
.sector p { margin-top: 8px; color: var(--tinta-2); font-size: var(--fs-sm); line-height: 1.55; }

@media (max-width: 1000px) {
  .sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}
@media (max-width: 520px) {
  .sectors { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Empresa ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.about-media { margin: 0; }
.about-media img { width: 100%; border-radius: var(--radius); }
.about-media figcaption { margin-top: 10px; font-size: var(--fs-xs); color: var(--tinta-2); }
.about h2 { margin-bottom: 24px; }
.about p { color: var(--tinta-2); }

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-top: 28px;
  list-style: none;
}
.checks li {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
  font-stretch: 106%;
  line-height: 1.35;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.1em;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--agua) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23072536' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

@media (max-width: 900px) {
  .about { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 460px) {
  .checks { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Servicios ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 80px);
  list-style: none;
  counter-reset: none;
}
.service {
  padding: 26px 0 28px;
  border-top: 1px solid rgba(169, 193, 206, 0.28);
}
.service h3 { font-size: var(--fs-md); }
.service p { margin-top: 8px; color: #a9c1ce; font-size: var(--fs-sm); }
.section--dark .link-more { color: var(--agua); margin-top: 40px; }
.section--dark .link-more:hover { color: var(--blanco); }

.section--tint .service, .services--light .service { border-top-color: var(--linea); }
.services--light .service p { color: var(--tinta-2); }

@media (max-width: 760px) {
  .services { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Categorías (inicio) ---------- */
.cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}
.cat {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: var(--blanco);
  color: var(--tinta);
  text-decoration: none;
  transition: border-color 0.15s ease;
}
.cat:hover { border-color: var(--agua); color: var(--tinta); }
.cat img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin-bottom: 16px;
}
.cat-group { font-size: var(--fs-xs); color: var(--tinta-2); margin-bottom: 4px; }
.cat h3 { font-size: 1.125rem; }
.cat p { margin-top: 8px; font-size: var(--fs-sm); color: var(--tinta-2); line-height: 1.5; }
.cat-count {
  margin-top: auto;
  padding-top: 16px;
  font-size: var(--fs-sm);
  font-weight: 650;
  color: var(--agua-700);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1000px) {
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .cat { padding: 14px; }
  .cat p { display: none; }
}

/* ---------- RS Pump ---------- */
.rspump {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.rspump-logo { height: 64px; width: auto; margin-bottom: 28px; }
.rspump h2 { margin-bottom: 20px; }
.rspump p { color: var(--tinta-2); }
.rspump .specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0;
  padding: 0;
  list-style: none;
}
.rspump .specs li { border-top: 2px solid var(--abismo); padding-top: 10px; font-size: var(--fs-sm); color: var(--tinta-2); line-height: 1.35; }
.rspump .specs strong { display: block; font-size: var(--fs-lg); font-stretch: 120%; font-weight: 780; color: var(--abismo); line-height: 1.1; margin-bottom: 4px; }
.rspump-media { margin: 0; background: var(--blanco); border-radius: 16px; padding: clamp(16px, 3vw, 40px); }
.rspump-media img { width: 100%; }

@media (max-width: 900px) {
  .rspump { grid-template-columns: minmax(0, 1fr); }
  .rspump-media { order: -1; max-width: 480px; }
}

/* ---------- Banda de contacto ---------- */
.cta {
  background: var(--agua);
  color: var(--abismo);
  padding-block: clamp(56px, 6vw, 96px);
}
.cta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px clamp(32px, 5vw, 80px);
  align-items: center;
}
.cta h2 { color: var(--abismo); }
.cta p { margin-top: 16px; font-size: var(--fs-md); line-height: 1.5; }
.cta-lines { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.cta-lines a {
  color: var(--abismo);
  font-size: var(--fs-lg);
  font-weight: 760;
  font-stretch: 118%;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  line-height: 1.35;
}
.cta-lines a:hover { text-decoration: underline; }
.cta-lines .small { font-size: var(--fs-base); font-weight: 600; font-stretch: 105%; }
.cta .btn { margin-top: 24px; }
.cta .btn--light:hover { background: var(--abismo); color: var(--blanco); }
.cta :focus-visible { outline-color: var(--abismo); }

@media (max-width: 800px) {
  .cta-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Pie ---------- */
.site-footer {
  background: var(--abismo);
  color: #a9c1ce;
  padding-top: clamp(56px, 6vw, 88px);
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.footer-brand img { height: 72px; width: auto; margin-bottom: 18px; }
.footer-brand p { max-width: 34ch; }
.site-footer h2 {
  font-size: var(--fs-base);
  font-stretch: 110%;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { color: #d3e2ea; text-decoration: none; }
.site-footer a:hover { color: var(--blanco); text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.6; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 56px;
  padding-block: 24px;
  border-top: 1px solid rgba(169, 193, 206, 0.2);
  font-size: var(--fs-xs);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Barra fija móvil ---------- */
.mobile-bar { display: none; }
@media (max-width: 700px) {
  .mobile-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--linea);
  }
  .mobile-bar .btn { min-height: 46px; padding-inline: 12px; }
  body { padding-bottom: 72px; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(7, 37, 54, 0.55), 0 0 0 4px rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.wa-float svg { width: 34px; height: 34px; }
.wa-float:hover { background: #1ebe5b; color: #fff; transform: scale(1.06); }
.wa-float:focus-visible { outline: 3px solid var(--agua-700); outline-offset: 4px; border-radius: 50%; }
.wa-tip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--abismo);
  color: var(--blanco);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.wa-float:hover .wa-tip, .wa-float:focus-visible .wa-tip { opacity: 1; }

@media (max-width: 700px) {
  .wa-float {
    right: 16px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: 56px;
    height: 56px;
  }
  .wa-float svg { width: 30px; height: 30px; }
  .wa-tip { display: none; }
}

/* ---------- Encabezado de página interior ---------- */
.page-hero {
  background: var(--caliza);
  padding-block: clamp(40px, 5vw, 72px) clamp(40px, 5vw, 64px);
  border-bottom: 1px solid var(--linea);
}
.breadcrumb { margin-bottom: 20px; font-size: var(--fs-sm); color: var(--tinta-2); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--acero); }
.breadcrumb a { color: var(--tinta-2); }
.page-hero h1 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.2rem); color: var(--abismo); }
.page-hero p { margin-top: 20px; font-size: var(--fs-md); line-height: 1.5; color: var(--tinta-2); max-width: 46em; }

/* ---------- Catálogo ---------- */
.catalog-tools {
  background: var(--blanco);
  border-bottom: 1px solid var(--linea);
  padding-block: 20px;
}
.tools-row { display: flex; align-items: flex-start; gap: 24px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 auto;
}
.chip {
  flex: none;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--blanco);
  color: var(--tinta);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 560;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.chip:hover { border-color: var(--agua); }
.chip[aria-pressed="true"] { background: var(--abismo); border-color: var(--abismo); color: var(--blanco); }
.chip .n { margin-left: 6px; opacity: 0.6; font-variant-numeric: tabular-nums; }

.search {
  position: relative;
  flex: 0 0 280px;
}
.search svg {
  position: absolute;
  left: 14px; top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  color: var(--tinta-2);
  pointer-events: none;
}
.search input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 42px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: var(--caliza);
  color: var(--tinta);
  font: inherit;
  font-size: var(--fs-sm);
}
.search input:focus { outline: none; border-color: var(--agua); background: var(--blanco); box-shadow: 0 0 0 3px var(--agua-100); }

@media (max-width: 860px) {
  .tools-row { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .search { flex-basis: auto; }
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: -2px calc(var(--gutter) * -1);
    padding: 2px var(--gutter);
  }
  .chips::-webkit-scrollbar { display: none; }
}

.catalog { padding-block: 40px var(--section); }
.catalog-status { margin-bottom: 24px; color: var(--tinta-2); font-size: var(--fs-sm); }
.catalog-status strong { color: var(--tinta); }

.cat-section + .cat-section { margin-top: 64px; }
.cat-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--abismo); }
.cat-section-head h2 { font-size: var(--fs-lg); }
.cat-section-head p { margin: 0; color: var(--tinta-2); font-size: var(--fs-sm); max-width: 56ch; }

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  list-style: none;
}
.product {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--linea);
  border-radius: 12px;
  background: var(--blanco);
  overflow: hidden;
}
.product-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid var(--linea);
}
.product-body { display: flex; flex-direction: column; flex: 1; padding: 18px 18px 20px; }
.product-brand { font-size: var(--fs-xs); color: var(--tinta-2); margin-bottom: 4px; min-height: 1.3em; }
.product h3 { font-size: 1.0625rem; }
.product p { margin-top: 8px; font-size: var(--fs-sm); line-height: 1.5; color: var(--tinta-2); }
.product-open {
  margin-top: auto;
  padding-top: 16px;
}
.product-open button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: none;
  color: var(--agua-700);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 650;
  font-stretch: 108%;
  cursor: pointer;
}
.product-open button:hover { color: var(--tinta); }
.product-open button::after { content: ""; position: absolute; inset: 0; }
.product { position: relative; transition: border-color 0.15s ease; }
.product:hover { border-color: var(--agua); }

@media (max-width: 520px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-img { padding: 8px; }
  .product-body { padding: 12px 12px 16px; }
  .product h3 { font-size: 0.9375rem; }
  .product p {
    font-size: 0.8125rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .product-open button { font-size: 0.8125rem; }
}

.empty {
  padding: 48px 24px;
  border: 1px dashed var(--acero);
  border-radius: 12px;
  text-align: center;
}
.empty p { margin: 0 auto 20px; color: var(--tinta-2); }

/* Ficha (diálogo) */
.sheet {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--blanco);
  color: var(--tinta);
  box-shadow: 0 40px 80px -20px rgba(7, 37, 54, 0.5);
}
.sheet::backdrop { background: rgba(7, 37, 54, 0.62); }
.sheet[open] { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.sheet-media { background: #fff; padding: 32px; border-right: 1px solid var(--linea); display: flex; align-items: center; }
.sheet-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.sheet-body { padding: 40px 40px 32px; overflow-y: auto; max-height: calc(100dvh - 32px); }
.sheet-cat { font-size: var(--fs-sm); color: var(--agua-700); font-weight: 600; margin-bottom: 8px; }
.sheet h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.2rem); padding-right: 40px; }
.sheet-brand { margin-top: 8px; color: var(--tinta-2); font-size: var(--fs-sm); }
.sheet-desc { margin-top: 20px; }
.sheet-desc p { color: var(--tinta-2); }
.sheet h3 { font-size: var(--fs-base); margin: 28px 0 10px; }
.spec-list { list-style: none; border-top: 1px solid var(--linea); }
.spec-list li { padding: 9px 0; border-bottom: 1px solid var(--linea); font-size: var(--fs-sm); line-height: 1.45; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.sheet-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--caliza);
  color: var(--tinta);
  cursor: pointer;
}
.sheet-close:hover { background: var(--abismo); color: var(--blanco); }
.sheet-close svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.2, 1); }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .sheet { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
  .sheet[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; overflow-y: auto; }
  .sheet-media { border-right: 0; border-bottom: 1px solid var(--linea); padding: 16px; justify-content: center; }
  .sheet-media img { max-width: 240px; }
  .sheet-body { padding: 24px 20px 32px; max-height: none; overflow: visible; }
}

/* ---------- Servicios (página) ---------- */
.service-rows { list-style: none; }
.service-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px clamp(32px, 5vw, 80px);
  padding-block: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--linea);
  align-items: start;
}
.service-row:last-child { border-bottom: 1px solid var(--linea); }
.service-row h2 { font-size: var(--fs-lg); }
.service-row p { color: var(--tinta-2); }
.service-row ul { list-style: none; margin-top: 16px; display: grid; gap: 6px; }
.service-row ul li { position: relative; padding-left: 20px; color: var(--tinta-2); font-size: var(--fs-sm); }
.service-row ul li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--agua); }

@media (max-width: 800px) {
  .service-row { grid-template-columns: minmax(0, 1fr); }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
}
.gallery figure { margin: 0; }
.gallery li:nth-child(1), .gallery li:nth-child(2) { grid-column: span 3; }
.gallery li:nth-child(n + 3) { grid-column: span 2; }
.gallery img { width: 100%; aspect-ratio: 748 / 360; object-fit: cover; border-radius: var(--radius); }
.gallery figcaption { margin-top: 10px; font-size: var(--fs-sm); color: #a9c1ce; line-height: 1.4; }
.gallery figcaption strong { color: var(--blanco); font-weight: 650; display: block; }

@media (max-width: 860px) {
  .gallery { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gallery li:nth-child(n) { grid-column: span 1; }
  .gallery li:nth-child(1) { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 20px; }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: var(--fs-sm); font-weight: 650; font-stretch: 106%; }
.field .opt { font-weight: 400; color: var(--tinta-2); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #b9c7cf;
  border-radius: var(--radius);
  background: var(--blanco);
  color: var(--tinta);
  font: inherit;
  font-size: var(--fs-base);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field select { appearance: none; background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%23102231' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 18px no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--agua-700); box-shadow: 0 0 0 3px var(--agua-100); }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: var(--fs-sm); }
.field-error:empty { display: none; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-note { margin: 0; font-size: var(--fs-sm); color: var(--tinta-2); max-width: 44ch; }
.form-status { grid-column: 1 / -1; margin: 0; padding: 14px 16px; border-radius: var(--radius); background: var(--agua-100); color: var(--abismo); font-size: var(--fs-sm); }
.form-status:empty { display: none; }
.form-status:focus { outline: none; }
.form-status.is-ok { background: #e3f5ec; color: #0f4d2e; border-left: 4px solid #1f8a54; }
.form-status.is-error { background: #fdecea; color: #7a1a14; border-left: 4px solid #b3261e; }
.form-status a { color: inherit; font-weight: 650; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .h-captcha { min-height: 0; }
.btn[disabled] { opacity: 0.65; cursor: progress; }

@media (max-width: 600px) {
  .form { grid-template-columns: minmax(0, 1fr); }
}

.contact-aside { display: grid; gap: 32px; }
.contact-list { list-style: none; display: grid; gap: 24px; }
.contact-list h2 { font-size: var(--fs-sm); font-stretch: 106%; color: var(--tinta-2); font-weight: 600; margin-bottom: 4px; }
.contact-list a, .contact-list address {
  color: var(--abismo);
  font-size: var(--fs-md);
  font-weight: 700;
  font-stretch: 112%;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  line-height: 1.4;
}
.contact-list a:hover { color: var(--agua-700); text-decoration: underline; }
.map {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: 12px;
  background: var(--caliza);
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
