/* =====================================================================
   SABAOTH FQ INSULATION LLC - projects.css
   Pagina PROJECTS - EN /projects/ - ES /es/proyectos/
   V3 "THE SILVER STANDARD": tinta #0A0A0B / #101013, papel #FBFBFA,
   UN acento #FE7300, hairlines, Anton display, eyebrows "//", fotos
   reales SIEMPRE en placa/marco etiquetado dentro del mundo oscuro.

   FRONTERA: este archivo es el UNICO CSS de esta pagina. base.css,
   js/main.js y js/boot.js no se tocan.

   ESTRUCTURA (ley 0720-a #11: dos galerias con banner de seccion EN MEDIO)
     banner (tinta+foto) -> intro (tinta) -> GALERIA 1 bento (ink2)
     -> BANNER INTERMEDIO escena (foto) -> GALERIA 2 desfasada (tinta)
     -> antes/despues (ink2) -> CTA foto scrim horneado -> footer

   Compositor-only: aqui no se anima width/height/filter/top/left.
   GSAP (projects.js) es dueno unico del transform de .gt y de los <img>
   con zoom; las unicas transition CSS viven en opacidades de pseudos y
   colores, nodos que GSAP no posee.
   ===================================================================== */

/* ajuste local del sangrado de la mascara .hl (convencion de About) */
[data-page="projects"] .hl { padding: 0 12px; margin: 0 -12px; }

/* rotulo HUD fino (10px, gris, calmado) */
.hud {
  margin-top: 14px;
  font-size: 10px; font-weight: 600; letter-spacing: .22em;
  text-transform: uppercase; color: var(--mut);
}

/* ---------------------------------------------------------------------
   1 - INTRO (respuesta directa AEO) - tinta
   --------------------------------------------------------------------- */
.pr-intro { background: var(--ink); padding: clamp(54px, 7vw, 96px) 0; }
.intro-grid {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: clamp(24px, 4vw, 64px); align-items: center;
}
.intro-lead {
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7; color: var(--soft);
  max-width: 56ch;
}
.intro-lead a {
  color: var(--paper); font-weight: 800; white-space: nowrap;
  border-bottom: 2px solid var(--acc);
  transition: color .25s var(--ease);
}
.intro-lead a:hover { color: var(--acc-hi); }
.intro-chips { justify-content: flex-end; align-content: center; }

/* ---------------------------------------------------------------------
   2 - GALERIAS: cabecera compartida
   --------------------------------------------------------------------- */
.pr-gal { position: relative; }
.pr-gal1 { background: var(--ink2); border-top: 1px solid var(--hair-soft); padding: clamp(72px, 9vw, 120px) 0 clamp(84px, 10vw, 130px); }
.pr-gal2 { background: var(--ink); padding: clamp(72px, 9vw, 120px) 0 clamp(84px, 10vw, 130px); }
.gal-head {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  align-items: end; margin-bottom: clamp(34px, 4vw, 54px);
}
.gal-head .eyebrow { margin-bottom: 16px; }
.gal-side { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------------------------------------------------------------------
   3 - TILE = placa "REAL WORK" clicable (lightbox)
   El tile jamas cambia de tamano: el zoom vive en el <img> dentro de
   overflow:hidden (GSAP). El anillo es un pseudo estatico por opacidad.
   --------------------------------------------------------------------- */
.gt {
  position: relative; border-radius: 6px; overflow: hidden;
  background: #0D0D0F;
}
.gt-btn {
  display: block; width: 100%; height: 100%; padding: 0;
  cursor: zoom-in; text-align: left;
}
.gt-btn:focus-visible { outline: 2px solid var(--acc); outline-offset: -3px; }
.gt img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.gt-btn::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px var(--acc); border-radius: 6px;
  opacity: 0; transition: opacity .25s var(--ease);
}
.gt-btn:hover::after, .gt-btn:focus-visible::after { opacity: 1; }
.gt-tag {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  background: rgba(10,10,11,.78); border-radius: 3px; padding: 7px 12px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--soft);
}
.gt-real {
  position: absolute; right: 14px; top: 12px; z-index: 2;
  background: var(--acc); color: var(--acc-ink); border-radius: 3px;
  padding: 5px 9px; font-size: 10px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
}

/* ratios */
.rl   { aspect-ratio: 16/10; }
.rp   { aspect-ratio: 4/5; }
.sq   { aspect-ratio: 1/1; }
.rl43 { aspect-ratio: 4/3; }
.rp34 { aspect-ratio: 3/4; }

/* --- GALERIA 1: bento 12 columnas (receta G1) --- */
.gwall {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(10px, 1.3vw, 18px);
}
.w4 { grid-column: span 4; }
.w6 { grid-column: span 6; }
.w8 { grid-column: span 8; }

/* --- GALERIA 2: editorial desfasado, 3 columnas + hairlines (G3) --- */
.gcols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.8vw, 26px);
}
.gcol { display: flex; flex-direction: column; gap: clamp(14px, 1.8vw, 26px); }
.gcol + .gcol { border-left: 1px solid var(--hair-soft); padding-left: clamp(14px, 1.8vw, 26px); }
.gcol-off { padding-top: clamp(40px, 5vw, 76px); }
/* escalera editorial: la tercera columna baja el doble que la segunda,
   asi el borde inferior desciende de izquierda a derecha (G3) */
.gcols .gcol:last-child { padding-top: clamp(80px, 10vw, 152px); }

/* ---------------------------------------------------------------------
   4 - BANNER INTERMEDIO (0720-a #11) - escena del mundo + 4 pasos
   img sobredimensionada 116% para el parallax de projects.js.
   --------------------------------------------------------------------- */
.pr-mid {
  position: relative; overflow: hidden; background: var(--ink3);
  padding: clamp(84px, 12vh, 150px) 0;
}
.mid-media { position: absolute; inset: 0; }
.mid-media img {
  position: absolute; top: -8%; width: 100%; height: 116%;
  object-fit: cover; object-position: 50% 62%; will-change: transform;
}
.mid-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(94deg, rgba(7,7,8,.86) 0%, rgba(7,7,8,.55) 44%, rgba(7,7,8,.18) 78%),
              linear-gradient(180deg, rgba(7,7,8,.5) 0%, rgba(7,7,8,.12) 40%, rgba(7,7,8,.62) 100%);
}
.mid-content { position: relative; z-index: 2; }
.mid-h { margin-top: 16px; max-width: 18ch; text-shadow: 0 3px 30px rgba(0,0,0,.55); }
.mid-sub { margin-top: 18px; max-width: 52ch; font-size: 15px; line-height: 1.7; color: var(--soft); }
.mid-steps {
  display: flex; flex-wrap: wrap; gap: clamp(14px, 2.4vw, 34px);
  margin-top: clamp(30px, 4vw, 46px); counter-reset: none;
}
.mid-steps li {
  display: flex; align-items: baseline; gap: 10px;
  border-left: 2px solid var(--acc); padding-left: 12px;
}
.mid-steps b {
  font-family: var(--disp); font-weight: 400; font-size: 20px;
  color: var(--paper); letter-spacing: .02em;
}
.mid-steps span {
  font-size: 11px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--soft);
}

/* ---------------------------------------------------------------------
   5 - ANTES / DESPUES (etapa penultima, 0720-a #6)
   clip-path por variable --pos movida por el <input type="range">
   invisible a pantalla completa (teclado, touch y drag nativos).
   Tirador BLANCO: hay escalera naranja real dentro del encuadre.
   --------------------------------------------------------------------- */
.pr-ba { background: var(--ink2); border-top: 1px solid var(--hair-soft); padding: clamp(72px, 9vw, 120px) 0; }
.ba-grid {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: clamp(28px, 4.5vw, 72px); align-items: center;
}
.ba-copy .copy { margin-top: 20px; }
.ba-copy .eyebrow { margin-bottom: 16px; }
.ba {
  position: relative; aspect-ratio: 3/4; width: 100%;
  max-width: 520px; justify-self: end;
  border-radius: 6px; overflow: hidden; background: #0D0D0F;
}
.ba-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* el ANTES (foil) va ARRIBA recortado por la izquierda: antes a la
   izquierda, despues a la derecha, como se lee */
.ba-before { z-index: 1; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px;
  background: var(--paper); transform: translateX(-1px); z-index: 2;
}
.ba-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--paper); color: var(--ink);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  box-shadow: 0 4px 18px rgba(0,0,0,.5);
}
.ba-range {
  position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; margin: 0;
}
.ba-range:focus-visible ~ .ba-divider { outline: 3px solid var(--acc); outline-offset: 2px; }
.ba-label {
  position: absolute; bottom: 14px; z-index: 2;
  background: rgba(10,10,11,.78); border-radius: 3px; padding: 7px 12px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--soft);
}
.ba-l-before { left: 14px; }
.ba-l-after { right: 14px; }

/* ---------------------------------------------------------------------
   6 - CTA DE CIERRE (C2 fotografico; scrim HORNEADO en el archivo)
   --------------------------------------------------------------------- */
.pr-cta {
  position: relative; overflow: hidden; background: var(--ink3);
  min-height: min(64vh, 660px);
  display: flex; align-items: center;
  padding: clamp(84px, 12vh, 150px) 0;
}
.cta-media { position: absolute; inset: 0; }
.cta-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.cta-inner { position: relative; z-index: 2; }
.cta-h { margin-top: 16px; font-size: clamp(44px, 5.6vw, 84px); }
.cta-copy { margin-top: 18px; max-width: 46ch; font-size: 15.5px; line-height: 1.7; color: var(--soft); }
.pr-cta .cta-row { display: flex; align-items: center; gap: 26px; margin-top: 34px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   7 - LIGHTBOX (05 §7A) - z-index 150, foco atrapado, fondo inert
   --------------------------------------------------------------------- */
.lb {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center;
}
.lb[hidden] { display: none; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(7,7,8,.94); cursor: zoom-out; }
.lb-stage {
  position: relative; z-index: 1;
  max-width: min(92vw, 1240px);
  display: flex; flex-direction: column; gap: 12px;
}
.lb-img {
  max-width: 100%; max-height: 80vh; width: auto; height: auto;
  margin-inline: auto;
  border-radius: 6px; background: #0D0D0F;
}
.lb-cap {
  display: flex; justify-content: space-between; gap: 18px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--soft);
}
.lb-count { color: var(--mut); letter-spacing: .22em; }
.lb-nav, .lb-close {
  position: absolute; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(10,10,11,.72); border: 1px solid var(--hair);
  color: var(--paper); font-size: 26px; line-height: 1;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.lb-nav:hover, .lb-close:hover { border-color: var(--acc); background: rgba(16,16,19,.9); }
.lb-nav:focus-visible, .lb-close:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.lb-prev { left: 10px; top: 50%; margin-top: -24px; }
.lb-next { right: 10px; top: 50%; margin-top: -24px; }
.lb-close { top: -58px; right: 0; }

/* ---------------------------------------------------------------------
   8 - PRE-SIEMBRA de reveals de tiles (0714-c: .001, jamas 0)
   Solo bajo html.js; langswap y reduced-motion componen al instante.
   projects.js es el dueno del transform de .gt.
   --------------------------------------------------------------------- */
.js [data-page="projects"] .gt { opacity: .001; transform: translateY(22px); }
.js.langswap [data-page="projects"] .gt { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-page="projects"] .gt { opacity: 1 !important; transform: none !important; }
}

/* ---------------------------------------------------------------------
   9 - RESPONSIVE (390 / 768 / 1440 / 1920 / 2560; todo vw con techo px)
   --------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-chips { justify-content: flex-start; }
  .gal-head { grid-template-columns: 1fr; gap: 18px; }
  .ba-grid { grid-template-columns: 1fr; }
  .ba { justify-self: start; }
}
@media (max-width: 900px) {
  /* bento -> 2 columnas; featured a lo ancho */
  .w4, .w6 { grid-column: span 6; }
  .w8 { grid-column: span 12; }
  .gcols { grid-template-columns: 1fr 1fr; }
  .gcol + .gcol { border-left: 0; padding-left: 0; }
  .gcol-off { padding-top: clamp(30px, 6vw, 56px); }
  .gcols .gcol:last-child { grid-column: span 2; flex-direction: row; padding-top: 0; }
  .gcol:last-child .gt { flex: 1 1 0; }
  .gcol:last-child .rl43 { aspect-ratio: 3/4; }
}
@media (max-width: 640px) {
  /* el banner corto de base (46vh) deja el crumb bajo el nav con este
     contenido: se le da altura real para que el bloque respire (0720-a #10) */
  [data-page="projects"] .banner { min-height: 560px; }
  .pr-mid { padding: 64px 0 72px; }
  .mid-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .sq { aspect-ratio: 4/5; }
  .lb-close { top: 10px; right: 10px; position: fixed; }
  .lb-stage { max-width: 94vw; }
  .lb-img { max-height: 72vh; }
  .lb-cap { flex-direction: column; gap: 6px; }
  .pr-cta { min-height: 0; }
}
@media (max-width: 480px) {
  /* a 390 el bento pasa a columna unica: placas grandes y legibles */
  .w4, .w6, .w8 { grid-column: span 12; }
  .rp, .sq { aspect-ratio: 4/5; }
  .rl { aspect-ratio: 4/3; }
  .gcols { grid-template-columns: 1fr; }
  .gcols .gcol:last-child { grid-column: auto; flex-direction: column; }
  .gcols .gcol:last-child .rl43 { aspect-ratio: 4/3; }
  .gcol-off { padding-top: 0; }
  .ba { max-width: none; }
}
