:root {
  color-scheme: light;
  --tinta: #11262b;
  --oscuro: #102c32;
  --verde: #0b5650;
  --luz: #f6dc82;
  --fondo: #f8faf7;
  --borde: #cddbd6;
  font: 100%/1.6 "Instrument Sans", "Segoe UI", sans-serif;
  color: var(--tinta);
  background: var(--fondo);
  hyphens: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
p { text-align: justify; margin: 0 0 1rem; max-width: 65ch; }
a { color: var(--verde); text-underline-offset: .24em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid #08796b; outline-offset: 4px; }
[hidden] { display: none !important; }
.marco { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }
.salto { position: absolute; top: .5rem; left: 1rem; padding: .5rem 1rem; background: white; transform: translateY(-180%); }
.salto:focus { transform: none; z-index: 1; }
.cabecera { background: white; border-bottom: 1px solid var(--borde); }
.barra, .pie, nav { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.6rem; }
.barra { min-height: 4.8rem; justify-content: space-between; padding-block: .75rem; }
.marca { color: var(--tinta); font-weight: 730; text-decoration: none; line-height: 1.15; }
.marca span { display: block; color: var(--verde); }
nav a { font-size: .95rem; font-weight: 600; text-decoration: none; }
nav a:hover { text-decoration: underline; }
.boton {
  --sombra-boton: #102c3252;
  touch-action: manipulation;
  display: inline-flex; align-items: center; gap: .7rem; justify-content: center;
  border: 1px solid transparent; border-radius: .45rem; padding: .7rem 1.15rem;
  background: var(--luz); color: #18251f; font-weight: 700; text-decoration: none;
}
.portada .boton { --sombra-boton: #f6dc8240; }
.boton:not(:disabled):is(:hover, :focus-visible) { filter: brightness(1.06); }
.boton:not(:disabled):active { filter: brightness(.9); }
.boton:disabled { opacity: .7; cursor: wait; }
.boton-oscuro { background: var(--verde); color: white; }
.boton-secundario { color: var(--verde); background: white; border-color: var(--borde); }
.boton-portada { color: white; background: transparent; border-color: #79958f; }
.boton-portada:is(:hover, :focus-visible) { background-color: #ffffff16; }
.acciones { display: flex; flex-wrap: wrap; gap: .7rem; }
.portada { background: var(--oscuro); color: #fff; }
.portada-interior {
  min-height: 29rem; padding-block: 3.5rem; display: grid;
  grid-template-columns: 1.2fr 1fr; align-items: center; gap: clamp(1.5rem, 6vw, 5rem);
}
.portada-foto {
  position: relative; overflow: hidden; align-self: stretch; border-radius: .9rem; border: 1px solid #3d5656;
  isolation: isolate;
  background: radial-gradient(ellipse at 55% 82%, #354e4c, transparent 62%),
    linear-gradient(150deg, #203c40, #0e2429 73%);
}
.portada-foto::after {
  position: absolute; content: ""; inset: auto -18% -28% -18%; height: 49%;
  background: radial-gradient(ellipse at 51% 15%, #ac9267 0, #655b4a 21%, #213737 58%, #0d2328 80%);
  border-top: 1px solid #708277;
  border-radius: 50% 50% 0 0;
}
.haz-de-luz {
  position: absolute; inset: 24% 12% 5% 7%; z-index: 1;
  transform-origin: 53% 0;
  background: radial-gradient(ellipse at 53% 0, #ffdc8a, #e6bd704b 38%, transparent 73%);
  clip-path: polygon(49% 0, 57% 0, 100% 100%, 0 100%);
}
.poste {
  position: absolute; z-index: 2; left: 70%; top: 19%; bottom: 10%; width: 2%;
  border-radius: 3rem 3rem 0 0; background: linear-gradient(90deg, #66817b, #263c3d 48%, #12282b);
}
.poste::before {
  position: absolute; content: ""; width: clamp(3rem, 10vw, 9rem); height: 12%; top: 0; right: 0;
  border-top: clamp(3px, .65vw, 10px) solid #5b726c;
  border-right: 2px solid #324948; border-radius: 0 2rem 0 0;
}
.luminaria {
  position: absolute; z-index: 3; left: 47%; top: 23%; width: 12%; height: 1.9%;
  border-radius: 50%; background: #fff4cb; box-shadow: 0 0 1.5rem .28rem #ffdc8a95;
}
.localidad { color: var(--luz); font-size: .85rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; margin: 0 0 .85rem; }
h1 { font-size: clamp(2.35rem, 5.8vw, 4.45rem); letter-spacing: -.048em; margin-block: .7rem 1.2rem; }
h2 { font-size: clamp(1.65rem, 3.1vw, 2.45rem); letter-spacing: -.025em; }
h3 { font-size: 1.18rem; }
.portada p { color: #dce8e3; max-width: 50ch; margin-bottom: 1.5rem; }
.bloque { padding-block: clamp(2.35rem, 5vw, 4.5rem); }
.superficie { background: #eaf2ee; }
.tarjetas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.tarjeta { border: 1px solid var(--borde); background: white; border-radius: .8rem; padding: clamp(1rem, 2.8vw, 1.65rem); }
.tarjeta a { font-weight: 650; }
.tarjeta a span[aria-hidden="true"] { display: inline-block; }
.tarjeta:focus-within {
  border-color: #62988c;
  box-shadow: 0 .55rem 1.35rem #102c3217;
}
@media (hover: hover) and (pointer: fine) {
  .tarjeta:not(.panel):hover {
    border-color: #62988c;
    box-shadow: 0 .85rem 1.6rem #102c3226;
  }
}
.columnas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(1.4rem, 5vw, 4rem); }
.compromiso { margin-top: 2rem; border-left: .22rem solid var(--verde); padding-left: 1rem; }
.compromiso p, .tarjeta p:last-child { margin-bottom: 0; }
.cuadricula-servicios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.tarjeta-led { margin-top: 1rem; border-left: .25rem solid var(--verde); }
.etapas { margin: 0; padding-left: 1.35rem; }
.etapas li + li, .lista-galeria li + li, .lista-gestion li + li { margin-top: .35rem; }
.etapas li::marker { font-weight: 700; color: var(--verde); }
.proyectos { align-items: center; margin-top: 1.5rem; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.proyecto-foto { min-height: 13rem; border: 1px solid var(--borde); border-radius: .8rem; background: linear-gradient(145deg, #daeae0, #edf3ed); }
.lista-galeria, .lista-gestion { margin: 0; padding-left: 1.25rem; }
.preguntas { margin-top: 2.25rem; }
.categorias div, details { border-top: 1px solid var(--borde); padding: .75rem 0; }
.categorias dt, summary { font-weight: 700; }
.categorias dd { margin: 0; text-align: justify; }
summary { cursor: pointer; }
details p { margin-block: .5rem 0; }
footer { background: var(--oscuro); color: #dce8e3; }
.pie { justify-content: space-between; padding-block: 1.3rem; font-size: .9rem; }
.pie a { color: white; }
.volver { display: inline-block; margin-bottom: 1.25rem; }
.reporte h1 { max-width: 12ch; margin-top: 0; }
.aviso, #estado:not(:empty) { color: #18524c; background: #e8f4ec; padding: .68rem .9rem; border-radius: .4rem; }
.aviso { width: fit-content; }
#estado:not(:empty) { margin-block: .75rem; }
#estado.error { color: #861b21; background: #fff0ed; }
form { display: grid; gap: .8rem; }
form button { justify-self: start; }
label { display: block; font-weight: 650; }
label span, .ayuda { font-size: .9rem; font-weight: 400; color: #435952; }
input, select, textarea {
  display: block; width: 100%; min-width: 0; margin-top: .22rem; padding: .55rem .65rem;
  border: 1px solid #788e85; border-radius: .35rem; background: white; color: var(--tinta);
}
textarea { resize: vertical; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
#mensaje {
  white-space: pre-wrap; overflow-wrap: anywhere; background: #edf3ef;
  padding: 1rem; border-radius: .45rem; margin-bottom: .9rem;
}

@keyframes encendido {
  0%, 14% { opacity: .07; }
  49% { opacity: .45; }
  100% { opacity: 1; }
}
@keyframes entrada-portada {
  from { opacity: .64; transform: translateY(.85rem); }
  to { opacity: 1; transform: none; }
}
@keyframes entrada-seccion {
  from { opacity: .74; transform: translateY(.9rem); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .portada-interior > div:first-child { animation: entrada-portada .65s ease-out both; }
  .luminaria, .haz-de-luz { animation: encendido 1.35s ease-out both; }
  .boton {
    transition: translate .2s ease, scale .16s ease, box-shadow .2s ease,
      filter .18s ease, background-color .18s ease;
  }
  .boton:not(:disabled):focus-visible {
    translate: 0 -.2rem;
    box-shadow: 0 .45rem 1rem var(--sombra-boton);
  }
  .tarjeta { transition: translate .24s ease, box-shadow .24s ease, border-color .24s ease; }
  .tarjeta:not(.panel):focus-within { translate: 0 -.24rem; }
  .tarjeta a span[aria-hidden="true"] { transition: translate .2s ease; }
  .tarjeta a:is(:hover, :focus-visible) span[aria-hidden="true"] { translate: .3rem 0; }
  .panel { animation: entrada-seccion .45s ease-out both; }
  details[open] > p { animation: entrada-seccion .24s ease-out both; }

  @media (hover: hover) and (pointer: fine) {
    .boton:not(:disabled):hover {
      translate: 0 -.2rem;
      box-shadow: 0 .45rem 1rem var(--sombra-boton);
    }
    .tarjeta:not(.panel):hover { translate: 0 -.32rem; }
  }
  .boton:not(:disabled):active {
    translate: 0 .1rem;
    scale: .96;
    box-shadow: 0 .12rem .3rem var(--sombra-boton);
  }

  @supports (animation-timeline: view()) {
    .compromiso, .tarjeta:not(.panel), .proyectos {
      animation: entrada-seccion 1ms ease-out both;
      animation-timeline: view();
      animation-range: entry 0% entry 78%;
    }
    .cuadricula-servicios .tarjeta:nth-child(even), .tarjetas .tarjeta:nth-child(2) {
      animation-range: entry 8% entry 95%;
    }
    .tarjetas .tarjeta:nth-child(3) { animation-range: entry 15% entry 100%; }
  }
}

@media (max-width: 47rem) {
  .portada-interior, .tarjetas, .columnas, .cuadricula-servicios { grid-template-columns: 1fr; }
  .portada-interior { min-height: auto; padding-block: 2.6rem 1.4rem; }
  .portada-foto { min-height: 9rem; }
  .barra nav { order: 3; width: 100%; gap: .4rem 1rem; }
}

@media (max-width: 25rem) {
  .marco { width: calc(100% - 1.5rem); }
  .campos { grid-template-columns: 1fr; }
}

/* Composición con fotografía real y formularios conectados. */
.cabecera { position: relative; z-index: 20; }
.portada-real { position: relative; min-height: min(84vh, 850px); display: grid; align-items: center; isolation: isolate; overflow: hidden; }
.portada-real::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#071a27e8 0%,#071a2790 49%,#071a2710 100%),linear-gradient(0deg,#071a2770,transparent 45%); }
.imagen-portada { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; z-index: -2; }
.portada-texto { padding-block: 6rem; }
.portada-texto h1 { font-size: clamp(2.5rem,5.6vw,5.1rem); max-width: 18ch; }
.portada-texto p { max-width: 46ch; margin-bottom: 1.8rem; color: #edf4f1; }
.credito-portada { position: absolute; bottom: .7rem; right: 1rem; color: #e9eee8; font-size: .7rem; }
.ceja { display: block; color: #38776a; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .75rem; margin-bottom: .8rem; }
.identidad { align-items: start; }
.identidad h2 { max-width: 20ch; }
.servicio-card, .proyecto-card { padding: 0; overflow: hidden; }
.servicio-card > img { width: 100%; height: 240px; object-fit: cover; }
.servicio-copy, .proyecto-copy { padding: 1.35rem; }
.servicio-card p, .proyecto-card p { font-size: .95rem; }
.servicio-card details { margin-top: .5rem; }
.galeria-proyectos { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.1rem; margin-top: 2rem; }
.proyecto-card > img { width: 100%; height: 230px; object-fit: cover; }
.proyecto-copy { display: grid; gap: .4rem; }
.proyecto-copy .boton { justify-self: start; }
.antes-despues { margin-top: 3.5rem; }
.comparacion { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.comparacion figure { margin: 0; }
.comparacion img { width: 100%; height: 330px; object-fit: contain; background: #e3ebe5; border-radius: .7rem; }
.comparacion figcaption { padding-top: .4rem; font-weight: 650; }
.mapa-layout { display: grid; grid-template-columns: 1.8fr 1fr; gap: 1rem; align-items: start; }
#mapa { height: 480px; border-radius: .8rem; background: #bdcac4; z-index: 1; }
#mapa-ficha { max-height: 540px; overflow-y: auto; }
#mapa-ficha img { width: 100%; height: auto; border-radius: .5rem; }
#mapa-ficha p { font-size: .88rem; overflow-wrap: anywhere; }
.pin-mapa span { display: block; width: 21px; height: 21px; border: 3px solid white; box-shadow: 0 2px 7px #0007; border-radius: 50%; }
.pin-mapa:focus-visible { outline: 3px solid #edb85f; border-radius: 50%; }
.capas-mapa { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.capa-mapa { display: flex; align-items: center; gap: .35rem; font-size: .85rem; }
.capa-mapa input { width: auto; margin: 0; }
.lista-intervenciones { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding-top: 1rem; }
dialog { max-width: min(1100px,94vw); width: 100%; max-height: 90vh; border: 1px solid var(--borde); border-radius: 1rem; padding: 1.5rem; color: var(--tinta); }
dialog::backdrop { background: #03151bd4; }
#cerrar-galeria { float: right; margin-bottom: 1rem; }
#galeria-contenido { clear: both; }
.galeria-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
.galeria-grid img { width: 100%; height: 320px; object-fit: contain; background: #eef1ed; border-radius: .4rem; }
.formulario-pagina { max-width: 54rem; }
.formulario-pagina h1 { font-size: clamp(2rem,4vw,3.4rem); }
fieldset { display: grid; gap: .8rem; border: 0; min-width: 0; padding: 0; margin: 0 0 1.2rem; }
legend { font-size: 1.35rem; font-weight: 700; padding: 0 0 .8rem; }
.consentimiento { display: flex; gap: .7rem; align-items: flex-start; font-size: .9rem; font-weight: 400; }
.consentimiento input { width: 1.2rem; height: 1.2rem; flex-shrink: 0; margin-top: .3rem; }
#solicitud { display: grid; gap: .8rem; }
#solicitud button { justify-self: start; }
#consulta { display: grid; gap: 1rem; margin-block: 1.5rem; }
#consulta button { justify-self: start; }
#resultado:empty { display: none; }
.estado-ticket { display: inline-block; padding: .25rem .75rem; color: #155a46; background: #e2f0e7; border-radius: 2rem; font-weight: 650; }
.historial { padding-left: 1.4rem; }
.historial li { margin-bottom: 1rem; }
.legal { max-width: 54rem; }
.legal h1 { font-size: clamp(2rem,4vw,3.4rem); }
.legal h2 { margin-top: 1.8rem; font-size: 1.45rem; }
.pie p { margin: .25rem 0 0; font-size: .8rem; }
@keyframes entrada-fotografia { from { scale: 1.035; opacity: .7; } to { scale: 1; opacity: 1; } }
@media (prefers-reduced-motion: no-preference) {
  .imagen-portada { animation: entrada-fotografia 1.3s ease-out both; }
  .portada-texto { animation: entrada-portada .65s ease-out both; }
  dialog[open] { animation: entrada-seccion .25s ease-out both; }
  nav a { transition: color .18s, translate .18s; }
  nav a:hover { translate: 0 -.15rem; }
  summary, select, input, textarea { transition: border-color .18s, color .18s, box-shadow .18s; }
  summary:hover { color: var(--verde); }
  .leaflet-control-zoom a { transition: scale .16s, background .16s; }
  .leaflet-control-zoom a:hover { scale: 1.08; background: #f6dc82; }
  .leaflet-control-zoom a:active { scale: .94; }
}
@media (max-width: 58rem) {
  .galeria-proyectos { grid-template-columns: 1fr 1fr; }
  .mapa-layout { grid-template-columns: 1fr; }
}
@media (max-width: 42rem) {
  .portada-real { min-height: 650px; }
  .portada-real::after { background: linear-gradient(90deg,#071a27cb,#071a2760),linear-gradient(0deg,#071a2780,transparent); }
  .imagen-portada { object-position: 44% 50%; }
  .portada-texto { padding-block: 4rem; }
  .galeria-proyectos, .comparacion, .galeria-grid { grid-template-columns: 1fr; }
  .galeria-grid img { height: auto; max-height: 500px; }
  .comparacion img { height: 310px; }
  .lista-intervenciones { grid-template-columns: 1fr; }
  #mapa { height: 380px; }
}
