/* Cuinex Reformas (Alzira) — propuesta de web nueva. Archivo expandida (títulos) + Libre Franklin (texto), autoalojadas (SIL OFL).
   Colores del logo: rojo del triángulo (#f80808 en la luz, #b80000 en la sombra; para texto y botones se usa #d40000, dentro de esa gama y con
   contraste AA sobre blanco) y el grafito de las letras (#454547). Neutros para el texto y las superficies. CONFIRMAR los hex con su rótulo. */

@font-face {
  font-family: "Archivo Exp";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/archivo-exp-700.woff2") format("woff2");
}

@font-face {
  font-family: "Archivo Exp";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/archivo-exp-800.woff2") format("woff2");
}

@font-face {
  font-family: "Archivo Exp";
  font-weight: 900;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/archivo-exp-900.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Franklin";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/libre-franklin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Franklin";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/libre-franklin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Franklin";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/libre-franklin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Libre Franklin";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("../fonts/libre-franklin-700.woff2") format("woff2");
}

:root {
  --ink: #1b1a1c;
  --grafito: #454547;
  --gris: #66656a;
  --linea: #d8d7da;
  --banda: #f3f2f3;
  --blanco: #ffffff;
  --rojo: #d40000;
  --rojo-hondo: #a80000;
  --rojo-vivo: #f80808;
  --titulos: "Archivo Exp", "Arial Black", system-ui, sans-serif;
  --texto: "Libre Franklin", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ancho: 1240px;
  --margen: clamp(1rem, 4vw, 2.5rem);
  --seccion: clamp(3.5rem, 8vw, 7rem);
  --cabecera: 84px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--blanco);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--texto);
  -webkit-font-smoothing: antialiased;
}

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

img {
  height: auto;
}

p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--titulos);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: auto;
}

p {
  text-wrap: pretty;
}

h1 {
  font-size: clamp(2rem, 5.2vw, 4.4rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.55rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  line-height: 1.15;
}

/* Enlaces: nunca subrayados (regla de Alfred), en ningún estado. Se distinguen por peso y color; foco con contorno */
a,
a:link,
a:visited,
a:hover,
a:focus,
a:active {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  color: var(--rojo);
}

:focus-visible {
  outline: 3px solid var(--rojo);
  outline-offset: 3px;
}

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: var(--margen);
}

.saltar {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--blanco);
}

.saltar:focus {
  top: 1rem;
}

[id] {
  scroll-margin-top: calc(var(--cabecera) + 1rem);
}

/* ---------- La marca del logo: el triángulo rojo invertido y la línea roja fina ---------- */
.tri {
  display: inline-block;
  width: 0.82em;
  height: 0.7em;
  margin-right: 0.6em;
  background: var(--rojo);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  vertical-align: baseline;
}

.etiqueta {
  display: flex;
  align-items: center;
  color: var(--grafito);
  font: 700 0.78rem/1.2 var(--texto);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.etiqueta .tri {
  width: 0.95em;
  height: 0.8em;
  margin-right: 0.7em;
}

.regla {
  display: flex;
  align-items: center;
  gap: 0;
  height: 14px;
}

.regla::before,
.regla::after {
  content: "";
  height: 2px;
  background: var(--rojo);
}

.regla::before {
  flex: 0 0 min(18%, 5rem);
}

.regla::after {
  flex: 1;
  background: var(--linea);
}

.regla i {
  flex: 0 0 18px;
  height: 14px;
  margin-inline: 4px;
  background: var(--rojo);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ---------- Botones ---------- */
.botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.boton,
.boton:link,
.boton:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.75rem 1.6rem;
  border: 2px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--blanco);
  font: 700 1rem/1.2 var(--texto);
  text-align: center;
  text-wrap: balance;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.boton:hover {
  background: var(--blanco);
  color: var(--ink);
}

.boton--rojo,
.boton--rojo:link,
.boton--rojo:visited {
  border-color: var(--rojo);
  background: var(--rojo);
  color: var(--blanco);
}

.boton--rojo:hover {
  border-color: var(--rojo-hondo);
  background: var(--blanco);
  color: var(--rojo);
}

.boton--linea,
.boton--linea:link,
.boton--linea:visited {
  background: transparent;
  color: var(--ink);
}

.boton--linea:hover {
  background: var(--ink);
  color: var(--blanco);
}

.boton--claro,
.boton--claro:link,
.boton--claro:visited {
  border-color: var(--blanco);
  background: transparent;
  color: var(--blanco);
}

.boton--claro:hover {
  background: var(--blanco);
  color: var(--ink);
}

@media (max-width: 599.98px) {
  .botones {
    flex-direction: column;
    width: 100%;
  }

  .boton,
  .boton:link,
  .boton:visited {
    display: flex;
    width: 100%;
  }
}

/* ---------- Cabecera ---------- */
.cabecera {
  position: relative;
  z-index: 40;
  border-bottom: 1px solid var(--linea);
  background: var(--blanco);
}

.cabecera__interior {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 2rem;
  max-width: var(--ancho);
  min-height: var(--cabecera);
  margin-inline: auto;
  padding: 0.6rem var(--margen);
}

.marca {
  display: block;
  margin-right: auto;
}

.marca img {
  width: 172px;
  height: auto;
}

.menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.9rem;
}

.menu a,
.menu a:link,
.menu a:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font: 700 0.84rem/1 var(--texto);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.menu a:hover,
.menu a[aria-current="page"] {
  color: var(--rojo);
}

.menu a[aria-current="page"] {
  position: relative;
}

.menu a[aria-current="page"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  width: 11px;
  height: 9px;
  margin-left: -5px;
  background: var(--rojo);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.cabecera__cita {
  min-height: 44px;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
}

.menu-boton {
  display: none;
}

.cabecera__iconos {
  display: none;
}

@media (min-width: 1120px) {
  .marca img {
    width: 232px;
  }
}

/* Teléfono y tableta: menú plegable. El menú empieza cerrado en CSS (sin esperar al JS) para que la cabecera no salte */
@media (max-width: 1119.98px) {
  .cabecera a.cabecera__cita {
    display: none;
  }

  .menu-boton {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 52px;
    height: 52px;
    margin-right: -0.7rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-boton__raya,
  .menu-boton::before,
  .menu-boton::after {
    content: "";
    display: block;
    width: 28px;
    height: 3px;
    background: var(--ink);
    transition: transform 0.2s, opacity 0.2s;
  }

  .menu-boton[aria-expanded="true"] .menu-boton__raya {
    opacity: 0;
  }

  .menu-boton[aria-expanded="true"]::before {
    transform: translateY(9px) rotate(45deg);
  }

  .menu-boton[aria-expanded="true"]::after {
    transform: translateY(-9px) rotate(-45deg);
  }

  .menu {
    display: none;
    flex: 0 0 100%;
    order: 3;
  }

  .menu.abierto {
    display: block;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid var(--linea);
  }

  .menu ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
  }

  .menu a,
  .menu a:link,
  .menu a:visited {
    min-height: 56px;
    padding-inline: 1rem;
    font: 800 1.35rem/1 var(--titulos);
    letter-spacing: 0;
    text-transform: none;
  }

  .menu a[aria-current="page"]::before {
    top: 50%;
    left: -6px;
    margin: -4px 0 0;
  }

  .menu.abierto + .cabecera__iconos {
    display: flex;
    flex: 0 0 100%;
    order: 4;
    justify-content: center;
    gap: 0.9rem;
    padding: 0.8rem 0 1rem;
  }

  .cabecera__iconos a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 2px solid var(--ink);
    border-radius: 50%;
    color: var(--ink);
  }

  .cabecera__iconos a:hover {
    border-color: var(--rojo);
    color: var(--rojo);
  }

  .cabecera__iconos svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
  }
}

/* Sin JavaScript el menú se queda a la vista */
@media (max-width: 1119.98px) and (scripting: none) {
  .menu {
    display: block;
    padding: 0.5rem 0;
  }

  .menu-boton {
    display: none;
  }
}

/* ---------- Secciones ---------- */
.seccion {
  padding-block: var(--seccion);
}

.seccion--banda {
  background: var(--banda);
}

.seccion--oscura {
  background: var(--ink);
  color: #e8e7e9;
}

.seccion--oscura h2,
.seccion--oscura h3 {
  color: var(--blanco);
}

.encabezado {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.encabezado h2 {
  max-width: 22ch;
}

.encabezado p {
  max-width: 44rem;
  color: var(--grafito);
}

@media (min-width: 900px) {
  .encabezado--lateral {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 1rem 4rem;
  }
}

/* ---------- Portada ---------- */
.portada {
  padding-block: clamp(2rem, 5vw, 4.5rem) var(--seccion);
}

.portada__interior {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.portada__texto {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  justify-items: start;
}

.portada h1 {
  max-width: 11ch;
}

.portada__entrada {
  max-width: 30rem;
  color: var(--grafito);
  font-size: clamp(1.1rem, 1.7vw, 1.3rem);
  line-height: 1.5;
}

.portada__datos {
  padding-top: 0.5rem;
  border-top: 1px solid var(--linea);
  color: var(--grafito);
  font-size: 0.95rem;
}

.portada__datos a {
  white-space: nowrap;
}

.portada__fotos {
  position: relative;
}

.portada__foto {
  margin: 0;
}

.portada__foto img {
  width: 100%;
  object-fit: cover;
}

.portada__foto--grande img {
  aspect-ratio: 4 / 3;
}

.portada__foto--pequena {
  display: none;
}

@media (min-width: 900px) {
  .portada__interior {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    gap: 4rem;
  }

  .portada__foto--grande img {
    aspect-ratio: 5 / 6;
  }

  .portada__foto--pequena {
    position: absolute;
    bottom: -2rem;
    left: -3.5rem;
    display: block;
    width: 44%;
    padding: 8px;
    background: var(--blanco);
  }

  .portada__foto--pequena img {
    aspect-ratio: 1 / 1;
  }

  .portada__fotos::before {
    content: "";
    position: absolute;
    top: 0;
    right: 9%;
    z-index: 2;
    width: 15%;
    aspect-ratio: 1.15 / 1;
    background: var(--rojo);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
  }
}

/* ---------- Pilares de la portada ---------- */
.pilares {
  display: grid;
  gap: 2.5rem;
}

.pilar {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.pilar__foto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.pilar__num {
  color: var(--rojo);
  font: 900 clamp(2.4rem, 4vw, 3.4rem)/1 var(--titulos);
}

.pilar p:last-child {
  color: var(--grafito);
}

@media (min-width: 900px) {
  .pilares {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ---------- Texto con foto al lado ---------- */
.dos-col {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.dos-col__texto {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.dos-col__texto p {
  max-width: 36rem;
  color: var(--grafito);
}

.dos-col__foto img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

@media (min-width: 900px) {
  .dos-col {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4.5rem;
  }

  .dos-col--invertida .dos-col__foto {
    order: -1;
  }
}

/* ---------- Valores (tres frases con número) ---------- */
.valores {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--ink);
}

.valor {
  display: grid;
  gap: 0.6rem 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--linea);
}

.valor__num {
  color: var(--rojo);
  font: 800 1rem/1 var(--titulos);
}

.valor p {
  max-width: 40rem;
  color: var(--grafito);
}

@media (min-width: 900px) {
  .valor {
    grid-template-columns: 4rem minmax(0, 0.9fr) minmax(0, 1.4fr);
    align-items: start;
    padding: 2rem 0;
  }
}

/* ---------- Servicios (índice) ---------- */
.servicios-lista {
  border-top: 2px solid var(--ink);
}

.servicio-fila {
  display: grid;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--linea);
}

.servicio-fila h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.servicio-fila p {
  max-width: 44rem;
  color: var(--grafito);
}

.servicio-fila__mas,
.servicio-fila__mas:link,
.servicio-fila__mas:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  color: var(--rojo);
  font-weight: 700;
}

.servicio-fila__mas::after {
  content: "→";
  transition: transform 0.15s;
}

.servicio-fila:hover .servicio-fila__mas::after {
  transform: translateX(4px);
}

@media (min-width: 900px) {
  .servicio-fila {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) auto;
    align-items: start;
    padding: 1.9rem 0;
  }
}

/* ---------- Proyectos (categorías) ---------- */
.categorias {
  display: grid;
  gap: 1.5rem;
}

.categoria {
  position: relative;
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.categoria__foto img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: opacity 0.2s;
}

.categoria:hover .categoria__foto img {
  opacity: 0.9;
}

.categoria h3 {
  display: flex;
  align-items: center;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

.categoria h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.categoria__dato {
  color: var(--gris);
  font-size: 0.95rem;
}

@media (min-width: 700px) {
  .categorias {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* ---------- Reseñas (las que muestra su web actual) ---------- */
.resenas {
  display: grid;
  gap: 2.5rem;
}

.resumen-resenas {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  justify-items: start;
}

.resumen-resenas__nota {
  font: 900 clamp(3.6rem, 8vw, 6rem)/0.9 var(--titulos);
}

.estrellas {
  color: var(--rojo);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
}

.resumen-resenas__total {
  color: var(--gris);
}

.resenas-lista {
  display: grid;
  gap: 1.5rem;
}

.resena {
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--linea);
  background: var(--blanco);
}

.resena__cabecera {
  display: grid;
  gap: 0.15rem;
}

.resena__autor {
  font: 800 1.05rem/1.2 var(--titulos);
}

.resena__fecha {
  color: var(--gris);
  font-size: 0.9rem;
}

.resena__texto {
  color: var(--grafito);
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .resenas {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 2fr);
    gap: 3.5rem;
    align-items: start;
  }

  .resenas-lista {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

/* ---------- Franja de contacto ---------- */
.franja {
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}

.franja h2 {
  max-width: 18ch;
}

.franja p {
  max-width: 34rem;
  color: #d9d8db;
}

.franja__derecha {
  display: grid;
  gap: 1.5rem;
  justify-items: stretch;
}

@media (min-width: 600px) {
  .franja__derecha {
    justify-items: start;
  }
}

@media (min-width: 900px) {
  .franja {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
  }
}

/* ---------- Páginas interiores: cabecera de página ---------- */
.pagina {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem);
}

.pagina__interior {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

.pagina h1 {
  max-width: 18ch;
  font-size: clamp(1.9rem, 4.6vw, 3.8rem);
}

.pagina__entrada {
  max-width: 44rem;
  color: var(--grafito);
  font-size: clamp(1.08rem, 1.6vw, 1.25rem);
  line-height: 1.5;
}

.miga {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
  color: var(--gris);
  font-size: 0.88rem;
}

.miga a,
.miga a:link,
.miga a:visited {
  color: var(--gris);
  font-weight: 600;
}

.miga a:hover {
  color: var(--rojo);
}

.miga li:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--linea);
}

/* Navegación entre las páginas de una sección (servicios, proyectos) */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.6rem;
  border-top: 1px solid var(--linea);
  border-bottom: 1px solid var(--linea);
}

.subnav a,
.subnav a:link,
.subnav a:visited {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--grafito);
  font-size: 0.95rem;
}

.subnav a:hover,
.subnav a[aria-current="page"] {
  color: var(--rojo);
}

.subnav a[aria-current="page"]::before {
  content: "";
  width: 0.72em;
  height: 0.62em;
  margin-right: 0.5em;
  background: var(--rojo);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* ---------- Páginas de servicio y texto largo ---------- */
.texto-largo {
  display: grid;
  gap: 1.1rem;
  max-width: 46rem;
}

.texto-largo h2 {
  margin-top: 1.6rem;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
}

.texto-largo h3 {
  margin-top: 0.6rem;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

.texto-largo p {
  color: var(--grafito);
}

.texto-largo strong {
  color: var(--ink);
  font-weight: 700;
}

.texto-largo ul {
  display: grid;
  gap: 0;
  margin-top: 0.4rem;
  border-top: 1px solid var(--linea);
}

.texto-largo li {
  position: relative;
  padding: 0.9rem 0 0.9rem 1.6rem;
  border-bottom: 1px solid var(--linea);
  color: var(--grafito);
}

.texto-largo li::before {
  content: "";
  position: absolute;
  top: 1.35rem;
  left: 0;
  width: 0.7rem;
  height: 0.6rem;
  background: var(--rojo);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.servicio-pagina {
  display: grid;
  gap: 2rem;
}

.servicio-pagina__lateral {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.servicio-pagina__foto img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.nota-foto {
  margin-top: 0.5rem;
  color: var(--gris);
  font-size: 0.85rem;
}

@media (min-width: 900px) {
  .servicio-pagina {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 4.5rem;
  }

  .servicio-pagina__lateral {
    position: sticky;
    top: 1.5rem;
  }
}

/* ---------- Galerías de proyectos y visor ---------- */
.galeria {
  columns: 2 150px;
  column-gap: 10px;
}

.galeria a,
.galeria a:link,
.galeria a:visited {
  position: relative;
  display: block;
  margin-bottom: 10px;
  break-inside: avoid;
  background: var(--banda);
  cursor: zoom-in;
}

.galeria img {
  width: 100%;
  height: auto;
}

.galeria a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(212, 0, 0, 0);
  transition: background-color 0.15s;
}

.galeria a:hover::after {
  background: rgba(212, 0, 0, 0.14);
}

@media (min-width: 700px) {
  .galeria {
    columns: 3 200px;
    column-gap: 12px;
  }

  .galeria a {
    margin-bottom: 12px;
  }
}

@media (min-width: 1100px) {
  .galeria {
    columns: 4 200px;
  }
}

.visor {
  position: fixed;
  inset: 0;
  z-index: 200;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 13, 15, 0.96);
  color: var(--blanco);
}

.visor::backdrop {
  background: rgba(14, 13, 15, 0.96);
}

.visor[open] {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.visor__imagen {
  --py: clamp(0.5rem, 3vw, 2rem);
  --px: clamp(0.5rem, 7vw, 5rem);
  position: relative;
  min-height: 0;
}

.visor__imagen img {
  position: absolute;
  inset: var(--py) var(--px);
  width: calc(100% - 2 * var(--px));
  height: calc(100% - 2 * var(--py));
  max-width: none;
  object-fit: contain;
}

.visor__barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem clamp(0.5rem, 3vw, 2rem) 1rem;
  font-size: 0.95rem;
}

.visor__boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: transparent;
  color: var(--blanco);
  font: 700 1.3rem/1 var(--texto);
  cursor: pointer;
}

.visor__boton:hover,
.visor__boton:focus-visible {
  border-color: var(--blanco);
  background: var(--rojo);
}

.visor__cerrar {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  background: rgba(14, 13, 15, 0.7);
}

.visor__pasos {
  display: flex;
  gap: 0.6rem;
}

/* ---------- Cocinas: tarjetas de cada proyecto ---------- */
.proyectos {
  display: grid;
  gap: 2rem 1.5rem;
}

.proyecto {
  position: relative;
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.proyecto__foto {
  overflow: hidden;
  background: var(--banda);
}

.proyecto__foto img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.4s;
}

.proyecto:hover .proyecto__foto img {
  transform: scale(1.03);
}

.proyecto h3 {
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.2;
}

.proyecto h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.proyecto h3 .mas {
  color: var(--rojo);
}

.proyecto__dato {
  color: var(--gris);
  font-size: 0.9rem;
}

@media (min-width: 600px) {
  .proyectos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .proyectos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 2rem;
  }
}

.entre-proyectos {
  display: grid;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ink);
}

.entre-proyectos a,
.entre-proyectos a:link,
.entre-proyectos a:visited {
  display: block;
  padding: 0.5rem 0;
}

.entre-proyectos small {
  display: block;
  color: var(--gris);
  font: 700 0.75rem/1.2 var(--texto);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (min-width: 700px) {
  .entre-proyectos {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .entre-proyectos a:last-child {
    text-align: right;
  }
}

/* ---------- Contacto ---------- */
.contacto {
  display: grid;
  gap: 3rem;
}

.contacto__datos {
  display: grid;
  gap: 1.75rem;
  align-content: start;
}

.dato {
  display: grid;
  gap: 0.3rem;
}

.dato__titulo {
  color: var(--gris);
  font: 700 0.76rem/1.2 var(--texto);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dato__valor {
  font-size: 1.15rem;
  line-height: 1.45;
}

.dato__valor a,
.dato__valor a:link,
.dato__valor a:visited {
  font-weight: 700;
}

.dato__tel {
  font: 800 clamp(1.4rem, 3vw, 1.9rem)/1.2 var(--titulos);
}

.dato__tel a,
.dato__tel a:link,
.dato__tel a:visited {
  font-weight: 800;
}

@media (min-width: 900px) {
  .contacto {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 4.5rem;
  }
}

/* Plano propio (SVG de OpenStreetMap) */
.mapa {
  display: grid;
  gap: 1rem;
}

.mapa__marco {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--blanco);
}

.mapa__marco svg {
  width: 100%;
  height: auto;
}

.mapa__enlace {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.mapa__enlace:focus-visible {
  outline-offset: -5px;
}

.mapa__credito {
  position: absolute;
  right: 0.5rem;
  bottom: 0.4rem;
  z-index: 2;
  padding: 0.1rem 0.4rem;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
}

.mapa__acciones {
  margin: 0;
}

/* Formulario */
.formulario {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 2px solid var(--ink);
}

.formulario h2 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.campo {
  display: grid;
  gap: 0.35rem;
}

.campo label,
.campo legend {
  font-weight: 700;
  font-size: 0.95rem;
}

.campo input[type="text"],
.campo input[type="tel"],
.campo input[type="email"],
.campo select,
.campo textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--linea);
  border-radius: 2px;
  background: var(--blanco);
  color: var(--ink);
  font: 400 1rem/1.4 var(--texto);
}

.campo textarea {
  min-height: 9rem;
  resize: vertical;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  border-color: var(--ink);
  outline: 3px solid var(--rojo);
  outline-offset: 1px;
}

.campos-dos {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 600px) {
  .campos-dos {
    grid-template-columns: 1fr 1fr;
  }
}

.perfil {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.perfil label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-weight: 600;
}

.perfil input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--rojo);
}

.campo--empresa[hidden] {
  display: none;
}

.campo--trampa {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.privacidad-check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.95rem;
}

.privacidad-check input {
  flex: none;
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.15rem;
  accent-color: var(--rojo);
}

.info-datos {
  padding: 1rem 1.1rem;
  background: var(--banda);
  color: var(--grafito);
  font-size: 0.85rem;
  line-height: 1.55;
}

.info-datos strong {
  color: var(--ink);
}

.aviso-prueba {
  padding: 0.7rem 0.9rem;
  border-left: 4px solid var(--rojo);
  background: #fff3f3;
  font-size: 0.9rem;
}

/* ---------- Páginas legales y 404 ---------- */
.legal {
  max-width: 860px;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.legal h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
}

.legal h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: clamp(1.2rem, 2.3vw, 1.55rem);
}

.legal p + p,
.legal > p:not(.legal__borrador) {
  margin-top: 0.75rem;
}

.legal ul {
  display: grid;
  gap: 0.4rem;
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  list-style: disc;
}

.legal__borrador {
  display: inline-block;
  margin: 1rem 0 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--rojo);
  color: var(--rojo);
  font-weight: 700;
  font-size: 0.95rem;
}

.ficha-legal {
  display: grid;
  gap: 0;
  margin: 1rem 0 0;
  border-top: 1px solid var(--linea);
}

.ficha-legal div {
  display: grid;
  gap: 0.15rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--linea);
}

.ficha-legal dt {
  color: var(--gris);
  font-weight: 700;
}

@media (min-width: 700px) {
  .ficha-legal div {
    grid-template-columns: 15rem minmax(0, 1fr);
  }
}

.creditos {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-left: 1.2rem;
  list-style: disc;
}

/* ---------- Pie ---------- */
.pie {
  background: var(--ink);
  color: #cfcdd1;
  font-size: 1rem;
}

.pie__interior {
  display: grid;
  gap: 2.25rem;
  max-width: var(--ancho);
  margin-inline: auto;
  padding: 3.25rem var(--margen) 2rem;
}

.pie__marca {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.pie__logo,
.pie__logo:link,
.pie__logo:visited {
  display: block;
  width: fit-content;
  padding: 0.9rem 1.2rem;
  border-radius: 2px;
  background: var(--blanco);
}

.pie__logo img {
  width: 220px;
  height: auto;
  aspect-ratio: 600 / 137;
}

.pie__marca p {
  max-width: 24rem;
}

.pie h2,
.pie h3 {
  margin-bottom: 0.7rem;
  color: var(--blanco);
  font: 700 0.78rem/1.2 var(--texto);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pie a,
.pie a:link,
.pie a:visited {
  color: var(--blanco);
}

.pie a:hover {
  color: #ff9a9a;
}

.pie :focus-visible {
  outline-color: var(--blanco);
}

.pie__columna ul {
  display: grid;
  gap: 0;
}

.pie__columna a,
.pie__columna a:link,
.pie__columna a:visited {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-weight: 500;
}

.pie__redes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pie__redes a,
.pie__redes a:link,
.pie__redes a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-height: 46px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
}

.pie__redes a:hover {
  border-color: var(--blanco);
  background: var(--rojo);
  color: var(--blanco);
}

.pie__redes svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.pie__base {
  display: grid;
  gap: 0.35rem;
  max-width: var(--ancho);
  margin-inline: auto;
  padding: 1.25rem var(--margen) 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.9rem;
}

@media (min-width: 900px) {
  .pie__interior {
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }

  .pie__base {
    grid-template-columns: 1fr auto;
  }
}

/* ---------- Utilidades y plano ---------- */
.sr-solo {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.seccion--poco {
  padding-block: clamp(1.5rem, 3vw, 2.5rem) var(--seccion);
}

.servicio-pagina__tira {
  display: grid;
  gap: 0.5rem;
}

.servicio-pagina__tira img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.plano {
  display: block;
  width: 100%;
  height: auto;
}

.plano__parque,
.plano__plaza {
  fill: #eceaed;
}

.plano__agua {
  fill: #e2e0e4;
}

.plano__calle {
  fill: none;
  stroke: #c9c7cc;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plano__calle--peatonal {
  stroke: #dcdadf;
  stroke-width: 4;
}

.plano__calle--principal {
  stroke: #8f8d93;
  stroke-width: 10;
}

.plano text {
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5px;
  stroke-linejoin: round;
}

.plano__rotulo {
  fill: var(--gris);
  font: 700 21px var(--texto);
}

.plano__sede .plano__triangulo {
  fill: var(--rojo);
  stroke: #fff;
  stroke-width: 3;
  stroke-linejoin: round;
}

.plano__guia {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.plano__etiqueta {
  fill: var(--ink);
}

.plano .plano__nombre {
  fill: #fff;
  stroke: none;
  font: 800 34px var(--titulos);
}

.plano .plano__dato {
  fill: #e4e3e6;
  stroke: none;
  font: 700 24px var(--texto);
}

.plano__escala path,
.plano__norte path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
}

.plano__escala text,
.plano__norte text {
  fill: var(--ink);
  font: 700 18px var(--texto);
}

/* Teléfono: el plano se ve ampliado 1,7 veces y recortado en un cuadrado centrado en el punto y su etiqueta; los rótulos de las calles se esconden */
@media (max-width: 599.98px) {
  .mapa__marco {
    aspect-ratio: 1 / 1;
  }

  .mapa__marco .plano {
    width: 170%;
    max-width: none;
    margin: -8.65% 0 0 -65.4%;
  }

  .plano__solo-escritorio {
    display: none;
  }
}
