/* ════════════════════════════════════════════════════════
   BIRD & HOCKNEY — Versión Final
   Flujo: Hero → Nosotros → Manifiesto → Productos →
          Proyectos → Sección 04 → Contacto → Footer
   ════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #2a2b2e;
  --ink-72: rgba(42, 43, 46, .72);
  --ink-60: rgba(42, 43, 46, .60);
  --ink-42: rgba(42, 43, 46, .42);
  --sand: #cebaa3;
  --sand-soft: rgba(206, 186, 163, .35);
  --white: #ffffff;
  --paper: #fbfaf8;
  --mist: #f4f0ea;
  --line: rgba(42, 43, 46, .12);
  --serif: "Nimbus Roman", "Nimbus Roman No9 L", Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --snap: cubic-bezier(.76, 0, .24, 1);
  --pad-x: clamp(22px, 4.2vw, 64px);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  background: var(--white);
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }

::selection { background: var(--sand); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1000;
  padding: 11px 14px;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  letter-spacing: .08em;
}

.skip-link:focus { transform: translateY(0); }

/* ─── Tipografía utilitaria ─────────────────────────── */

.eyebrow, .num, .meta {
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.num { color: var(--sand); }
.meta { color: var(--ink-42); }

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.copy {
  color: var(--ink-60);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.75;
  max-width: 600px;
}

.text-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 40px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-72);
  transition: color .3s ease, transform .3s ease;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}

.text-link:hover { color: var(--ink); }
.text-link:hover::after { transform: scaleX(1); transform-origin: left; }
.text-link .plus { font-size: 15px; color: var(--sand); transition: transform .35s var(--ease); }
.text-link:hover .plus { transform: rotate(90deg); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background .3s ease, border-color .3s ease, color .3s ease, transform .3s ease;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--sand);
  background: var(--sand);
  color: var(--ink);
}

.btn:active { transform: scale(.98); }

/* ════════════════════════════════════════════════════
   HEADER
   Transparente sobre el hero → blanco sólido al hacer scroll
   ════════════════════════════════════════════════════ */

.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 26px var(--pad-x);
  color: var(--white);
  transition: padding .4s ease, background .4s ease, color .4s ease, box-shadow .4s ease, opacity .8s var(--ease), transform .8s var(--ease);
}

.site-nav .brand img {
  width: clamp(126px, 11vw, 158px);
  filter: brightness(0) invert(1);
  transition: filter .4s ease, transform .3s var(--ease);
}

.site-nav.scrolled {
  padding-block: 14px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(18px);
  color: var(--ink);
}

.site-nav.scrolled .brand img { filter: none; }

.brand { justify-self: center; }
.brand:hover img { transform: translateY(-1px); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 38px);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav-links a,
.nav-mail {
  position: relative;
  opacity: .76;
  transition: opacity .3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}

.nav-links a:hover,
.nav-mail:hover { opacity: 1; }

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-mail {
  font-size: 11px;
  letter-spacing: .1em;
}

/* Botón de menú — diseño de la Versión 3: ícono asimétrico + etiqueta "Menú".
   Usa currentColor para adaptarse al header (blanco sobre el hero,
   tinta al hacer scroll, blanco con el menú abierto). */
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: inherit;
  transition: opacity .3s ease, transform .3s ease;
}

.menu-btn:hover { opacity: .68; transform: translateY(-1px); }
.menu-btn:active { transform: scale(.97); }

.ham {
  width: 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ham span {
  display: block;
  height: 1px;
  background: currentColor;
  transform-origin: center;
  transition: transform .45s var(--snap), width .3s ease, opacity .3s ease;
}

.ham span:first-child { width: 24px; }
.ham span:last-child  { width: 16px; }

.menu-btn.open .ham span:first-child { transform: rotate(45deg) translate(4px, 4px); width: 20px; }
.menu-btn.open .ham span:last-child  { transform: rotate(-45deg) translate(3px, -3px); width: 20px; }

/* Estado: menú abierto — el header se mantiene en blanco */
body.menu-open .site-nav {
  background: transparent;
  box-shadow: none;
  color: var(--white);
}

body.menu-open .site-nav .brand img { filter: brightness(0) invert(1); }

/* Con el menú abierto, los accesos del header se retiran:
   las secciones viven dentro del overlay */
.nav-links { transition: opacity .35s ease; }
body.menu-open .nav-links { opacity: 0; pointer-events: none; }

/* ════════════════════════════════════════════════════
   MENÚ — panel que desciende como una persiana
   Navegación completa (las secciones se ocultan en el header
   mientras el overlay está abierto)
   ════════════════════════════════════════════════════ */

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: clamp(32px, 6vw, 100px);
  align-content: center;
  align-items: end;
  padding: clamp(100px, 14vh, 150px) var(--pad-x) clamp(36px, 6vh, 64px);
  background: var(--ink);
  color: var(--white);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .9s var(--snap);
  will-change: clip-path;
  pointer-events: none;
}

.menu-overlay.open {
  clip-path: inset(0);
  pointer-events: auto;
}

.menu-nav {
  display: grid;
  align-self: end;
  counter-reset: menu;
}

.menu-link {
  display: flex;
  align-items: baseline;
  gap: clamp(16px, 2.4vw, 30px);
  padding: clamp(10px, 1.6vh, 20px) 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--serif);
  font-size: clamp(34px, min(6.2vw, 7.2vh), 88px);
  line-height: .94;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .55s ease, transform .55s var(--ease), color .3s ease;
}

.menu-link:first-child { border-top: 1px solid rgba(255, 255, 255, .1); }

.menu-link::before {
  counter-increment: menu;
  content: "0" counter(menu);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--sand);
  transform: translateY(-.5em);
}

.menu-link:hover { color: var(--sand); }

.menu-overlay.open .menu-link { opacity: 1; transform: translateY(0); }
.menu-overlay.open .menu-link:nth-child(1) { transition-delay: .28s; }
.menu-overlay.open .menu-link:nth-child(2) { transition-delay: .35s; }
.menu-overlay.open .menu-link:nth-child(3) { transition-delay: .42s; }
.menu-overlay.open .menu-link:nth-child(4) { transition-delay: .49s; }
.menu-overlay.open .menu-link:nth-child(5) { transition-delay: .56s; }
.menu-overlay.open .menu-link:nth-child(6) { transition-delay: .63s; }
.menu-overlay.open .menu-link:nth-child(7) { transition-delay: .70s; }

.menu-side {
  display: grid;
  gap: clamp(26px, 4vh, 40px);
  align-self: end;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease .6s, transform .6s var(--ease) .6s;
}

.menu-overlay.open .menu-side { opacity: 1; transform: translateY(0); }

.menu-contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 36px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255, 255, 255, .62);
}

.menu-contact .mini {
  display: block;
  margin-bottom: 8px;
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .34);
}

.menu-contact a {
  position: relative;
  transition: color .3s ease;
}

.menu-contact a:hover { color: var(--sand); }

.menu-social {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding-top: clamp(20px, 3vh, 32px);
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.menu-social .mini { flex: 0 0 100%; margin-bottom: 0; }

.menu-social a {
  position: relative;
  font-size: 12px;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .72);
  transition: color .3s ease;
}

.menu-social a:hover { color: var(--sand); }

/* ════════════════════════════════════════════════════
   HERO — cinemático, pantalla completa
   ════════════════════════════════════════════════════ */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  animation: heroZoom 16s var(--ease) forwards;
  will-change: transform;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

.hero-media img {
  position: absolute;
  inset: -10% 0 auto;
  width: 100%;
  height: 120%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(155deg,
    rgba(28, 29, 31, .58) 0%,
    rgba(28, 29, 31, .22) 48%,
    rgba(28, 29, 31, .55) 100%);
}

.hero-body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad-x) clamp(72px, 11vh, 116px);
  color: var(--white);
  will-change: transform, opacity;
}

.hero-kicker {
  margin-bottom: clamp(18px, 3vh, 30px);
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  opacity: 0;
  transition: opacity 1.2s ease .9s;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 8.4vw, 124px);
  line-height: .96;
  letter-spacing: -.01em;
  max-width: 1080px;
  text-wrap: balance;
}

.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: .08em;
  margin-bottom: -.08em;
}

.hero-line span {
  display: block;
  transform: translateY(112%);
  transition: transform 1.25s var(--ease);
}

.hero-line:nth-child(2) span { transition-delay: .14s; }

.hero-sub {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: clamp(22px, 3.6vh, 36px);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .66);
  opacity: 0;
  transition: opacity 1.2s ease 1.15s;
}



body.hero-ready .hero-line span { transform: translateY(0); }
body.hero-ready .hero-kicker,
body.hero-ready .hero-sub { opacity: 1; }

.hero-scroll {
  position: absolute;
  bottom: 0;
  right: var(--pad-x);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 26px;
  opacity: 0;
  transition: opacity 1.2s ease 1.5s;
}

body.hero-ready .hero-scroll { opacity: 1; }

.hero-scroll span {
  font-size: 9px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
  writing-mode: vertical-rl;
}

.hero-scroll .line {
  position: relative;
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, .28);
  overflow: hidden;
}

.hero-scroll .line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--sand);
  animation: scrollDrop 2.4s var(--ease) infinite;
}

@keyframes scrollDrop {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* ════════════════════════════════════════════════════
   01 — NOSOTROS  (split editorial, sin marcos)
   ════════════════════════════════════════════════════ */

section { padding-inline: var(--pad-x); }

.about {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  gap: clamp(32px, 5.5vw, 90px);
  align-items: center;
  padding-block: clamp(64px, 9vw, 120px);
  background: var(--white);
}

.about-fig {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 560px;
  width: 100%;
  overflow: hidden;
  background: var(--mist);
}

.about-fig img {
  position: absolute;
  inset: -9% 0 auto;
  width: 100%;
  height: 118%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.01);
  will-change: transform;
}

.about-body { display: grid; gap: clamp(22px, 3vh, 32px); }

.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 44px);
}

.about-cols .copy { max-width: none; }

/* Principios de trabajo: numerales serif y aire,
   sin recuadros ni filetes */
.about-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(26px, 3.4vw, 52px);
  margin-top: clamp(14px, 2vh, 24px);
}

.about-points article {
  display: grid;
  gap: 14px;
  align-content: start;
}

.about-points strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 2.8vw, 42px);
  line-height: 1;
  color: var(--sand);
  transition: transform .45s var(--ease);
}

.about-points article:hover strong { transform: translateY(-3px); }

.about-points span {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-60);
  max-width: 220px;
}

/* ════════════════════════════════════════════════════
   02 — MANIFIESTO
   ════════════════════════════════════════════════════ */

.manifesto {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  padding-block: clamp(88px, 12vw, 150px);
  background: var(--mist);
}

.manifesto .num { margin-bottom: 38px; }

.manifesto-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.6vw, 84px);
  line-height: 1.06;
  max-width: 740px;
  letter-spacing: 0;
}

.manifesto-title em {
  font-style: italic;
  color: var(--ink);
}

.manifesto-side { padding-top: 6px; flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   03 — PRODUCTOS
   Seis paneles verticales — el nombre vive en la foto
   ════════════════════════════════════════════════════ */

.products {
  padding-block: clamp(64px, 9vw, 120px);
  background: var(--white);
}

.section-head {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  gap: clamp(22px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-head .copy { margin-top: 14px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.3vw, 20px);
}

.product {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--mist);
  aspect-ratio: 9 / 14;
}

.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease), filter .5s ease;
}

.product:hover img,
.product:focus-visible img {
  transform: scale(1.06);
  filter: saturate(.88);
}

/* Velo inferior para la legibilidad del nombre */
.product::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(28, 29, 31, .68) 0%,
    rgba(28, 29, 31, .22) 34%,
    rgba(28, 29, 31, 0) 58%);
  transition: opacity .5s ease;
  pointer-events: none;
}

.product:hover::after { opacity: .92; }

.product-tag {
  position: absolute;
  z-index: 2;
  inset: auto 14px 18px 16px;
  display: grid;
  gap: 8px;
  color: var(--white);
}

.product-tag .num {
  color: var(--sand);
  transition: transform .5s var(--ease);
}

.product-tag h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(19px, 1.5vw, 25px);
  line-height: 1.08;
  text-wrap: balance;
  transition: transform .5s var(--ease);
}

.product:hover .product-tag .num,
.product:hover .product-tag h3 { transform: translateY(-4px); }

/* ════════════════════════════════════════════════════
   04 — INSTALACIONES
   Scrollytelling: los pasos recorren la columna
   izquierda mientras un visor fijo responde con
   imagen, número y avance — todo en parallax
   ════════════════════════════════════════════════════ */

.install {
  padding-block: clamp(64px, 9vw, 120px);
  background: var(--mist);
  overflow: clip;
}

/* — Cinta del proceso: viaja con el scroll — */

.install-ticker {
  margin: 0 calc(var(--pad-x) * -1) clamp(16px, 2.6vw, 36px);
  pointer-events: none;
  user-select: none;
}

.install-ticker-track {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(24px, 3.4vw, 52px);
  padding-left: var(--pad-x);
  white-space: nowrap;
  font-family: var(--serif);
  font-size: clamp(46px, 7.4vw, 112px);
  line-height: 1.1;
  color: rgba(42, 43, 46, .14);
  will-change: transform;
}

@supports (-webkit-text-stroke: 1px black) {
  .install-ticker-track {
    color: rgba(42, 43, 46, .16);
    -webkit-text-stroke: .6px rgba(42, 43, 46, .28);
  }
}

.install-ticker-track em {
  font-style: normal;
  font-size: .4em;
  color: var(--sand);
  -webkit-text-stroke: 0;
}

/* — Escenario — */

.install-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .96fr);
  gap: clamp(36px, 5.5vw, 96px);
  align-items: stretch;
}

/* — Pasos: se encienden al cruzar el centro — */

.install-flow { display: grid; }

.install-step {
  display: grid;
  grid-template-columns: clamp(54px, 4.6vw, 80px) minmax(0, 1fr);
  gap: clamp(14px, 1.8vw, 26px);
  align-content: center;
  min-height: clamp(340px, 58vh, 540px);
  padding-block: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line);
  opacity: .3;
  transform: translateY(8px);
  transition: opacity .6s ease, transform .7s var(--ease), border-color .6s ease;
}

.install-step.is-active,
.install-step:focus-within {
  opacity: 1;
  transform: translateY(0);
  border-top-color: var(--sand);
}

.step-no {
  font-family: var(--serif);
  font-size: clamp(26px, 2.3vw, 40px);
  line-height: 1;
  color: var(--ink-42);
  transition: color .6s ease, transform .7s var(--ease);
}

.install-step.is-active .step-no {
  color: var(--sand);
  transform: translateY(-3px);
}

.install-step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(23px, 2vw, 32px);
  line-height: 1.1;
}

.install-step p {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-60);
  max-width: 440px;
}

.install-step .text-link { margin-top: 14px; }

/* Paso protagonista: la instalación */
.install-step.is-hero {
  margin-inline: calc(clamp(18px, 2.2vw, 30px) * -1);
  padding-inline: clamp(18px, 2.2vw, 30px);
}

.install-step.is-hero h3 { font-size: clamp(28px, 2.5vw, 40px); }

.install-kicker { margin-bottom: 10px; }

.install-marks {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  list-style: none;
}

.install-marks li {
  position: relative;
  padding-left: 20px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-72);
}

.install-marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 9px;
  height: 1px;
  background: var(--sand);
}

/* — Visor fijo: imagen, avance y número en parallax — */

.install-media { position: relative; }

.install-sticky {
  position: sticky;
  top: clamp(80px, 11vh, 110px);
}

.install-frame {
  position: relative;
  overflow: hidden;
  height: min(76vh, 720px);
  background: var(--sand-soft);
}

/* El lienzo se desplaza a otra velocidad que el scroll */
.install-canvas {
  position: absolute;
  inset: -7% 0;
  transform: translate3d(0, var(--ipy, 0px), 0);
  will-change: transform;
}

.install-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  opacity: 0;
  transform: scale(1.07);
  transition: opacity .9s ease, transform 1.6s var(--ease);
  will-change: opacity, transform;
}

.install-img.is-on { opacity: 1; transform: scale(1); }
.install-img:nth-child(1) { object-position: center 62%; }
.install-img:nth-child(3) { object-position: center 38%; }

/* Velos para la legibilidad de avance y leyenda */
.install-frame::before,
.install-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.install-frame::before {
  background: linear-gradient(to bottom,
    rgba(28, 29, 31, .36) 0%,
    rgba(28, 29, 31, 0) 26%);
}

.install-frame::after {
  background: linear-gradient(to top,
    rgba(28, 29, 31, .56) 0%,
    rgba(28, 29, 31, 0) 42%);
}

.install-progress {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--white);
}

.install-count {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.install-count b { font-weight: 400; color: var(--sand); }

.install-progress .bar {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, .28);
}

.install-progress .bar i {
  display: block;
  height: 100%;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left;
}

/* Número gigante: deriva en sentido contrario a la imagen */
.install-ghost {
  position: absolute;
  z-index: 2;
  right: 14px;
  bottom: 2px;
  font-family: var(--serif);
  font-size: clamp(96px, 11vw, 190px);
  line-height: .78;
  color: rgba(255, 255, 255, .3);
  transform: translate3d(0, var(--gpy, 0px), 0);
  will-change: transform;
  pointer-events: none;
}

@supports (-webkit-text-stroke: 1px black) {
  .install-ghost {
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .62);
  }
}

.install-ghost.swap { animation: installFade .7s ease; }

.install-cap {
  position: absolute;
  z-index: 3;
  left: 18px;
  bottom: 16px;
  display: grid;
  gap: 6px;
  max-width: 300px;
  color: var(--white);
  font-size: 12.5px;
  line-height: 1.55;
  text-shadow: 0 1px 14px rgba(28, 29, 31, .45);
}

.install-cap.swap { animation: installSwap .7s var(--ease); }

@keyframes installSwap {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes installFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ════════════════════════════════════════════════════
   PROYECTOS — índice editorial con visor
   El cursor recorre los nombres; la imagen responde
   ════════════════════════════════════════════════════ */

.projects {
  padding-block: clamp(64px, 9vw, 120px);
  background: var(--paper);
}

.projects-stage {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(36px, 5.5vw, 96px);
  align-items: center;
}

.projects-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: min(620px, 72vh);
  width: 100%;
  overflow: hidden;
  background: var(--mist);
}

.pv-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity .85s ease, transform 1.4s var(--ease);
  will-change: opacity, transform;
}

.pv-img.on {
  opacity: 1;
  transform: scale(1);
}

.projects-count {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 14px;
  font-size: 10px;
  letter-spacing: .24em;
  color: rgba(255, 255, 255, .85);
}

.projects-count::before {
  content: "";
  position: absolute;
  inset: -10px -14px;
  background: linear-gradient(to top, rgba(28, 29, 31, .35), transparent);
  z-index: -1;
}

.projects-list {
  display: grid;
  align-content: center;
}

.proj-item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: clamp(18px, 2.6vw, 34px);
  padding: clamp(20px, 3.4vh, 38px) 0;
  cursor: pointer;
  transition: opacity .45s ease;
}

.proj-item .num { transition: color .4s ease; }

.proj-name {
  position: relative;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3.8vw, 58px);
  line-height: 1;
  transition: transform .55s var(--ease), color .4s ease;
}

.proj-name::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 6px;
  bottom: -10px;
  height: 1px;
  background: var(--sand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .65s var(--ease);
}

/* El índice se atenúa; el proyecto activo respira */
.projects-list.dimmed .proj-item { opacity: .28; }
.projects-list.dimmed .proj-item.is-active { opacity: 1; }

.proj-item.is-active .proj-name { transform: translateX(10px); }
.proj-item.is-active .proj-name::after { transform: scaleX(1); }

/* En pantallas táctiles / angostas cada proyecto trae su imagen */
.proj-thumb { display: none; }

/* ════════════════════════════════════════════════════
   04 — AUTOMATIZACIÓN  (intacta)
   ════════════════════════════════════════════════════ */

.s04 {
  position: relative;
  background:
    linear-gradient(rgba(15, 15, 15, .45), rgba(15, 15, 15, .45)),
    url("Fotos/FondoAutomatización_Mesa-de-trabajo-1_Mesa de trabajo 1.png") center/cover no-repeat;
  padding-block: 40px;
  min-height: 65vh;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 64px;
  align-items: center;
}

.s04 .num { margin-bottom: 38px; color: rgba(206, 186, 163, .6); }

.s04-h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1.06;
  color: var(--white);
  margin-bottom: 36px;
}

.s04 .text-link { color: var(--sand); opacity: .85; }
.s04 .text-link:hover { color: var(--sand); opacity: 1; }

.s04-phone { position: relative; align-self: stretch; }

.s04-phone img {
  position: absolute;
  top: -40px;
  bottom: -40px;
  left: 0;
  width: 100%;
  height: calc(100% + 80px);
  object-fit: cover;
}

.s04-brands {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-self: center;
}

.s04-compat {
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .26);
  margin-bottom: 40px;
}

/* Columna vertical de logotipos de plataformas compatibles */
.s04-logos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.s04-logo-wrap { display: block; line-height: 0; }

/* Reveal al hacer scroll: fade + translateY 15px (usa el observer .rv/.on).
   El fade lo controla .rv; al llegar .on vuelve a translateY(0). */
.s04-logo-wrap.rv:not(.on) { transform: translateY(15px); }

.s04-logo {
  display: block;
  width: 132px;
  height: auto;
  object-fit: contain;
  /* Logotipos ya monocromáticos (#EAEAEA) sobre el fondo oscuro */
  opacity: .72;
  transition: opacity .4s ease;
}

.s04-logo-wrap:hover .s04-logo { opacity: 1; }

/* ════════════════════════════════════════════════════
   CONTACTO + FOOTER  (intactos)
   ════════════════════════════════════════════════════ */

/* Sección de contacto — tomada de la Versión 2 */
.contact {
  padding-top: clamp(76px, 11vw, 140px);
  padding-bottom: 0;
  background: var(--paper);
}

/* Encabezado de contacto con la escala de la Versión 2 (dos líneas) */
.contact .display {
  font-size: clamp(36px, 5.4vw, 86px);
  line-height: .98;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: clamp(36px, 7vw, 104px);
  align-items: end;
  padding-bottom: clamp(60px, 8vw, 110px);
  border-bottom: 1px solid var(--line);
}

.contact-links {
  display: grid;
  gap: 16px;
  color: var(--ink-60);
  font-size: 15px;
  line-height: 1.7;
}

.contact-links a { transition: color .3s ease; }
.contact-links a:hover { color: var(--ink); }

.site-footer { background: var(--paper); }

.footer {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) repeat(3, minmax(140px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: 35px 0 24px;
  color: var(--ink-60);
  font-size: 13px;
  line-height: 1.7;
}

.footer a {
  position: relative;
  width: fit-content;
  transition: color .3s ease;
}

.footer a:hover { color: var(--ink); }

.footer-brand {
  display: grid;
  gap: 16px;
  max-width: 270px;
}

.footer-logo { width: 150px; }

.footer-contact {
  display: grid;
  gap: 6px;
}

.footer-tagline {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
}

.footer-col {
  display: grid;
  gap: 9px;
  align-content: start;
}

.footer-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  color: var(--ink-42);
  font-size: 11px;
  letter-spacing: .06em;
}

/* ─── Animaciones de aparición ──────────────────────── */

.rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s ease, transform .9s var(--ease);
}

.rv.on { opacity: 1; transform: translateY(0); }
.rv.d1 { transition-delay: .1s; }
.rv.d2 { transition-delay: .2s; }
.rv.d3 { transition-delay: .3s; }
.rv.d4 { transition-delay: .4s; }
.rv.d5 { transition-delay: .5s; }

/* ─── Responsive ────────────────────────────────────── */

@media (max-width: 1080px) {
  .nav-links, .nav-mail { display: none; }
  /* Móvil: oculta el espaciador y deja logo a la izquierda, menú a la derecha,
     ambos alineados verticalmente. */
  .site-nav { grid-template-columns: auto 1fr; align-items: center; }
  .site-nav > span[aria-hidden] { display: none; }
  .brand { justify-self: start; }
  .nav-actions { justify-self: end; }

  .about { grid-template-columns: 1fr; align-items: start; }
  .about-fig { aspect-ratio: 16 / 10; max-height: 440px; }

  .section-head { grid-template-columns: 1fr; gap: 16px; }

  .product-grid { grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 22px); }
  .product { aspect-ratio: 3 / 4; }

  /* Visor pegado arriba; los pasos pasan por debajo */
  .install-stage { display: flex; flex-direction: column; }
  .install-media {
    order: -1;
    position: sticky;
    top: 64px;
    z-index: 5;
    margin-bottom: clamp(20px, 3.5vw, 36px);
  }
  .install-sticky { position: static; }
  .install-frame { height: min(46vh, 420px); }
  .install-step { min-height: clamp(200px, 34vh, 330px); padding-block: clamp(26px, 4vw, 40px); }
  .install-step p { max-width: 560px; }
  .install-ghost { font-size: clamp(80px, 12vw, 140px); }

  .s04 { grid-template-columns: 1fr 1fr; }
  .s04-phone { display: none; }
  .contact-panel { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 900px) {
  .projects-stage { grid-template-columns: 1fr; gap: 0; }
  .projects-visual { display: none; }

  .projects-list { gap: clamp(26px, 4.5vw, 40px); }

  .proj-item {
    display: grid;
    gap: 0;
    padding: 0;
  }

  .proj-thumb {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--mist);
  }

  .proj-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .proj-item .num { display: none; }

  .proj-name {
    position: absolute;
    z-index: 2;
    left: 16px;
    bottom: 14px;
    color: var(--white);
    font-size: clamp(26px, 6.4vw, 40px);
  }

  .proj-name::after { display: none; }

  .proj-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
      rgba(28, 29, 31, .58) 0%,
      rgba(28, 29, 31, 0) 46%);
  }

  .proj-item.is-active .proj-name { transform: none; }
  .projects-list.dimmed .proj-item { opacity: 1; }
}

@media (max-width: 760px) {
  .menu-overlay { grid-template-columns: 1fr; align-content: end; gap: 36px; }
  .menu-link { font-size: clamp(30px, 8.4vw, 48px); padding: clamp(8px, 1.4vh, 14px) 0; }

  .hero { min-height: 560px; }
  .hero-title { font-size: clamp(44px, 13vw, 72px); }
  .hero-scroll { right: auto; left: var(--pad-x); align-items: flex-start; }

  .about-cols { grid-template-columns: 1fr; }
  .about-points { grid-template-columns: 1fr; gap: 26px; }
  .about-points span { max-width: none; }

  .manifesto { flex-direction: column; gap: 34px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); }

  .install-frame { height: min(58vw, 340px); }
  .install-step { grid-template-columns: 44px minmax(0, 1fr); }
  .install-step p { max-width: none; }
  .install-step.is-hero { margin-inline: -16px; padding-inline: 16px; }
  .install-ghost { font-size: clamp(64px, 17vw, 100px); }
  .install-cap { max-width: 230px; }
  .install-ticker-track { font-size: clamp(38px, 10.5vw, 60px); }

  .s04 { grid-template-columns: 1fr; gap: 44px; padding-block: 72px; }
  .s04-brands { align-items: flex-start; text-align: left; }

  .footer { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-media { animation: none; }
  [data-parallax] img { transform: none !important; }
  .rv, .hero-line span, .hero-kicker, .hero-sub { opacity: 1 !important; transform: none !important; }
  .pv-img { transform: none !important; }
  .install-step { opacity: 1 !important; transform: none !important; }
  .install-canvas, .install-ghost, .install-ticker-track, .install-img { transform: none !important; }
}
