/* ============================================================================
   PORTADA — la usan index.html, trabajos.html, elektron.html, energia-solar.html
   y labelec/index.html. Una foto de obra a sangre, el título abajo a la
   izquierda y una franja al pie que nombra la obra que se está viendo.

   El color de acento sale de la variable --acento de cada página, así que
   Labelec la usa igual pero en naranja. No hace falta editar este archivo.
   ============================================================================ */

/* ========================================================================
   PORTADA (hx) — una foto de obra a sangre, el título abajo a la izquierda
   y una franja que nombra la obra que se está viendo.
   ======================================================================== */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .35s, backdrop-filter .35s; }
.topbar #header, .topbar .cab { position: static; background: transparent; backdrop-filter: none; }
.topbar { background: transparent; }
.topbar.posada { background: rgba(10,16,28,.82); backdrop-filter: blur(14px); }

.hx { position: relative; min-height: min(100vh, 900px); display: flex; align-items: flex-end;
      background: #0a1018; overflow: hidden; }
.hx__fotos { position: absolute; inset: 0; z-index: 0; }
.hx__foto { position: absolute; inset: 0; background-position: center; background-size: cover;
            opacity: 0; transition: opacity 1.2s ease, transform 10s linear; transform: scale(1.03); }
.hx__foto.activa { opacity: 1; transform: scale(1.09); }
/* Velos: oscurece abajo para el texto y a la izquierda para que el título respire */
.hx__velo { position: absolute; inset: 0; z-index: 1; pointer-events: none; background:
    linear-gradient(to top, rgba(8,12,20,.95) 2%, rgba(8,12,20,.66) 32%, rgba(8,12,20,.24) 62%, rgba(8,12,20,.58) 100%),
    linear-gradient(to right, rgba(8,12,20,.82) 0%, rgba(8,12,20,.25) 48%, transparent 72%); }

.hx__cont { position: relative; z-index: 2; width: 100%; padding-bottom: 112px; }
.hx .eyebrow { margin-bottom: 14px; }
.hx h1 { font-size: clamp(2.1rem, min(4.4vw, 7vh), 3.6rem); font-weight: 800; letter-spacing: -.03em;
         line-height: 1.05; margin-bottom: 18px; max-width: 23ch; text-shadow: 0 2px 30px rgba(0,0,0,.55); }
.hx__bajada { color: #d3dded; font-size: 1.05rem; max-width: 50ch; margin-bottom: 30px;
             text-shadow: 0 1px 14px rgba(0,0,0,.6); }
.hx .volver { display: table; color: #c3cfe1; font-size: .9rem; margin-bottom: 20px;
              text-shadow: 0 1px 10px rgba(0,0,0,.7); transition: color .2s; }
.hx .volver:hover { color: var(--acento); }
.hx .hero__acciones { display: flex; gap: 14px; flex-wrap: wrap; }
.hx .btn--ghost { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.07); backdrop-filter: blur(6px); }

/* Franja de abajo: qué obra se está viendo */
.hx__pie { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
           border-top: 1px solid rgba(255,255,255,.14);
           background: rgba(8,12,20,.5); backdrop-filter: blur(12px); }
.hx__pie .contenedor, .hx__pie .wrap { display: flex; align-items: center; gap: 16px; height: 62px; }
.hx__num { font-family: var(--display); font-weight: 700; font-size: .82rem; color: var(--acento); letter-spacing: .08em; }
.hx__obra { font-size: .86rem; color: #c3cfe1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx__obra b { color: var(--texto); font-weight: 600; }
.hx__indice { margin-left: auto; display: flex; align-items: center; gap: 9px; padding-right: 76px; }
.hx__indice button { width: 26px; height: 3px; border: 0; padding: 0; border-radius: 2px; cursor: pointer;
                     background: rgba(255,255,255,.3); transition: background .3s, width .3s; }
.hx__indice button.activo { background: var(--acento); width: 42px; }

/* Banda de cifras, justo debajo de la portada */
.cifras { background: var(--fondo-alt); border-bottom: 1px solid var(--borde); }
.cifras .contenedor { display: flex; align-items: center; gap: 0; padding: 34px 0; }
.cifras .stat { flex: 1; border-right: 1px solid var(--borde); padding-right: 20px; display: flex; align-items: center; gap: 14px; }
.cifras .stat__ico { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center;
                     background: rgba(0,194,255,.1); border: 1px solid rgba(0,194,255,.28); }
.cifras .stat__ico svg { width: 17px; height: 17px; fill: none; stroke: var(--acento); stroke-width: 1.8; }
.cifras .stat__n { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1; margin-bottom: 4px; }
.cifras .stat__t { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--texto-suave); line-height: 1.35; }
.cifras .stat + .stat { padding-left: 24px; }
.hx__frase { flex: 0 0 300px; padding-left: 30px; }
.hx__frase b { display: block; font-family: var(--display); font-size: .95rem; }
.hx__frase b + b { color: var(--acento); margin-bottom: 6px; }
.hx__frase p { font-size: .83rem; color: var(--texto-suave); }

/* Banda de qué hacemos */
.hx__valores { background: var(--fondo); border-bottom: 1px solid var(--borde); }
.hx__valores .contenedor { display: grid; grid-template-columns: repeat(4, 1fr); }
.hx__valores .valor { display: flex; align-items: center; gap: 13px; padding: 22px 22px 22px 0; }
.hx__valores .valor + .valor { border-left: 1px solid var(--borde); padding-left: 24px; }

@media (max-width: 1080px) {
  .hx { min-height: 86vh; }
  .hx__cont { padding-bottom: 96px; }
  .hx__velo { background: linear-gradient(to top, rgba(8,12,20,.96) 4%, rgba(8,12,20,.6) 42%, rgba(8,12,20,.3) 100%); }
  .cifras .contenedor { flex-wrap: wrap; gap: 24px 0; padding: 28px 0; }
  .cifras .stat { flex: 0 0 50%; border-right: 0; padding-left: 0 !important; }
  .hx__frase { flex: 1 1 100%; padding: 20px 0 0; border-top: 1px solid var(--borde); }
  .hx__valores .contenedor { grid-template-columns: 1fr 1fr; }
  .hx__valores .valor + .valor { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
  .hx h1 { max-width: none; }
  .hx__obra { font-size: .76rem; }
  .hx__indice { padding-right: 68px; }
  .hx__pie .contenedor, .hx__pie .wrap { height: 54px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx__foto, .hx__foto.activa { transition: opacity .3s; transform: none; }
}

/* Logo y lema de la empresa, cuando la portada es de Elektron o Labelec */
.hx__logo {
  height: 62px; width: auto; max-width: 320px; margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff, #e9eef7);
  padding: 10px 18px; border-radius: 12px; box-sizing: content-box; object-fit: contain;
  border: 1px solid color-mix(in srgb, var(--acento) 45%, transparent);
  box-shadow: 0 6px 24px -8px rgba(0,0,0,.7);
}
.hx__lema {
  display: block; color: var(--acento); font-family: var(--display); font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; font-size: .86rem; margin-bottom: 18px;
  text-shadow: 0 1px 10px rgba(0,0,0,.7);
}
@media (max-width: 560px) { .hx__logo { height: 46px; padding: 8px 14px; } }
