/* ==========================================================================
   Grupo Alianza Construcción — hoja de estilos principal
   Índice:
   1. Fuentes locales      2. Tokens (colores, tipografía, espacios)
   3. Base                 4. Utilidades y botones
   5. Encabezado           6. Portada (hero)
   7. Secciones            8. Servicios
   9. Proyectos            10. Principios (sección oscura)
   11. Metodología         12. Llamada a la acción
   13. Contacto/formulario 14. Textos legales
   15. Pie de página       16. WhatsApp flotante
   17. Movimiento reducido
   ========================================================================== */

/* 1. Fuentes locales (licencias en assets/fonts/LICENCIAS.txt) ----------- */
@font-face { font-family: "Inter"; src: url("../fonts/inter-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/lora-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }

/* 2. Tokens -------------------------------------------------------------- */
:root {
  /* Paleta oficial */
  --grafito: #202321;
  --negro: #111111;
  --blanco: #F5F3EE;
  --arena: #B3A18A;
  --oliva: #777B72;
  /* Rojo corporativo, medido del logotipo original (#ED1B24).
     --rojo: líneas, indicadores y detalles. --rojo-texto: versión más oscura para
     textos y enlaces, con contraste suficiente sobre los fondos claros. */
  --rojo: #ED1B24;
  --rojo-texto: #B8121A;

  /* Derivados */
  --papel: #ECE8E0;
  --linea: #D6D0C4;
  --linea-oscura: #3A3E3B;
  --texto: #202321;
  --texto-suave: #5C6058;      /* oliva oscurecido: contraste AA sobre --blanco */
  --texto-claro: #D9D4CA;
  --exito: #3F6B47;
  --error: #9E1C24;

  --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Escala tipográfica (razón ~1.25) */
  --t-xs: .8125rem;
  --t-sm: .9375rem;
  --t-base: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --t-2xl: clamp(1.875rem, 1.4rem + 1.8vw, 2.75rem);
  --t-3xl: clamp(2.375rem, 1.6rem + 3.2vw, 4.25rem);
  --t-hero: clamp(2.6rem, 1.4rem + 5vw, 5.4rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1280px;
  --sec: clamp(4.5rem, 3rem + 6vw, 9rem);
  --header-h: 80px;
  --radio: 2px;
}

/* 3. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0; background: var(--blanco); color: var(--texto);
  font-family: var(--sans); font-size: var(--t-base); line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--rojo-texto); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; letter-spacing: -.015em; margin: 0 0 .5em; color: var(--negro); text-wrap: balance; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-xl); }
h4 { font-family: var(--sans); font-size: var(--t-base); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1.1em; max-width: 68ch; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: .4em; }
:focus-visible { outline: 2px solid var(--rojo-texto); outline-offset: 3px; }
::selection { background: var(--arena); color: var(--negro); }

.saltar {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--negro); color: var(--blanco); padding: .75rem 1rem;
}
.saltar:focus { top: 1rem; color: var(--blanco); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 4. Utilidades y botones ------------------------------------------------ */
.contenedor { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.seccion { padding-block: var(--sec); }
.seccion--papel { background: var(--papel); }
.seccion--oscura { background: var(--grafito); color: var(--texto-claro); }
.seccion--oscura h2, .seccion--oscura h3 { color: var(--blanco); }

/* Encabezado de sección: línea de nivel roja + título (sin rótulos en mayúsculas) */
.titulo-seccion { display: grid; gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); max-width: 46rem; }
.titulo-seccion::before { content: ""; width: 56px; height: 2px; background: var(--rojo); }
.titulo-seccion h2 { margin: 0; }
.titulo-seccion p { margin: 0; color: var(--texto-suave); font-size: var(--t-lg); }
.seccion--oscura .titulo-seccion p { color: var(--texto-claro); }
.titulo-seccion--fila { max-width: none; grid-template-columns: 1fr auto; align-items: end; }
.titulo-seccion--fila::before { grid-column: 1 / -1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 48px; padding: .8rem 1.4rem; border: 1px solid transparent; border-radius: var(--radio);
  font: 500 var(--t-sm)/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primario { background: var(--negro); color: var(--blanco); }
.btn--primario:hover { background: var(--grafito); color: var(--blanco); box-shadow: inset 0 -3px 0 var(--rojo); }
.btn--secundario { border-color: var(--negro); color: var(--negro); background: transparent; }
.btn--secundario:hover { background: var(--negro); color: var(--blanco); }
.btn--claro { background: var(--blanco); color: var(--negro); }
.btn--claro:hover { background: #fff; color: var(--negro); box-shadow: inset 0 -3px 0 var(--rojo); }
.btn--contorno-claro { border-color: rgba(245,243,238,.6); color: var(--blanco); }
.btn--contorno-claro:hover { border-color: var(--blanco); background: rgba(245,243,238,.08); color: var(--blanco); }
.btn svg { width: 18px; height: 18px; flex: none; }
.botones { display: flex; flex-wrap: wrap; gap: .75rem; }

.enlace-flecha { display: inline-flex; gap: .5rem; align-items: center; font-weight: 500; font-size: var(--t-sm); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.enlace-flecha:hover { color: var(--rojo-texto); }

.etiqueta-ilustrativa {
  position: absolute; left: .75rem; bottom: .75rem; z-index: 2;
  background: rgba(17,17,17,.78); color: var(--blanco);
  font-size: .75rem; letter-spacing: .01em; padding: .3rem .55rem; border-radius: var(--radio);
}
.figura { position: relative; margin: 0; overflow: hidden; background: var(--papel); }
.figura img { width: 100%; height: 100%; object-fit: cover; }

/* 5. Encabezado ---------------------------------------------------------- */
.encabezado {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: rgba(245,243,238,.96); border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
@supports (backdrop-filter: blur(8px)) { .encabezado { background: rgba(245,243,238,.86); backdrop-filter: blur(10px); } }
.encabezado.desplazado { border-bottom-color: var(--linea); }
.encabezado__fila { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.marca { display: block; flex: none; }
.marca img { height: 52px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav__lista { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav__lista li { margin: 0; }
.nav__lista a { font-size: var(--t-sm); text-decoration: none; padding: .5rem 0; position: relative; }
.nav__lista a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--rojo); transition: right .25s; }
.nav__lista a:hover::after, .nav__lista a[aria-current="page"]::after { right: 0; }
.nav__lista a:hover { color: var(--negro); }
.nav__acciones { display: flex; align-items: center; gap: 1rem; }
.nav__wa { display: inline-flex; align-items: center; gap: .45rem; font-size: var(--t-sm); text-decoration: none; }
.nav__wa svg { width: 18px; height: 18px; }
.nav__acciones .btn { min-height: 42px; padding: .6rem 1.1rem; }
.menu-boton {
  display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; padding: 12px; margin-right: -12px;
}
.menu-boton span { display: block; height: 2px; background: var(--negro); margin: 6px 0; transition: transform .25s, opacity .2s; }
.menu-boton[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-boton[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-boton[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1080px) {
  :root { --header-h: 66px; }
  .marca img { height: 42px; }
  /* backdrop-filter crearía un contexto que recorta el menú fijo: se desactiva en móvil */
  .encabezado { background: var(--blanco); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-boton { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--blanco);
    flex-direction: column; align-items: stretch; gap: 0; padding: 1.5rem var(--gutter) 2rem;
    overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .nav.abierto { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
  .nav__lista { flex-direction: column; gap: 0; }
  .nav__lista a { display: block; font-family: var(--serif); font-size: 1.6rem; padding: .85rem 0; border-bottom: 1px solid var(--linea); }
  .nav__lista a::after { display: none; }
  .nav__lista a[aria-current="page"] { color: var(--rojo-texto); }
  .nav__acciones { flex-direction: column; align-items: stretch; margin-top: 2rem; gap: .75rem; }
  .nav__acciones .btn { min-height: 52px; }
  .nav__wa { justify-content: center; border: 1px solid var(--negro); min-height: 52px; }
  body.menu-abierto { overflow: hidden; }
}

/* 6. Portada (hero) ------------------------------------------------------ */
.hero { position: relative; padding-top: clamp(2.5rem, 5vw, 5rem); overflow: hidden; }
.hero__rejilla { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 4vw, 4rem); align-items: end; }
.hero__texto { padding-bottom: clamp(1rem, 3vw, 3rem); position: relative; z-index: 2; }
.hero h1 { font-size: var(--t-hero); line-height: 1.02; letter-spacing: -.025em; margin-bottom: .45em; }
.hero__apoyo { font-size: var(--t-lg); color: var(--texto-suave); max-width: 34rem; margin-bottom: 2rem; }
.hero__imagen { aspect-ratio: 16 / 11; margin-right: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--max)) / 2))); }
.hero__imagen img { object-position: 60% 50%; }
/* Línea de nivel: el gesto de la marca (línea roja del logotipo) */
.nivel { position: relative; display: flex; align-items: center; gap: 1rem; margin-top: clamp(2rem, 4vw, 3rem); }
.nivel__linea { flex: 1; height: 2px; background: var(--rojo); transform-origin: left; }
.nivel__cota { flex: none; display: flex; align-items: center; gap: .55rem; font-size: var(--t-xs); color: var(--texto-suave); font-variant-numeric: tabular-nums; }
.nivel__cota::before { content: ""; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 11px solid var(--rojo); }
.hero__lema { padding-block: 1.25rem 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: var(--t-sm); color: var(--texto-suave); }
.hero__lema strong { font-family: var(--serif); font-weight: 400; font-size: var(--t-lg); color: var(--negro); }
@media (prefers-reduced-motion: no-preference) {
  .nivel__linea { animation: trazo 1.4s cubic-bezier(.6,.05,.2,1) .25s both; }
  .nivel__cota { animation: aparece .5s ease 1.4s both; }
}
@keyframes trazo { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 860px) {
  .hero__rejilla { grid-template-columns: 1fr; }
  .hero__imagen { margin-inline: calc(-1 * var(--gutter)); aspect-ratio: 4 / 3; }
  .hero__texto { padding-bottom: 0; }
}

/* Cabecera de páginas interiores */
.cabecera { padding-block: clamp(3rem, 6vw, 6rem) clamp(2.5rem, 4vw, 4rem); border-bottom: 1px solid var(--linea); }
.cabecera__rejilla { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem 4rem; align-items: end; }
.cabecera h1 { margin: 0; }
.cabecera p { margin: 0; color: var(--texto-suave); font-size: var(--t-lg); }
.cabecera .nivel { margin-top: 2rem; }
.migas { font-size: var(--t-xs); color: var(--texto-suave); margin-bottom: 1.5rem; }
.migas a { text-decoration: none; }
.migas a:hover { text-decoration: underline; }
@media (max-width: 860px) { .cabecera__rejilla { grid-template-columns: 1fr; } }

/* 7. Secciones generales ------------------------------------------------- */
.intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.intro__cita { font-family: var(--serif); font-size: var(--t-2xl); line-height: 1.22; color: var(--negro); margin: 0; max-width: 22ch; letter-spacing: -.01em; }
.intro__texto p { color: var(--texto-suave); }
.intro__texto .enlace-flecha { margin-top: .5rem; color: var(--negro); }
.coordinacion { list-style: none; padding: 0; margin: 2rem 0; border-top: 1px solid var(--linea); }
.coordinacion li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--linea); margin: 0; font-size: var(--t-sm); }
.coordinacion li span:first-child { color: var(--negro); font-weight: 500; }
.coordinacion li span:last-child { color: var(--texto-suave); text-align: right; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } .intro__cita { max-width: none; } }

/* Bloques de texto en dos columnas (Nosotros) */
.bloques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 6vw, 6rem); }
.bloque h3 { font-size: var(--t-xl); }
.bloque p { color: var(--texto-suave); }
@media (max-width: 760px) { .bloques { grid-template-columns: 1fr; } }

.dividido { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.dividido .figura { aspect-ratio: 4 / 3; }
@media (max-width: 860px) { .dividido { grid-template-columns: 1fr; } }

/* 8. Servicios ----------------------------------------------------------- */
.tarjetas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 3vw, 3rem) clamp(1.25rem, 2.5vw, 2rem); }
.tarjeta { display: flex; flex-direction: column; }
.tarjeta .figura { aspect-ratio: 4 / 3; margin-bottom: 1.25rem; }
.tarjeta .figura img { transition: transform .6s ease; }
.tarjeta:hover .figura img { transform: scale(1.03); }
.tarjeta h3 { font-size: 1.5rem; margin-bottom: .4em; }
.tarjeta h3 a { text-decoration: none; }
.tarjeta p { color: var(--texto-suave); font-size: var(--t-sm); flex: 1; }
.tarjeta .enlace-flecha { align-self: flex-start; }
@media (max-width: 980px) { .tarjetas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tarjetas { grid-template-columns: 1fr; } }

.servicio { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; padding-block: clamp(3.5rem, 6vw, 6rem); border-top: 1px solid var(--linea); }
.servicio:nth-of-type(even) .servicio__imagen { order: 2; }
.servicio__imagen { aspect-ratio: 5 / 4; position: sticky; top: calc(var(--header-h) + 2rem); }
.servicio__texto > p:first-of-type { font-size: var(--t-lg); color: var(--negro); }
.servicio__texto p { color: var(--texto-suave); }
.servicio__texto h4 { margin-top: 2rem; }
.servicio__lista { list-style: none; padding: 0; margin: 0 0 2rem; columns: 2; column-gap: 2rem; }
.servicio__lista li { break-inside: avoid; padding-left: 1.1rem; position: relative; font-size: var(--t-sm); }
.servicio__lista li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--rojo); }
.nota { font-size: var(--t-sm); color: var(--texto-suave); border-left: 2px solid var(--arena); padding-left: 1rem; }
@media (max-width: 860px) {
  .servicio { grid-template-columns: 1fr; }
  .servicio:nth-of-type(even) .servicio__imagen { order: 0; }
  .servicio__imagen { position: static; }
  .servicio__lista { columns: 1; }
}

/* 9. Proyectos ----------------------------------------------------------- */
.aviso-referencia {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.25rem; margin-bottom: 2.5rem;
  border: 1px solid var(--linea); background: var(--papel); font-size: var(--t-sm); color: var(--texto-suave);
}
.aviso-referencia strong { color: var(--negro); font-weight: 600; }
.aviso-referencia::before { content: ""; flex: none; width: 3px; align-self: stretch; background: var(--arena); }
.aviso-referencia p { margin: 0; max-width: none; }

.filtros { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filtro { min-height: 40px; padding: .45rem 1rem; border: 1px solid var(--linea); background: transparent; border-radius: 40px; font: 500 var(--t-sm) var(--sans); color: var(--texto); cursor: pointer; }
.filtro:hover { border-color: var(--negro); }
.filtro[aria-pressed="true"] { background: var(--negro); color: var(--blanco); border-color: var(--negro); }

.portafolio { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 2.5vw, 2rem); align-items: start; }
.proyecto { grid-column: span 6; display: flex; flex-direction: column; text-decoration: none; }
.proyecto:nth-child(4n+1) { grid-column: span 7; }
.proyecto:nth-child(4n+2) { grid-column: span 5; padding-top: clamp(0px, 5vw, 4rem); }
.proyecto:nth-child(4n+3) { grid-column: span 5; }
.proyecto:nth-child(4n+4) { grid-column: span 7; }
.proyecto .figura { aspect-ratio: 4 / 3; }
.proyecto:nth-child(4n+2) .figura, .proyecto:nth-child(4n+3) .figura { aspect-ratio: 1 / 1; }
.proyecto .figura img { transition: transform .6s ease; }
.proyecto:hover .figura img { transform: scale(1.025); }
.proyecto__datos { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; align-items: baseline; }
.proyecto__datos h3 { font-size: 1.4rem; margin: 0; }
.proyecto__datos span { font-size: var(--t-xs); color: var(--texto-suave); white-space: nowrap; }
.proyecto p { font-size: var(--t-sm); color: var(--texto-suave); margin: .4rem 0 0; }
.proyecto:hover h3 { color: var(--rojo-texto); }
@media (max-width: 760px) {
  .proyecto, .proyecto:nth-child(n) { grid-column: 1 / -1; padding-top: 0; }
  .proyecto:nth-child(n) .figura { aspect-ratio: 4 / 3; }
}
.espacio-proyecto {
  grid-column: span 6; min-height: 260px; border: 1px dashed var(--arena); display: grid; place-items: center; text-align: center;
  padding: 2rem; color: var(--texto-suave); font-size: var(--t-sm);
}
.vacio { text-align: center; padding: 4rem 1rem; border: 1px dashed var(--arena); }

/* Ficha de proyecto */
.ficha__galeria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ficha__galeria .figura:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.ficha__galeria .figura { aspect-ratio: 4 / 3; }
.ficha__datos { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); margin-top: clamp(2.5rem, 5vw, 4rem); }
.ficha__tabla { margin: 0; border-top: 1px solid var(--linea); }
.ficha__tabla div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--linea); font-size: var(--t-sm); }
.ficha__tabla dt { color: var(--texto-suave); }
.ficha__tabla dd { margin: 0; color: var(--negro); }
@media (max-width: 760px) { .ficha__datos, .ficha__galeria { grid-template-columns: 1fr; } }

/* 10. Principios (sección oscura) ---------------------------------------- */
.principios { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); border-top: 1px solid var(--linea-oscura); }
.principio { padding: 2rem 2rem 2rem 0; border-bottom: 1px solid var(--linea-oscura); margin: 0; display: grid; grid-template-columns: 40px 1fr; gap: 1rem; align-content: start; }
.principio svg { width: 32px; height: 32px; color: var(--arena); }
.principio h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.principio p { font-size: var(--t-sm); margin: 0; color: #B9B4AA; }
.principios-nota { margin-top: 2rem; font-size: var(--t-sm); color: #A39E95; }

/* 11. Metodología -------------------------------------------------------- */
.pasos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; counter-reset: paso; position: relative; }
.pasos::before { content: ""; position: absolute; left: 0; right: 0; top: 1.05rem; height: 1px; background: var(--linea); }
.paso { position: relative; padding: 0 1.25rem 0 0; margin: 0; }
.paso__num { display: inline-flex; align-items: center; background: var(--blanco); padding-right: .75rem; font-family: var(--serif); font-size: 1.5rem; color: var(--negro); position: relative; font-variant-numeric: lining-nums; }
.seccion--papel .paso__num { background: var(--papel); }
.paso__num::after { content: ""; width: 9px; height: 9px; background: var(--rojo); margin-left: .75rem; transform: rotate(45deg); }
.paso h3 { font-family: var(--sans); font-size: var(--t-base); font-weight: 600; margin: 1.25rem 0 .4rem; letter-spacing: 0; }
.paso p { font-size: var(--t-sm); color: var(--texto-suave); margin: 0; }
@media (max-width: 1080px) {
  .pasos { grid-template-columns: 1fr; gap: 0; }
  .pasos::before { left: 1.05rem; right: auto; top: .5rem; bottom: .5rem; width: 1px; height: auto; }
  .paso { display: grid; grid-template-columns: 4.5rem 1fr; padding: 0 0 2rem; }
  .paso__num { padding: 0 0 .5rem; flex-direction: column; align-items: flex-start; gap: .5rem; }
  .paso__num::after { display: none; }
  .paso h3 { margin-top: .2rem; }
  .paso p { grid-column: 2; }
}

/* Metodología detallada (página) */
.etapas { list-style: none; padding: 0; margin: 0; }
.etapa { display: grid; grid-template-columns: minmax(5rem, 2fr) minmax(0, 4fr) minmax(0, 6fr); gap: 1.5rem clamp(2rem, 4vw, 4rem); padding-block: clamp(2.25rem, 4vw, 3.5rem); border-top: 1px solid var(--linea); margin: 0; }
.etapa:last-child { border-bottom: 1px solid var(--linea); }
.etapa__num { font-family: var(--serif); font-size: var(--t-3xl); line-height: 1; color: var(--arena); font-variant-numeric: lining-nums; }
.etapa h2 { font-size: var(--t-xl); margin: .3rem 0 0; }
.etapa p { color: var(--texto-suave); margin-bottom: .75rem; }
.etapa ul { margin: 0; padding: 0; list-style: none; }
.etapa li { font-size: var(--t-sm); padding-left: 1.1rem; position: relative; }
.etapa li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 1px; background: var(--rojo); }
@media (max-width: 860px) { .etapa { grid-template-columns: 1fr; } .etapa__num { font-size: 2.5rem; } }

/* 12. Llamada a la acción ------------------------------------------------ */
.cta { position: relative; background: var(--negro); color: var(--texto-claro); overflow: hidden; }
.cta__rejilla { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: stretch; min-height: 520px; }
.cta__texto { padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 4vw, 4rem) clamp(4rem, 8vw, 7rem) 0; display: flex; flex-direction: column; justify-content: center; }
.cta h2 { color: var(--blanco); font-size: var(--t-3xl); max-width: 14ch; }
.cta p { font-size: var(--t-lg); color: #C9C4BA; max-width: 32rem; margin-bottom: 2rem; }
.cta .figura { margin-right: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--max)) / 2))); background: var(--grafito); min-height: 320px; }
.cta .nivel__cota { color: #A39E95; }
@media (max-width: 860px) {
  .cta__rejilla { grid-template-columns: 1fr; }
  .cta__texto { padding-right: 0; }
  .cta .figura { margin-inline: calc(-1 * var(--gutter)); aspect-ratio: 4 / 3; min-height: 0; }
}

/* 13. Contacto y formulario --------------------------------------------- */
.contacto { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.canales { display: grid; gap: 0; border-top: 1px solid var(--linea); margin-bottom: 2rem; }
.canal { display: grid; gap: .15rem; padding: 1.1rem 0; border-bottom: 1px solid var(--linea); text-decoration: none; }
.canal span { font-size: var(--t-xs); color: var(--texto-suave); }
.canal strong { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; color: var(--negro); word-break: break-word; }
a.canal:hover strong { color: var(--rojo-texto); }
.formulario { background: #FBFAF7; border: 1px solid var(--linea); padding: clamp(1.5rem, 4vw, 3rem); }
.formulario__rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.5rem; }
.campo { display: grid; gap: .4rem; align-content: start; }
.campo--completo { grid-column: 1 / -1; }
.campo label, .campo legend { font-size: var(--t-sm); font-weight: 500; color: var(--negro); }
.campo .opcional { font-weight: 400; color: var(--texto-suave); }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 50px; padding: .75rem .9rem; border: 1px solid #BDB6A8; border-radius: var(--radio);
  background: #fff; color: var(--negro); font: 400 1rem/1.4 var(--sans);
}
.campo textarea { min-height: 150px; resize: vertical; }
.campo select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--negro) 50%), linear-gradient(135deg, var(--negro) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2.5rem; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: 2px solid var(--negro); outline-offset: 0; border-color: var(--negro); }
.campo [aria-invalid="true"] { border-color: var(--error); background: #FFF7F7; }
.campo__error { font-size: var(--t-xs); color: var(--error); min-height: 0; }
.campo__error:empty { display: none; }
.campo__ayuda { font-size: var(--t-xs); color: var(--texto-suave); }
.casilla { display: grid; grid-template-columns: 24px 1fr; gap: .75rem; align-items: start; font-size: var(--t-sm); }
.casilla input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; accent-color: var(--negro); }
.trampa { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.formulario__pie { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 1.75rem; }
.formulario__pie .btn[disabled] { opacity: .6; cursor: progress; }
.estado { margin-top: 1.5rem; padding: 1rem 1.25rem; font-size: var(--t-sm); border-left: 3px solid; display: none; }
.estado p { margin: .3rem 0 0; }
.estado.visible { display: block; }
.estado--ok { border-color: var(--exito); background: #EFF5EF; color: #22402A; }
.estado--error { border-color: var(--error); background: #FBEFEF; color: #5E1015; }
.estado--enviando { border-color: var(--oliva); background: var(--papel); }
@media (max-width: 960px) { .contacto { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .formulario__rejilla { grid-template-columns: 1fr; } }

/* 14. Textos legales ----------------------------------------------------- */
.legal { max-width: 46rem; }
.legal h2 { font-size: var(--t-xl); margin-top: 2.5rem; }
.legal p, .legal li { color: #3E423D; }
.legal p { max-width: none; }
.completar { background: #FFF1C9; color: #4A3A00; padding: 0 .3em; border-radius: 2px; font-weight: 500; }
.borrador { border: 1px solid #E5C76B; background: #FFF8E1; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem; font-size: var(--t-sm); }
.borrador p { margin: 0; max-width: none; }

/* 15. Pie de página ------------------------------------------------------ */
.pie { background: var(--negro); color: #B9B4AA; padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem; font-size: var(--t-sm); }
.pie a { text-decoration: none; }
.pie a:hover { color: var(--blanco); text-decoration: underline; }
.pie__rejilla { display: grid; grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 2.5fr)); gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid #2C2F2D; }
.pie__marca img { width: 180px; height: auto; margin-bottom: 1.75rem; }
.pie__lema { font-family: var(--serif); font-size: 1.3rem; color: var(--blanco); line-height: 1.35; max-width: 20ch; }
.pie h2 { font-family: var(--sans); font-size: var(--t-sm); font-weight: 600; color: var(--blanco); letter-spacing: 0; margin-bottom: 1rem; }
.pie ul { list-style: none; padding: 0; margin: 0; }
.pie li { margin-bottom: .55rem; }
.pie__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; font-size: var(--t-xs); color: #8E8A82; }
@media (max-width: 900px) { .pie__rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pie__marca { grid-column: 1 / -1; } }
@media (max-width: 520px) { .pie__rejilla { grid-template-columns: 1fr; } }

/* 16. WhatsApp flotante (solo pantallas pequeñas) ----------------------- */
.wa-flotante {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; display: none; place-items: center;
  background: var(--grafito); color: var(--blanco); box-shadow: 0 6px 20px rgba(17,17,17,.25);
  border: 1px solid rgba(245,243,238,.25);
}
.wa-flotante svg { width: 26px; height: 26px; }
.wa-flotante:hover { color: var(--blanco); background: var(--negro); }
@media (max-width: 1080px) { .wa-flotante { display: grid; } .pie { padding-bottom: 6rem; } }
body.menu-abierto .wa-flotante { display: none; }

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

@media print {
  .encabezado, .wa-flotante, .cta, .pie { display: none; }
  body { background: #fff; }
}

/* Ajustes para pantallas pequeñas */
@media (max-width: 760px) {
  .titulo-seccion--fila { grid-template-columns: 1fr; align-items: start; }
  .titulo-seccion--fila > .enlace-flecha { justify-self: start; }
  .paso h3 { margin-bottom: .25rem; }
}
