/* ==========================================================
   RejillaIndustrial.mx — hoja de estilos
   Paleta: acero galvanizado + amarillo de seguridad
   ========================================================== */

:root {
  --tinta: #14202A;
  --acero: #2E4353;
  --acero-medio: #5B7080;
  --zinc: #C4CFD5;
  --zinc-claro: #E6ECEF;
  --papel: #F5F7F8;
  --blanco: #FFFFFF;
  --seguridad: #F2C21B;
  --seguridad-oscuro: #D9A900;
  --texto: #1B2831;
  --texto-suave: #4A5B66;

  --fuente: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;

  --ancho: 72rem;
  --ancho-lectura: 44rem;
  --espacio-seccion: clamp(4rem, 9vw, 7rem);
  --radio: 3px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--papel);
  font-stretch: 100%;
}

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

h1, h2, h3 {
  font-family: var(--fuente);
  line-height: 1.12;
  margin: 0 0 1rem;
  color: var(--tinta);
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 800;
  font-stretch: 112%;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 1.2rem;
  font-weight: 700;
  font-stretch: 105%;
  margin-top: 2.25rem;
}
p { margin: 0 0 1.1rem; max-width: var(--ancho-lectura); }

a { color: var(--acero); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tinta); text-decoration-thickness: 2px; }

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

/* Enlace para saltar al contenido */
.salto {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--seguridad);
  color: var(--tinta);
  padding: .6rem 1rem;
  font-weight: 700;
  text-decoration: none;
}
.salto:focus { top: 1rem; }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .8rem 1.4rem;
  font-weight: 700;
  font-size: 1rem;
  font-stretch: 105%;
  text-decoration: none;
  border-radius: var(--radio);
  border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.boton--primario { background: var(--seguridad); color: var(--tinta); }
.boton--primario:hover { background: var(--blanco); color: var(--tinta); }
.boton--secundario { border-color: var(--zinc); color: var(--zinc-claro); }
.boton--secundario:hover { border-color: var(--blanco); color: var(--blanco); }
.boton--oscuro { background: var(--tinta); color: var(--blanco); }
.boton--oscuro:hover { background: var(--acero); color: var(--blanco); }
.boton--contorno { border-color: var(--tinta); color: var(--tinta); }
.boton--contorno:hover { background: var(--tinta); color: var(--seguridad); }
.boton--cabecera {
  background: var(--seguridad);
  color: var(--tinta);
  min-height: 2.5rem;
  padding: .5rem 1rem;
  font-size: .95rem;
  white-space: nowrap;
}
.boton--cabecera:hover { background: var(--blanco); color: var(--tinta); }

/* ---------- Cabecera ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--tinta);
  border-bottom: 4px solid var(--seguridad);
}
.cabecera__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.marca {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.marca__icono { width: 2rem; height: 2rem; }
.marca__texto {
  color: var(--zinc);
  font-size: 1.15rem;
  font-weight: 500;
  font-stretch: 88%;
  letter-spacing: .01em;
  margin: 0;
}
.marca__texto strong { color: var(--blanco); font-weight: 800; }

.menu { margin-left: auto; }
.menu__lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}
.menu__lista a {
  color: var(--zinc-claro);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.menu__lista a:hover { color: var(--blanco); border-bottom-color: var(--seguridad); }

/* Botón de menú móvil (solo aparece con JavaScript activo) */
.menu-boton { display: none; }
.menu__cta { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: var(--tinta);
  color: var(--zinc-claro);
  overflow: hidden;
}
.hero__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 1.25rem clamp(3rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.hero h1 {
  color: var(--blanco);
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}
.hero__sub {
  font-size: clamp(1.02rem, 1.4vw, 1.12rem);
  color: var(--zinc);
  max-width: 34rem;
  margin-bottom: 1.9rem;
}
.hero__acciones { display: flex; flex-wrap: wrap; gap: .9rem; }

/* Render del producto contenido en su columna */
.hero__figura {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 620px;
}
.hero__imagen {
  display: block;
  width: 100%;
  height: auto;
}
.hero__pie {
  margin-top: 1rem;
  padding-top: .6rem;
  border-top: 1px solid var(--acero);
  font-size: .85rem;
  color: var(--zinc);
}

/* ---------- Bloques de contenido ---------- */
.bloque { padding: var(--espacio-seccion) 0; }
.bloque__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.bloque__interior--estrecho { max-width: 52rem; }
.bloque__intro {
  font-size: 1.15rem;
  color: var(--texto-suave);
  margin-bottom: 2.5rem;
}
.bloque--zinc { background: var(--zinc-claro); }
.bloque--tinta { background: var(--acero); color: var(--zinc-claro); }
.bloque--tinta h2 { color: var(--blanco); }
.bloque--tinta h2 + * { margin-top: 1.5rem; }

.dos-columnas {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

/* Proceso de fabricación (secuencia real, por eso numerada) */
.proceso {
  background: var(--blanco);
  border-left: 6px solid var(--seguridad);
  padding: 1.75rem 1.75rem 1.25rem;
}
.proceso h3 { margin-top: 0; }
.proceso__pasos {
  margin: 0 0 1.25rem;
  padding-left: 1.4rem;
}
.proceso__pasos li { margin-bottom: .85rem; padding-left: .3rem; }
.proceso__pasos li::marker { font-weight: 800; color: var(--acero-medio); }
.proceso__nota {
  font-size: .95rem;
  color: var(--texto-suave);
  border-top: 1px solid var(--zinc);
  padding-top: 1rem;
  margin: 0;
}

/* Tipos: índice tipo hoja técnica */
.grupo {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-top: 2.5rem;
  border-top: 2px solid var(--tinta);
}
.grupo + .grupo { margin-top: 3.5rem; }
.grupo__figura {
  margin: 0;
  position: sticky;
  top: 6rem;
  display: grid;
  gap: 1rem;
}
.grupo__figura img { width: 100%; height: auto; }
.grupo__figura--claro { background: var(--zinc-claro); isolation: isolate; }
.grupo__figura--claro img { mix-blend-mode: multiply; }
.grupo__figura figcaption { font-size: .85rem; color: var(--texto-suave); }
.grupo__titulo {
  margin-top: 0;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 800;
  font-stretch: 112%;
}
.tipos {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tipo {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--zinc);
}
.tipo:first-child { padding-top: .25rem; }
.tipo__nombre {
  margin: 0 0 .35rem;
  font-size: 1.15rem;
  font-weight: 800;
  font-stretch: 108%;
  color: var(--tinta);
}
.tipo__desc { margin: 0 0 .5rem; color: var(--texto-suave); }
.tipo__enlace {
  font-weight: 700;
  font-size: .95rem;
  white-space: nowrap;
  color: var(--tinta);
}

/* Aplicaciones y criterios */
.aplicaciones {
  list-style: none;
  margin: 0;
  padding: 0;
}
.aplicaciones li {
  padding: .75rem 0 .75rem 1.6rem;
  border-bottom: 1px solid rgba(196, 207, 213, .25);
  position: relative;
}
.aplicaciones li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: .75rem;
  height: .75rem;
  background:
    linear-gradient(90deg, var(--seguridad) 0 2px, transparent 2px 5px, var(--seguridad) 5px 7px, transparent 7px 10px, var(--seguridad) 10px 12px);
}
.criterios { margin: 0; }
.criterios dt {
  font-weight: 800;
  font-stretch: 108%;
  color: var(--blanco);
  margin-top: 1.4rem;
}
.criterios dt:first-child { margin-top: 0; }
.criterios dd { margin: .35rem 0 0; color: var(--zinc); }
.bloque--tinta a { color: var(--seguridad); }
.bloque--tinta a:hover { color: var(--blanco); }

/* Preguntas frecuentes */
.faq { border-top: 2px solid var(--tinta); }
.faq__item { border-bottom: 1px solid var(--zinc); }
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.25rem 2.5rem 1.25rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--tinta);
  position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: .25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--acero-medio);
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item summary:hover { color: var(--acero); }
.faq__item p { padding: 0 0 1.25rem; color: var(--texto-suave); margin: 0; }

/* Llamada a la acción */
.cta {
  background: var(--seguridad);
  background-image: linear-gradient(90deg, rgba(20, 32, 42, .06) 0 8px, transparent 8px 30px);
  background-size: 30px 100%;
}
.cta__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 5.5rem) 1.25rem;
}
.cta h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-stretch: 118%;
  max-width: 44rem;
}
.cta p { font-size: 1.15rem; color: var(--tinta); }
.cta__acciones { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

/* Pie de página */
.pie {
  background: var(--tinta);
  color: var(--zinc);
  font-size: .95rem;
}
.pie__interior {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 3.5rem 1.25rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
}
.marca__texto--pie { font-size: 1.3rem; margin-bottom: .8rem; }
.pie__aviso { color: var(--zinc); max-width: 26rem; }
.pie a { color: var(--zinc-claro); }
.pie a:hover { color: var(--seguridad); }
.pie__nav ul { list-style: none; margin: 0; padding: 0; }
.pie__nav li { margin-bottom: .55rem; }
.pie__nav a { text-decoration: none; }
.pie__legal {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 1.25rem;
  border-top: 1px solid var(--acero);
  color: var(--zinc);
  font-size: .85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .menu__lista { gap: 1rem; }
}

@media (max-width: 820px) {
  .cabecera__interior { flex-wrap: wrap; row-gap: .5rem; }
  .boton--cabecera { margin-left: auto; }
  .menu {
    order: 3;
    margin: 0 -1.25rem;
    padding: 0 1.25rem;
    overflow-x: auto;
    width: calc(100% + 2.5rem);
    scrollbar-width: none;
  }
  .menu::-webkit-scrollbar { display: none; }
  .menu__lista { gap: 1.25rem; padding-bottom: .25rem; }
  .menu__lista a { white-space: nowrap; }

  /* Menú desplegable (con JavaScript) */
  .menu-boton:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 2.5rem;
    padding: .45rem .8rem;
    background: transparent;
    color: var(--blanco);
    border: 2px solid var(--acero-medio);
    border-radius: var(--radio);
    font: 700 .9rem/1 var(--fuente);
    cursor: pointer;
  }
  .menu-boton:hover { border-color: var(--zinc); }
  .menu-boton__icono,
  .menu-boton__icono::before,
  .menu-boton__icono::after {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform .2s ease, background-color .2s ease;
  }
  .menu-boton__icono { position: relative; }
  .menu-boton__icono::before,
  .menu-boton__icono::after { content: ""; position: absolute; left: 0; }
  .menu-boton__icono::before { top: -6px; }
  .menu-boton__icono::after { top: 6px; }
  .menu-boton[aria-expanded="true"] .menu-boton__icono { background: transparent; }
  .menu-boton[aria-expanded="true"] .menu-boton__icono::before { transform: translateY(6px) rotate(45deg); }
  .menu-boton[aria-expanded="true"] .menu-boton__icono::after { transform: translateY(-6px) rotate(-45deg); }

  .js .menu-boton { margin-left: auto; }
  .js .boton--cabecera { margin-left: 0; }
  .js .menu {
    display: none;
    overflow: visible;
    border-top: 1px solid var(--acero);
    padding-top: .25rem;
    padding-bottom: 1rem;
  }
  .js .menu.menu--abierto { display: block; }
  .js .menu__lista { flex-direction: column; gap: 0; padding: 0; }
  .js .menu__lista a {
    display: block;
    padding: .9rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--acero);
  }
  .js .menu__lista a:hover { border-bottom-color: var(--acero); color: var(--seguridad); }
  .js .menu__cta { display: block; margin-top: 1rem; }
  .js .menu__lista .menu__cta a {
    display: flex;
    border: 0;
    padding: .8rem 1.4rem;
    color: var(--tinta);
    font-weight: 700;
  }
  .js .menu__lista .menu__cta a:hover { color: var(--tinta); }

  .hero__interior,
  .dos-columnas,
  .grupo { grid-template-columns: 1fr; }
  .hero__interior { gap: 2.5rem; }
  .hero__figura { justify-self: start; max-width: 520px; }
  .grupo__figura { position: static; }
  .pie__interior { grid-template-columns: 1fr 1fr; }
  .pie__marca { grid-column: 1 / -1; }
  html { scroll-padding-top: 7.5rem; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .cabecera__interior { gap: .75rem; padding-left: 1rem; padding-right: 1rem; }
  .marca { gap: .45rem; }
  .menu { margin: 0 -1rem; padding: 0 1rem; width: calc(100% + 2rem); }
  .marca__icono { width: 1.6rem; height: 1.6rem; }
  .marca__texto { font-size: .95rem; }
  .boton--cabecera { font-size: .8rem; padding: .4rem .65rem; min-height: 2.25rem; }
  .js .boton--cabecera { display: none; }
  .hero__acciones .boton, .cta__acciones .boton { width: 100%; }
  .pie__interior { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-boton__icono, .menu-boton__icono::before, .menu-boton__icono::after { transition: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .cabecera, .cta, .hero__figura, .menu-boton { display: none; }
  body { background: #fff; }
  a::after { content: " (" attr(href) ")"; font-size: .8em; }
}
