:root {
  --negro: #0b0b0b;
  --blanco: #fff;
  --papel: #faf9f7;
  --rojo: #c4161c;
  --gris: #8c8c8c;
  --linea: #d9d6d0;
  --sans: "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --pad: clamp(16px, 4vw, 56px);
  --gap: 10px;
  --cols: 4;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--negro);
  color: var(--negro);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
body.ficha-abierta { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

.logo svg { display: block; width: 100%; height: auto; }
.logo path[fill="currentColor"] { fill: currentColor; }

.hero { position: relative; min-height: 100svh; }
.hero-b { display: none; }
.portada-b .hero-a { display: none; }
.portada-b .hero-b { display: flex; }

.hero-a { background: var(--papel); display: flex; align-items: center; justify-content: center; padding: var(--pad) var(--pad) 90px; }
.hero-a-caja { width: min(1100px, 100%); position: relative; }
.hero-a .barra { height: 12px; background: var(--negro); transform-origin: left; animation: barra 1.1s var(--ease) both; }
.hero-a .logo { width: clamp(150px, 16vw, 210px); margin: 22px auto 18px; color: var(--negro); animation: aparecer 1s .5s var(--ease) both; }
.hero-a .filete { height: 1px; background: var(--negro); transform-origin: center; animation: barra 1.2s .3s var(--ease) both; }
.titulo {
  font-family: var(--sans);
  font-weight: 300;
  text-transform: uppercase;
  line-height: .98;
  letter-spacing: -.01em;
  margin: 0;
}
.titulo span { display: block; overflow: hidden; }
.titulo i { display: block; font-style: normal; animation: subir 1.1s var(--ease) both; }
.titulo span:nth-child(1) i { animation-delay: .55s; }
.titulo span:nth-child(2) i { animation-delay: .65s; }
.titulo span:nth-child(3) i { animation-delay: .75s; }
.titulo span:nth-child(4) i { animation-delay: .85s; }
.hero-a .titulo { font-size: clamp(54px, min(11vw, 14vh), 168px); margin: clamp(40px, 9vh, 110px) 0 28px 16%; }
.hero-a .intro {
  margin: 0 0 0 16%;
  max-width: 640px;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.5;
  animation: aparecer 1s 1.1s var(--ease) both;
}
.hero-a .creditos {
  margin: clamp(40px, 8vh, 90px) 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--negro);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.7;
  animation: aparecer 1s 1.3s var(--ease) both;
}
.hero-a .pie {
  display: flex; justify-content: space-between;
  margin-top: 26px; padding-top: 8px;
  border-top: 4px solid var(--negro);
  font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
}
.hero-a .pie span:last-child { font-weight: 600; }

.hero-b { align-items: center; justify-content: center; overflow: hidden; background: var(--negro); color: var(--blanco); }
.mosaico {
  position: absolute; inset: -10% -5%;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  transform: rotate(-4deg);
  animation: fundido 2s .2s ease both;
}
.mosaico .col { display: flex; flex-direction: column; gap: 10px; animation: deslizar 90s linear infinite; }
.mosaico .col:nth-child(even) { animation-direction: reverse; animation-duration: 110s; }
.mosaico img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; filter: grayscale(1) brightness(.75); }
.hero-b::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at center, rgba(11,11,11,.55) 0%, rgba(11,11,11,.92) 70%);
}

.hero-b-caja { position: relative; z-index: 2; text-align: center; padding: var(--pad) var(--pad) 110px; max-width: 1100px; }
.hero-b .logo { width: clamp(170px, 18vw, 240px); margin: 0 auto 40px; color: var(--blanco); animation: aparecer 1s .3s var(--ease) both; }
.hero-b .titulo { font-size: clamp(46px, min(10vw, 12vh), 150px); }
.hero-b .intro {
  max-width: 640px; margin: 36px auto 0;
  font-size: clamp(16px, 1.3vw, 19px); line-height: 1.55; color: #d8d8d8;
  animation: aparecer 1s 1.1s var(--ease) both;
}

.bajar { position: absolute; left: 50%; bottom: 22px; z-index: 3; width: 26px; height: 42px; margin-left: -13px; border: 1px solid currentColor; border-radius: 13px; color: var(--negro); opacity: .7; }
.hero-b .bajar { color: var(--blanco); }
.bajar span { position: absolute; left: 50%; top: 8px; width: 2px; height: 8px; margin-left: -1px; background: currentColor; border-radius: 1px; animation: rueda 1.8s ease-in-out infinite; }

.grilla-wrap { background: var(--negro); color: var(--blanco); padding: clamp(40px, 7vw, 90px) var(--pad); }
.grilla-cab {
  display: flex; justify-content: space-between;
  border-top: 1px solid #333; padding-top: 12px; margin-bottom: 28px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gris);
}
.grilla {

  --colw: calc((100vw - 2 * var(--pad) - (var(--cols) - 1) * var(--gap)) / var(--cols));
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: calc(var(--colw) / 20);
  column-gap: var(--gap);
}
.item {
  position: relative; display: block; padding-bottom: var(--gap);
  color: var(--blanco); text-decoration: none; cursor: pointer;
  opacity: 0; transform: translateY(40px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.item.visible { opacity: 1; transform: none; }
.grilla.sin-anim .item { transition: none; }
.item-foto { position: relative; height: 100%; overflow: hidden; background: #1a1a1a; }
.item img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform 1.2s var(--ease), filter .6s; }
.item-foto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.25) 38%, rgba(0,0,0,0) 60%);
  opacity: .75; transition: opacity .5s;
}
.item-info { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.item-info .n { display: block; font-family: var(--sans); font-weight: 500; font-size: clamp(14px, 1.15vw, 18px); letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; }
.item-info .c {
  display: block; margin-top: 4px; font-size: 14px; line-height: 1.35; color: #cfcfcf;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .5s;
}
@media (hover: hover) {
  .item:hover img { transform: scale(1.05); }
  .item:hover .item-foto::after { opacity: 1; }
  .item:hover .c { max-height: 4em; opacity: 1; }
  .grilla:hover .item:not(:hover) img { filter: grayscale(.7) brightness(.7); }
}
.item:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }

.pie-sitio { background: var(--negro); color: var(--gris); text-align: center; padding: 70px var(--pad) 60px; border-top: 1px solid #222; font-family: var(--sans); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; line-height: 1.8; }
.pie-sitio .logo { width: 170px; margin: 0 auto 26px; color: var(--blanco); }
.pie-sitio p { max-width: 760px; margin: 0 auto 8px; }

.ficha { position: fixed; inset: 0; z-index: 50; background: var(--papel); display: flex; flex-direction: column; }
.ficha[hidden] { display: none; }
.ficha:focus { outline: none; }
.ficha.abriendo { animation: ficha-entra .6s var(--ease) both; }
.ficha.cerrando { animation: ficha-sale .35s ease both; }
.ficha-progreso { height: 3px; background: var(--linea); }
.ficha-progreso i { display: block; height: 100%; background: var(--rojo); transition: width .6s var(--ease); }
.ficha-barra {
  display: flex; align-items: center; gap: 20px;
  height: 58px; padding: 0 var(--pad); border-bottom: 1px solid var(--linea); background: var(--papel);
  font-family: var(--sans); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
}
.ficha-barra .logo { width: 128px; color: var(--negro); }
.barra-nav { display: flex; align-items: center; gap: 6px; }
.ficha-barra .contador { color: var(--gris); min-width: 64px; text-align: center; }
.barra-nav button { position: relative; width: 30px; height: 30px; }
.barra-nav button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; border: solid currentColor; border-width: 1.5px 1.5px 0 0; }
.barra-nav .ant::before { transform: translate(-30%, -50%) rotate(-135deg); }
.barra-nav .sig::before { transform: translate(-70%, -50%) rotate(45deg); }
.barra-nav button:hover { color: var(--rojo); }
.ficha-barra .cerrar { margin-left: auto; font-size: 12px; line-height: 1; letter-spacing: .2em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.ficha-barra .cerrar b { position: relative; width: 16px; height: 16px; font-size: 0; }
.ficha-barra .cerrar b::before, .ficha-barra .cerrar b::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1.5px; margin-top: -.75px; background: currentColor; transform: rotate(45deg); }
.ficha-barra .cerrar b::after { transform: rotate(-45deg); }
.ficha-barra .cerrar:hover { color: var(--rojo); }

.ficha-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr; }

.ficha-foto { position: relative; margin: 0; height: 100%; aspect-ratio: var(--ar, 2 / 3); max-width: 58vw; background: var(--negro); overflow: hidden; }
.ficha-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.ficha-texto { overflow-y: auto; padding: clamp(32px, 5vw, 80px) clamp(24px, 5vw, 90px) 60px; overscroll-behavior: contain; }

.tira {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; gap: 24px;
  height: 92px; padding: 0 var(--pad); background: var(--negro); color: var(--blanco);
  transform: translateY(100%); opacity: 0;
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1), opacity .9s ease;
}
.ficha.tira-visible .tira { transform: none; opacity: 1; }
.ficha-texto { padding-bottom: 140px; }
.tira-nombre {
  flex: none; width: 210px;
  font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3;
}

.tira-fotos {
  flex: 1; min-width: 0; display: flex; gap: 4px;
  padding: 10px 0 12px;
}
.mini { flex: 1 1 0; min-width: 0; max-width: 44px; position: relative; height: 66px; transition: min-width .45s var(--ease), max-width .45s var(--ease); }
.mini.actual { min-width: 44px; }
.mini:hover { min-width: 60px; max-width: 60px; }
.mini img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.55); transition: filter .35s, transform .35s var(--ease); }
.mini::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 3px; background: var(--rojo); transform: scaleX(0); transition: transform .4s var(--ease); }
.mini:hover img { filter: grayscale(0) brightness(1); transform: translateY(-3px); }
.mini.actual img { filter: none; }
.mini.actual::after { transform: none; }
.mini:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; }
.ficha .flecha { display: none; }
.ficha-texto > * { max-width: 620px; }
.nombre { font-family: var(--sans); font-weight: 300; text-transform: uppercase; font-size: clamp(34px, 3.6vw, 58px); line-height: 1; margin: 0; }
.cargo { margin: 14px 0 0; font-family: var(--sans); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gris); }
.cargo::before { content: ""; display: block; width: 40px; height: 3px; background: var(--rojo); margin-bottom: 14px; }
.cuerpo { margin-top: 34px; font-size: 18px; line-height: 1.68; }
.cuerpo p { margin: 0 0 1.1em; }
.cuerpo p:first-child::first-letter { float: left; font-family: var(--sans); font-weight: 500; font-size: 4.1em; line-height: .82; padding: .06em .08em 0 0; color: var(--rojo); }

.quote-sobre-foto {
  display: none; position: absolute; right: 7%; bottom: 7%; width: min(46%, 340px); margin: 0;
  font-family: var(--sans); font-weight: 600; font-size: clamp(13px, 1.05vw, 16px); line-height: 1.35;
  letter-spacing: .06em; text-transform: uppercase; color: var(--blanco);
  text-shadow: 0 1px 14px rgba(0,0,0,.6);
}
.quote-sobre-foto::before { content: ""; display: block; width: 32px; height: 3px; background: var(--rojo); margin-bottom: 14px; }
.ficha-foto::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent); display: none; }
.quote-foto .quote-sobre-foto, .quote-foto .ficha-foto::after { display: block; }
.quote-sobre-foto { transition: bottom 1.1s cubic-bezier(.16, 1, .3, 1); }
.ficha.tira-visible .quote-sobre-foto { bottom: calc(7% + 92px); }

.quote-en-texto {
  display: none; margin: 34px 0 0; padding-left: 26px; border-left: 3px solid var(--rojo);
  font-family: var(--serif); font-style: italic; font-size: clamp(22px, 1.9vw, 30px); line-height: 1.3;
}
.quote-texto .quote-en-texto { display: block; }

.ficha-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 50px; padding-top: 22px; border-top: 1px solid var(--linea); }
.ficha-nav button { text-align: left; }
.ficha-nav .sig { text-align: right; }
.ficha-nav small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gris); }
.ficha-nav strong { display: block; margin-top: 4px; font-family: var(--sans); font-weight: 500; font-size: 16px; text-transform: uppercase; letter-spacing: .04em; }
.ficha-nav button:hover strong { color: var(--rojo); }

.flecha {
  position: absolute; top: 50%; z-index: 2; height: 132px; margin-top: -66px;
  display: flex; align-items: center; gap: 14px; overflow: hidden;
  width: 64px; padding: 0 18px;
  background: transparent; color: var(--negro); text-align: left;
  transition: width .55s var(--ease), background .35s, color .35s;
}

.flecha.ant { left: var(--fotow, 50%); }
.flecha.sig { right: 0; flex-direction: row-reverse; text-align: right; }
.flecha .trazo { position: relative; flex: none; width: 28px; height: 2px; background: currentColor; transition: width .55s var(--ease); }
.ficha.nav-entra .flecha.ant { animation: flecha-desde-izq .7s .5s var(--ease) both; }
.ficha.nav-entra .flecha.sig { animation: flecha-desde-der .7s .5s var(--ease) both; }
.flecha.ant .trazo { animation: empujon-izq 7s 2.2s ease-in-out infinite; }
.flecha.sig .trazo { animation: empujon-der 7s 2s ease-in-out infinite; }
.flecha:hover .trazo { animation: none; }
.flecha .trazo::before { content: ""; position: absolute; top: -4px; width: 9px; height: 9px; border: solid currentColor; border-width: 2px 2px 0 0; }
.flecha.ant .trazo::before { left: 0; transform: rotate(-135deg); }
.flecha.sig .trazo::before { right: 0; transform: rotate(45deg); }
.flecha img { flex: none; width: 70px; height: 104px; object-fit: cover; object-position: center 20%; opacity: 0; transition: opacity .4s .1s; }
.flecha span { flex: none; width: 170px; opacity: 0; transform: translateX(-8px); transition: opacity .4s .15s, transform .5s .15s var(--ease); }
.flecha.sig span { transform: translateX(8px); }
.flecha small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--gris); }
.flecha strong { display: block; margin-top: 6px; font-family: var(--sans); font-weight: 400; font-size: 15px; line-height: 1.25; letter-spacing: .06em; text-transform: uppercase; }
@media (hover: hover) {
  .flecha:hover { width: 330px; background: var(--negro); color: var(--blanco); }
  .flecha:hover .trazo { width: 34px; }  .flecha:hover img, .flecha:hover span { opacity: 1; transform: none; }
}

.ficha-cuerpo.sale .ficha-foto img { opacity: 0; transform: scale(1.03); transition: opacity .25s, transform .25s; }
.ficha-cuerpo.sale .ficha-texto > *, .ficha-cuerpo.sale .quote-sobre-foto { opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.ficha-cuerpo.entra .ficha-foto img { animation: foto-entra 1.1s var(--ease) both; }
.ficha-cuerpo.entra .quote-sobre-foto { animation: subir-suave .9s .35s var(--ease) both; }
.ficha-cuerpo.entra .ficha-texto > * { animation: subir-suave .8s var(--ease) both; }
.ficha-cuerpo.entra .ficha-texto > :nth-child(2) { animation-delay: .07s; }
.ficha-cuerpo.entra .ficha-texto > :nth-child(3) { animation-delay: .14s; }
.ficha-cuerpo.entra .ficha-texto > :nth-child(4) { animation-delay: .2s; }

.ficha, .ficha-barra, .ficha-texto, .nombre, .cuerpo, .ficha-nav, .ficha-barra .logo { transition: background-color .6s ease, color .6s ease, border-color .6s ease; }
.fondo-alterna .ficha.oscura { background: var(--negro); color: #e9e7e3; }
.fondo-alterna .ficha.oscura .ficha-barra { background: var(--negro); border-color: #2a2a2a; }
.fondo-alterna .ficha.oscura .ficha-barra .logo { color: var(--blanco); }
.fondo-alterna .ficha.oscura .ficha-progreso { background: #2a2a2a; }
.fondo-alterna .ficha.oscura .ficha-nav { border-color: #2a2a2a; }
.fondo-alterna .ficha.oscura .cargo, .fondo-alterna .ficha.oscura .ficha-nav small { color: #9a9a9a; }
.fondo-alterna .ficha.oscura .tira { border-top: 1px solid #2a2a2a; }

.opciones {
  position: fixed; right: 16px; bottom: 110px; z-index: 100;
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px;
  background: rgba(255,255,255,.96); border-radius: 10px; box-shadow: 0 10px 40px rgba(0,0,0,.3);
  font-family: var(--sans); font-size: 13px;
}
.opciones[hidden] { display: none; }
.opciones label { display: flex; flex-direction: column; gap: 4px; color: #555; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.opciones select { font: inherit; font-size: 13px; letter-spacing: 0; text-transform: none; padding: 4px; }

@keyframes barra { from { transform: scaleX(0); } }
@keyframes fundido { from { opacity: 0; } }
@keyframes flecha-desde-izq { from { opacity: 0; transform: translateX(-100%); } }
@keyframes flecha-desde-der { from { opacity: 0; transform: translateX(100%); } }
@keyframes empujon-der { 0%, 12%, 100% { transform: none; } 4% { transform: translateX(7px); } 8% { transform: translateX(2px); } 10% { transform: translateX(5px); } }
@keyframes empujon-izq { 0%, 12%, 100% { transform: none; } 4% { transform: translateX(-7px); } 8% { transform: translateX(-2px); } 10% { transform: translateX(-5px); } }
@keyframes aparecer { from { opacity: 0; transform: translateY(14px); } }
@keyframes subir { from { transform: translateY(105%); } }
@keyframes subir-suave { from { opacity: 0; transform: translateY(18px); } }
@keyframes foto-entra { from { opacity: 0; transform: scale(1.08); } }
@keyframes deslizar { to { transform: translateY(-50%); } }
@keyframes rueda { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes ficha-entra { from { opacity: 0; transform: translateY(30px); } }
@keyframes ficha-sale { to { opacity: 0; transform: translateY(20px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .item { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
  :root { --cols: 3; }
}
@media (max-width: 900px) {
  .ficha-cuerpo { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .ficha-foto { height: auto; max-width: none; }
  .ficha-texto { overflow: visible; padding: 34px var(--pad) 120px; }
  .flecha { display: none; }
  .quote-sobre-foto { width: auto; left: var(--pad); right: var(--pad); bottom: 28px; }
  .mosaico { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 700px) {
  :root { --cols: 2; --gap: 6px; }
  .hero-a .titulo, .hero-a .intro { margin-left: 0; }
  .item-info { left: 10px; right: 10px; bottom: 10px; }
  .ficha-barra .logo { width: 100px; }
  .ficha-barra { gap: 10px; }
  .tira { height: 74px; gap: 0; padding: 0; }
  .ficha.tira-visible .quote-sobre-foto { bottom: 28px; }
  .tira-nombre { display: none; }

  .tira-fotos {
    gap: 6px; padding: 8px 24px 10px; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  }
  .tira-fotos::-webkit-scrollbar { display: none; }
  .mini { flex: none; width: 36px; max-width: none; height: 54px; }
  .mini:hover, .mini.actual { min-width: 0; max-width: none; }
  .ficha-barra .contador { min-width: 52px; }
  .cuerpo { font-size: 17px; }
  .grilla-cab span:last-child { display: none; }
}
