/* ==========================================================================
   The Concrete Home — capa de efectos (Divi 5)
   La maqueta es 100 % Divi. Este archivo solo añade el movimiento del diseño
   a los módulos que llevan clases "tch-…" (Avanzado › Atributos HTML › Clase).
   ========================================================================== */

:root {
  --tch-bg: #0B0B0A;
  --tch-bg2: #141413;
  --tch-ink: #ECE9E3;
  --tch-ink2: #8E8982;
  --tch-line: rgba(236, 233, 227, .12);
  --tch-acc: var(--gcid-primary-color, #E8772E);
  --tch-ease: cubic-bezier(.19, 1, .22, 1);
  --tch-ease2: cubic-bezier(.77, 0, .18, 1);
}

/* Sticky necesita que ningún contenedor recorte con overflow:hidden */
html, body { overflow-x: clip !important; }
body { overflow-y: visible !important; background: var(--tch-bg); }
#page-container { overflow: visible !important; }
::selection { background: var(--tch-acc); color: #141312; }
:focus-visible { outline: 1px solid var(--tch-acc); outline-offset: 3px; }

/* ---------- Cabecera ---------- */
.tch-header {
  border-bottom: 1px solid transparent;
  transition: background-color .6s, padding .6s, transform .9s var(--tch-ease), border-color .6s, opacity 1.2s ease !important;
}
.tch-header.is-scrolled {
  background-color: rgba(11, 11, 10, .82) !important;
  background-image: none !important;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--tch-line);
}
@media (min-width: 981px) {
  .tch-header.is-scrolled { padding-top: 14px !important; padding-bottom: 14px !important; }
}
.tch-header.is-hidden { transform: translate3d(0, -100%, 0); }
html.tch-intro-on .tch-header { opacity: 0; }

/* Menú móvil a pantalla completa */
.tch-header .et_mobile_menu {
  position: fixed !important;
  left: 0 !important; right: 0 !important; top: var(--tch-hh, 64px) !important;
  height: calc(100vh - var(--tch-hh, 64px)); height: calc(100svh - var(--tch-hh, 64px));
  width: 100% !important; margin: 0 !important;
  padding: 32px clamp(20px, 3.6vw, 64px) 40px !important;
  background: var(--tch-bg) !important;
  border: 0 !important; border-top: 1px solid var(--tch-line) !important;
  box-shadow: none !important;
  overflow-y: auto;
}
.tch-header .et_mobile_menu li a {
  font-size: 42px !important; font-weight: 200 !important; letter-spacing: -.04em !important;
  text-transform: uppercase; line-height: 1.15 !important;
  padding: 8px 0 !important; border: 0 !important; color: var(--tch-ink) !important; background: none !important;
}
.tch-header .et_mobile_menu li a:hover { color: var(--tch-acc) !important; opacity: 1 !important; }

/* ---------- Intro (solo portada, 1 vez por sesión) ---------- */
.tch-intro {
  position: fixed; inset: 0; z-index: 100000; background: var(--tch-bg); color: var(--tch-ink);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(24px, 4vw, 56px) clamp(20px, 3.6vw, 64px);
  font-family: 'Manrope', sans-serif; will-change: clip-path;
}
.tch-intro__row { display: flex; justify-content: space-between; align-items: flex-end; font-size: 10px; font-weight: 500; letter-spacing: .34em; }
.tch-intro__mid { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.tch-intro__mask { overflow: hidden; }
.tch-intro__word { font-family: 'DM Serif Display', serif; font-style: italic; font-size: clamp(40px, 6vw, 96px); letter-spacing: -.02em; transform: translateY(110%); transition: transform 1.2s var(--tch-ease); }
.tch-intro__bar { width: min(320px, 60vw); height: 1px; background: rgba(236, 233, 227, .15); position: relative; }
.tch-intro__bar i { position: absolute; inset: 0; background: var(--tch-acc); transform: scaleX(0); transform-origin: left; }
.tch-intro__num { font-size: clamp(56px, 8vw, 140px); font-weight: 200; letter-spacing: -.06em; line-height: .8; }

/* ---------- Secciones fijadas (pin) ---------- */
.tch-js .tch-pinned { height: var(--pin, 200vh) !important; min-height: 0 !important; padding: 0 !important; display: block !important; }
.tch-pinned > .tch-pin-inner { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; box-sizing: border-box; }
.tch-pin-inner { box-sizing: border-box; }
.tch-hero { --pin: 170vh; }
.tch-manifesto { --pin: 220vh; }
.tch-firma { --pin: 360vh; }
.tch-grow { --pin: 250vh; }

/* Filas de imagen que hacen de fondo (hero, tarjetas, marco) */
.tch-media-row {
  position: absolute !important; inset: 0; z-index: 0;
  width: 100% !important; max-width: none !important; height: 100% !important;
  margin: 0 !important; padding: 0 !important; will-change: transform, clip-path;
}
.tch-media-row > .et_pb_column,
.tch-media-row .et_pb_image,
.tch-media-row .et_pb_image_wrap { width: 100% !important; max-width: none !important; height: 100% !important; margin: 0 !important; }
.tch-media-row img { width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; display: block; }
.tch-media-row::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.tch-hero .tch-media-row::after { background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.05) 30%, rgba(0,0,0,.1) 55%, rgba(0,0,0,.75) 100%); }
.tch-card .tch-media-row::after { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.12) 28%, rgba(0,0,0,.1) 45%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.88) 100%); }
.tch-hero .et_pb_row:not(.tch-media-row), .tch-card .et_pb_row:not(.tch-media-row) { position: relative; z-index: 2; }

/* Hero */
.tch-hero .tch-media-row img { transform: scale(1.25); will-change: transform; }
.tch-hero.is-in .tch-media-row img { transform: scale(1.05); transition: transform 3.2s var(--tch-ease); }
.tch-js .tch-hero .tch-drift { opacity: 0; transform: translate3d(0, 24px, 0); }
.tch-hero.is-in .tch-drift { opacity: 1; transform: none; transition: opacity 1.4s var(--tch-ease), transform 1.4s var(--tch-ease); }
.tch-hero.is-in.is-scrolling .tch-drift { transition: none; }

/* Letras justificadas (THE CONCRETE HOME) */
.tch-letters .et_pb_module_header { display: flex !important; justify-content: space-between; overflow: hidden; padding-top: .14em; padding-bottom: .04em; white-space: nowrap; }
.tch-letters .tch-l { display: inline-block; }
.tch-js .tch-letters.tch-reveal-letters .tch-l { transform: translateY(110%); transition: transform 1.4s var(--tch-ease); }
.tch-letters.tch-reveal-letters.is-in .tch-l { transform: translateY(0); }

/* Líneas que suben enmascaradas */
.tch-lines .tch-line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.tch-lines .tch-line > span { display: block; }
.tch-js .tch-lines .tch-line > span { transform: translate3d(0, 110%, 0); transition: transform 1.4s var(--tch-ease); }
.tch-lines.is-in .tch-line > span { transform: none; }
.tch-lines[style*="text-align: center"] .tch-line, .tch-lines .et_pb_module_header[style*="center"] .tch-line { text-align: inherit; }

/* Revelado genérico */
.tch-js .tch-reveal-up { opacity: 0; transform: translate3d(0, 40px, 0); transition: opacity 1.3s var(--tch-ease), transform 1.3s var(--tch-ease); }
.tch-reveal-up.is-in { opacity: 1; transform: none; }
.tch-js .tch-reveal-clip { clip-path: inset(100% 0 0 0); transition: clip-path 1.8s var(--tch-ease2); }
.tch-reveal-clip.is-in { clip-path: inset(0 0 0 0); }

/* Manifiesto: palabras que se encienden */
.tch-words .tch-w { opacity: .14; transition: opacity .5s; }
.tch-words .tch-w.on { opacity: 1; }

/* Firma: nube de imágenes */
.tch-firma .tch-pin-inner { display: block !important; }
.tch-cloud { position: absolute !important; inset: 0; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; display: block !important; z-index: 1; }
.tch-cloud > .et_pb_column {
  position: absolute !important; left: 50%; top: 50%; margin: 0 !important; padding: 0 !important;
  overflow: hidden; background: var(--tch-bg2); will-change: transform, opacity;
  max-width: none !important; flex: none !important;
}
.tch-cloud .et_pb_image, .tch-cloud .et_pb_image_wrap { width: 100% !important; height: 100% !important; margin: 0 !important; }
.tch-cloud img { width: 100% !important; height: 100% !important; object-fit: cover; }
.tch-firma-copy { position: absolute !important; inset: 0; z-index: 30; margin: 0 !important; width: 100% !important; max-width: none !important; display: flex !important; align-items: center; justify-content: center; pointer-events: none; }
.tch-js .tch-firma.tch-pinned .tch-firma-copy { opacity: 0; }
.tch-firma-copy a { pointer-events: auto; }

/* Tarjetas de modelos apiladas */
.tch-card { position: sticky !important; top: 0; height: 100vh; height: 100svh; min-height: 0 !important; overflow: hidden; }
/* Tramo de pausa: la tarjeta se queda quieta antes de que llegue la siguiente */
.tch-js .tch-card { margin-bottom: 55vh !important; }
.tch-js .tch-card + .et_pb_section:not(.tch-card) { margin-top: 0 !important; }
.tch-card .tch-media-row img { transition: transform 2s var(--tch-ease); }
.tch-card:hover .tch-media-row img { transform: scale(1.045); }
.tch-card .tch-dim { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 4; }
.tch-cover { position: relative; z-index: 3; }
/* Las secciones posteriores deben tapar la última tarjeta fijada */
.et-l--post .et_pb_section { position: relative; z-index: 1; }
.et-l--post .et_pb_section.tch-card { position: sticky !important; z-index: 0; }

/* Proyectos: carril horizontal */
.tch-hsec .tch-pin-inner { display: flex !important; flex-direction: column; justify-content: center; gap: clamp(28px, 4vh, 48px); padding: 0 !important; }
.tch-htrack { flex-wrap: nowrap !important; align-items: flex-end !important; width: max-content !important; max-width: none !important; will-change: transform; }
.tch-htrack > .et_pb_column { flex: none !important; margin: 0 !important; }
.tch-htrack > .et_pb_column:nth-child(4n+1) { width: 52vw !important; } .tch-htrack > .et_pb_column:nth-child(4n+1) img { height: 60vh !important; }
.tch-htrack > .et_pb_column:nth-child(4n+2) { width: 30vw !important; } .tch-htrack > .et_pb_column:nth-child(4n+2) img { height: 46vh !important; }
.tch-htrack > .et_pb_column:nth-child(4n+3) { width: 40vw !important; } .tch-htrack > .et_pb_column:nth-child(4n+3) img { height: 54vh !important; }
.tch-htrack > .et_pb_column:nth-child(4n+4) { width: 28vw !important; } .tch-htrack > .et_pb_column:nth-child(4n+4) img { height: 40vh !important; }
.tch-htrack img { width: 100% !important; object-fit: cover; }
.tch-hcount p { display: flex; align-items: center; gap: 18px; }
.tch-hcount .tch-hbar { position: relative; width: 160px; height: 1px; background: var(--tch-line); display: block; }
.tch-hcount .tch-hbar i { position: absolute; inset: 0; background: var(--tch-acc); transform: scaleX(0); transform-origin: left; }
@media (max-width: 900px) {
  .tch-htrack { width: 100% !important; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px !important; }
  .tch-htrack > .et_pb_column:nth-child(n) { width: 78vw !important; scroll-snap-align: start; }
  .tch-htrack > .et_pb_column:nth-child(n) img { height: 56vh !important; }
  .tch-hcount .tch-hbar { display: none; }
}

/* Zoom y desplazamiento al pasar por encima */
.tch-project img, .tch-film { transition: transform 2s var(--tch-ease); }
.tch-project .et_pb_image_wrap { overflow: hidden; display: block; }
.tch-project:hover img { transform: scale(1.045); }
.tch-project .et_pb_group { transition: transform 1s var(--tch-ease); }
.tch-project:hover .et_pb_group { transform: translate3d(6px, 0, 0); }

/* 100 % a medida: marco que crece */
.tch-grow .tch-pin-inner { display: block !important; padding: 0 !important; }
.tch-grow .tch-media-row { clip-path: inset(30% 38% 30% 38%); background: var(--tch-bg2); z-index: 1; }
.tch-grow .tch-media-row img { transform: scale(1.25); }
.tch-grow .tch-media-row::after { background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,.85) 100%); opacity: var(--shade, 0); }
.tch-grow-label { height: 100%; box-sizing: border-box; flex: 1 1 auto; margin: 0 !important; padding: clamp(100px, 14vh, 150px) clamp(20px, 3.6vw, 64px) clamp(40px, 6vh, 70px) !important; }
.tch-grow-label .et_pb_text_inner { height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.tch-grow-label p { padding: 0 !important; }
.tch-grow-label p:nth-child(2) { align-self: flex-end; }
.tch-grow-labelrow { position: absolute !important; inset: 0; margin: 0 !important; padding: 0 !important; max-width: none !important; width: 100% !important; z-index: 0; }
.tch-grow-labelrow > .et_pb_column { height: 100%; display: flex !important; flex-direction: column; }
.tch-grow-title { position: absolute !important; left: 0; right: 0; bottom: clamp(32px, 7vh, 80px); z-index: 2; margin: 0 !important; }
.tch-js .tch-grow.tch-pinned .tch-grow-title { opacity: 0; pointer-events: none; }

/* Reseñas */
.tch-rev-item { display: none !important; }
.tch-rev-item.is-on { display: flex !important; }
.tch-rev-q .tch-rw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.tch-rev-q .tch-rw > span { display: inline-block; }
.tch-rev-imgs { position: relative; aspect-ratio: 4 / 5; max-height: min(58vh, 560px); overflow: hidden; background: var(--tch-bg2); }
@media (max-width: 980px) { .tch-rev-imgs { max-height: none; } }
.tch-rev-imgs .et_pb_image { position: absolute !important; inset: 0; margin: 0 !important; clip-path: inset(100% 0 0 0); z-index: 0; }
.tch-rev-imgs .et_pb_image.is-on { clip-path: inset(0 0 0 0); z-index: 2; }
.tch-rev-imgs .et_pb_image_wrap, .tch-rev-imgs img { width: 100% !important; height: 100% !important; object-fit: cover; }
.tch-rev-imgs::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%; z-index: 4; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.75)); }
.tch-rev-cap { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 5; display: flex; justify-content: space-between; font: 600 10px/1.4 'Manrope', sans-serif; letter-spacing: .28em; text-transform: uppercase; color: var(--tch-ink); text-shadow: 0 1px 12px rgba(0,0,0,.5); pointer-events: none; }
.tch-rev-tab { cursor: pointer; opacity: .42; transition: opacity .5s; position: relative; }
.tch-rev-tab.is-on, .tch-rev-tab:hover { opacity: 1; }
.tch-rev-tab::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--tch-acc); transform: scaleX(var(--p, 0)); transform-origin: left; }

/* Prensa: marquesina */
.tch-press-sec { overflow: hidden; }
.tch-marquee { flex-wrap: nowrap !important; width: max-content !important; max-width: none !important; gap: clamp(40px, 5vw, 90px) !important; will-change: transform; }
.tch-marquee > .et_pb_column { flex: none !important; width: auto !important; flex-direction: row !important; align-items: baseline !important; gap: 22px; white-space: nowrap; padding-top: clamp(28px, 3vw, 44px) !important; padding-bottom: clamp(28px, 3vw, 44px) !important; }
.tch-marquee .et_pb_text { margin: 0 !important; }

/* Vídeo en ventana */
.tch-video { cursor: pointer; }
.tch-modal { position: fixed; inset: 0; z-index: 100001; background: rgba(5,5,5,.96); display: flex; align-items: center; justify-content: center; padding: clamp(16px, 5vw, 80px); opacity: 0; transition: opacity .4s; }
.tch-modal.is-open { opacity: 1; }
.tch-modal__box { width: min(100%, 1400px); aspect-ratio: 16 / 9; background: #000; }
.tch-modal__box iframe { width: 100%; height: 100%; border: 0; }
.tch-modal__close { position: absolute; top: 24px; right: clamp(20px, 3.6vw, 64px); background: none; border: 0; color: var(--tch-ink); font: 600 10.5px 'Manrope', sans-serif; letter-spacing: .28em; padding: 12px 0; cursor: pointer; }

/* Botones: la flecha se desplaza */
.et_pb_button:after { transition: transform .5s var(--tch-ease), opacity .3s !important; }
.et_pb_button:hover:after { transform: translateX(6px); }

/* Cursor personalizado (solo ratón) */
html.tch-cursor, html.tch-cursor * { cursor: none !important; }
.tch-dot, .tch-lab { position: fixed; left: 0; top: 0; z-index: 100002; pointer-events: none; will-change: transform; }
.tch-dot { mix-blend-mode: difference; }
.tch-dot i { display: block; width: 6px; height: 6px; background: #fff; border-radius: 50%; transform: translate(-50%, -50%); transition: width .5s var(--tch-ease), height .5s var(--tch-ease), opacity .3s; }
.tch-lab i { display: flex; align-items: center; justify-content: center; width: 112px; height: 112px; border-radius: 50%; transform: translate(-50%, -50%) scale(.3); opacity: 0; background: rgba(236,233,227,.94); color: #141312; font: 600 9.5px 'Manrope', sans-serif; letter-spacing: .24em; text-transform: uppercase; font-style: normal; white-space: nowrap; transition: opacity .35s, transform .7s var(--tch-ease), background-color .3s; }

@media (prefers-reduced-motion: reduce) {
  .tch-js .tch-drift, .tch-js .tch-reveal-up, .tch-js .tch-lines .tch-line > span, .tch-js .tch-letters .tch-l { opacity: 1 !important; transform: none !important; }
  .tch-js .tch-reveal-clip { clip-path: none !important; }
}

/* Legibilidad del texto sobre imagen */
.tch-card .et_pb_text, .tch-card .et_pb_heading, .tch-grow-title .et_pb_text, .tch-grow-title .et_pb_heading,
.tch-hero .et_pb_text, .tch-page-hero .et_pb_text { text-shadow: 0 1px 18px rgba(0,0,0,.45); }
.tch-card-info { border-top: 1px solid rgba(236,233,227,.3) !important; }
