/* EuroDesign Pavimentos · estilos (maqueta tipo pavicost.com, en los grises del logo) */

/* Tipografías: Oxygen para el texto, Lato para títulos y botones, Abril Fatface para el lema */
@font-face { font-family: "Oxygen"; src: url("../fonts/oxygen-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Oxygen"; src: url("../fonts/oxygen-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("../fonts/lato-900-italic.woff2") format("woff2"); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Abril Fatface"; src: url("../fonts/abril-fatface.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* grises muestreados del logo: del tono más oscuro (#454545) al brillo del acero (#f4f4f4) */
  --bg: #ffffff;
  --ink: #333333;
  --negro: #151515;
  --muted: #5c5c5c;
  --acero: #6a6a6a;      /* títulos: 5,3:1 sobre blanco */
  --accent: #454545;     /* botones y bandas: el gris más oscuro del logo */
  --accent-hover: #2b2b2b;
  --black: #2b2b2b;
  --plata: #aaabac;
  --linea: #cecfcf;
  --surface: #f4f4f4;
  --surface-2: #e1e1e1;
  --white: #ffffff;

  --font: "Oxygen", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-titulo: "Lato", "Oxygen", Arial, sans-serif;
  --font-lema: "Abril Fatface", Georgia, "Times New Roman", serif;

  --step-small: 0.9375rem;
  --step-body: 1rem;
  --step-h2: clamp(1.625rem, 1.3rem + 1.2vw, 2.25rem);
  --step-h1: clamp(2.375rem, 1.5rem + 3.7vw, 4.5rem);

  --cab: 200px;            /* alto de la cabecera arriba de todo */
  --cab-compacta: 96px;    /* alto al bajar */
  --col: 960px;            /* la columna central de toda la web */
  --margin: clamp(16px, 4vw, 40px);
  --hueco: clamp(40px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* para lo que se mueve en pantalla: fundidos y fotos que se descubren */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; scroll-padding-top: calc(var(--cab-compacta) + 20px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-body);
  line-height: 1.55;
  overflow-x: hidden;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
h2 { font: 700 var(--step-h2) / 1.2 var(--font-titulo); color: var(--acero); text-transform: uppercase; text-align: center; }
h3 { font: 700 1.125rem / 1.3 var(--font-titulo); color: var(--ink); }
::selection { background: var(--accent); color: var(--white); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -60px; z-index: 80; background: var(--white); color: var(--ink); padding: 10px 16px; }
.skip:focus { top: 12px; }

.link { text-decoration: underline; text-decoration-color: var(--plata); text-decoration-thickness: 2px; text-underline-offset: 0.2em; transition: text-underline-offset 0.2s var(--ease); }
.link:hover { text-underline-offset: 0.32em; }

/* ---------- Botones: rectángulo gris con el canto apenas redondeado ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: min(270px, 100%); padding: 12px 24px;
  background: var(--accent); color: var(--white);
  font: 700 1rem / 1.15 var(--font-titulo);
  text-decoration: none; text-align: center; border: 0; border-radius: 3px; cursor: pointer;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: scale(0.97); }
.btn--big { font-size: 1.0625rem; padding: 15px 28px; }
.btn--light { background: var(--white); color: var(--negro); }
.btn--light:hover { background: var(--surface-2); }

/* ---------- Cabecera: tira de texturas con cortes diagonales, fija; se achica al bajar ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--cab);
  background: var(--accent) url("../img/cabecera.webp") center / cover no-repeat;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.42); color: var(--white);
  transition: height 0.35s var(--ease);
}
.nav.is-compacta { height: var(--cab-compacta); }
.nav__dentro { height: 100%; max-width: calc(var(--col) + 2 * var(--margin)); margin: 0 auto; padding: 0 var(--margin); display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.nav__brand { flex: none; display: block; padding: 6px 10px; background: rgba(20, 20, 20, 0.78); border-radius: 3px; }
.nav__brand img { width: auto; height: 148px; transition: height 0.35s var(--ease); }
.nav.is-compacta .nav__brand img { height: 72px; }
.nav__centro { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.nav__links { display: flex; align-items: center; gap: 2px; }
.nav__links a {
  padding: 7px 15px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  color: var(--white); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  transition: background-color 0.25s var(--ease);
}
.nav__links a:hover { background: rgba(20, 20, 20, 0.5); }
.nav__links a[aria-current] { background: rgba(20, 20, 20, 0.86); }
.nav__lema { font-style: italic; font-size: var(--step-small); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); padding-right: 15px; transition: opacity 0.2s var(--ease); }
.nav.is-compacta .nav__lema { display: none; }
.nav__toggle { display: none; }
.nav :focus-visible { outline-color: var(--white); }

main { padding-top: var(--cab); }

/* ---------- Portada ---------- */
.portada { max-width: calc(var(--col) + 2 * var(--margin)); margin: 0 auto; padding: clamp(32px, 4vw, 56px) var(--margin) clamp(24px, 3vw, 40px); text-align: center; display: flex; flex-direction: column; gap: 8px; }
.portada__linea { font: 700 clamp(1.125rem, 0.8rem + 1.5vw, 2.25rem) / 1.25 var(--font); color: var(--acero); text-transform: uppercase; text-wrap: balance; }
.portada__lema { font: 400 var(--step-h1) / 1.2 var(--font-lema); color: var(--negro); text-wrap: balance; }

.bienvenida { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; min-height: clamp(340px, 69vw, 900px); padding: 32px var(--margin); background: var(--accent); color: var(--white); text-align: center; }
.bienvenida__foto { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; animation: bienvenida-asentar 1.8s var(--ease) both; }
.bienvenida::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(closest-side at 50% 50%, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.14)); }
.bienvenida__texto { display: flex; flex-direction: column; align-items: center; }
.bienvenida__hola, .bienvenida__sub { font-family: var(--font-titulo); font-style: italic; font-weight: 900; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7); }
.bienvenida__hola { font-size: clamp(1.75rem, 1rem + 3.5vw, 4rem); line-height: 1.1; }
.bienvenida__sub { font-size: clamp(1rem, 0.75rem + 1.3vw, 2rem); line-height: 1.2; text-transform: uppercase; }
.bienvenida__marca { font: italic 900 clamp(3rem, 1.4rem + 8.4vw, 8rem) / 1.12 var(--font-titulo); text-transform: uppercase; text-shadow: 0 3px 8px rgba(0, 0, 0, 0.72); }
@keyframes bienvenida-asentar { from { transform: scale(1.06); } }

/* ---------- Bloques de la columna central ---------- */
.bloque { max-width: calc(var(--col) + 2 * var(--margin)); margin: 0 auto; padding: var(--hueco) var(--margin) 0; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.bloque > * { max-width: 100%; }
.bloque--izq { align-items: flex-start; text-align: left; }
.titulo-chico { font: 700 1.125rem / 1.3 var(--font); color: var(--negro); text-transform: none; }
.titulo-modelo { font: 700 clamp(1.25rem, 1.1rem + 0.6vw, 1.4375rem) / 1.3 var(--font-titulo); color: var(--acero); text-transform: none; }
.titulo-negro { font: 700 var(--step-h2) / 1.2 var(--font); color: var(--negro); text-transform: none; }
.pie-foto { font-style: italic; font-size: var(--step-small); color: var(--muted); }
.frase { font-size: 1.125rem; }

.foto { position: relative; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.foto__marco { overflow: hidden; }
.foto__marco img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* el rótulo blanco sobre la foto, arriba a la derecha */
.foto__rotulo, .carrusel__rotulo {
  position: absolute; top: clamp(10px, 2vw, 20px); right: clamp(12px, 3vw, 28px); z-index: 2; pointer-events: none;
  font: 700 clamp(1.0625rem, 0.8rem + 1.3vw, 1.875rem) / 1.2 var(--font-titulo); color: var(--white); text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}
/* el rótulo espera a la foto: sin ella sería blanco sobre blanco */
.foto__rotulo { transition: opacity 0.5s var(--ease) 0.6s; }
.js .foto__marco:not(.is-in) + .foto__rotulo { opacity: 0; }

.fichas { list-style: none; margin: 24px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 5vw, 60px); }
.fichas a { display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.fichas__img { display: block; overflow: hidden; }
.fichas img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.6s var(--ease); }
.fichas__titulo { font: 700 clamp(1.0625rem, 0.9rem + 0.7vw, 1.4375rem) / 1.25 var(--font-titulo); color: var(--acero); transition: color 0.2s var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .fichas a:hover img { transform: scale(1.04); }
  .fichas a:hover .fichas__titulo { color: var(--negro); }
}

.ventajas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ventajas li { display: flex; gap: 10px; align-items: baseline; }
.ventajas li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }

/* foto cuadrada con texto grande encima */
.foto-texto { position: relative; isolation: isolate; overflow: hidden; width: 100%; aspect-ratio: 1; display: grid; place-items: center; padding: clamp(20px, 6vw, 64px); color: var(--white); background: var(--black); }
.foto-texto img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.foto-texto::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.42); }
.foto-texto__dentro { display: flex; flex-direction: column; align-items: center; gap: 18px; max-width: 18em; }
.foto-texto h2 { font: 700 clamp(1.75rem, 1rem + 3.4vw, 3.25rem) / 1.2 var(--font-titulo); color: var(--white); text-transform: none; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.foto-texto p { font-size: 1.125rem; }
.foto-texto :focus-visible { outline-color: var(--white); }

/* collage: nueve fotos, con la del centro enmarcada en blanco y montada sobre las demás */
.collage { width: 100%; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(120px, 28vw, 300px); gap: 6px; }
.collage figure { position: relative; overflow: hidden; }
.collage img { width: 100%; height: 100%; object-fit: cover; }
.collage__a { grid-column: span 7; }
.collage__b { grid-column: span 5; }
.collage__c { grid-column: 1 / span 3; grid-row: 2; }
.collage__d { grid-column: 10 / span 3; grid-row: 2; }
.collage__e { grid-column: 1 / span 3; grid-row: 3; }
.collage__f { grid-column: 10 / span 3; grid-row: 3; }
.collage__g { grid-column: span 5; grid-row: 4; }
.collage__h { grid-column: span 7; grid-row: 4; }
.collage__centro { grid-column: 4 / span 6; grid-row: 2 / span 2; z-index: 1; margin: -22px -14px; border: 6px solid var(--white); }
.collage__centro figcaption {
  position: absolute; left: 0; right: 0; top: 22%; padding: 0 12px; text-align: center;
  font: 700 clamp(1.25rem, 0.8rem + 2vw, 2.25rem) / 1.2 var(--font-titulo); color: var(--white); text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* muestrario de colores: discos sobre una banda gris */
.muestrario { width: 100%; padding: clamp(28px, 5vw, 56px) clamp(12px, 3vw, 32px); background: linear-gradient(180deg, #5a5a5a, var(--accent)); }
.discos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(20px, 3.4vw, 36px) clamp(14px, 3.6vw, 40px); color: var(--white); font-size: var(--step-small); }
.discos li { width: clamp(84px, 13vw, 122px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.disco {
  display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; background: var(--c);
  background: radial-gradient(circle at 34% 30%, color-mix(in srgb, var(--c) 74%, #fff) 0%, var(--c) 46%, color-mix(in srgb, var(--c) 70%, #000) 100%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.42);
}

/* ---------- Carrusel: fotos que pasan solas, con barras de progreso (piscina por etapas y modelos) ---------- */
.carrusel { position: relative; width: 100%; }
.carrusel__fotos { display: grid; overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; }
.carrusel__foto { grid-area: 1 / 1; position: relative; overflow: hidden; opacity: 0; transition: opacity 0s linear 1.2s; }
/* la que entra queda arriba y se funde sobre la anterior, que sigue entera debajo: el fundido nunca deja ver el fondo */
.carrusel__foto.is-active { opacity: 1; z-index: 1; transition: opacity 1.2s var(--ease-in-out); }
.carrusel__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } /* absoluta: el alto lo pone el recuadro, no la foto */
.carrusel__foto.is-active img, .carrusel__foto.is-saliente img { animation: carrusel-acercar calc(var(--dur, 5.5s) + 1.2s) linear both; }
.carrusel__foto.is-saliente img { animation-play-state: paused; }
.carrusel__foto figcaption {
  position: absolute; left: 0; bottom: 0; z-index: 1; padding: 6px 12px 7px;
  background: var(--accent); color: var(--white); font-size: 0.875rem; font-weight: 700;
}
.carrusel__foto figcaption b { margin-right: 6px; font-family: var(--font-titulo); }
.carrusel__flecha {
  position: absolute; top: calc(50% - 40px); z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; background: none; color: var(--acero); cursor: pointer; transition: color 0.2s var(--ease), transform 0.15s var(--ease);
}
.carrusel__flecha--ant { left: -52px; }
.carrusel__flecha--sig { right: -52px; }
.carrusel__flecha:hover { color: var(--negro); }
.carrusel__flecha:active { transform: scale(0.9); }
.carrusel__controles { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.carrusel__barra { flex: 1; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; }
.carrusel__barra i { display: block; width: 100%; height: 3px; background: var(--linea); overflow: hidden; }
.carrusel__barra i::before { content: ""; display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.carrusel__barra.is-done i::before { transform: scaleX(1); }
.carrusel__barra.is-active i::before { animation: carrusel-llenar var(--dur, 5.5s) linear forwards; }
.carrusel__barra:focus-visible { outline-offset: 0; }
.carrusel__pausa {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-left: 6px; padding: 0;
  border: 0; background: var(--surface); color: var(--ink); cursor: pointer; transition: background-color 0.2s var(--ease);
}
.carrusel__pausa svg { fill: currentColor; }
.carrusel__pausa:hover { background: var(--surface-2); }
.carrusel__icono-play, .carrusel__pausa[aria-pressed="true"] .carrusel__icono-pausa { display: none; }
.carrusel__pausa[aria-pressed="true"] .carrusel__icono-play { display: inline; }
/* pausado por el usuario, o fuera de la pantalla: todo se congela donde está */
.carrusel.is-paused .carrusel__barra i::before, .carrusel.is-fuera .carrusel__barra i::before,
.carrusel.is-paused .carrusel__foto img, .carrusel.is-fuera .carrusel__foto img { animation-play-state: paused; }
.carrusel--etapas { --dur: 2.6s; }
@keyframes carrusel-acercar { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes carrusel-llenar { to { transform: scaleX(1); } }

.lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; text-align: left; }
.lista li { position: relative; padding-left: 18px; line-height: 1.4; }
.lista li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Píldora técnica ---------- */
.spec-pill {
  display: inline-flex; align-items: flex-start; gap: 8px; text-align: left;
  padding: 10px 14px 10px 11px; background: var(--accent); color: var(--white); border-radius: 20px;
  font: 700 0.875rem / 1.35 var(--font);
}
.spec-pill svg { flex: none; margin-top: 1px; color: var(--linea); }

/* ---------- Sello de garantía (va antes de cada botón de WhatsApp) ---------- */
.badge-garantia { display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; background: var(--surface); border-radius: 999px; text-align: left; }
.badge-garantia__icon { flex: none; }
.badge-garantia__shield { fill: var(--accent); }
.badge-garantia__check { fill: none; stroke: var(--white); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.badge-garantia p { display: flex; flex-direction: column; line-height: 1.25; }
.badge-garantia strong { font-weight: 700; font-size: 0.9375rem; color: var(--negro); }
.badge-garantia span { font-size: 0.875rem; color: var(--muted); }

/* ---------- Cómo trabajamos ---------- */
.pasos__lista { list-style: none; width: 100%; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 20px; counter-reset: paso; text-align: left; }
.pasos__lista li { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; counter-increment: paso; }
/* número del paso sobre la esquina de la foto */
.pasos__lista li::before {
  content: counter(paso, decimal-leading-zero); position: absolute; left: 0; top: 0; z-index: 1;
  padding: 6px 10px; background: var(--accent); color: var(--white);
  font: 700 1.125rem / 1 var(--font-titulo);
}
.pasos__lista img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 4px; }
.pasos__lista p { font-size: var(--step-small); }
.pasos__lista .spec-pill { margin-top: 4px; }

/* ---------- Formulario de contacto: caja con borde fino ---------- */
.form-caja { width: 100%; display: flex; flex-direction: column; gap: 18px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--plata); text-align: left; }
.form-caja > h2 { text-align: left; }
.form-caja__campos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-caja textarea { resize: vertical; background: var(--surface); }
.form-caja__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.form-caja__nota { font-size: 0.875rem; color: var(--muted); text-align: right; }

/* ---------- Opciones y campos (calculadora y contacto) ---------- */
.opts { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.opts legend { font-weight: 700; margin-bottom: 12px; padding: 0; }
.opts label { position: relative; cursor: pointer; }
.opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opts span {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--surface); color: var(--ink); font-size: var(--step-small);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.15s var(--ease);
}
.opts label:hover span { background: var(--surface-2); }
.opts label:active span { transform: scale(0.97); }
.opts input:checked + span { background: var(--accent); color: var(--white); }
.opts input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 3px; }
.opts i { width: 18px; height: 18px; display: inline-block; border-radius: 50%; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: var(--step-small); font-weight: 700; }
.field--wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  font: inherit; font-weight: 400; font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--linea); border-radius: 0; padding: 11px 13px; min-height: 46px; width: 100%;
}
.field textarea { background: var(--surface); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }

/* ---------- Página del catálogo ---------- */
.cat-portada { max-width: calc(var(--col) + 2 * var(--margin)); margin: 0 auto; padding: clamp(32px, 4vw, 56px) var(--margin) 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cat-portada h1 { font: 400 var(--step-h1) / 1.2 var(--font-lema); color: var(--negro); text-wrap: balance; }
.cat-portada > p { max-width: 62ch; }
.cat-indice { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; margin-top: 8px; font-weight: 700; }
.cat-indice a:not(.btn) { text-underline-offset: 0.25em; }
.cat-sec { padding: var(--hueco) var(--margin) 0; }
.cat-sec > * { max-width: var(--col); margin-left: auto; margin-right: auto; }
.cat-sec__head { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 28px; max-width: var(--col); margin-left: auto; margin-right: auto; text-align: center; }
.moldes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px 20px; }
.molde { display: flex; flex-direction: column; gap: 12px; }
.molde__muestra { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.molde__texto { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.molde__texto h3 { color: var(--acero); }
.molde__texto p { font-size: var(--step-small); line-height: 1.5; }
.molde__obra { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.molde__obra img { width: 64px; height: 64px; object-fit: cover; }
.molde__obra figcaption { font-size: 0.8125rem; color: var(--muted); }
.molde__calc { font-size: var(--step-small); font-weight: 700; margin-top: 4px; }
.acabados { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acabados li { display: flex; flex-direction: column; gap: 6px; padding: 18px; background: var(--surface); }
.acabados p { font-size: var(--step-small); line-height: 1.5; }
.tipos { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 24px; }
.tipos li { position: relative; padding-left: 18px; line-height: 1.4; }
.tipos li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* ---------- Páginas de zona y de servicio ---------- */
.migas { font-size: var(--step-small); color: var(--muted); }
.migas ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 8px; }
.migas li + li::before { content: "›"; margin-right: 8px; }
.migas a { display: inline-block; padding: 6px 0; text-underline-offset: 0.2em; }
.migas li[aria-current] { padding: 6px 0; }
.bloque--texto { max-width: calc(72ch + 2 * var(--margin)); align-items: flex-start; text-align: left; }
.bloque--texto h2 { text-align: left; }
.bloque--texto .lista { width: 100%; }
.bloque--texto .acabados { width: 100%; margin: 0; }
.bloque--texto .ventajas span { flex: 1; min-width: 0; }
.preguntas { width: 100%; border-top: 1px solid var(--linea); }
.preguntas details { border-bottom: 1px solid var(--linea); }
.preguntas summary { position: relative; padding: 13px 36px 13px 0; font: 700 1.0625rem / 1.35 var(--font-titulo); color: var(--ink); cursor: pointer; list-style: none; transition: color 0.2s var(--ease); }
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after { content: "+"; position: absolute; right: 6px; top: 10px; font-size: 1.5rem; line-height: 1.2; color: var(--acero); }
.preguntas details[open] summary::after { content: "−"; }
.preguntas summary:hover { color: var(--negro); }
.preguntas details p { padding-bottom: 16px; }

/* ---------- Calculadora ---------- */
.calc { padding: var(--hueco) var(--margin) 0; }
.calc__grid { max-width: var(--col); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.calc__form { display: flex; flex-direction: column; gap: 26px; }
.calc__ayuda { font-size: var(--step-small); color: var(--muted); margin-top: -14px; }
.calc__resumen { position: sticky; top: calc(var(--cab-compacta) + 20px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 20px; background: var(--surface); }
.calc__muestra { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.calc__caption { font-size: var(--step-small); color: var(--muted); margin-top: -6px; font-style: italic; }
.calc__datos { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; width: 100%; font-size: var(--step-small); }
.calc__datos dt { color: var(--muted); }
.calc__datos dd { margin: 0; font-weight: 700; }
.calc__m2 { font: 700 1.375rem / 1.15 var(--font-titulo); color: var(--negro); }
.calc__resumen .btn { width: 100%; }
.calc__nota { font-size: 0.875rem; color: var(--muted); }

/* ---------- Banda de teléfono y pie ---------- */
.llamar { margin-top: var(--hueco); padding: 0 var(--margin); background: var(--accent); color: var(--white); text-align: center; font: 700 1rem / 1.3 var(--font-titulo); }
.llamar a { display: inline-block; padding: 13px 6px; text-decoration: none; }
.llamar a:hover { text-decoration: underline; }
.foot { color: var(--white); }
.foot__textura { min-height: 200px; padding: 20px var(--margin); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--black) url("../img/pie.webp") center top / cover no-repeat; text-align: center; }
.foot__tel { font-weight: 700; text-decoration: none; }
.foot__tel:hover { text-decoration: underline; }
.foot__logo { display: block; padding: 6px 10px; background: rgba(20, 20, 20, 0.78); border-radius: 3px; }
.foot__logo img { width: 104px; height: auto; }
.foot__banda { padding: clamp(36px, 5vw, 64px) var(--margin); background: var(--accent); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.foot__enlaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-weight: 700; }
.foot__enlaces a { text-decoration: none; }
.foot__enlaces a:hover { text-decoration: underline; }
.foot__enlaces--chico { font-weight: 400; font-size: var(--step-small); }
.foot__zona { font-style: italic; color: var(--surface-2); }
.foot__textura--baja { min-height: 98px; padding-right: 88px; padding-left: 88px; background-position: center bottom; font-size: var(--step-small); }
.foot :focus-visible { outline-color: var(--white); }

/* ---------- WhatsApp flotante: siempre visible, abajo a la derecha, en todas las páginas ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
  background: #25d366; color: #ffffff; border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); /* flota sobre todo */
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.wa-float svg { width: 32px; height: 32px; }
.wa-float:hover { background: #1ebe5a; transform: scale(1.06); }
.wa-float:active { transform: scale(0.94); }
.wa-float:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wa-float__label {
  position: absolute; right: calc(100% + 12px); top: 50%;
  padding: 8px 12px; border-radius: 6px; white-space: nowrap;
  background: var(--accent); color: var(--white); font: 700 0.875rem / 1 var(--font);
  opacity: 0; transform: translate(6px, -50%); pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.wa-float:hover .wa-float__label, .wa-float:focus-visible .wa-float__label { opacity: 1; transform: translate(0, -50%); }
@media (hover: none) { .wa-float__label { display: none; } }

/* ---------- Páginas legales ---------- */
.legal { max-width: 72ch; margin: 0 auto; padding: clamp(32px, 4vw, 56px) var(--margin) 0; }
.legal h1 { font: 400 clamp(2rem, 1.4rem + 2.4vw, 3.25rem) / 1.2 var(--font-lema); color: var(--negro); margin-bottom: 24px; }
.legal h2 { font-size: clamp(1.1875rem, 1.1rem + 0.5vw, 1.4375rem); text-transform: none; text-align: left; margin: 36px 0 10px; }
.legal p + p { margin-top: 1em; }
.legal ul { padding-left: 1.2em; margin: 0; }
.legal li { margin: 0.3em 0; }
.legal a { text-underline-offset: 0.2em; }
.legal__date { margin-top: 40px !important; color: var(--muted); font-size: var(--step-small); }

/* ---------- Entradas al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* las fotos se descubren de arriba abajo; las que no pasan solas, además, se asientan */
.js .revela { clip-path: inset(0 0 100% 0); transition: clip-path 1s var(--ease-in-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .revela.is-in { clip-path: inset(0); }
/* en los carruseles el recorte deja sitio a los costados: las flechas van fuera de la foto */
.js .carrusel.revela { clip-path: inset(0 -60px 100% -60px); }
.js .carrusel.revela.is-in { clip-path: inset(0 -60px 0 -60px); }
.js .revela--asienta img { transform: scale(1.12); transition: transform 1.4s var(--ease); transition-delay: inherit; }
.js .revela--asienta.is-in img { transform: none; }

/* ---------- Pantallas medianas: las flechas entran dentro de la foto ---------- */
@media (max-width: 1120px) {
  .carrusel__flecha { width: 40px; height: 56px; background: rgba(20, 20, 20, 0.5); color: var(--white); }
  .carrusel__flecha:hover { background: rgba(20, 20, 20, 0.72); color: var(--white); }
  .carrusel__flecha--ant { left: 0; }
  .carrusel__flecha--sig { right: 0; }
}

/* ---------- Tablet: cabecera corta y menú plegado ---------- */
@media (max-width: 880px) {
  :root { --cab: 76px; --cab-compacta: 76px; }
  .nav__dentro { justify-content: space-between; position: relative; }
  .nav__brand { padding: 3px 6px; }
  .nav__brand img, .nav.is-compacta .nav__brand img { height: 62px; }
  .nav__lema { display: none; }
  .nav__centro { flex: none; }
  .nav__toggle {
    display: inline-block; background: rgba(20, 20, 20, 0.82); border: 0; border-radius: 999px; color: var(--white);
    font: 700 var(--step-small) / 1 var(--font); padding: 12px 18px; cursor: pointer;
  }
  .js .nav__links { display: none; }
  .js .nav.is-open .nav__links {
    position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px var(--margin) 14px; background: var(--black); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
  }
  .nav__links a { padding: 11px 15px; text-shadow: none; }
  .nav.is-compacta .nav__links a, .nav__links a { font-size: 1.0625rem; }

  .moldes { grid-template-columns: repeat(2, 1fr); }
  .tipos { grid-template-columns: 1fr 1fr; }
  .calc__grid { grid-template-columns: 1fr; }
  .calc__resumen { position: static; }
  .pasos__lista { grid-template-columns: 1fr 1fr; }
}

/* ---------- Móvil ---------- */
@media (max-width: 620px) {
  .bloque { gap: 16px; }
  .btn { width: 100%; }
  .fichas { grid-template-columns: 1fr; gap: 20px; }
  .lista { grid-template-columns: 1fr; }
  .fields, .form-caja__campos { grid-template-columns: 1fr; }
  .form-caja__pie { flex-direction: column; align-items: stretch; }
  .form-caja__nota { text-align: left; }
  .acabados, .tipos { grid-template-columns: 1fr; }
  .pasos__lista { grid-template-columns: 1fr; gap: 28px; }
  .pasos__lista img { aspect-ratio: 16 / 9; }
  .foto-texto { aspect-ratio: 4 / 5; }
  .moldes { gap: 28px 12px; }
  .molde__obra img { width: 48px; height: 48px; }
  .cat-indice .btn { width: 100%; }

  /* el collage pasa a dos columnas, con la foto del centro a todo el ancho */
  .collage { grid-template-columns: 1fr 1fr; grid-auto-rows: 42vw; }
  .collage__a, .collage__b, .collage__c, .collage__d, .collage__e, .collage__f, .collage__g, .collage__h { grid-column: auto; grid-row: auto; }
  .collage__centro { grid-column: 1 / -1; grid-row: span 2; order: -1; margin: 0; border: 0; }

  .foot__textura--baja { padding-right: 84px; padding-left: var(--margin); text-align: left; }
  .wa-float { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .revela, .js .carrusel.revela, .js .carrusel.revela.is-in { clip-path: none; }
  .js .revela--asienta img { transform: none; }
  /* sin movimiento: los carruseles no avanzan solos (se cambian con las barras y las flechas) */
  .carrusel__barra.is-active i::before { transform: scaleX(1); }
  .carrusel__pausa { display: none; }
}
