/* ============================================================================
   GSI v2 — capa visual del prototipo de portada (index-nuevo.html)
   Se carga después de gsi.css. Mantiene paleta y tipografías; añade
   fotografía grande, bandas oscuras y movimiento.
   ========================================================================= */

:root {
  --noche: #141414;
  --noche-2: #1d1c1a;
  --piedra-mute: #b9b3a8;
  --gris-noche: #8f897e;
}

/* ---------- Portada oscura ---------- */
.hx { position: relative; overflow: hidden; background: var(--noche); color: var(--piedra); }
.hx__mesh {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(239,234,227,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239,234,227,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 80% at 20% 30%, #000 30%, transparent 100%);
}
.hx__inner { position: relative; display: grid; gap: clamp(40px, 6vw, 64px); align-items: center; padding-block: clamp(56px, 8vw, 96px); }
@media (min-width: 1040px) { .hx__inner { grid-template-columns: 1.05fr 1fr; min-height: min(86vh, 820px); } }
.hx__kicker { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .22em; color: var(--bronce-warm); margin-bottom: 26px; display: flex; align-items: center; gap: 14px; }
.hx__kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.hx h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(42px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -.025em; color: var(--piedra); max-width: 13ch; }
.hx h1 em { font-style: normal; color: var(--bronce-warm); }
.hx__lede { color: var(--piedra-mute); font-size: clamp(16px, 1.9vw, 19px); line-height: 1.65; max-width: 46ch; margin-top: 28px; }
.hx__cta { margin-top: 40px; }
.btn--light { border-color: rgba(239,234,227,.35); color: var(--piedra); background: transparent; }
.btn--light:hover { border-color: var(--bronce-warm); color: var(--bronce-warm); }
.hx__chips { list-style: none; display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 44px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--gris-noche); }
.hx__chips li { display: flex; align-items: center; gap: 10px; }
.hx__chips li::before { content: ""; width: 7px; height: 7px; background: var(--bronce); }

.hx__media { position: relative; margin: 0; }
.hx__media .ba { aspect-ratio: 4 / 3; border: 0; background: var(--noche-2); }
@media (min-width: 1040px) { .hx__media .ba { aspect-ratio: 4 / 5; } }
.hx__badge { position: absolute; left: 12px; bottom: 56px; z-index: 4; background: var(--piedra); color: var(--carbon); padding: 14px 18px; max-width: 250px; pointer-events: none; }
@media (min-width: 1040px) { .hx__badge { left: -28px; bottom: 72px; } }
.hx__badge small { display: block; font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .14em; color: var(--bronce); }
.hx__badge strong { display: block; font-family: var(--f-display); font-weight: 400; font-size: 18px; line-height: 1.25; margin-top: 6px; }
.hx__cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--gris-noche); }
.hx__cap a { color: var(--bronce-warm); }

/* ---------- Banda en movimiento ---------- */
.mq { background: var(--bronce); color: var(--carbon); overflow: hidden; }
.mq__track { display: flex; width: max-content; animation: mq 46s linear infinite; }
.mq__list { display: flex; gap: 44px; padding: 20px 22px; list-style: none; font-family: var(--f-display); font-size: clamp(20px, 2.3vw, 27px); white-space: nowrap; }
.mq__list li { display: flex; align-items: center; gap: 44px; }
.mq__list li::after { content: ""; width: 9px; height: 9px; background: var(--carbon); transform: rotate(45deg); }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mq__track { animation: none; } }

/* ---------- Obras recientes ---------- */
.ob__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px 40px; margin-bottom: clamp(32px, 5vw, 48px); }
.ob__grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .ob__grid { grid-template-columns: repeat(2, 1fr); } .oc--big { grid-column: 1 / -1; } }
@media (min-width: 1040px) {
  .ob__grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 270px; }
  .oc--big { grid-column: span 2; grid-row: span 2; }
}
.oc { position: relative; overflow: hidden; display: block; aspect-ratio: 4 / 3; background: var(--noche); color: var(--piedra); }
@media (min-width: 1040px) { .oc { aspect-ratio: auto; } }
.oc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.oc::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,20,20,.88) 0%, rgba(20,20,20,.35) 38%, rgba(20,20,20,0) 62%); }
.oc:hover img, .oc:focus-visible img { transform: scale(1.06); }
.oc__txt { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; }
.oc__meta { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; color: var(--bronce-warm); }
.oc__t { font-family: var(--f-display); font-size: 20px; line-height: 1.2; margin-top: 8px; color: var(--piedra); }
.oc--big .oc__t { font-size: clamp(24px, 2.6vw, 34px); max-width: 18ch; }
.oc__go { display: inline-block; margin-top: 12px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--piedra-mute); transition: color .2s ease; }
.oc:hover .oc__go { color: var(--bronce-warm); }

/* ---------- Banda CTA con foto ---------- */
.ctp { position: relative; overflow: hidden; background: var(--noche); color: var(--piedra); }
.ctp > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ctp::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(20,20,20,.92) 0%, rgba(20,20,20,.72) 55%, rgba(20,20,20,.45) 100%); }
.ctp__inner { position: relative; z-index: 2; padding-block: clamp(72px, 10vw, 128px); }
.ctp h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.08; letter-spacing: -.015em; color: var(--piedra); max-width: 16ch; }
.ctp p { color: var(--piedra-mute); font-size: clamp(16px, 1.8vw, 18px); line-height: 1.65; max-width: 48ch; margin-top: 20px; }
.ctp .btn-row { margin-top: 36px; }

@media (max-width: 719px) { .hx__badge { display: none; } }

/* ---------- Esquema interactivo "Dónde intervenimos" ---------- */
.dw2__grid { display: grid; gap: clamp(28px, 4vw, 48px); align-items: start; }
.dw2__fig { max-width: 1120px; margin-inline: auto; width: 100%; }

.dw2__fig { margin: 0; }
.dw2__svg { width: 100%; height: auto; display: block; overflow: visible; }
.dw2__svg .body { fill: #f6f3ee; }
.dw2__svg .slab, .dw2__svg .wall { fill: #d9d4cb; }
.dw2__svg .ln { fill: none; stroke: #9a958b; stroke-width: 1.5; }
.dw2__svg .ln-t { fill: none; stroke: #b4afa5; stroke-width: 1; }
.dw2__svg .ln-d { fill: none; stroke: #b4afa5; stroke-width: 1; stroke-dasharray: 4 4; }
.dw2__svg .acc { fill: none; stroke: var(--bronce); stroke-width: 2; }
.dw2__svg .acc-f { fill: var(--bronce); }
.dw2__svg .acc-d { fill: none; stroke: var(--bronce); stroke-width: 2; stroke-dasharray: 6 4; }
.dw2__svg .hl { fill: var(--bronce); opacity: 0; transition: opacity .35s ease; }
.dw2__svg .ar.is-on .hl { opacity: .14; }
.dw2__svg .ar.is-on .acc, .dw2__svg .ar.is-on .acc-d { stroke-width: 3; }
.dw2__svg .n { font-family: var(--f-display); font-size: 32px; fill: var(--bronce); }
.dw2__svg .t { font-family: var(--f-mono); font-size: 15px; letter-spacing: .14em; fill: var(--carbon); }
.dw2__svg .s { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .12em; fill: #8A8A86; }
.dw2__svg .lead { fill: none; stroke: var(--bronce); stroke-width: 1; opacity: .7; }
.dw2__svg .pt { fill: var(--bronce); }
.dw2__svg .pt-ring { fill: none; stroke: var(--bronce); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.dw2__svg .hit { fill: transparent; }
.dw2__svg .cl { cursor: pointer; opacity: .5; transition: opacity .3s ease; outline: none; }
.dw2__svg .cl.is-on, .dw2__svg .cl:hover, .dw2__svg .cl:focus-visible { opacity: 1; }
.dw2__svg .cl:focus-visible .t { text-decoration: underline; }
.dw2__svg .cl.is-on .pt-ring { animation: dw2pulse 1.8s ease-out infinite; }
@keyframes dw2pulse { 0% { opacity: .9; transform: scale(.5); } 100% { opacity: 0; transform: scale(1.8); } }
.dw2__cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--acero); }

/* dibujo que se traza al entrar en pantalla (solo con JS) */
.dw2.js-anim .dl { stroke-dasharray: 1; stroke-dashoffset: 1; }
.dw2.js-anim.is-drawn .dl { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.4,.1,.2,1); }
.dw2.js-anim .acc-d.dl, .dw2.js-anim .ln-d.dl { stroke-dasharray: none; }

.dw2__card { background: var(--piedra); border: 1px solid var(--arena-line); }
.dw2__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: repeating-linear-gradient(135deg, var(--arena) 0 14px, #e2dbcf 14px 28px); }
.dw2__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.dw2__media.is-empty img { opacity: 0; }
.dw2__ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: 88px; color: var(--bronce); opacity: 0; transition: opacity .35s ease; }
.dw2__media.is-empty .dw2__ph { opacity: .55; }
.dw2__body { padding: 22px 24px 26px; }
.dw2__n { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; color: var(--bronce); }
.dw2__t { font-family: var(--f-display); font-size: clamp(24px, 2.6vw, 30px); color: var(--carbon); margin-top: 6px; }
.dw2__d { color: var(--gris-texto); margin-top: 10px; line-height: 1.65; }
.dw2__go { display: inline-flex; gap: 8px; margin-top: 16px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .1em; color: var(--bronce); }
.dw2__go:hover .btn__arrow { transform: translateX(4px); }
.dw2__tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--arena-line); border: 1px solid var(--arena-line); margin-top: 14px; }
@media (min-width: 560px) { .dw2__tabs { grid-template-columns: repeat(3, 1fr); } }
.dw2__tab { display: flex; gap: 8px; align-items: baseline; text-align: left; background: var(--piedra); border: 0; padding: 12px 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--gris-texto); cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.dw2__tab span { color: var(--bronce); }
.dw2__tab:hover { background: #fff; color: var(--carbon); }
.dw2__tab.is-on { background: var(--carbon); color: var(--piedra); }
.dw2__tab.is-on span { color: var(--bronce-warm); }
@media (prefers-reduced-motion: reduce) {
  .dw2.js-anim .dl { stroke-dashoffset: 0; }
  .dw2__svg .cl.is-on .pt-ring { animation: none; }
}

/* escritorio: ficha y pestañas (va al final para prevalecer) */
@media (min-width: 860px) {
  .dw2__panel { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; align-items: stretch; }
  .dw2__card { display: grid; grid-template-columns: 1.1fr 1fr; }
  .dw2__media { aspect-ratio: auto; min-height: 280px; }
  .dw2__body { display: flex; flex-direction: column; justify-content: center; padding: 28px 30px; }
  .dw2__tabs { margin-top: 0; grid-template-columns: 1fr !important; }
  .dw2__tab { padding: 14px 18px; font-size: 12px; }
}

@media (max-width: 719px) {
  .dw2__svg .t, .dw2__svg .s { display: none; }
  .dw2__svg .n { font-size: 46px; }
  .dw2__cap span:last-child { display: none; }
}

/* ============================================================================
   Vida sutil: hover y entradas escalonadas
   ========================================================================= */

/* Por qué Gavión */
.why__item { position: relative; overflow: hidden; transition: background-color .35s ease; }
.why__item::before { content: ""; position: absolute; top: 0; left: 0; height: 2px; width: 0; background: var(--bronce); transition: width .45s cubic-bezier(.22,.8,.3,1); }
.why__item::after { content: attr(data-n); position: absolute; right: -4px; bottom: -26px; font-family: var(--f-display); font-size: 120px; line-height: 1; color: var(--carbon); opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.why__item:hover { background: #fff; }
.why__item:hover::before { width: 100%; }
.why__item:hover::after { opacity: .045; transform: none; }
.why__n { transition: transform .45s cubic-bezier(.22,.8,.3,1), color .3s ease; }
.why__item:hover .why__n { transform: translateY(-5px); color: var(--bronce-warm); }
.why__t { transition: color .3s ease; }
.why__item:hover .why__t { color: var(--bronce); }

/* Servicios */
.svc { transition: background-color .3s ease, transform .35s ease; }
.svc:hover .svc__t { color: var(--bronce); }
.svc__t { transition: color .3s ease; }
.svc__more { transition: letter-spacing .3s ease; }
.svc:hover .svc__more { letter-spacing: .18em; }

/* Proceso: el cuadrado bronce recorre la línea */
.step { transition: border-color .35s ease; }
.step::before { transition: left .6s cubic-bezier(.22,.8,.3,1); }
.step:hover { border-top-color: var(--bronce); }
.step:hover::before { left: calc(100% - 10px); }

/* Listas */
.ticklist li { transition: padding-left .3s ease, background-color .3s ease; }
.ticklist li::before { transition: width .3s ease; }
.ticklist li:hover { padding-left: 30px; background: #fff; }
.ticklist li:hover::before { width: 16px; }
.deflist__row { transition: background-color .3s ease; }
.deflist__row:hover { background: #fff; }

/* Retícula de fondo que se desplaza muy lentamente */
.mesh__grid, .hx__mesh { animation: meshdrift 90s linear infinite; }
@keyframes meshdrift { to { background-position: 44px 44px, 44px 44px; } }

/* Entradas escalonadas (solo si el JS las activa) */
.js-stagger .stg { opacity: 0; transform: translateY(20px); }
.js-stagger .stg.in { opacity: 1; transform: none; transition: opacity .7s ease calc(var(--i, 0) * 90ms), transform .8s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * 90ms); }
.js-stagger .stg.reveal { animation: none !important; }
.js-stagger .eyebrow::after { transform: scaleX(0); transform-origin: left; transition: transform 1.1s cubic-bezier(.22,.8,.3,1) .15s; }
.js-stagger .eyebrow.in::after { transform: none; }

@media (prefers-reduced-motion: reduce) {
  .mesh__grid, .hx__mesh { animation: none; }
  .step::before, .why__item::after { transition: none; }
}

/* En cuadrículas con filete (fondo = color de línea) se anima el contenido, no la celda */
.js-stagger .grid--hair > .stg, .js-stagger .grid--hair-dark > .stg { opacity: 1; transform: none; }
.js-stagger .grid--hair > .stg > :not(.svc__ghost), .js-stagger .grid--hair-dark > .stg > * { opacity: 0; transform: translateY(14px); }
.js-stagger .grid--hair > .stg.in > :not(.svc__ghost), .js-stagger .grid--hair-dark > .stg.in > * { opacity: 1; transform: none; transition: opacity .7s ease calc(var(--i, 0) * 90ms), transform .8s cubic-bezier(.2,.7,.2,1) calc(var(--i, 0) * 90ms); }

/* ============================================================================
   Realces de texto al pasar el ratón (muy ligeros)
   ========================================================================= */
/* titular: aparece un subrayado bronce fino bajo cada línea */
.h2 { text-decoration-line: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: .18em; transition: text-decoration-color .5s ease; }
:is(div, header, section):has(> .h2):hover > .h2 { text-decoration-color: rgba(166,124,82,.6); }
/* etiqueta: se abre un poco y su línea crece */
.eyebrow { transition: letter-spacing .6s cubic-bezier(.22,.8,.3,1); }
.eyebrow::after { transition: max-width .6s cubic-bezier(.22,.8,.3,1), opacity .4s ease; }
:is(div, header, section):has(> .eyebrow):hover > .eyebrow { letter-spacing: .24em; }
:is(div, header, section):has(> .eyebrow):hover > .eyebrow::after { max-width: 180px; opacity: .6; }
/* párrafo: el gris se oscurece y las negritas se subrayan en bronce */
.lede { transition: color .45s ease; }
.lede:hover { color: var(--tinta); }
.lede strong { background-image: linear-gradient(var(--bronce-warm), var(--bronce-warm)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1px; transition: background-size .55s cubic-bezier(.22,.8,.3,1); }
.lede:hover strong { background-size: 100% 1px; }
@media (hover: none) { .h2, .eyebrow, .lede { transition: none; } }
