/* Latitud 40 · página INICIO */

/* Hero partido con fondo desenfocado */
/* Mismo aire superior que las cabeceras interiores (.page-hero): sin min-height ni
   align-items:end, que en pantallas altas empujaban toda la portada hacia abajo. */
.hero { display: grid; align-items: start; padding: 150px 0 clamp(48px, 6vw, 88px); overflow: hidden; isolation: isolate; position: relative; }
.hero-bg { position: absolute; inset: -10%; z-index: -2; background: var(--bg); }
.hero-bg .slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(38px) saturate(.8); opacity: 0; transform: scale(1.15); transition: opacity 1.6s var(--ease); }
.hero-bg .slide.is-on { opacity: var(--hero-bg-o); animation: drift 22s var(--ease) infinite alternate; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 30% 40%, transparent, color-mix(in srgb, var(--bg) 55%, transparent) 70%), linear-gradient(to bottom, color-mix(in srgb, var(--bg) 35%, transparent), var(--bg) 92%); }
@keyframes drift { from { transform: scale(1.15) translate(0, 0); } to { transform: scale(1.22) translate(-2%, -3%); } }

/* El pase de fotos (Ken Burns) vive en components.css: lo usan Inicio, Servicios, Seguridad y Trabajos. */
.hero-visual figcaption { display: flex; justify-content: space-between; gap: 16px; }
.hero-visual figcaption #heroPie { transition: opacity .5s var(--ease); }
.hero-visual figcaption #heroPie.fade { opacity: 0; }
.hero-visual figcaption .mono { font-size: calc(11px * var(--k-body, 1)); letter-spacing: .1em; color: var(--dim); white-space: nowrap; }
.hero .wrap { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: end; }
.hero-copy { grid-column: 1 / 8; display: flex; flex-direction: column; align-self: stretch; }
.hero-copy > *:not(.hero-mark) { flex: none; }
.hero-copy h1 { font-size: var(--fs-hero); }
.hero-copy .hero-sub { font-size: calc(var(--fs-hero) * .46); color: var(--accent-2); margin-top: 14px; line-height: 1; text-wrap: balance; max-width: 22ch; }
.hero-copy .lead { margin: 28px 0 40px; max-width: 44ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { grid-column: 8 / 13; margin: 0; }
.hero-visual .ph { aspect-ratio: 4 / 5; background: var(--surf); }
.hero-visual figcaption { margin-top: 14px; font-size: calc(13px * var(--k-body, 1)); color: var(--dim); padding-left: 6px; }

/* Servicios: pie con enlace */
.services-foot { display: flex; justify-content: center; margin-top: 36px; }

/* Método: titular fijo a la izquierda, pasos a la derecha */
.method .wrap { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(40px, 6vw, 100px); }
.method .sticky { position: sticky; top: 120px; align-self: start; }

/* Sectores: paneles que se apilan al hacer scroll */
.sectors-head { padding: var(--sec) 0 clamp(32px, 4vw, 56px); }
.stack { position: relative; }
.panel { position: sticky; top: 0; min-height: min(100dvh, 1000px); display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); isolation: isolate; }
.panel:nth-child(1) { background: var(--bg); } .panel:nth-child(2) { background: var(--bg2); } .panel:nth-child(3) { background: var(--surf); }
.panel .txt { display: flex; flex-direction: column; justify-content: center; padding: clamp(48px, 8vw, 120px) var(--gutter) clamp(48px, 8vw, 120px) max(var(--gutter), calc((100vw - var(--max)) / 2)); }
.panel .txt h3 { font-family: var(--font-display); font-variation-settings: "wdth" calc(var(--display-wdth) - 5); font-weight: var(--display-wght); text-transform: var(--display-tt); font-size: clamp(3rem, 8vw, 7rem); line-height: .9; letter-spacing: -.02em; }
.panel .txt p { margin: 26px 0 30px; color: var(--muted); max-width: 44ch; font-size: clamp(1rem, 1.25vw, 1.15rem); }
.panel .pic { position: relative; overflow: hidden; min-height: 56vh; }
.panel .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.panel .pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(11, 12, 14, var(--scrim-o)), transparent 40%), linear-gradient(to top, rgba(11, 12, 14, var(--scrim-o)), transparent 40%); }
.panel .idx { position: absolute; top: 28px; right: 28px; z-index: 2; font-family: var(--mono); font-size: calc(12px * var(--k-body, 1)); color: rgba(255, 255, 255, .8); letter-spacing: .1em; }

/* Trabajos: cabecera con botón a la derecha */
.gallery { overflow: hidden; }
.gallery .sec-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; }
.gallery .sec-head .lead { max-width: 44ch; }

@media (max-width: 900px) {
  .hero { padding-top: 120px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy, .hero-visual { grid-column: 1 / -1; }
  .hero-visual { max-width: 440px; }
  .method .wrap { grid-template-columns: 1fr; }
  .method .sticky { position: static; }
  .panel { grid-template-columns: 1fr; grid-template-rows: 52vh 1fr; }
  .panel .pic { order: -1; min-height: 0; }
  .panel .txt { padding: 36px var(--gutter) 56px; }
  .gallery .sec-head { flex-direction: column; align-items: start; }
}
@media (max-width: 560px) {
  .hero-cta .btn { width: 100%; justify-content: space-between; }
}
