/* Constructora HPP — hoja de estilos del sitio. Tokens y reglas en design-system.md */
:root {
  --hpp-navy: #223345;
  --navy-deep: #152230;
  --hpp-teal: #22B5C3;
  --teal-ink: #0B6E79;
  --teal-soft: #7FD8E0;
  --ink: #0D1216;
  --muted: #56626D;
  --paper: #FFFFFF;
  --mist: #F2F4F5;
  --line: #D6DBDF;
  --pending: #B4530A;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1310px;
  --gutter: 40px;
  --section: clamp(72px, 9vw, 128px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 84px;
}
@media (max-width: 720px) { :root { --gutter: 16px; --header-h: 68px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal-soft); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--hpp-navy); color: #fff; padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--mist { background: var(--mist); }
.section--dark { background: var(--navy-deep); color: #fff; }

/* ---------- Tipografía ---------- */
.display-xl, .display, .h3, .cifra, .wordmark {
  font-weight: 800; text-transform: uppercase; margin: 0; text-wrap: balance;
}
.display-xl { font-size: clamp(40px, 5.6vw, 84px); line-height: .92; letter-spacing: -.02em; font-variation-settings: "wdth" 118; }
.display { font-size: clamp(32px, 4.2vw, 60px); line-height: .96; letter-spacing: -.015em; font-variation-settings: "wdth" 115; }
.h3 { font-size: clamp(24px, 2.4vw, 36px); line-height: 1; letter-spacing: -.01em; font-variation-settings: "wdth" 112; }
.h5 { margin: 0; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.15; font-weight: 800; text-transform: uppercase; letter-spacing: .005em; font-variation-settings: "wdth" 112; text-wrap: balance; }
.cifra { font-size: clamp(44px, 5vw, 76px); line-height: .9; letter-spacing: -.02em; font-variation-settings: "wdth" 112; font-variant-numeric: tabular-nums; }
.lede { font-size: clamp(18px, 1.4vw, 20px); line-height: 1.45; color: var(--muted); max-width: 40ch; margin: 0; }
.section--dark .lede, .on-photo .lede { color: rgba(255,255,255,.82); }
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1.1em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-variation-settings: "wdth" 112; line-height: 1;
}
.eyebrow::before {
  content: ""; width: 14px; height: 9px; flex: none; background: var(--hpp-teal);
  clip-path: polygon(50% 0, 100% 78%, 100% 100%, 50% 30%, 0 100%, 0 78%);
}
.dato { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.section--dark .dato, .on-photo .dato { color: rgba(255,255,255,.66); }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--hpp-teal); --btn-fg: var(--hpp-navy); --chip: var(--hpp-navy); --chip-fg: var(--hpp-teal);
  display: inline-flex; align-items: center; gap: 18px; min-height: 52px; padding: 0 14px 0 22px;
  background: var(--btn-bg); color: var(--btn-fg); border: 0; border-radius: 0; cursor: pointer;
  font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  font-variation-settings: "wdth" 110; line-height: 1.1;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.btn__chip {
  width: 22px; height: 22px; flex: none; display: grid; place-items: center; background: var(--chip); color: var(--chip-fg);
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.btn__chip svg { width: 10px; height: 10px; }
@media (hover: hover) {
  .btn:hover { --btn-bg: var(--hpp-navy); --btn-fg: #fff; --chip: var(--hpp-teal); --chip-fg: var(--hpp-navy); }
  .btn:hover .btn__chip { transform: translateX(4px); }
  .section--dark .btn:hover, .on-photo .btn:hover { --btn-bg: #fff; --btn-fg: var(--hpp-navy); }
}
.btn:active { transform: translateY(1px); }
.btn--ghost { --btn-bg: transparent; --btn-fg: currentColor; box-shadow: inset 0 0 0 1.5px currentColor; color: inherit; }
.btn--ghost .btn__chip { --chip: currentColor; }
.btn--ghost .btn__chip svg { color: var(--paper); }
.section--dark .btn--ghost .btn__chip svg, .on-photo .btn--ghost .btn__chip svg { color: var(--navy-deep); }

.link {
  display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none; color: var(--teal-ink); font-variation-settings: "wdth" 110;
  background: linear-gradient(currentColor, currentColor) 0 100% / 30% 2px no-repeat; padding-bottom: 5px;
  transition: background-size .25s var(--ease);
}
.link:hover { background-size: 100% 2px; }
.section--dark .link, .on-photo .link { color: var(--teal-soft); }

.tag {
  display: inline-block; background: var(--hpp-navy); color: #fff; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; padding: 5px 9px; line-height: 1.2; font-variation-settings: "wdth" 105;
}
.section--dark .tag { background: #fff; color: var(--navy-deep); }

.pendiente {
  display: inline-block; border: 1.5px dashed var(--pending); color: var(--pending); background: #FFF6EE;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; line-height: 1.3;
}
.section--dark .pendiente, .on-photo .pendiente { background: rgba(255,246,238,.95); }
.foto-pendiente {
  display: grid; place-items: center; text-align: center; background: repeating-linear-gradient(135deg, #EEF0F2 0 14px, #F6F7F8 14px 28px);
  border: 1.5px dashed var(--pending); color: var(--pending); font-weight: 700; font-size: 13px; letter-spacing: .1em;
  text-transform: uppercase; padding: 24px; width: 100%; height: 100%;
}

.obra-row > *, .obras-grid > *, .servicio > *, .cifras > *, .siguiente > *, .contacto > *, .obra-cuerpo > *, .lineas > *, .hechos > *, .pie__card > *, .galeria > * { min-width: 0; }

/* ---------- Cabecera (transparente sobre la foto, sólida al bajar) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; color: #fff; background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.3);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-solid, .site-header.is-open { background: var(--paper); color: var(--ink); border-bottom-color: var(--line); }
.site-header__in { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 50px; height: auto; }
.brand__pos { display: none; }
.is-solid .brand__pos, .is-open .brand__pos { display: block; }
.is-solid .brand__neg, .is-open .brand__neg { display: none; }
.is-solid .brand, .is-open .brand { color: var(--hpp-navy); }
.brand span { font-weight: 800; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; line-height: 1.05; font-variation-settings: "wdth" 118; }
.brand small { display: block; font-size: 10.5px; letter-spacing: .2em; font-weight: 600; color: rgba(255,255,255,.72); }
.is-solid .brand small, .is-open .brand small { color: var(--muted); }
.nav { display: flex; align-items: center; gap: 30px; align-self: stretch; }
.nav > a:not(.btn) {
  display: flex; align-items: center; height: 100%; position: relative; text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; font-variation-settings: "wdth" 108;
}
.nav > a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .2s var(--ease); }
.nav > a:not(.btn):hover::after, .nav > a[aria-current="page"]::after { transform: scaleX(1); }
.nav-toggle { display: none; }
@media (max-width: 980px) {
  .site-header__in { gap: 12px; }
  .site-header__in > .btn-linea { display: none; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px; background: none; border: 1.5px solid currentColor; color: inherit;
    min-height: 44px; padding: 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  }
  .nav-toggle i { width: 16px; height: 2px; background: currentColor; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: var(--paper); color: var(--ink); flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; border-bottom: 1px solid var(--line); display: none; align-self: auto;
  }
  .nav.is-open { display: flex; }
  .nav > a:not(.btn) { height: auto; padding: 16px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav > a:not(.btn)::after { display: none; }
  .nav .btn { display: inline-flex; margin-top: 20px; justify-content: space-between; }
}
.is-solid .nav > a:not(.btn)::after { background: var(--hpp-teal); }
@media (min-width: 981px) { .nav .btn { display: none; } }
/* Botón de línea: acción secundaria de la cabecera */
.btn-linea {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border: 1px solid currentColor; color: inherit;
  font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; font-variation-settings: "wdth" 110;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.btn-linea:hover { background: #fff; color: var(--hpp-navy); border-color: #fff; }
.is-solid .btn-linea { color: var(--hpp-navy); }
.is-solid .btn-linea:hover { background: var(--hpp-navy); color: #fff; border-color: var(--hpp-navy); }

/* ---------- Hero de inicio (mecánicas medidas en el Figma: bar.md) ---------- */
.hero {
  --stat-w: 320px; --regla: rgba(255,255,255,.3);
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  min-height: max(720px, 100svh); padding-top: var(--header-h);
  color: #fff; background: var(--navy-deep); overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.001); transition: opacity 1.2s var(--ease), transform 9s linear;
  filter: saturate(.78) contrast(.96);
}
.hero__media img.is-active { opacity: 1; transform: scale(1.05); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6,10,14,.72) 0%, rgba(6,10,14,.6) 58%, rgba(6,10,14,.68) 100%);
}
.hero__lines { position: absolute; inset: 0; pointer-events: none; }
.hero__lines .wrap { position: relative; height: 100%; }
.hero__lines i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--regla); }
.hero__lines i:first-child { right: calc(var(--gutter) + var(--stat-w)); }
.hero__lines i:last-child { right: var(--gutter); }
.hero__fila { position: relative; border-bottom: 1px solid var(--regla); }
.hero__fila--pie { border-bottom: 0; flex: 1; display: flex; align-items: flex-end; }
.hero__titular { padding-block: 32px; }
.hero__h1 {
  margin: 0 0 48px; max-width: 13em;
  font-size: clamp(40px, 4.6vw, 78px); line-height: 1.02; letter-spacing: -.025em;
  font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 112;
}
.hero__accion { display: flex; align-items: center; gap: 32px; }
.hero__accion .btn { min-height: 54px; flex: none; }
.hero__h1 > span { display: inline-block; }
.hero__accion p { margin: 0; max-width: 340px; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.5; color: rgba(255,255,255,.9); text-wrap: pretty; }
.hero__prueba-in { display: flex; justify-content: space-between; align-items: stretch; gap: 40px; }
.hero__prueba { display: flex; align-items: center; align-self: flex-end; padding-bottom: 32px; }
.hero__num { margin: 0 18px 0 0; font-size: clamp(46px, 4vw, 64px); font-weight: 800; line-height: .9; letter-spacing: -.035em; font-variation-settings: "wdth" 96; font-variant-numeric: tabular-nums; }
.hero__thumbs { display: flex; align-items: center; }
.hero__thumbs button, .hero__mas {
  position: relative; flex: none; width: 50px; height: 50px; margin-right: -6px; padding: 0;
  border: 1px solid #fff; background: var(--navy-deep); cursor: pointer;
}
.hero__thumbs button img { width: 100%; height: 100%; object-fit: cover; opacity: .72; transition: opacity .2s var(--ease); }
.hero__thumbs button:hover img, .hero__thumbs button[aria-pressed="true"] img { opacity: 1; }
.hero__thumbs button[aria-pressed="true"] { z-index: 2; box-shadow: 0 0 0 2px #fff; }
.hero__mas {
  display: grid; place-items: center; margin-right: 0; background: var(--hpp-teal); color: var(--hpp-navy);
  text-decoration: none; z-index: 1;
}
.hero__mas svg { width: 14px; height: 14px; transition: transform .18s var(--ease); }
.hero__mas:hover svg { transform: translateX(3px); }
.hero__mas:hover { background: #fff; }
.hero__prueba-txt { display: grid; gap: 6px; margin: 0 0 0 22px; line-height: 1.35; }
.hero__prueba-txt span { font-size: 16px; line-height: 1.5; color: #fff; text-wrap: balance; }
.hero__stat {
  flex: none; width: var(--stat-w); min-height: 270px; padding: 24px 30px 26px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  background: var(--hpp-teal); color: var(--hpp-navy); text-decoration: none; transition: background-color .18s var(--ease);
}
.hero__stat:hover { background: #fff; }
.hero__stat:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hero__stat-cifra {
  font-size: clamp(46px, 4vw, 64px); line-height: .9; letter-spacing: -.035em; font-weight: 800; white-space: nowrap;
  font-variation-settings: "wdth" 96; font-variant-numeric: tabular-nums;
}
.hero__stat-cifra small { display: block; margin-top: 6px; font-size: .42em; line-height: 1; letter-spacing: 0; font-variation-settings: "wdth" 100; }
.hero__stat-pie { display: grid; gap: 8px; }
.hero__stat-linea { font-size: 16px; line-height: 1.5; white-space: nowrap; }
.hero__pie-in { display: flex; justify-content: flex-end; width: 100%; padding-block: 18px 22px; }
.hero__pausa {
  flex: none; width: var(--stat-w); min-height: 40px; padding: 0 30px; background: none; border: 0; cursor: pointer; text-align: left;
  color: rgba(255,255,255,.85); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-variation-settings: "wdth" 110;
}
.hero__pausa:hover { color: #fff; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  .hero__media img, .hero__media img.is-active { transform: none; transition: none; }
  .hero__pausa { display: none; }
}
@media (max-width: 860px) {
  .hero { --stat-w: 0px; min-height: 100svh; }
  .hero__lines { display: none; }
  .hero__titular { padding-block: 28px 30px; }
  .hero__h1 { margin-bottom: 22px; font-size: clamp(34px, 9.4vw, 54px); }
  .hero__accion { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero__accion p { order: -1; font-size: 17px; }
  .hero__prueba-in { flex-direction: column; gap: 0; }
  .hero__prueba { align-self: stretch; padding-block: 22px; flex-wrap: wrap; row-gap: 14px; }
  .hero__stat { width: 100%; min-height: 150px; padding: 20px 22px 22px; gap: 14px; }
  .hero__stat-cifra { font-size: 46px; }
  .hero__pie-in { padding-block: 12px 16px; }
  .hero__pausa { width: auto; padding: 0; }
  .hero__h1 > span { display: inline; }
}
@media (max-width: 420px) {
  .hero__thumbs button, .hero__mas { width: 44px; height: 44px; }

  .hero__prueba-txt { margin-left: 16px; }
}

/* ---------- Hero interior ---------- */
.page-hero { position: relative; min-height: 560px; padding-top: var(--header-h); display: flex; align-items: flex-end; color: #fff; background: var(--navy-deep); overflow: hidden; }
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,16,22,.62) 0%, rgba(10,16,22,.3) 38%, rgba(10,16,22,.76) 100%); }
.page-hero .wrap { position: relative; z-index: 2; padding-block: 72px 64px; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { margin-top: 22px; max-width: 54ch; }
.migas { display: flex; gap: 10px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 26px; color: rgba(255,255,255,.75); }
.migas a { text-decoration: none; color: #fff; }
.migas a:hover { text-decoration: underline; }
@media (max-width: 720px) { .page-hero { min-height: 460px; } .page-hero .wrap { padding-block: 48px 40px; } }

/* ---------- Declaración + cifras ---------- */
.intro { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
.intro > .eyebrow { align-self: start; margin-top: 14px; }
.intro__say { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.08; font-weight: 700; letter-spacing: -.015em; margin: 0 0 40px; font-variation-settings: "wdth" 108; text-wrap: balance; }
.intro__say em { font-style: normal; color: var(--teal-ink); }
.intro__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; max-width: 820px; }
.intro__cols p { margin: 0; color: var(--muted); }
.cifras { display: grid; grid-template-columns: 1.05fr 1fr 1fr; grid-template-rows: auto auto; gap: 12px; margin-top: 72px; }
.cifras__foto { grid-row: span 2; position: relative; min-height: 520px; background: var(--mist); }
.cifras__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cifra-box { background: var(--mist); padding: 28px 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 254px; }
.cifra-box .cifra { font-size: clamp(44px, 4.4vw, 68px); color: inherit; max-width: none; line-height: .9; }
.cifra-box p:not(.cifra) { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); max-width: 28ch; }
.cifra-box--navy { background: var(--hpp-navy); color: #fff; }
.cifra-box--navy p:not(.cifra) { color: rgba(255,255,255,.8); }
.cifra-box--foto { padding: 0; position: relative; overflow: hidden; }
.cifra-box--foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cifra small { font-size: .42em; letter-spacing: 0; margin-left: .08em; text-transform: none; }
@media (max-width: 980px) {
  .intro { grid-template-columns: 1fr; gap: 0; }
  .cifras { grid-template-columns: 1fr 1fr; }
  .cifras__foto { grid-column: span 2; grid-row: auto; min-height: 340px; }
}
@media (max-width: 560px) {
  .intro__cols { grid-template-columns: 1fr; gap: 18px; }
  .cifras { grid-template-columns: 1fr; }
  .cifras__foto { grid-column: auto; }
  .cifra-box { min-height: 0; gap: 22px; }
  .cifra-box--foto { min-height: 240px; }
}

/* ---------- Clientes (marquesina) ---------- */
.clientes { padding-block: 56px 64px; border-top: 1px solid var(--line); }
.clientes__label { text-align: center; margin: 0 0 28px; }
.marquee { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 0; margin: 0; padding: 0; list-style: none; }
.marquee li { display: flex; align-items: center; gap: 56px; padding-right: 56px; white-space: nowrap; font-size: clamp(18px, 1.8vw, 24px); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; color: var(--hpp-navy); font-variation-settings: "wdth" 115; }
.marquee li::after { content: ""; width: 12px; height: 8px; background: var(--hpp-teal); clip-path: polygon(50% 0, 100% 78%, 100% 100%, 50% 30%, 0 100%, 0 78%); }
.marquee li span { font-weight: 500; color: var(--muted); font-size: .72em; margin-left: 10px; letter-spacing: .04em; font-variation-settings: "wdth" 100; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask: none; mask: none; }
  .marquee__track { animation: none; width: auto; }
  .marquee ul { flex-wrap: wrap; justify-content: center; row-gap: 14px; }
  .marquee ul[aria-hidden] { display: none; }
}

/* ---------- Cabecera de sección ---------- */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 64px; }
.sec-head .display { max-width: 15ch; }
.sec-head--center { flex-direction: column; align-items: center; text-align: center; }
.sec-head--center .display { max-width: 18ch; }
.sec-head p.lede { max-width: 38ch; }
@media (max-width: 860px) { .sec-head { flex-direction: column; align-items: flex-start; margin-bottom: 44px; gap: 22px; } .sec-head--center { align-items: center; } }

/* ---------- Obras en zigzag ---------- */
.obras-lista { display: grid; gap: clamp(56px, 7vw, 96px); }
.obra-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 60px); align-items: stretch; }
.obra-row:nth-child(even) .obra-row__foto { order: 2; }
.obra-row__foto { position: relative; aspect-ratio: 4 / 3; width: 100%; align-self: start; overflow: hidden; background: var(--mist); display: block; }
.obra-row__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.obra-row__foto:hover img { transform: scale(1.03); }
.obra-row__body { display: flex; flex-direction: column; padding-block: 8px; }
.obra-row__body .tag { align-self: flex-start; margin-bottom: 22px; }
.obra-row__body .h3 { margin-bottom: 10px; }
.obra-row__body .h3 a { text-decoration: none; }
.obra-row__body .h3 a:hover { color: var(--teal-ink); }
.obra-row__lugar { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 20px; }
.obra-row__body > p { margin: 0 0 28px; color: var(--muted); max-width: 52ch; }
.obra-row__body .ficha { margin-top: auto; margin-bottom: 28px; }
@media (max-width: 860px) {
  .obra-row { grid-template-columns: 1fr; }
  .obra-row:nth-child(even) .obra-row__foto { order: 0; }
}

/* ---------- Cajetín (ficha técnica) ---------- */
.ficha { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); margin: 0; }
.ficha > div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.ficha > div:nth-child(odd) { padding-right: 20px; border-right: 1px solid var(--line); }
.ficha > div:nth-child(even) { padding-left: 20px; }
.ficha dt { margin: 0 0 4px; }
.ficha dd { margin: 0; font-weight: 600; font-size: 15px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.ficha--wide { grid-template-columns: repeat(4, 1fr); }
.ficha--wide > div { border-right: 1px solid var(--line); padding: 18px 20px; }
.ficha--wide > div:first-child { padding-left: 0; }
.ficha--wide > div:last-child { border-right: 0; }
.section--dark .ficha, .section--dark .ficha > div { border-color: rgba(255,255,255,.18); }
@media (max-width: 860px) {
  .ficha--wide { grid-template-columns: 1fr 1fr; }
  .ficha--wide > div { padding: 14px 16px 14px 0; border-right: 0; }
  .ficha--wide > div:nth-child(odd) { padding-right: 20px; border-right: 1px solid var(--line); }
  .ficha--wide > div:nth-child(even) { padding-left: 20px; }
}
@media (max-width: 420px) {
  .ficha, .ficha--wide { grid-template-columns: 1fr; }
  .ficha > div:nth-child(n), .ficha--wide > div:nth-child(n) { padding: 12px 0; border-right: 0; }
}

/* ---------- Líneas de obra (banda oscura) ---------- */
.lineas { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid rgba(255,255,255,.18); }
.linea { display: grid; grid-template-columns: 64px 1fr; gap: 0 24px; padding: 40px 40px 44px 0; border-bottom: 1px solid rgba(255,255,255,.18); }
.linea:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.18); }
.linea:nth-child(even) { padding-left: 40px; }
.linea__img { width: 64px; height: 64px; object-fit: cover; grid-row: span 3; }
.linea .h3 { font-size: clamp(22px, 2vw, 30px); margin-bottom: 12px; }
.linea p { margin: 0 0 18px; color: rgba(255,255,255,.78); font-size: 16px; max-width: 46ch; }
.linea__obras { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.lineas-pie { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 44px; flex-wrap: wrap; }
.lineas-pie p { margin: 0; color: rgba(255,255,255,.8); }
@media (max-width: 860px) {
  .lineas { grid-template-columns: 1fr; }
  .linea, .linea:nth-child(even) { padding: 32px 0; border-right: 0; grid-template-columns: 52px 1fr; gap: 0 18px; }
  .linea__img { width: 52px; height: 52px; }
}

/* ---------- Banda de foto ---------- */
.banda { position: relative; color: #fff; background: var(--navy-deep); overflow: hidden; }
.banda > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banda::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(10,16,22,.78) 0%, rgba(10,16,22,.35) 45%, rgba(10,16,22,.82) 100%); }
.banda .wrap { position: relative; z-index: 2; padding-block: var(--section); min-height: 760px; display: flex; flex-direction: column; justify-content: space-between; gap: 120px; }
.banda__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.banda__top .display { max-width: 16ch; }
.hechos { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.4); }
.hecho { padding: 28px 32px 0 0; }
.hecho + .hecho { padding-left: 32px; border-left: 1px solid rgba(255,255,255,.4); }
.hecho h3 { margin: 0 0 12px; }
.hecho p { margin: 0; color: rgba(255,255,255,.85); font-size: 16px; max-width: 34ch; }
@media (max-width: 860px) {
  .banda .wrap { min-height: 0; gap: 64px; }
  .hechos { grid-template-columns: 1fr; }
  .hecho, .hecho + .hecho { padding: 24px 0; border-left: 0; border-bottom: 1px solid rgba(255,255,255,.3); }
}

/* ---------- Cierre + pie ---------- */
.cierre { position: relative; color: #fff; background: var(--navy-deep); overflow: hidden; }
.cierre > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cierre::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(10,16,22,.62); }
.cierre__cta { position: relative; z-index: 2; text-align: center; padding-block: clamp(96px, 11vw, 150px) clamp(72px, 8vw, 110px); }
.cierre__cta .display { max-width: 15ch; margin-inline: auto; }
.cierre__cta p { margin: 22px auto 34px; max-width: 46ch; color: rgba(255,255,255,.86); font-size: 18px; }
.pie { position: relative; z-index: 2; }
.pie__card { background: var(--paper); color: var(--ink); padding: clamp(28px, 4vw, 52px); display: grid; grid-template-columns: 1.3fr .8fr 1.2fr; gap: 40px; }
.pie__logo img { width: 150px; }
.pie__logo p { margin: 22px 0 0; color: var(--muted); font-size: 15px; max-width: 32ch; }
.pie__nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; align-content: start; }
.pie__nav a { text-decoration: none; font-weight: 600; font-size: 16px; }
.pie__nav a:hover { color: var(--teal-ink); text-decoration: underline; }
.pie__contacto { display: grid; gap: 16px; align-content: start; }
.pie__contacto .dato { display: block; margin-bottom: 4px; }
.pie__dato { font-weight: 600; font-size: 16px; line-height: 1.45; text-decoration: none; }
.pie__dato:hover { color: var(--teal-ink); text-decoration: underline; }
.datos__enlace { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.45); }
.datos__enlace:hover { border-bottom-color: #fff; }
.datos .link { margin-top: 10px; }
.pie__legal { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.pie__legal p { margin: 0; }
.wordmark { display: block; text-align: center; color: #fff; font-size: clamp(120px, 31vw, 450px); line-height: .78; letter-spacing: -.04em; font-weight: 900; font-variation-settings: "wdth" 125; padding-top: 28px; margin-bottom: -.06em; user-select: none; opacity: .96; }
@media (max-width: 860px) {
  .pie__card { grid-template-columns: 1fr 1fr; }
  .pie__logo { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .pie__card { grid-template-columns: 1fr; } }

/* ---------- Página de obra ---------- */
.obra-ficha { margin-top: -1px; }
.obra-cuerpo { display: grid; grid-template-columns: 1fr 380px; gap: clamp(40px, 6vw, 96px); align-items: start; }
.obra-cuerpo .prose p:first-child { font-size: clamp(19px, 1.6vw, 22px); line-height: 1.5; color: var(--ink); }
.obra-cuerpo .prose p { color: #33404B; }
.obra-aside { position: sticky; top: calc(var(--header-h) + 24px); background: var(--mist); padding: 28px; }
.obra-aside .cifra { margin: 6px 0 18px; font-size: clamp(36px, 3.4vw, 52px); }
.obra-aside ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; }
.obra-aside li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; font-size: 15px; line-height: 1.45; }
.obra-aside li::before { content: ""; width: 10px; height: 7px; margin-top: 7px; background: var(--hpp-teal); clip-path: polygon(50% 0, 100% 78%, 100% 100%, 50% 30%, 0 100%, 0 78%); }
@media (max-width: 980px) { .obra-cuerpo { grid-template-columns: 1fr; } .obra-aside { position: static; } }

.galeria { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; gap: 10px; }
.galeria button { grid-column: span 4; padding: 0; border: 0; background: var(--mist); cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; position: relative; }
.galeria button:nth-child(5n+1) { grid-column: span 8; grid-row: span 2; aspect-ratio: auto; }
.galeria img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.galeria button:hover img { transform: scale(1.03); }
.galeria--pocas button, .galeria--pocas button:nth-child(5n+1) { grid-column: span 6; grid-row: auto; aspect-ratio: 16 / 9; }
@media (max-width: 720px) {
  .galeria { grid-template-columns: 1fr 1fr; gap: 8px; }
  .galeria button, .galeria button:nth-child(5n+1) { grid-column: span 1; grid-row: auto; aspect-ratio: 1; }
  .galeria button:nth-child(3n+1) { grid-column: span 2; aspect-ratio: 16 / 10; }
  .galeria--pocas button, .galeria--pocas button:nth-child(n) { grid-column: span 2; aspect-ratio: 16 / 9; }
}
.visor { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(8,12,16,.96); color: #fff; }
.visor::backdrop { background: rgba(8,12,16,.9); }
.visor[open] { display: grid; grid-template-rows: auto 1fr auto; }
.visor__top { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.visor figure { margin: 0; display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); }
.visor figure img { max-height: calc(100vh - 150px); width: auto; max-width: 100%; object-fit: contain; }
.visor__nav { display: flex; justify-content: center; gap: 10px; padding: 16px; }
.visor button { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); min-width: 48px; min-height: 48px; cursor: pointer; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; padding: 0 16px; }
.visor button:hover { background: #fff; color: var(--navy-deep); }

.siguiente { display: grid; grid-template-columns: 1fr 1fr; gap: 0; text-decoration: none; background: var(--navy-deep); color: #fff; }
.siguiente__img { position: relative; min-height: 320px; overflow: hidden; }
.siguiente__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.siguiente:hover .siguiente__img img { transform: scale(1.03); }
.siguiente__txt { padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
@media (max-width: 720px) { .siguiente { grid-template-columns: 1fr; } .siguiente__img { min-height: 220px; } }

/* ---------- Listado de obras ---------- */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px; }
.filtros button { background: transparent; border: 1.5px solid var(--hpp-navy); color: var(--hpp-navy); min-height: 44px; padding: 0 16px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.filtros button[aria-pressed="true"] { background: var(--hpp-navy); color: #fff; }
.obras-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 32px; }
.obra-card { text-decoration: none; display: flex; flex-direction: column; gap: 18px; }
.obra-card[hidden] { display: none; }
.obra-card__foto { aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); position: relative; }
.obra-card__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.obra-card:hover .obra-card__foto img { transform: scale(1.03); }
.obra-card__foto .tag { position: absolute; left: 0; top: 0; }
.obra-card .h3 { font-size: clamp(22px, 2vw, 30px); }
.obra-card:hover .h3 { color: var(--teal-ink); }
.obra-card__meta { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.obra-card__meta strong { color: var(--ink); }
@media (max-width: 720px) { .obras-grid { grid-template-columns: 1fr; gap: 44px; } }

/* ---------- Servicios ---------- */
.servicio { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); padding-block: 56px; border-top: 1px solid var(--line); align-items: start; }
.servicio:last-child { border-bottom: 1px solid var(--line); }
.servicio__foto { aspect-ratio: 4 / 3; overflow: hidden; background: var(--mist); }
.servicio__foto img { width: 100%; height: 100%; object-fit: cover; }
.servicio .h3 { margin-bottom: 18px; }
.servicio p { color: var(--muted); max-width: 58ch; margin: 0 0 22px; }
.servicio__obras { display: grid; gap: 0; margin: 26px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.servicio__obras a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.servicio__obras a:hover { color: var(--teal-ink); }
.servicio__obras span { color: var(--muted); font-weight: 400; font-size: 15px; white-space: nowrap; }
@media (max-width: 860px) { .servicio { grid-template-columns: 1fr; padding-block: 40px; } }

/* ---------- Nosotros ---------- */
.instituciones { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.institucion { padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); }
.institucion:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.institucion h3 { margin: 0 0 10px; }
.institucion p { margin: 0; color: var(--muted); font-size: 15.5px; }
.institucion a { color: var(--teal-ink); font-weight: 600; }
@media (max-width: 860px) {
  .instituciones { grid-template-columns: 1fr; }
  .institucion, .institucion:not(:nth-child(3n+1)) { padding: 24px 0; border-left: 0; }
}
.pendientes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pendientes > div { border: 1.5px dashed var(--pending); padding: 26px; background: #FFFAF5; }
.pendientes h3 { margin: 0 0 8px; }
.pendientes p { margin: 0; font-size: 15px; color: var(--muted); }
@media (max-width: 860px) { .pendientes { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contacto { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.campo { display: grid; gap: 8px; }
.campo--full { grid-column: 1 / -1; }
.campo label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 52px; border: 1.5px solid #AEB6BD; border-radius: 0; background: var(--paper); padding: 12px 14px; font-size: 16px;
  transition: border-color .15s var(--ease);
}
.campo textarea { min-height: 150px; resize: vertical; }
.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: var(--hpp-navy); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--hpp-navy); box-shadow: 0 0 0 3px var(--teal-soft); }
.campo small { color: var(--muted); font-size: 13.5px; }
.form__pie { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.form__aviso { margin: 0; font-size: 14.5px; color: var(--muted); }
.form__aviso[data-estado="ok"] { color: var(--teal-ink); font-weight: 600; }
.datos { background: var(--navy-deep); color: #fff; padding: clamp(28px, 3vw, 40px); display: grid; gap: 26px; }
.datos .dato { display: block; margin-bottom: 6px; }
.datos p { margin: 0; font-size: 18px; font-weight: 600; }
.contacto__directo .display { margin-bottom: 18px; }
.contacto__directo .lede { margin-bottom: 30px; }
@media (max-width: 860px) { .contacto { grid-template-columns: 1fr; } .form { grid-template-columns: 1fr; } }

/* ---------- Selector de vistas (borrador) ---------- */
.vistas { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; background: var(--ink); padding: 4px; gap: 2px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.vistas a { color: rgba(255,255,255,.75); text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; }
.vistas a[aria-current="true"], .vistas a:hover { background: var(--hpp-teal); color: var(--hpp-navy); }
@media (max-width: 520px) { .vistas { right: 8px; bottom: 8px; } .vistas a { padding: 7px 7px; font-size: 11px; } }
@media print { .vistas, .site-header { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 520px) {
  .brand img { width: 40px; }
  .brand span { font-size: 13px; white-space: nowrap; }
  .brand small { display: none; }
  .display-xl { font-size: clamp(34px, 9.6vw, 44px); }
  .clientes__label { padding-inline: var(--gutter); text-align: center; line-height: 1.5; }
}
