/* MTK Constructora · v3 (30-oct-2026)
   Jerarquía tipográfica tipo Emergence (Geist, tamaños por rol, tracking proporcional), rejilla de 8 px,
   blanco y piedra, tinta y azul del logo; naranja solo como acento fino. Sin sombras, sin degradados. */

:root {
  --blanco: #ffffff;
  --piedra: #f4f2ee;
  --piedra-2: #e9e6e0;
  --linea: #dedad3;
  --tinta: #16181c;
  --tinta-2: #4b4f56;
  --tinta-3: #80848c;
  --azul: #16233a;
  --azul-2: #1f3152;
  --naranja: #e8791a;
  --verde-wa: #1f9d55;

  --ancho: 1200px;
  --gutter: 20px;
  --col-gap: 32px;

  --type-display: clamp(36px, 4.2vw, 60px);
  --type-section: clamp(30px, 3vw, 40px);
  --type-subhead: 22px;
  --type-body: 16px;
  --type-small: 14px;
  --type-label: 12px;
  --leading-display: 1.08;
  --leading-heading: 1.2;
  --leading-body: 1.6;
  --tracking-display: -0.04em;
  --tracking-heading: -0.03em;

  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 32px; --s-6: 48px; --s-8: 64px; --s-12: 96px;
  --seccion: var(--s-8);
  --radio: 4px;
}
@media (min-width: 720px) { :root { --gutter: 32px; --seccion: var(--s-12); } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: "Geist", "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: var(--type-body); line-height: var(--leading-body); color: var(--tinta); background: var(--blanco);
  font-kerning: normal; font-feature-settings: "kern", "ss01";
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--azul); text-wrap: balance; }
h1 { font-size: var(--type-display); line-height: var(--leading-display); letter-spacing: var(--tracking-display); }
h2 { font-size: var(--type-section); line-height: var(--leading-heading); letter-spacing: var(--tracking-heading); }
h3 { font-size: var(--type-subhead); line-height: 1.3; letter-spacing: -0.02em; }
h4 { font-size: 16px; line-height: 24px; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--s-2); }
a { color: var(--azul); }
:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }
.salto { position: absolute; left: -999px; top: 8px; background: var(--tinta); color: #fff; padding: 8px 12px; z-index: 50; }
.salto:focus { left: 8px; }

.contenedor { width: min(100% - 2 * var(--gutter), var(--ancho)); margin-inline: auto; }
.seccion { padding-block: var(--seccion); }
.seccion-piedra { background: var(--piedra); }

/* Etiqueta pequeña sobre los títulos, como en Emergence */
.etiqueta { display: block; font-size: var(--type-label); line-height: 20px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tinta-3); margin-bottom: var(--s-2); font-weight: 500; }
.cabeza { display: grid; gap: var(--s-2); margin-bottom: var(--s-6); max-width: 40em; }
.cabeza p { color: var(--tinta-2); font-size: 18px; line-height: 1.5; max-width: 34em; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--azul); color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; line-height: 20px; padding: 14px 22px; border: 0; border-radius: var(--radio); font-family: inherit; cursor: pointer; white-space: nowrap; transition: background-color 160ms ease, transform 160ms ease; }
.boton:hover { background: var(--azul-2); }
.boton:active { transform: scale(0.98); }
.boton-claro { background: transparent; color: var(--azul); border: 1px solid var(--linea); }
.boton-claro:hover { background: var(--piedra); }
.enlace { font-weight: 500; text-decoration: none; font-size: 15px; line-height: 20px; border-bottom: 1px solid var(--azul); padding-bottom: 2px; }
.enlace:hover { border-color: var(--naranja); }

/* Cabecera: solo el logo */
.cabecera { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.cabecera-interior { width: min(100% - 2 * var(--gutter), var(--ancho)); margin-inline: auto; min-height: 64px; display: flex; align-items: center; gap: var(--s-3); }
.marca { display: flex; align-items: center; flex: none; }
.marca img { height: 36px; width: auto; }
.nav { display: none; gap: var(--s-3); margin-left: var(--s-2); }
.nav a { text-decoration: none; color: var(--tinta-2); font-size: 15px; line-height: 20px; padding: 4px 0; }
.nav a:hover { color: var(--azul); }
.cabecera-derecha { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }
.telefono { display: none; text-decoration: none; color: var(--tinta); font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; }
.boton-cabecera { padding: 10px 16px; }
.boton-cabecera .largo { display: none; }

/* Portada: texto y foto, mitad y mitad */
.portada { padding-block: var(--s-6) 0; }
.portada-grid { display: grid; gap: var(--s-4); }
.portada-texto { display: grid; gap: var(--s-3); align-content: center; }
.portada h1 { max-width: 12em; }
.portada-sub { font-size: 18px; line-height: 1.5; color: var(--tinta-2); max-width: 30em; }
.portada-nota { margin-top: var(--s-2); }
.portada-cifras { margin-top: var(--s-2); }
.acciones { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; }
.portada-foto { margin: 0; }
.portada-foto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radio); background: var(--piedra-2); }
figcaption { font-size: var(--type-small); line-height: 20px; color: var(--tinta-3); margin-top: var(--s-1); }

/* Lo que nos distingue: seis puntos con icono de línea, justo bajo la portada */
.distingue { padding-block: var(--s-6); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); margin-top: var(--s-6); }
.distingue ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-4) var(--s-3); }
.distingue li { display: grid; gap: var(--s-2); align-content: start; }
.distingue svg { width: 32px; height: 32px; stroke: var(--azul); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.distingue h4 { color: var(--tinta); }
.distingue p { font-size: var(--type-small); line-height: 20px; color: var(--tinta-2); }

/* Servicios: tarjetas con foto, texto debajo */
.servicios { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6) var(--col-gap); }
.servicios li { display: grid; gap: var(--s-2); align-content: start; scroll-margin-top: 96px; }
.servicios img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radio); background: var(--piedra-2); }
.servicios img.tope { object-position: center top; }
.servicios h3 { margin-top: var(--s-1); }
.servicios p { color: var(--tinta-2); }
.servicios .enlace { justify-self: start; margin-top: var(--s-1); }

/* Obras: fotos reales */
.obras { display: grid; gap: var(--s-4) var(--col-gap); }
.obras figure { margin: 0; }
.obras img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radio); background: var(--piedra-2); }
.obras .ancha img { aspect-ratio: 2 / 1; }
.obras img.arriba { object-position: center 15%; }
.obras img.tope { object-position: center top; }
.obras img.bajo { object-position: center 78%; }

/* Cómo trabajamos: tres pasos numerados, alineados por rejilla */
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4) var(--col-gap); counter-reset: paso; }
.pasos li { display: grid; grid-template-rows: auto auto auto 1fr; gap: var(--s-2); align-content: start; }
.pasos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radio); background: var(--piedra-2); }
.pasos .numero { font-size: var(--type-label); line-height: 20px; color: var(--tinta-3); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.pasos .numero::before { counter-increment: paso; content: "Paso " counter(paso, decimal-leading-zero); }
.pasos h3 { font-size: 20px; min-height: 2.6em; }
.pasos p { color: var(--tinta-2); font-size: var(--type-small); line-height: 22px; }

/* Equipo y por qué */
.equipo { display: grid; gap: var(--s-4); }
.equipo figure { margin: 0; }
.equipo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radio); background: var(--piedra-2); }
.equipo-texto { display: grid; gap: var(--s-3); align-content: center; }
.equipo-texto .grande { font-size: 18px; line-height: 1.5; color: var(--tinta); max-width: 30em; }
.cifras { margin: var(--s-2) 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.cifras div { border-top: 1px solid var(--linea); padding-top: var(--s-2); }
.cifras dd { margin: 0; font-size: 28px; line-height: 32px; font-weight: 500; color: var(--azul); letter-spacing: -0.03em; }
.cifras dt { color: var(--tinta-3); font-size: var(--type-small); line-height: 20px; margin-top: 4px; }

/* Contacto */
.contacto { display: grid; gap: var(--s-4); }
.contacto-texto { display: grid; gap: var(--s-3); align-content: start; }
.contacto-texto > p { color: var(--tinta-2); font-size: 18px; line-height: 1.5; max-width: 28em; }
.datos { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-1); }
.datos li { color: var(--tinta-2); }
.datos a { text-decoration: none; color: var(--tinta); font-weight: 500; border-bottom: 1px solid var(--linea); }
.datos a:hover { border-color: var(--naranja); }
.formulario { background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); padding: var(--s-3); display: grid; gap: var(--s-2); }
.formulario label { display: grid; gap: 6px; font-weight: 500; font-size: var(--type-small); line-height: 20px; }
.formulario input, .formulario select { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--linea); border-radius: var(--radio); background: #fff; color: var(--tinta); width: 100%; }
.formulario input:focus, .formulario select:focus { outline: 2px solid var(--azul); outline-offset: 0; border-color: var(--azul); }
.formulario .boton { margin-top: var(--s-1); }
.nota { font-size: var(--type-label); line-height: 18px; color: var(--tinta-3); }

/* Pie: logo, ligas, oficina, contacto */
.pie { background: var(--azul); color: rgba(255,255,255,0.72); padding: var(--s-8) 0 calc(var(--s-6) + 56px); font-size: var(--type-small); line-height: 22px; }
.pie-grid { display: grid; gap: var(--s-6); }
.pie-marca { display: grid; gap: var(--s-2); max-width: 24em; }
.pie-marca img { height: 44px; width: auto; }
.pie h4 { color: #fff; margin-bottom: var(--s-2); }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pie a { color: rgba(255,255,255,0.86); text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pie address { font-style: normal; }
.pie-bajo { border-top: 1px solid rgba(255,255,255,0.14); margin-top: var(--s-6); padding-top: var(--s-3); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); justify-content: space-between; font-size: var(--type-label); line-height: 18px; color: rgba(255,255,255,0.55); }
.pie-bajo a { color: rgba(255,255,255,0.72); }

/* WhatsApp fijo */
.wa-fijo { position: fixed; right: 16px; bottom: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; background: var(--verde-wa); color: #fff; text-decoration: none; font-weight: 500; font-size: 15px; padding: 12px; border-radius: 999px; }
.wa-fijo span { display: none; }
.wa-fijo:active { transform: scale(0.97); }

/* Tablet */
@media (min-width: 720px) {
  .cabecera-interior { min-height: 72px; }
  .marca img { height: 40px; }
  .nav { display: flex; }
  .boton-cabecera .largo { display: inline; }
  .boton-cabecera .corto { display: none; }
  .portada { padding-block: var(--s-8) 0; }
  .portada-grid { grid-template-columns: 1fr 1fr; gap: var(--col-gap); align-items: center; }
  .distingue { margin-top: var(--s-8); }
  .distingue ul { grid-template-columns: repeat(3, 1fr); }
  .servicios { grid-template-columns: repeat(2, 1fr); }
  .obras { grid-template-columns: repeat(2, 1fr); }
  .obras .ancha { grid-column: span 2; }
  .pasos { grid-template-columns: repeat(3, 1fr); }
  .equipo { grid-template-columns: 1.3fr 1fr; gap: var(--s-8); align-items: center; }
  .contacto { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .formulario { padding: var(--s-4); }
  .pie-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .wa-fijo { padding: 12px 18px 12px 14px; }
  .wa-fijo span { display: inline; }
}
/* Escritorio */
@media (min-width: 1000px) {
  .cabecera-interior { min-height: 80px; }
  .telefono { display: inline; }
  .portada-grid { grid-template-columns: 5fr 6fr; gap: var(--s-8); }
  .portada-foto img { aspect-ratio: 5 / 4; }
  .distingue ul { grid-template-columns: repeat(6, 1fr); gap: var(--s-4) var(--s-3); }
  .distingue h4 { min-height: 48px; }
  .servicios { gap: var(--s-8) var(--s-6); }
  .pasos { gap: var(--s-6); }
}

/* Páginas de texto */
.texto-legal { max-width: 42em; }
.texto-legal h1 { font-size: var(--type-section); margin-bottom: var(--s-3); }
.texto-legal h2 { font-size: var(--type-subhead); margin: var(--s-4) 0 var(--s-1); }

/* Blog (2-nov-2026): misma escala, colores y fotos que la portada; medida de lectura de ~68 caracteres. */
.articulo { padding-block: var(--s-6) var(--seccion); }
.migas { font-size: var(--type-small); line-height: 20px; color: var(--tinta-3); margin-bottom: var(--s-4); }
.migas a { color: var(--tinta-2); text-decoration: none; }
.migas a:hover { color: var(--azul); }
.articulo-cabeza { display: grid; gap: var(--s-2); max-width: 40rem; margin-bottom: var(--s-4); }
.articulo-cabeza .etiqueta { margin-bottom: 0; }
.articulo-cabeza h1 { max-width: 14em; }
.articulo-firma { font-size: var(--type-small); line-height: 20px; color: var(--tinta-3); }
.articulo-foto { margin: 0 0 var(--s-6); max-width: 40rem; }
.articulo-foto img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radio); background: var(--piedra-2); }
.articulo-cuerpo { max-width: 40rem; color: var(--tinta); }
.articulo-cuerpo h2 { font-size: 30px; margin: var(--s-6) 0 var(--s-2); }
.articulo-cuerpo h3 { font-size: 1em; line-height: 1.4; margin: var(--s-3) 0 var(--s-1); color: var(--tinta); }
.articulo-cuerpo h3 + p { margin-top: 0; }
.articulo-cuerpo strong { font-weight: 500; }
.articulo-cuerpo .respuesta { font-size: 18px; line-height: 1.5; padding-block: var(--s-3); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); margin-bottom: var(--s-4); }
.articulo-cuerpo ul { padding-left: 1.2em; margin: var(--s-2) 0; }
.articulo-cuerpo li + li { margin-top: var(--s-1); }
.tabla { overflow-x: auto; margin: var(--s-3) 0; border-top: 1px solid var(--linea); }
.tabla table { border-collapse: collapse; width: 100%; font-size: var(--type-small); line-height: 20px; }
.tabla th, .tabla td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--linea); }
.tabla th { font-size: var(--type-label); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 500; color: var(--tinta-3); white-space: nowrap; }
.tabla td { color: var(--tinta-2); }
.tabla td:first-child { font-weight: 500; color: var(--tinta); min-width: 9em; }
.articulo-cierre { max-width: 40rem; margin-top: var(--s-8); padding-top: var(--s-6); border-top: 1px solid var(--linea); display: grid; gap: var(--s-2); }
.articulo-cierre h2 { font-size: var(--type-subhead); line-height: 1.3; letter-spacing: -0.02em; }
.articulo-cierre p { color: var(--tinta-2); }
.articulo-cierre .acciones { margin-top: var(--s-1); }
.blog-seccion { margin-top: var(--s-6); }
.blog-seccion > h2 { margin-bottom: var(--s-4); }
.blog-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-6) var(--col-gap); }
.blog-lista a { display: grid; gap: var(--s-2); align-content: start; text-decoration: none; }
.blog-lista img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radio); background: var(--piedra-2); }
.blog-lista h3 { margin-top: var(--s-1); }
.blog-lista a:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.blog-lista p { color: var(--tinta-2); }
@media (min-width: 720px) { .blog-lista { grid-template-columns: repeat(2, 1fr); } .articulo-cuerpo { font-size: 18px; line-height: 1.65; } }
@media (min-width: 1000px) { .blog-lista { grid-template-columns: repeat(3, 1fr); gap: var(--s-8) var(--s-6); } }
.sigue { max-width: 40rem; margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--linea); }
.sigue h2 { font-size: var(--type-label); line-height: 20px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tinta-3); margin-bottom: var(--s-2); }
.sigue ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.sigue a { text-decoration: none; font-weight: 500; }
.sigue a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* Obra en curso · galería de La Perla (10-nov-2026) */
.galeria { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.galeria button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radio); overflow: hidden; }
.galeria img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--piedra-2); transition: transform 240ms ease; }
.galeria button:hover img { transform: scale(1.03); }
.galeria button:focus-visible { outline: 2px solid var(--naranja); outline-offset: 2px; }
.galeria .mas { display: none; }
.galeria.todas .mas { display: block; }
.galeria-acciones { margin-top: var(--s-4); flex-wrap: wrap; }
#obra-en-curso .nota { margin-top: var(--s-2); }
.visor { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.visor::backdrop { background: rgba(10, 12, 16, 0.92); }
.visor figure { margin: 0; height: 100%; display: grid; place-items: center; align-content: center; gap: 12px; padding: 56px 16px 24px; }
.visor img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--radio); }
.visor figcaption { color: #fff; font-size: var(--type-small); text-align: center; max-width: 40em; }
.visor button { position: fixed; background: rgba(255, 255, 255, 0.12); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 999px; font-size: 28px; line-height: 1; cursor: pointer; }
.visor button:hover { background: rgba(255, 255, 255, 0.22); }
.visor-cerrar { top: 12px; right: 12px; }
.visor-ant { left: 12px; top: 50%; transform: translateY(-50%); }
.visor-sig { right: 12px; top: 50%; transform: translateY(-50%); }
@media (min-width: 720px) { .galeria { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

/* «En obra ahora» en la portada: una línea sobria que liga a la galería de La Perla (10-nov-2026) */
.en-obra { display: block; text-decoration: none; color: var(--tinta-2); font-size: var(--type-small); line-height: 20px; width: fit-content; border-bottom: 1px solid transparent; transition: color 160ms ease, border-color 160ms ease; }
.en-obra:hover { color: var(--azul); border-color: var(--linea); }
.en-obra::after { content: " →"; color: var(--tinta-3); }
.punto { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--naranja); margin-right: 10px; vertical-align: middle; position: relative; top: -1px; }

/* Plaza La Perla en grande en el título de la obra en curso; liga al Hotel DuBlé (10-nov-2026) */
.titulo-lugar .lugar { display: block; font-size: clamp(40px, 5vw, 64px); line-height: 1.02; letter-spacing: var(--tracking-display); color: var(--azul); margin-top: 6px; }
figcaption a { color: var(--tinta-2); text-underline-offset: 2px; }
figcaption a:hover { color: var(--azul); }
.enlace-fig { font-weight: 500; margin-left: 4px; white-space: nowrap; }
.enlace-fig::after { content: " ↗"; }
#obra-en-curso { border-bottom: 1px solid var(--linea); }
.portada-foto img.derecha { object-position: 72% center; }
