/* ============================================================
   Industrias RYMEX — Hoja de estilos principal (diseño 2026)
   Paleta: rojo #E31E24 · tinta #0D0F12 · niebla #F6F7F8
   Tipografía: Archivo (display) · Manrope (texto)

   Temas: el tema claro vive en :root. El oscuro se aplica con
   [data-tema="oscuro"] en <html> (elección del usuario) o por
   preferencia del sistema cuando no hay elección explícita.
   ============================================================ */
:root {
  /* --- Marca (idénticos en ambos temas) --- */
  --rojo: #e31e24;
  --rojo-vivo: #ff4d43;
  --rojo-oscuro: #b71318;
  --verde-wa: #25d366;
  --panel: #0d0f12;           /* paneles oscuros de acento: CTA, datos, pie */
  --panel-alto: #14171c;

  /* --- Superficies y texto (cambian con el tema) --- */
  --fondo: #ffffff;           /* fondo de página */
  --fondo-alt: #f6f7f8;       /* secciones alternas */
  --superficie: #ffffff;      /* tarjetas, formulario */
  --superficie-2: #f6f7f8;    /* campos de formulario */
  --titulo: #0d0f12;          /* encabezados */
  --texto: #1c2026;           /* cuerpo */
  --gris: #5c636d;            /* texto secundario */
  --hairline: #e8eaed;        /* bordes */
  --puntos: rgba(13, 15, 18, 0.045);
  --vidrio: rgba(255, 255, 255, 0.72);
  --vidrio-fijo: rgba(255, 255, 255, 0.86);
  --sombra-sm: 0 1px 2px rgba(13, 15, 18, 0.05), 0 4px 12px rgba(13, 15, 18, 0.05);
  --sombra-md: 0 6px 18px rgba(13, 15, 18, 0.07), 0 20px 45px rgba(13, 15, 18, 0.08);
  --sombra-roja: 0 8px 24px rgba(227, 30, 36, 0.32);
  --logo-invertir: 0;         /* el logo se aclara en tema oscuro */

  /* --- Constantes --- */
  --fuente-titulos: "Archivo", "Helvetica Neue", sans-serif;
  --fuente-texto: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --grad-rojo: linear-gradient(135deg, #ff4d43 0%, #e31e24 45%, #b71318 100%);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --ruido: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* --- Tema oscuro --- */
:root[data-tema="oscuro"] {
  --fondo: #0d0f12;
  --fondo-alt: #14171c;
  --superficie: #1a1e25;
  --superficie-2: #14171c;
  --panel: #14171c;
  --panel-alto: #1a1e25;
  --titulo: #f4f6f8;
  --texto: #d6dae0;
  --gris: #98a0aa;
  --hairline: rgba(255, 255, 255, 0.1);
  --puntos: rgba(255, 255, 255, 0.05);
  --vidrio: rgba(13, 15, 18, 0.72);
  --vidrio-fijo: rgba(13, 15, 18, 0.88);
  --sombra-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.35);
  --sombra-md: 0 6px 18px rgba(0, 0, 0, 0.45), 0 20px 45px rgba(0, 0, 0, 0.45);
  --logo-invertir: 1;
  color-scheme: dark;
}

/* Preferencia del sistema cuando el visitante no ha elegido tema */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fondo: #0d0f12;
    --fondo-alt: #14171c;
    --superficie: #1a1e25;
    --superficie-2: #14171c;
    --panel: #14171c;
    --panel-alto: #1a1e25;
    --titulo: #f4f6f8;
    --texto: #d6dae0;
    --gris: #98a0aa;
    --hairline: rgba(255, 255, 255, 0.1);
    --puntos: rgba(255, 255, 255, 0.05);
    --vidrio: rgba(13, 15, 18, 0.72);
    --vidrio-fijo: rgba(13, 15, 18, 0.88);
    --sombra-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.35);
    --sombra-md: 0 6px 18px rgba(0, 0, 0, 0.45), 0 20px 45px rgba(0, 0, 0, 0.45);
    --logo-invertir: 1;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: clip; }

/* Transición suave entre páginas (Chrome/Safari; se ignora en el resto) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: 0.22s; }
::view-transition-new(root) { animation-duration: 0.32s; }

body {
  font-family: var(--fuente-texto);
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.7;
  font-size: 1.03rem;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--rojo); text-decoration: none; }
a:hover { color: var(--rojo-oscuro); }

::selection { background: var(--rojo); color: #fff; }

/* Texto solo para lectores de pantalla */
.visualmente-oculto {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid rgba(227, 30, 36, 0.5); outline-offset: 3px; border-radius: 4px; }

.contenedor { width: min(1180px, 92%); margin-inline: auto; }

/* Barra de progreso de lectura */
body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90;
  background: var(--grad-rojo); transform-origin: 0 50%;
  transform: scaleX(var(--progreso, 0)); pointer-events: none;
}

/* ---------- Barra superior ---------- */
.barra-superior {
  background: var(--panel);
  color: #9aa1ab;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.barra-superior .contenedor {
  display: flex; flex-wrap: wrap; gap: 0.35rem 2rem;
  align-items: center; justify-content: center;
}
.barra-superior a { color: #e7e9ec; font-weight: 600; }
.barra-superior a:hover { color: var(--rojo-vivo); }
.barra-superior svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 7px; fill: var(--rojo-vivo); }
.barra-superior span { white-space: nowrap; }

/* ---------- Encabezado (vidrio) ---------- */
.encabezado {
  position: sticky; top: 0; z-index: 50;
  background: var(--vidrio);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow 0.3s ease, background 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.encabezado.oculto { transform: translateY(-110%); }
.encabezado.con-sombra {
  background: var(--vidrio-fijo);
  box-shadow: var(--sombra-sm);
}
.encabezado .contenedor {
  display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0;
}
.logo { margin-right: auto; display: block; }
.logo img { height: 54px; width: auto; }
/* En tema oscuro se usa la versión del logo con texto claro */
.logo .logo-oscuro { display: none; }
:root[data-tema="oscuro"] .logo .logo-claro { display: none; }
:root[data-tema="oscuro"] .logo .logo-oscuro { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .logo .logo-claro { display: none; }
  :root:not([data-tema="claro"]) .logo .logo-oscuro { display: block; }
}

.nav-principal { display: flex; align-items: center; gap: 1.15rem; flex-wrap: nowrap; }
.nav-principal a {
  color: var(--texto); font-weight: 700; font-size: 0.88rem;
  letter-spacing: 0; padding: 0.35rem 0; position: relative; white-space: nowrap;
}
.nav-principal a::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 0; height: 2px; border-radius: 2px;
  background: var(--grad-rojo); transition: width 0.3s cubic-bezier(0.7, 0, 0.2, 1);
}
.nav-principal a:hover::after, .nav-principal a.activo::after { width: 100%; }
.nav-principal a.activo { color: var(--rojo); }

/* ---------- Controles de tema e idioma ---------- */
.controles { display: flex; align-items: center; gap: 0.5rem; }

.btn-tema, .btn-idioma {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  height: 40px; border-radius: 999px; cursor: pointer;
  background: var(--superficie); border: 1px solid var(--hairline);
  color: var(--titulo); font: inherit; font-size: 0.82rem; font-weight: 800;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-tema { width: 40px; }
.btn-idioma { padding: 0 0.85rem; }
.btn-tema:hover, .btn-idioma:hover { border-color: var(--rojo); transform: translateY(-1px); }
.btn-tema svg, .btn-idioma svg { width: 18px; height: 18px; fill: currentColor; }

/* El sol se ve en tema claro; la luna en tema oscuro */
.btn-tema .icono-luna { display: none; }
:root[data-tema="oscuro"] .btn-tema .icono-sol { display: none; }
:root[data-tema="oscuro"] .btn-tema .icono-luna { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .btn-tema .icono-sol { display: none; }
  :root:not([data-tema="claro"]) .btn-tema .icono-luna { display: block; }
}

.selector-idioma { position: relative; }
.menu-idioma {
  position: absolute; top: calc(100% + 0.5rem); right: 0; z-index: 20;
  min-width: 152px; list-style: none; padding: 0.35rem;
  background: var(--superficie); border: 1px solid var(--hairline);
  border-radius: var(--r-sm); box-shadow: var(--sombra-md);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}
.selector-idioma.abierto .menu-idioma {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}
.menu-idioma button {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.55rem 0.75rem; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--texto);
  font: inherit; font-size: 0.94rem; font-weight: 600; text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}
.menu-idioma button:hover { background: var(--fondo-alt); color: var(--titulo); }
.menu-idioma button[aria-selected="true"] { color: var(--rojo); font-weight: 800; }
.menu-idioma button[aria-selected="true"]::after {
  content: ""; margin-left: auto; width: 15px; height: 15px; background: var(--rojo);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M6.2 12.5 2.4 8.7a1 1 0 0 1 1.4-1.4l2.4 2.3 5.9-6a1 1 0 1 1 1.4 1.4l-7.3 7.5z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M6.2 12.5 2.4 8.7a1 1 0 0 1 1.4-1.4l2.4 2.3 5.9-6a1 1 0 1 1 1.4 1.4l-7.3 7.5z"/></svg>') center / contain no-repeat;
}
.menu-idioma .codigo { font-size: 0.74rem; font-weight: 800; color: var(--gris); letter-spacing: 0.06em; }

/* ---------- Botones (píldora) ---------- */
.boton, .boton-borde, .boton-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--fuente-texto); font-weight: 700; font-size: 0.98rem;
  border-radius: 999px; padding: 0.85rem 1.9rem; letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1.5px solid transparent; cursor: pointer; text-align: center;
}
.boton {
  background: var(--grad-rojo); color: #fff;
  box-shadow: var(--sombra-roja);
  position: relative; overflow: hidden;
}
.boton::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 55%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: translateX(-160%) skewX(-18deg);
  transition: transform 0.65s ease; pointer-events: none;
}
.boton:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(227, 30, 36, 0.42); filter: brightness(1.06); }
.boton:hover::after { transform: translateX(300%) skewX(-18deg); }
.boton:active { transform: translateY(0); }
.boton-borde {
  background: rgba(255, 255, 255, 0.08); color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.boton-borde:hover { background: #fff; color: #0d0f12; border-color: #fff; transform: translateY(-2px); }

/* Botón de WhatsApp: verde de la propia marca para que se reconozca de inmediato */
.boton-wa {
  background: var(--verde-wa); color: #0b2e1a;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}
.boton-wa:hover {
  color: #0b2e1a; transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.42); filter: brightness(1.06);
}
.boton-wa svg { width: 17px; height: 17px; fill: currentColor; flex-shrink: 0; }
.nav-principal .boton { padding: 0.58rem 1.15rem; font-size: 0.88rem; box-shadow: 0 4px 14px rgba(227, 30, 36, 0.28); }

.hamburguesa { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburguesa span {
  display: block; width: 25px; height: 2.5px; background: var(--titulo);
  margin: 5.5px 0; border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburguesa.abierto span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburguesa.abierto span:nth-child(2) { opacity: 0; }
.hamburguesa.abierto span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Héroe ---------- */
.heroe {
  position: relative; color: #fff; display: flex; align-items: center;
  min-height: min(760px, 82vh); overflow: hidden; isolation: isolate;
}
.heroe.compacto { min-height: min(480px, 56vh); }
.heroe-fondo {
  position: absolute; inset: 0; z-index: -1;
  animation: heroAcercar 1.9s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
@keyframes heroAcercar { from { transform: scale(1.07); } to { transform: scale(1); } }
.heroe-fondo img { width: 100%; height: 112%; object-fit: cover; }
/* En pantallas angostas el recorte se corre hacia el sujeto de la portada
   para que no quede cortado por la mitad */
@media (max-width: 860px) {
  .heroe:not(.compacto) .heroe-fondo img { object-position: 68% 20%; }
}
.heroe-fondo::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--ruido); background-size: 160px;
  opacity: 0.14; mix-blend-mode: overlay; pointer-events: none; z-index: 2;
}
.heroe-fondo::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to top, rgba(13, 15, 18, 0.55) 0%, transparent 30%),
    linear-gradient(100deg, rgba(13, 15, 18, 0.92) 0%, rgba(13, 15, 18, 0.66) 42%, rgba(13, 15, 18, 0.18) 100%);
}
.heroe .contenedor { padding: 6rem 0; }
.heroe-contenido { max-width: 680px; }
.heroe-contenido > * { opacity: 0; animation: aparecerArriba 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) forwards; }
.heroe-contenido > :nth-child(1) { animation-delay: 0.12s; }
.heroe-contenido > :nth-child(2) { animation-delay: 0.24s; }
.heroe-contenido > :nth-child(3) { animation-delay: 0.38s; }
.heroe-contenido > :nth-child(4) { animation-delay: 0.5s; }
@keyframes aparecerArriba {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}
.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: #fff; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; font-size: 0.72rem; padding: 0.5rem 1.1rem;
  border-radius: 999px; margin-bottom: 1.5rem;
}
.kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rojo-vivo); box-shadow: 0 0 12px var(--rojo-vivo); }
.heroe h1 {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: clamp(1.95rem, 5.8vw, 4.5rem); line-height: 1.04;
  letter-spacing: -0.025em; margin-bottom: 1.3rem; text-wrap: balance;
}
.heroe h1 .acento {
  font-style: normal;
  background: linear-gradient(115deg, #ff6a5f 20%, #ff3b30 45%, #ffb3ae 60%, #ff3b30 75%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brillarTexto 5s ease-in-out infinite;
}
@keyframes brillarTexto {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.heroe p { font-size: 1.15rem; line-height: 1.65; color: rgba(255, 255, 255, 0.86); margin-bottom: 2.2rem; max-width: 54ch; }
.heroe-acciones { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ---------- Secciones ---------- */
.seccion { padding: 6.5rem 0; }
.seccion.gris {
  background-color: var(--fondo-alt);
  background-image: radial-gradient(var(--puntos) 1px, transparent 1px);
  background-size: 24px 24px;
}
.seccion.oscura { background: var(--panel-alto); color: #d8dce1; }
.seccion.oscura h2 { color: #fff; }

.encabezado-seccion { max-width: 720px; margin-bottom: 3.5rem; }
.encabezado-seccion.centrado { margin-inline: auto; text-align: center; }
.etiqueta {
  color: var(--rojo); font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.76rem;
  display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem;
}
.etiqueta::before { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--grad-rojo); }
.encabezado-seccion.centrado .etiqueta::after { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--grad-rojo); }
h2 {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: clamp(1.6rem, 3.8vw, 3.1rem); line-height: 1.1;
  letter-spacing: -0.02em; color: var(--titulo); text-wrap: balance;
}
.encabezado-seccion p { margin-top: 1.1rem; color: var(--gris); font-size: 1.08rem; }

/* ---------- Fila media (imagen + texto alternados) ---------- */
.fila-media {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: center; padding: 3.6rem 0;
}
.fila-media:not(:last-child) { border-bottom: 1px solid var(--hairline); }
.fila-media.invertida .media { order: 2; }
.fila-media .media { position: relative; }
.fila-media .media::before {
  content: ""; position: absolute; inset: 14px -14px -14px 14px;
  border-radius: var(--r-lg); background: linear-gradient(135deg, rgba(227, 30, 36, 0.14), rgba(227, 30, 36, 0.03));
  z-index: 0;
}
.fila-media.invertida .media::before { inset: 14px 14px -14px -14px; }
.fila-media .media img {
  position: relative; z-index: 1;
  border-radius: var(--r-lg); box-shadow: var(--sombra-md);
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.fila-media .media:hover img { transform: scale(1.03) rotate(0.4deg); }
/* Parallax ligado al scroll (navegadores con scroll-driven animations) */
@supports (animation-timeline: view()) {
  .fila-media .media {
    animation: parallaxSuave linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
  }
  @keyframes parallaxSuave {
    from { transform: translateY(22px); }
    to { transform: translateY(-22px); }
  }
}
.fila-media h3 {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: clamp(1.35rem, 2.4vw, 1.95rem); line-height: 1.14;
  letter-spacing: -0.015em; margin-bottom: 1rem; color: var(--titulo);
}
.fila-media h3::after {
  content: ""; display: block; width: 48px; height: 3px;
  background: var(--grad-rojo); margin-top: 0.7rem; border-radius: 3px;
}
.fila-media p { color: var(--gris); margin-bottom: 1rem; }

/* ---------- Listas con palomita ---------- */
.lista-check { list-style: none; display: grid; gap: 0.55rem; margin-top: 0.6rem; }
.lista-check.dos-columnas { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
.lista-check li { padding-left: 1.75rem; position: relative; color: var(--texto); font-weight: 600; font-size: 0.98rem; }
.lista-check li::before {
  content: ""; position: absolute; left: 0; top: 0.36em;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--rojo);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.7 5.9-4.2 4.9a.75.75 0 0 1-1.13.02L4.3 8.6a.75.75 0 1 1 1.1-1l1.5 1.6 3.66-4.28a.75.75 0 0 1 1.14.98z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.7 5.9-4.2 4.9a.75.75 0 0 1-1.13.02L4.3 8.6a.75.75 0 1 1 1.1-1l1.5 1.6 3.66-4.28a.75.75 0 0 1 1.14.98z"/></svg>') center / contain no-repeat;
}
.seccion.oscura .lista-check li { color: #d8dce1; }

/* ---------- Tarjetas ---------- */
.rejilla { display: grid; gap: 1.4rem; }
.rejilla.tres { grid-template-columns: repeat(3, 1fr); }
.rejilla.cuatro { grid-template-columns: repeat(4, 1fr); }
.rejilla.cinco { grid-template-columns: repeat(5, 1fr); }

.tarjeta {
  position: relative; overflow: hidden;
  background: var(--superficie); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 2rem 1.8rem 1.9rem;
  transition: transform 0.25s ease, box-shadow 0.3s ease, border-color 0.25s ease;
}
.tarjeta::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad-rojo); opacity: 0;
  transition: opacity 0.3s ease;
}
.tarjeta:hover { box-shadow: var(--sombra-md); border-color: transparent; }
body:not(.tiene-tilt) .tarjeta:hover { transform: translateY(-6px); }
body.tiene-tilt .tarjeta { will-change: transform; }
.tarjeta:hover::before { opacity: 1; }
.tarjeta h3 {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: 1.22rem; letter-spacing: -0.01em; margin: 0.4rem 0 0.5rem; color: var(--titulo);
}
.tarjeta p { color: var(--gris); font-size: 0.96rem; }
.tarjeta .icono {
  width: 54px; height: 54px; border-radius: 16px;
  background: var(--grad-rojo); display: grid; place-items: center;
  margin-bottom: 1.1rem; box-shadow: 0 6px 16px rgba(227, 30, 36, 0.3);
}
.tarjeta .icono svg { width: 26px; height: 26px; fill: #fff; }

/* ---------- Rejilla bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.bento-pieza {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--superficie); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 2rem 1.9rem;
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 210px;
  transition: transform 0.3s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.bento-pieza:hover { transform: translateY(-5px); box-shadow: var(--sombra-md); border-color: transparent; }
.bento-pieza.ancha { grid-column: span 2; }
.bento-pieza.alta { grid-row: span 2; min-height: 440px; }

/* Pieza con fotografía de fondo */
.bento-pieza.con-foto { border: 0; color: #fff; }
.bento-pieza.con-foto img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.bento-pieza.con-foto::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(13, 15, 18, 0.92) 12%, rgba(13, 15, 18, 0.45) 55%, rgba(13, 15, 18, 0.15) 100%);
}
.bento-pieza.con-foto:hover img { transform: scale(1.06); }
.bento-pieza.con-foto h3, .bento-pieza.con-foto p { color: #fff; }
.bento-pieza.con-foto p { color: rgba(255, 255, 255, 0.82); }

/* Pieza de acento en rojo */
.bento-pieza.acentuada { background: var(--grad-rojo); border: 0; color: #fff; }
.bento-pieza.acentuada h3, .bento-pieza.acentuada p { color: #fff; }
.bento-pieza.acentuada p { color: rgba(255, 255, 255, 0.88); }
.bento-pieza.acentuada .cifra {
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 3.2rem;
  line-height: 1; letter-spacing: -0.02em; margin-bottom: 0.3rem;
}

.bento-pieza .icono {
  width: 50px; height: 50px; border-radius: 15px; margin-bottom: auto;
  background: var(--grad-rojo); display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(227, 30, 36, 0.3);
}
.bento-pieza.con-foto .icono, .bento-pieza.acentuada .icono {
  background: rgba(13, 15, 18, 0.45); border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.bento-pieza.acentuada .icono { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.3); }
.bento-pieza .icono svg { width: 25px; height: 25px; fill: #fff; }
.bento-pieza h3 {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: 1.3rem; letter-spacing: -0.01em; margin: 1.4rem 0 0.45rem; color: var(--titulo);
}
.bento-pieza.alta h3 { font-size: 1.75rem; }
.bento-pieza p { color: var(--gris); font-size: 0.95rem; }
.bento-pieza .flecha {
  margin-top: 1.1rem; font-weight: 800; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.45rem; color: var(--rojo);
}
.bento-pieza.con-foto .flecha, .bento-pieza.acentuada .flecha { color: #fff; }
.bento-pieza .flecha::after {
  content: "→"; transition: transform 0.25s ease; display: inline-block;
}
.bento-pieza:hover .flecha::after { transform: translateX(5px); }

/* ---------- Galería horizontal movida por el scroll ---------- */
.galeria { background: var(--panel); color: #fff; }
.galeria-fijador { height: 320vh; position: relative; }
.galeria-lienzo {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 2rem;
}
.galeria-encabezado { flex-shrink: 0; }
.galeria h2, .galeria .encabezado-seccion p { color: #fff; }
.galeria .encabezado-seccion p { color: rgba(255, 255, 255, 0.72); }
.galeria .encabezado-seccion { margin-bottom: 0; }
.galeria-pista {
  display: flex; gap: 1.4rem; padding-inline: max(4vw, calc((100vw - 1180px) / 2));
  will-change: transform;
}
.galeria-tarjeta {
  position: relative; overflow: hidden; flex-shrink: 0;
  width: 330px; height: 430px; border-radius: var(--r-lg);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.8rem; isolation: isolate; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.galeria-tarjeta img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.galeria-tarjeta::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(13, 15, 18, 0.94) 10%, rgba(13, 15, 18, 0.4) 55%, rgba(13, 15, 18, 0.1) 100%);
}
.galeria-tarjeta:hover img { transform: scale(1.07); }
.galeria-tarjeta .numero {
  position: absolute; top: 1.3rem; left: 1.3rem; z-index: 1;
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 0.82rem;
  letter-spacing: 0.1em; color: #fff;
  /* pastilla: el número debe leerse sobre cualquier zona de la fotografía */
  background: rgba(13, 15, 18, 0.55); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px; padding: 0.28rem 0.7rem;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.galeria-tarjeta h3 {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: 1.45rem; line-height: 1.12; letter-spacing: -0.01em; margin-bottom: 0.5rem;
}
.galeria-tarjeta p { font-size: 0.94rem; color: rgba(255, 255, 255, 0.8); }
.galeria-barra {
  flex-shrink: 0; height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  width: min(1180px, 92%); margin-inline: auto; overflow: hidden;
}
.galeria-barra span {
  display: block; height: 100%; width: 100%; border-radius: 3px;
  background: var(--grad-rojo); transform-origin: 0 50%;
  transform: scaleX(var(--avance, 0));
}

/* ---------- Proceso con panel fijo ---------- */
.proceso { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 4.5rem; align-items: start; }
.proceso-visual { position: sticky; top: 130px; }
.proceso-marco {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 4 / 5; box-shadow: var(--sombra-md); background: var(--fondo-alt);
}
.proceso-marco img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.05);
  transition: opacity 0.65s ease, transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.proceso-marco img.activa { opacity: 1; transform: none; }
.proceso-contador {
  position: absolute; left: 1.5rem; bottom: 1.5rem; z-index: 2;
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 1rem;
  color: #fff; background: rgba(13, 15, 18, 0.55); border-radius: 999px;
  padding: 0.4rem 1rem; letter-spacing: 0.08em;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}

.proceso-pasos { position: relative; padding-left: 2.6rem; }
.proceso-pasos::before {
  content: ""; position: absolute; left: 9px; top: 12px; bottom: 12px;
  width: 2px; background: var(--hairline); border-radius: 2px;
}
.proceso-pasos::after {
  content: ""; position: absolute; left: 9px; top: 12px;
  width: 2px; border-radius: 2px; background: var(--grad-rojo);
  height: calc((100% - 24px) * var(--avance-proceso, 0));
  transition: height 0.35s ease;
}
.paso { position: relative; padding: 1.6rem 0 1.8rem; }
.paso::before {
  content: ""; position: absolute; left: -2.6rem; top: 2rem;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--fondo); border: 2px solid var(--hairline);
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease;
  z-index: 1;
}
.paso.activo::before { border-color: var(--rojo); background: var(--rojo); transform: scale(1.18); }
.paso h3 {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: 1.4rem; letter-spacing: -0.012em; margin-bottom: 0.5rem;
  color: var(--titulo); transition: color 0.3s ease;
}
.paso p { color: var(--gris); }
.paso .etapa {
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--gris); display: block; margin-bottom: 0.35rem;
  transition: color 0.3s ease;
}
.paso.activo .etapa { color: var(--rojo); }
html.js .paso { opacity: 0.42; transition: opacity 0.45s ease; }
html.js .paso.activo { opacity: 1; }

/* ---------- Guía: clases de fuego ---------- */
.clases-fuego { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.1rem; }
.clase {
  background: var(--superficie); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 1.6rem 1.3rem;
  border-top: 4px solid var(--clase-color, var(--rojo));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.clase:hover { transform: translateY(-5px); box-shadow: var(--sombra-md); }
.clase .letra {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--clase-color, var(--rojo)); color: #fff;
  display: grid; place-items: center; margin-bottom: 1rem;
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 1.6rem; line-height: 1;
}
.clase h3 {
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 1.12rem;
  letter-spacing: -0.01em; margin-bottom: 0.4rem; color: var(--titulo);
}
.clase p { color: var(--gris); font-size: 0.92rem; }

/* ---------- Guía: tipos de extintor ---------- */
.selector-riesgo {
  display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-bottom: 2.5rem;
}
.chip-riesgo {
  background: var(--superficie); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 0.6rem 1.3rem; font: inherit; font-weight: 700; font-size: 0.93rem;
  color: var(--texto); cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}
.chip-riesgo:hover { border-color: var(--rojo); transform: translateY(-2px); }
.chip-riesgo[aria-pressed="true"] {
  background: var(--grad-rojo); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(227, 30, 36, 0.3);
}

/* Resumen del filtro: cuando a un tipo de instalación le aplican varios
   extintores, se listan todos como accesos directos al anillo. */
.resumen-riesgo {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem 0.7rem; margin: -1.2rem auto 2.2rem; max-width: 780px;
  padding: 0.9rem 1.2rem; border-radius: var(--r-md);
  background: var(--superficie); border: 1px solid var(--hairline);
  animation: aparecerResumen 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.resumen-riesgo[hidden] { display: none; }
@keyframes aparecerResumen {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
.resumen-riesgo .rotulo-resumen {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gris);
}
.resumen-riesgo .atajo {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer;
  background: var(--fondo-alt); border: 1px solid var(--hairline);
  color: var(--titulo); font: inherit; font-weight: 700; font-size: 0.9rem;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.resumen-riesgo .atajo::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--tono, var(--rojo));
}
.resumen-riesgo .atajo:hover { border-color: var(--rojo); transform: translateY(-2px); }
.resumen-riesgo .atajo[aria-current="true"] {
  background: var(--grad-rojo); color: #fff; border-color: transparent;
}
.resumen-riesgo .atajo[aria-current="true"]::before { background: #fff; }

.rejilla-extintores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.extintor {
  background: var(--superficie); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 1.7rem 1.5rem;
  display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
}
.extintor:hover { transform: translateY(-4px); box-shadow: var(--sombra-md); }
.extintor h3 {
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 1.15rem;
  letter-spacing: -0.01em; margin-bottom: 0.5rem; color: var(--titulo);
}
.extintor p { color: var(--gris); font-size: 0.94rem; margin-bottom: 1rem; }
.clases-cubiertas { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; }
.clases-cubiertas span {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 0.88rem; color: #fff;
}
/* Cuando hay un escenario elegido, se atenúan los que no aplican */
.rejilla-extintores.filtrando .extintor { opacity: 0.34; }
.rejilla-extintores.filtrando .extintor.recomendado {
  opacity: 1; border-color: var(--rojo); box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.12);
}
.marca-recomendado {
  display: none; align-items: center; gap: 0.4rem; margin-bottom: 0.7rem;
  font-weight: 800; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rojo);
}
.extintor.recomendado .marca-recomendado { display: inline-flex; }

/* ---------- Guía: carrusel rotativo de extintores ----------
   Un anillo en 3D: cada ficha se coloca girada sobre su propio eje y empujada
   hacia el frente, así que el conjunto forma un círculo. Girar el anillo al
   revés trae al frente la que se elija. */
.carrusel-ext { --radio: 330px; --paso: 40deg; margin-top: 2rem; }

.escenario {
  position: relative; height: 340px;
  perspective: 1500px; perspective-origin: 50% 42%;
}
.anillo {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--activo, 0) * var(--paso) * -1));
  transition: transform 0.85s cubic-bezier(0.22, 0.7, 0.2, 1);
}
.carrusel-ext.arrastrando .anillo { transition: none; }

.ficha-ext {
  position: absolute; left: 50%; top: 50%;
  width: 178px; height: 262px; margin: -131px 0 0 -89px;
  transform: rotateY(calc(var(--i) * var(--paso))) translateZ(var(--radio));
  background: var(--superficie); border: 1px solid var(--hairline);
  border-radius: var(--r-md); cursor: pointer; font: inherit; color: inherit;
  padding: 1.1rem 0.9rem 1rem; display: flex; flex-direction: column;
  align-items: center; text-align: center;
  transition: opacity 0.45s ease, filter 0.45s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
/* Las que quedan de lado se atenúan para que el frente mande */
.ficha-ext[data-lejos="1"] { opacity: 0.55; }
.ficha-ext[data-lejos="2"] { opacity: 0.26; filter: blur(1px); }
.ficha-ext[data-lejos="3"] { opacity: 0.1; filter: blur(2px); pointer-events: none; }
.ficha-ext[data-lejos="4"] { opacity: 0; pointer-events: none; }
.ficha-ext[aria-selected="true"] {
  opacity: 1; filter: none;
  border-color: transparent;
  box-shadow: 0 18px 50px rgba(13, 15, 18, 0.18), 0 0 0 2px var(--tono, var(--rojo));
}
:root[data-tema="oscuro"] .ficha-ext[aria-selected="true"] { box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 0 2px var(--tono, var(--rojo)); }

.ficha-ext .halo {
  position: absolute; inset: auto 0 -18px 0; height: 70px; z-index: -1;
  background: radial-gradient(50% 100% at 50% 100%, var(--tono, var(--rojo)), transparent 72%);
  opacity: 0; transition: opacity 0.45s ease; filter: blur(12px);
}
.ficha-ext[aria-selected="true"] .halo { opacity: 0.45; }

.ficha-ext .dibujo { height: 150px; display: grid; place-items: center; margin-bottom: 0.7rem; }
.ficha-ext .dibujo svg { height: 100%; width: auto; }
.ficha-ext .nombre {
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 1rem;
  line-height: 1.15; letter-spacing: -0.01em; color: var(--titulo);
}
.ficha-ext .desc { display: none; }
.ficha-ext .clases { display: flex; gap: 0.25rem; margin-top: auto; padding-top: 0.6rem; }
.ficha-ext .clases span {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 0.68rem; color: #fff;
}
.ficha-ext .marca-rec {
  position: absolute; top: 0.6rem; right: 0.6rem;
  width: 9px; height: 9px; border-radius: 50%; background: var(--rojo);
  box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.22);
  opacity: 0; transition: opacity 0.3s ease;
}
.ficha-ext.recomendado .marca-rec { opacity: 1; }

/* ---- Ficha de detalle bajo el anillo ---- */
.detalle-ext {
  max-width: 660px; margin: 2.2rem auto 0; text-align: center; min-height: 132px;
}
.detalle-ext .titulo {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.02em; color: var(--titulo);
  margin-bottom: 0.6rem;
}
.detalle-ext p { color: var(--gris); font-size: 1.02rem; }
.detalle-ext .pie-clases {
  display: flex; gap: 0.5rem; justify-content: center; align-items: center;
  margin-top: 1rem; flex-wrap: wrap;
}
.detalle-ext .pie-clases .rotulo {
  font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gris);
}
.detalle-ext .pie-clases span.clase-badge {
  padding: 0.28rem 0.8rem; border-radius: 999px; color: #fff;
  font-weight: 800; font-size: 0.8rem;
}
.detalle-ext.cambiando { opacity: 0; transform: translateY(8px); }
.detalle-ext { transition: opacity 0.28s ease, transform 0.28s ease; }

/* ---- Controles ---- */
.controles-anillo {
  display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.8rem;
}
.flecha-anillo {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--superficie); border: 1px solid var(--hairline); color: var(--titulo);
  display: grid; place-items: center;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.flecha-anillo:hover { border-color: var(--rojo); transform: translateY(-2px); }
.flecha-anillo svg { width: 18px; height: 18px; fill: currentColor; }
.puntos-anillo { display: flex; gap: 0.45rem; }
.puntos-anillo button {
  width: 8px; height: 8px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--hairline); border: 0;
  transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
}
.puntos-anillo button[aria-current="true"] {
  background: var(--rojo); width: 22px; border-radius: 999px;
}
.pista-arrastre {
  text-align: center; margin-top: 1rem; font-size: 0.86rem; color: var(--gris);
}

/* Sin movimiento: el anillo se vuelve una rejilla normal */
@media (prefers-reduced-motion: reduce) {
  .escenario { perspective: none; height: auto; }
  .anillo {
    position: static; transform: none; transform-style: flat;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem;
  }
  .ficha-ext {
    position: static; transform: none; margin: 0; width: auto; height: auto;
    opacity: 1 !important; filter: none !important; pointer-events: auto !important;
  }
  .controles-anillo, .pista-arrastre, .detalle-ext { display: none; }
  .ficha-ext .desc { display: block; font-size: 0.9rem; color: var(--gris); margin: 0.5rem 0 0.8rem; }
  .ficha-ext .clases { margin-top: 0; }
}

/* ---------- Guía: tabla comparativa ---------- */
.tabla-envoltura {
  margin-top: 2.5rem; overflow-x: auto; border-radius: var(--r-lg);
  border: 1px solid var(--hairline); background: var(--superficie);
  -webkit-overflow-scrolling: touch;
}
.tabla-comparativa {
  width: 100%; border-collapse: collapse; min-width: 660px;
  font-size: 0.95rem;
}
.tabla-comparativa th, .tabla-comparativa td {
  padding: 0.9rem 1rem; text-align: center; vertical-align: middle;
  border-bottom: 1px solid var(--hairline);
}
.tabla-comparativa thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--fondo-alt); color: var(--titulo);
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 0.82rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-bottom: 1px solid var(--hairline);
}
/* La primera columna se queda fija al deslizar de lado en pantallas chicas */
.tabla-comparativa th[scope="row"], .tabla-comparativa thead th:first-child {
  position: sticky; left: 0; z-index: 3; text-align: left;
  background: var(--superficie); min-width: 210px;
}
.tabla-comparativa thead th:first-child { z-index: 4; background: var(--fondo-alt); }
.tabla-comparativa th[scope="row"] {
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 0.98rem;
  color: var(--titulo); letter-spacing: -0.01em;
}
.tabla-comparativa th[scope="row"]::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 9px; height: 9px; border-radius: 50%; margin-right: 0.6rem;
  background: var(--tono, var(--rojo));
}
.tabla-comparativa tbody tr:last-child th,
.tabla-comparativa tbody tr:last-child td { border-bottom: 0; }
.tabla-comparativa tbody tr { transition: background 0.3s ease; }
.tabla-comparativa tbody tr:hover { background: var(--fondo-alt); }
.tabla-comparativa tbody tr:hover th[scope="row"] { background: var(--fondo-alt); }
/* Fila del extintor que está al frente del carrusel */
.tabla-comparativa tbody tr.resaltada { background: rgba(227, 30, 36, 0.07); }
.tabla-comparativa tbody tr.resaltada th[scope="row"] { background: rgba(227, 30, 36, 0.07); }
.tabla-comparativa tbody tr.resaltada th[scope="row"] { box-shadow: inset 3px 0 0 var(--rojo); }

/* Encabezado de cada clase, con su color */
.tabla-comparativa .clase-col { display: inline-flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.tabla-comparativa .clase-col i {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-style: normal; font-weight: 800; font-size: 0.8rem; color: #fff;
}

/* Marcas de la tabla */
.marca { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.marca.si { background: rgba(31, 157, 85, 0.14); }
.marca.si::before {
  content: ""; width: 15px; height: 15px; background: #1f9d55;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M6.2 12.5 2.4 8.7a1 1 0 0 1 1.4-1.4l2.4 2.3 5.9-6a1 1 0 1 1 1.4 1.4l-7.3 7.5z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M6.2 12.5 2.4 8.7a1 1 0 0 1 1.4-1.4l2.4 2.3 5.9-6a1 1 0 1 1 1.4 1.4l-7.3 7.5z"/></svg>') center / contain no-repeat;
}
.marca.no { background: var(--fondo-alt); }
.marca.no::before {
  content: ""; width: 11px; height: 2px; border-radius: 2px; background: var(--gris); opacity: 0.6;
}
.marca.ojo { background: rgba(217, 162, 9, 0.16); }
.marca.ojo::before {
  content: "!"; font-family: var(--fuente-titulos); font-weight: 800;
  font-size: 0.86rem; color: #a8790a; line-height: 1;
}
.residuo { font-weight: 700; color: var(--titulo); }
.residuo.limpio { color: #1f9d55; }

.pie-tabla {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; justify-content: center;
  margin-top: 1.2rem; font-size: 0.86rem; color: var(--gris);
}
.pie-tabla span { display: inline-flex; align-items: center; gap: 0.45rem; }
.pie-tabla .marca { width: 20px; height: 20px; }
.pie-tabla .marca.si::before { width: 12px; height: 12px; }

/* ---------- Distribuidores: factores del precio ---------- */
.rejilla-factores {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 1.1rem;
}
.factor {
  background: var(--superficie); border: 1px solid var(--hairline);
  border-radius: var(--r-md); padding: 1.5rem 1.4rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.factor:hover { transform: translateY(-4px); box-shadow: var(--sombra-md); border-color: transparent; }
.factor .num {
  display: block; font-family: var(--fuente-titulos); font-weight: 800;
  font-size: 0.82rem; letter-spacing: 0.12em; color: var(--rojo); margin-bottom: 0.7rem;
}
.factor h3 {
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 1.06rem;
  letter-spacing: -0.01em; color: var(--titulo); line-height: 1.2;
}

/* ---------- Guía: aviso y revisión ---------- */
.aviso {
  display: flex; gap: 1.3rem; align-items: flex-start;
  background: rgba(227, 30, 36, 0.06); border: 1px solid rgba(227, 30, 36, 0.28);
  border-left: 4px solid var(--rojo); border-radius: var(--r-md); padding: 1.7rem 1.8rem;
}
.aviso .icono {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad-rojo); display: grid; place-items: center;
}
.aviso .icono svg { width: 24px; height: 24px; fill: #fff; }
.aviso h3 {
  font-family: var(--fuente-titulos); font-weight: 800; font-size: 1.25rem;
  margin-bottom: 0.5rem; color: var(--titulo);
}
.aviso p { color: var(--texto); }
.aviso p + p { margin-top: 0.6rem; }

.rejilla-revision { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.punto-revision {
  background: var(--superficie); border: 1px solid var(--hairline); border-radius: var(--r-sm);
  padding: 1.1rem 1.2rem; font-weight: 700; font-size: 0.96rem; color: var(--titulo);
  display: flex; align-items: center; gap: 0.7rem;
  transition: border-color 0.22s ease, transform 0.22s ease;
}
.punto-revision:hover { border-color: var(--rojo); transform: translateY(-3px); }
.punto-revision::before {
  content: ""; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--rojo);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.7 5.9-4.2 4.9a.75.75 0 0 1-1.13.02L4.3 8.6a.75.75 0 1 1 1.1-1l1.5 1.6 3.66-4.28a.75.75 0 0 1 1.14.98z"/></svg>') center / contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="black" d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.7 5.9-4.2 4.9a.75.75 0 0 1-1.13.02L4.3 8.6a.75.75 0 1 1 1.1-1l1.5 1.6 3.66-4.28a.75.75 0 0 1 1.14.98z"/></svg>') center / contain no-repeat;
}

/* ---------- Sectores ---------- */
.rejilla-sectores { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; max-width: 900px; margin-inline: auto; }
.sector {
  background: var(--superficie); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 0.7rem 1.4rem; font-weight: 700; font-size: 0.93rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
  transition: transform 0.2s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}
.sector::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--rojo); transition: background 0.25s ease; }
.sector:hover {
  background: var(--titulo); color: var(--fondo); border-color: var(--titulo);
  transform: translateY(-3px); box-shadow: var(--sombra-sm);
}
.sector:hover::before { background: var(--rojo-vivo); }

/* ---------- Valores ---------- */
.rejilla-valores { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }
.valor {
  background: transparent; border: 1px solid #d8dbdf; border-radius: 999px;
  padding: 0.55rem 1.35rem; font-weight: 700; font-size: 0.93rem; color: var(--texto);
  display: inline-flex; align-items: center; gap: 0.55rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.valor:hover { border-color: var(--rojo); background: rgba(227, 30, 36, 0.05); }
.valor::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--grad-rojo); }

/* ---------- Cinta de datos (panel oscuro inset) ---------- */
.cinta-datos { padding: 1.5rem 0; background: var(--fondo); }
.cinta-datos .contenedor {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--panel); border-radius: var(--r-lg);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  text-align: center; padding: 3.4rem 2.5rem; color: #fff;
}
.cinta-datos .contenedor::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(360px 360px at var(--mx, 50%) var(--my, -30%), rgba(255, 77, 67, 0.22), transparent 70%),
    radial-gradient(520px 260px at 12% 0%, rgba(227, 30, 36, 0.4), transparent 65%),
    radial-gradient(520px 260px at 88% 110%, rgba(227, 30, 36, 0.28), transparent 65%);
}
.cinta-datos .contenedor::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--ruido); background-size: 160px; opacity: 0.1; mix-blend-mode: overlay;
}
.dato strong {
  display: block; font-family: var(--fuente-titulos); font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 30%, #ffb3ae);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 0.4rem;
}
.dato span { font-size: 0.98rem; font-weight: 600; color: rgba(255, 255, 255, 0.78); }

/* ---------- Clientes ---------- */
/* Sección destacada: el cliente pidió que se note más y vaya arriba */
.seccion.destacada { position: relative; }
.seccion.destacada::before,
.seccion.destacada::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  width: min(1180px, 92%); height: 1px; background: var(--hairline);
}
.seccion.destacada::before { top: 0; }
.seccion.destacada::after { bottom: 0; }
.seccion.destacada .marquesina { padding: 1rem 0 0; }

.marquesina { overflow: hidden; position: relative; padding: 0.5rem 0; }
.marquesina::before, .marquesina::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 110px; z-index: 2; pointer-events: none;
}
.marquesina::before { left: 0; background: linear-gradient(90deg, var(--fondo-alt), transparent); }
.marquesina::after { right: 0; background: linear-gradient(-90deg, var(--fondo-alt), transparent); }
.marquesina-pista {
  display: flex; align-items: center; gap: 1.1rem; width: max-content;
  animation: desplazar 55s linear infinite;
}
.marquesina:hover .marquesina-pista { animation-play-state: paused; }
@keyframes desplazar { to { transform: translateX(-50%); } }
.logo-cliente {
  /* placa blanca fija: los logotipos de clientes son oscuros sobre transparente */
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-md);
  width: 232px; height: 130px; display: grid; place-items: center; padding: 7px;
  flex-shrink: 0; transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.logo-cliente:hover { box-shadow: var(--sombra-sm); transform: translateY(-3px); }
.logo-cliente img {
  width: 100%; height: 100%; object-fit: contain;
  filter: grayscale(1); opacity: 0.7; transition: filter 0.3s ease, opacity 0.3s ease;
}
.logo-cliente:hover img { filter: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .marquesina-pista { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .marquesina-pista > .duplicado { display: none; }
}

/* ---------- Llamado a la acción (panel oscuro inset) ---------- */
.cta { padding: 3rem 0 6.5rem; background: var(--fondo); }
.seccion.gris + .cta, .seccion.gris ~ .cta { background: var(--fondo); }
.cta .contenedor {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--panel); border-radius: var(--r-lg);
  text-align: center; padding: 5rem 2.5rem; color: #fff;
}
.cta .contenedor::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(380px 380px at var(--mx, 50%) var(--my, -30%), rgba(255, 77, 67, 0.22), transparent 70%),
    radial-gradient(700px 340px at 50% -15%, rgba(227, 30, 36, 0.42), transparent 68%),
    radial-gradient(400px 220px at 8% 110%, rgba(227, 30, 36, 0.2), transparent 65%);
}
.cta .contenedor::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--ruido); background-size: 160px; opacity: 0.1; mix-blend-mode: overlay;
}
.cta .etiqueta { color: var(--rojo-vivo); justify-content: center; }
.cta .etiqueta::before { background: var(--rojo-vivo); }
.cta h2 { color: #fff; margin-bottom: 0.9rem; }
.cta p { color: rgba(255, 255, 255, 0.75); max-width: 60ch; margin: 0 auto 2.3rem; font-size: 1.1rem; }
.cta .acciones { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

/* ---------- Contacto ---------- */
.rejilla-contacto { display: grid; grid-template-columns: 1.02fr 1fr; gap: 3.2rem; align-items: start; }
.tarjeta-contacto {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: var(--superficie); border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 1.35rem 1.5rem; margin-bottom: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.tarjeta-contacto:hover { transform: translateY(-3px); box-shadow: var(--sombra-sm); }
.tarjeta-contacto .icono {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad-rojo); display: grid; place-items: center;
  box-shadow: 0 5px 14px rgba(227, 30, 36, 0.28);
}
.tarjeta-contacto .icono svg { width: 22px; height: 22px; fill: #fff; }
.tarjeta-contacto strong { display: block; font-size: 1rem; font-weight: 800; color: var(--titulo); }
.tarjeta-contacto span, .tarjeta-contacto a { color: var(--gris); font-size: 0.97rem; font-weight: 500; }
.tarjeta-contacto a:hover { color: var(--rojo); }

.formulario {
  background: var(--superficie); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  padding: 2.4rem; box-shadow: var(--sombra-md);
}
.formulario h3 {
  font-family: var(--fuente-titulos); font-weight: 800;
  font-size: 1.55rem; letter-spacing: -0.015em; margin-bottom: 0.6rem; color: var(--titulo);
}
.campo { margin-bottom: 1.05rem; }
.campo label { display: block; font-weight: 700; font-size: 0.88rem; margin-bottom: 0.35rem; color: var(--titulo); }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 0.8rem 1rem; border: 1.5px solid var(--hairline);
  border-radius: var(--r-sm); font: inherit; font-size: 0.98rem;
  color: var(--texto); background: var(--superficie-2);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--rojo); background: var(--superficie);
  box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.1);
}
.campo textarea { min-height: 120px; resize: vertical; }
.dos-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ---------- Pie de página ---------- */
.pie { background: var(--panel); color: #9aa1ab; font-size: 0.96rem; }
.pie-borde { height: 3px; background: var(--grad-rojo); }
.pie-superior {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem;
  padding: 4rem 0 3rem;
}
.pie h4 {
  color: #fff; font-family: var(--fuente-titulos);
  font-weight: 700; font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.16em; margin-bottom: 1.1rem;
}
.pie ul { list-style: none; display: grid; gap: 0.55rem; }
.pie a { color: #9aa1ab; font-weight: 500; transition: color 0.2s ease; }
.pie a:hover { color: #fff; }
/* El pie es oscuro en ambos temas, así que va la versión clara del logotipo,
   sin placa blanca detrás. */
.pie-logo { display: inline-block; margin-bottom: 1.1rem; }
.pie-logo img { height: 48px; width: auto; }
.pie-inferior {
  border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 1.3rem 0;
  text-align: center; font-size: 0.86rem; color: #6d747e;
}

/* ---------- Botón flotante WhatsApp ---------- */
.whatsapp-flotante {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--verde-wa); display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(18, 140, 82, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.whatsapp-flotante::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--verde-wa); opacity: 0;
  animation: pulso 2.6s ease-out infinite;
}
@keyframes pulso {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.45); opacity: 0; }
}
.whatsapp-flotante:hover { transform: scale(1.08); box-shadow: 0 14px 32px rgba(18, 140, 82, 0.55); }
.whatsapp-flotante svg { width: 30px; height: 30px; fill: #fff; }

/* ---------- Animaciones de aparición ----------
   Los estados ocultos solo aplican con JS activo (html.js) para que el
   contenido nunca quede invisible si el script no carga. */
html.js .revelar { opacity: 0; transform: translateY(26px) scale(0.99); }
.revelar { transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1); }
html.js .revelar.visible { opacity: 1; transform: none; }

/* Deslizamiento lateral de las filas media */
html.js .fila-media.revelar { opacity: 1; transform: none; }
html.js .fila-media.revelar > :first-child { transform: translateX(-30px); }
html.js .fila-media.revelar > :last-child { transform: translateX(30px); }
html.js .fila-media.revelar > * { opacity: 0; transition: opacity 0.75s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.6, 0.2, 1); }
html.js .fila-media.revelar.visible > * { opacity: 1; transform: none; }

/* Aparición escalonada de hijos (el JS asigna el retraso por elemento) */
html.js .revelar-hijos > * { opacity: 0; transform: translateY(24px); transition: opacity 0.6s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
html.js .revelar-hijos.visible > * { opacity: 1; transform: none; }

/* Entrada del botón de WhatsApp */
html.js .whatsapp-flotante { animation: aparecerPop 0.55s cubic-bezier(0.35, 1.4, 0.4, 1) 1.1s both; }
@keyframes aparecerPop {
  from { opacity: 0; transform: scale(0.4) translateY(20px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .revelar, html.js .revelar.visible,
  html.js .fila-media.revelar > *, html.js .revelar-hijos > * {
    opacity: 1; transform: none; transition: none;
  }
  .whatsapp-flotante::after { animation: none; }
  html.js .whatsapp-flotante { animation: none; }
  .heroe-fondo, .heroe-contenido > * { animation: none; opacity: 1; }
  .heroe h1 .acento { animation: none; }
  .fila-media .media { animation: none; }
  body::before { display: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .rejilla.cuatro { grid-template-columns: repeat(3, 1fr); }
  .rejilla.cinco { grid-template-columns: repeat(3, 1fr); }
  .pie-superior { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-pieza.alta { grid-row: span 1; min-height: 300px; }
  .proceso { gap: 3rem; }
  .clases-fuego { grid-template-columns: repeat(3, 1fr); }
  .rejilla-extintores { grid-template-columns: repeat(2, 1fr); }
  .rejilla-revision { grid-template-columns: repeat(3, 1fr); }
  .carrusel-ext { --radio: 280px; }
}

@media (max-width: 1150px) {
  .hamburguesa { display: block; }
  /* El menú desplegable no debe tapar los controles ni la hamburguesa */
  .menu-idioma { right: -0.4rem; }
  .nav-principal {
    position: fixed; inset: 0 0 auto 0; top: 0; padding: 5.5rem 8% 2.5rem;
    /* opaco: con z-index negativo el desenfoque no es fiable y el texto de atrás se transparenta */
    background: var(--fondo);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column; align-items: flex-start;
    gap: 1.1rem; box-shadow: none;
    transform: translateY(-115%); visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s 0.35s;
    z-index: -1; border-radius: 0 0 var(--r-lg) var(--r-lg);
  }
  .nav-principal.abierto {
    transform: none; visibility: visible; box-shadow: var(--sombra-md);
    transition: transform 0.35s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s;
  }
  .nav-principal a { font-size: 1.12rem; }
  .nav-principal.abierto > * { animation: aparecerArriba 0.45s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  .nav-principal.abierto > :nth-child(2) { animation-delay: 0.05s; }
  .nav-principal.abierto > :nth-child(3) { animation-delay: 0.1s; }
  .nav-principal.abierto > :nth-child(4) { animation-delay: 0.15s; }
  .nav-principal.abierto > :nth-child(5) { animation-delay: 0.2s; }
  .nav-principal.abierto > :nth-child(6) { animation-delay: 0.25s; }
  .fila-media { grid-template-columns: 1fr; gap: 2.2rem; }
  .fila-media.invertida .media { order: 0; }
  .fila-media .media::before, .fila-media.invertida .media::before { inset: 10px -8px -10px 8px; }
  .rejilla.tres { grid-template-columns: 1fr; }
  .rejilla-contacto { grid-template-columns: 1fr; }
  .cinta-datos .contenedor { grid-template-columns: 1fr; gap: 1.8rem; padding: 2.8rem 2rem; }
  .heroe { min-height: min(640px, 72vh); }
  .seccion { padding: 4.5rem 0; }
  .cta .contenedor { padding: 3.5rem 1.8rem; }

  /* El proceso pasa a una sola columna; el panel deja de ir fijo */
  .proceso { grid-template-columns: 1fr; gap: 2.2rem; }
  .proceso-visual { position: static; }
  .proceso-marco { aspect-ratio: 16 / 10; }

  /* La galería deja de anclarse: se desliza con el dedo */
  .galeria-fijador { height: auto; }
  .galeria-lienzo { position: static; height: auto; padding: 4.5rem 0; gap: 1.6rem; }
  .galeria-pista {
    overflow-x: auto; scroll-snap-type: x mandatory;
    transform: none !important; padding-bottom: 0.5rem;
    scrollbar-width: none;
  }
  .galeria-pista::-webkit-scrollbar { display: none; }
  .galeria-tarjeta { scroll-snap-align: center; width: 270px; height: 370px; }
  .galeria-barra { display: none; }
}

@media (max-width: 560px) {
  .rejilla.cuatro, .rejilla.cinco { grid-template-columns: 1fr 1fr; }
  .lista-check.dos-columnas { grid-template-columns: 1fr; }
  .dos-campos { grid-template-columns: 1fr; }
  .pie-superior { grid-template-columns: 1fr; gap: 2.2rem; }
  .barra-superior span:not(:first-child) { display: none; }
  .logo img { height: 42px; }
  .kicker { font-size: 0.62rem; letter-spacing: 0.11em; padding: 0.45rem 0.85rem; }
  .formulario { padding: 1.7rem 1.4rem; }
  .heroe .contenedor { padding: 4.5rem 0; }
  .seccion { padding: 3.5rem 0; }
  .cta { padding: 2rem 0 3.5rem; }
  .cta .contenedor { padding: 2.8rem 1.3rem; }
  .cinta-datos .contenedor { padding: 2.2rem 1.3rem; }
  .fila-media { padding: 2.4rem 0; }
  .tarjeta { padding: 1.6rem 1.4rem; }
  .logo-cliente { width: 150px; height: 92px; padding: 0.9rem 1.1rem; }
  .marquesina::before, .marquesina::after { width: 40px; }
  /* Botones a todo lo ancho: objetivos táctiles cómodos */
  .heroe-acciones, .cta .acciones { flex-direction: column; align-items: stretch; }
  .heroe-acciones .boton, .heroe-acciones .boton-borde, .heroe-acciones .boton-wa,
  .cta .acciones .boton, .cta .acciones .boton-borde, .cta .acciones .boton-wa { width: 100%; }
}

@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento-pieza, .bento-pieza.ancha, .bento-pieza.alta {
    grid-column: span 1; grid-row: span 1; min-height: 190px; padding: 1.6rem 1.4rem;
  }
  .bento-pieza.alta { min-height: 260px; }
  .bento-pieza.alta h3 { font-size: 1.4rem; }
  /* la tarjeta con foto es más baja: el degradado necesita más peso abajo */
  .bento-pieza.con-foto::after {
    background: linear-gradient(to top, rgba(13, 15, 18, 0.96) 28%, rgba(13, 15, 18, 0.62) 68%, rgba(13, 15, 18, 0.25) 100%);
  }
  .proceso-pasos { padding-left: 2.1rem; }
  .paso::before { left: -2.1rem; width: 16px; height: 16px; }
  .proceso-pasos::before, .proceso-pasos::after { left: 7px; }
  .clases-fuego, .rejilla-extintores { grid-template-columns: 1fr; }
  .rejilla-revision { grid-template-columns: 1fr 1fr; }
  .aviso { flex-direction: column; gap: 1rem; padding: 1.4rem 1.3rem; }
  .logo-cliente { width: 168px; height: 100px; }
  /* En teléfono el anillo se cierra y las fichas encogen */
  .carrusel-ext { --radio: 200px; }
  .escenario { height: 300px; perspective: 900px; }
  .ficha-ext {
    width: 150px; height: 226px; margin: -113px 0 0 -75px; padding: 0.9rem 0.7rem;
  }
  .ficha-ext .dibujo { height: 124px; }
  .ficha-ext .nombre { font-size: 0.9rem; }
  .ficha-ext[data-lejos="2"] { opacity: 0.16; }
}

@media (max-width: 400px) {
  .contenedor { width: 90%; }
  .rejilla.cuatro, .rejilla.cinco, .rejilla-sectores { grid-template-columns: 1fr; }
  .btn-idioma { padding: 0 0.6rem; }
  .controles { gap: 0.35rem; }
  .encabezado .contenedor { gap: 0.6rem; }
  .logo img { height: 38px; }
}
