

@font-face { font-family: "Instrument Sans Fallback"; src: local("Helvetica Neue"), local("Arial"); size-adjust: 100%; }

:root {
  --papel: #fff;
  --tinta: #000;
  --info: #f0d23c;
  --margen: 15px;
  
  --c7: calc((100vw - 6 * 15px - 30px) / 7);
  --c15: calc((100vw - 14 * 15px - 30px) / 15);
  --pad-v: 50px;
  --pad-h: 15px;
  --ms: 21;
  --mlh: 24;
  --ds: 28;
  --dlh: 36;
  --entra: cubic-bezier(.645, .045, .355, 1);
  --sale: cubic-bezier(.215, .61, .355, 1);
  --suave: cubic-bezier(.25, .01, .25, 1);
  --sans: "Instrument Sans", "Instrument Sans Fallback", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
}

*, *::before, *::after { box-sizing: content-box; }

html { background: var(--papel); -webkit-text-size-adjust: 100%; }

html, body, div, span, header, footer, nav, aside, main, section, article, figure, figcaption, h1, p, a, img, button, ul, li {
  margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent;
}
header, footer, nav, aside, main, section, article, figure, figcaption { display: block; }

body {
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: .02em;
  font-weight: 400;
  height: 100vh;
  height: calc(var(--vh, 1vh) * 100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, p, a, span, figcaption, button { font-style: normal; font-weight: 400; font-stretch: normal; color: inherit; }
a { text-decoration: none; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
button { font: inherit; letter-spacing: inherit; cursor: pointer; }
.enlace { cursor: pointer; text-align: left; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
#galeria:focus-visible { outline: none; }


#galeria img, .serie-mini img, .hero-lienzo img, .contenido img, .descartes img, .descartes-vista img, #screen img, .info-fotos img {
  filter: saturate(.93) contrast(1.03);
}
img:not([src]) { visibility: hidden; }



body > header, body main, body aside#info {
  transition: top 1200ms var(--entra);
}
body > header {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 15px;
}
body > header a, body aside#info header a { transition: opacity .3s var(--sale); }
body > header a:hover, body aside#info header a:hover, footer nav a:hover, footer .enlace:hover { opacity: .55; }

body main { position: relative; top: 0; min-height: 100vh; min-height: calc(var(--vh, 1vh) * 100); }

body aside#info {
  position: absolute; z-index: 5; top: -100%; left: 0; right: 0;
  display: flex; flex-direction: column;
  height: 100vh; height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  color: #000;
}
body aside#info header { display: flex; justify-content: space-between; padding: 15px; }
body aside#info .info-texto { padding: 60px 15px; }
body aside#info h1 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  letter-spacing: 0;
  font-size: calc(var(--ms) * 1px);
  line-height: calc(var(--mlh) * 1px);
}
body aside#info .info-fotos { display: flex; }
body aside#info .info-fotos img { width: 20%; height: auto; }
body aside#info footer { position: absolute; left: 0; right: 0; bottom: 0; }

body footer {
  padding: 15px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 15px;
}
body footer nav { display: flex; justify-content: space-between; }
body footer .enlace, body footer a { transition: opacity .3s var(--sale); }
body > footer { display: none; }
body.project > footer { display: flex; }
body footer .muestra { margin: 0; }
.muestra a { transition: opacity .3s var(--sale); }
.muestra a:hover { opacity: .55; }



body.home #inicio { position: relative; height: 100vh; height: calc(var(--vh, 1vh) * 100); }
body.home #galeria {
  position: relative;
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  animation: entra 1200ms var(--sale) forwards;
}
body.home #galeria::-webkit-scrollbar { display: none; }
body.home #galeria a.serie {
  position: relative;
  display: flex; align-items: center;
  width: 100%; height: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
}
body.home #galeria a.serie figure {
  position: relative;
  width: calc(100% - 2 * var(--pad-h));
  height: calc(100% - 2 * var(--pad-v));
  padding: var(--pad-v) var(--pad-h);
}
body.home #galeria a.serie figure img {
  position: absolute; z-index: 1;
  top: var(--pad-v); left: var(--pad-h);
  width: calc(100% - 2 * var(--pad-h));
  height: calc(100% - 2 * var(--pad-v));
  object-fit: contain;
  opacity: 0;
  transition: opacity 260ms ease;
}
body.home #galeria a.serie figure img:nth-of-type(1) { opacity: 1; }
body.home #galeria a.serie figure[data-f="1"] img:nth-of-type(1) { opacity: 0; }
body.home #galeria a.serie figure[data-f="1"] img:nth-of-type(2) { opacity: 1; }
body.home #galeria a.serie figure figcaption {
  position: absolute; z-index: 2; bottom: 15px; left: 15px;
  transition: opacity .3s var(--sale);
  pointer-events: none;
}
body.home #galeria a.serie figure figcaption span { padding-right: 15px; }
body.home #galeria a.serie figure figcaption.fade { opacity: 0; }
body.home #galeria a.serie:focus-visible { outline: none; }
body.home #galeria a.serie:focus-visible figure { outline: 1px solid #000; outline-offset: -10px; }

body.home a.js-indice { position: absolute; z-index: 3; bottom: 15px; right: 15px; }
body.home a.js-indice { transition: opacity .4s var(--sale); }
body.home a.js-indice:hover { opacity: .55; }
body.project a.js-indice { display: none; }


body.home .muestra-inicio {
  position: absolute; z-index: 3; bottom: 40px; left: 0; right: 0;
  text-align: center; font-size: 11px; line-height: 16px; opacity: .6;
  pointer-events: none;
}
body.home .muestra-inicio a { pointer-events: auto; }



body aside#index { position: relative; min-height: 100vh; min-height: calc(var(--vh, 1vh) * 100); }
body aside#index span { position: absolute; top: 15px; left: 15px; }
body aside#index nav {
  display: flex; flex-direction: row; flex-wrap: wrap;
  row-gap: 45px; column-gap: 15px;
  padding: 150px 15px;
}
body aside#index nav a {
  position: relative;
  width: calc(50% - 7.5px);
  aspect-ratio: 16 / 9;
  transition: opacity .4s var(--sale);
}
body aside#index nav a figure { position: relative; width: 100%; height: 100%; }
body aside#index nav a figure > img { width: 100%; height: 100%; object-fit: cover; }
body aside#index nav a figure div { position: absolute; inset: 0; z-index: 2; display: none; }
body aside#index nav a figure div img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
}
body aside#index nav a figure figcaption { display: none; }
@media (hover: hover) {
  body aside#index nav a:hover figure div { display: block; }
  body aside#index nav a:hover figure div img:nth-child(1) { animation: mini-a 3.6s infinite; }
  body aside#index nav a:hover figure div img:nth-child(2) { animation: mini-b 3.6s infinite; }
}
body aside#index nav a:focus-visible { outline-offset: 4px; }
body aside#index nav a.activa { opacity: .2; pointer-events: none; }

body.home aside#index {
  position: absolute; z-index: 2; top: 0; right: 0; bottom: 0; left: 0;
  display: none;
}
body.home aside#index span { display: none; }
body.home.index aside#index { display: block; background: #fff; transition: top 1200ms var(--entra); }
body.home.index aside#index nav a { opacity: 0; animation: aparece 600ms calc(var(--i) * 50ms) var(--suave) forwards; }
body.home.index a.js-indice { position: fixed; }
body.home.index.info a.js-indice { opacity: 0; pointer-events: none; }
body.info.home.index aside#index { top: 100%; }
body.home.index #galeria { animation: none; }

@media (hover: hover) and (min-width: 1020px) {
  body aside#index nav a figure figcaption { position: fixed; left: 15px; bottom: 15px; }
  body aside#index nav a:hover figure figcaption { display: block; }
}



body aside#screen {
  position: fixed; z-index: 8; top: 0; left: 0; width: 100%;
  height: 100vh; height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  display: none; flex-direction: row; flex-wrap: nowrap;
  pointer-events: none;
  background: #000;
  transition: background 1s cubic-bezier(.25, .25, .75, .75);
}
body aside#screen > div { min-width: 100%; height: 100%; display: none; }
body aside#screen > div.activa { display: block; }
body aside#screen > div figure {
  padding: 15px; display: flex; justify-content: center; align-items: center;
  width: calc(100% - 30px); height: calc(100% - 30px);
}
body aside#screen > div figure img { object-fit: contain; width: 100%; height: 100%; }
body.screen aside#screen { display: flex; }



body.home #proyecto { display: none; }
body.project #inicio { display: none; }

body.project #proyecto article {
  padding: 20vh 0 0; padding: calc(var(--vh, 1vh) * 20) 0 0;
  display: flex; flex-direction: column; gap: 90px;
  animation: entra 1200ms var(--sale) forwards;
}
.hero { display: flex; flex-direction: column; gap: 15px; }
.hero h1 { padding: 0 15px; font-size: inherit; }
.hero-carrusel { display: flex; flex-direction: column; gap: 15px; }
.hero-lienzo figure { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; display: none; }
.hero-lienzo figure.activa { display: block; }
.hero-lienzo figure img { width: 100%; height: 100%; object-fit: contain; }
.hero-nav { width: 100%; padding-bottom: 30px; overflow-x: scroll; scrollbar-width: none; -ms-overflow-style: none; }
.hero-nav::-webkit-scrollbar { display: none; }
.hero-nav nav { position: relative; display: inline-flex; flex-wrap: nowrap; gap: 3px; padding: 0 15px; }
.hero-nav a { position: relative; width: calc(30vw - 5px); background: #000; transition: opacity .4s var(--sale); }
.hero-nav a figure { width: 100%; aspect-ratio: 16 / 9; opacity: .8; }
.hero-nav a img { width: 100%; height: 100%; object-fit: cover; }
.hero-nav a.activa { opacity: .2; pointer-events: none; }
.hero-detalle { display: flex; flex-direction: column; gap: 30px; padding: 0 15px; }

.contenido { display: flex; flex-direction: column; gap: 90px; padding: 0 15px; }
.contenido > div { position: relative; display: flex; }
.contenido > div.small figure { width: calc(var(--c7) * 4 + 3 * 15px); }
.contenido > div.medium figure { width: calc(var(--c7) * 5 + 4 * 15px); }
.contenido > div.large figure { width: calc(var(--c7) * 6 + 5 * 15px); }
.contenido > div.full figure { width: 100%; }
.contenido > div.left { justify-content: flex-start; }
.contenido > div.center { justify-content: center; }
.contenido > div.right { justify-content: flex-end; }
.contenido figure img { width: 100%; height: auto; }
.contenido figure.recorte { aspect-ratio: 4 / 5; overflow: hidden; }
.contenido figure.recorte img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: var(--pos, 50% 50%); transform-origin: var(--pos, 50% 50%); transform: scale(var(--zoom, 1.8));
}

.descartes { position: relative; width: 100%; height: 100vh; height: calc(var(--vh, 1vh) * 100); }
.descartes > span { position: absolute; top: 15px; left: 15px; }
.descartes-pista {
  width: 100%; height: 100%;
  overflow-x: scroll; scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.descartes-pista::-webkit-scrollbar { display: none; }
.descartes-pista:focus-visible { outline-offset: -6px; }
.descartes-tira {
  position: relative; display: inline-flex; gap: 15px; height: 100%; align-items: center;
  padding: 0 calc(var(--c7) + 30px);
}
.descartes-tira figure { scroll-snap-align: center; width: calc(var(--c7) * 5 + 4 * 15px); }
.descartes-tira figure img { width: 100%; }
.descartes-tira figure figcaption { display: none; }

body.project aside.descartes-vista {
  position: fixed; z-index: 7; display: none; background: #fff; top: 0; left: 0; right: 0;
  padding: 90px 15px; height: calc(100vh - 180px); height: calc(var(--vh, 1vh) * 100 - 180px);
  overflow-y: scroll;
}
body.project aside.descartes-vista > a { position: fixed; top: 15px; right: 15px; z-index: 2; }
body.project aside.descartes-vista > div {
  display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: center;
  column-gap: 20px; row-gap: 20px;
}
body.project aside.descartes-vista > div > div {
  position: relative; height: 150px; display: flex; justify-content: center; align-items: center;
  opacity: 0; transition: opacity 400ms var(--suave);
  transition-delay: calc(var(--k, 0) * 100ms);
}
body.project aside.descartes-vista > div > div figure { width: 100%; height: 100%; }
body.project aside.descartes-vista > div > div figure img { width: 100%; height: 100%; object-fit: contain; }
body.outtakes { overflow: hidden; }
body.outtakes aside.descartes-vista { display: block; }
body.outtakes aside.descartes-vista > div > div { opacity: 1; transition: opacity 800ms var(--suave); transition-delay: calc(var(--k, 0) * 100ms + 100ms); }



body.info { height: 100vh; height: calc(var(--vh, 1vh) * 100); overflow: hidden; }
body.info aside#info { top: 0; }
body.info > header, body.info main { top: 100%; }
body.loading, body.loading * { cursor: wait; }
body.loading * { pointer-events: none; }



@media screen and (min-width: 1020px) {
  :root { --pad-v: 100px; --pad-h: calc(var(--c15) + 30px); }
  body aside#info .info-texto { padding: 120px 15px; width: calc(var(--c15) * 9 + 8 * 15px); }
  body aside#info h1 { font-size: calc(var(--ds) * 1px); line-height: calc(var(--dlh) * 1px); }
  body aside#info footer { justify-content: space-between; }
  body aside#index nav a { width: calc(var(--c15) * 3 + 2 * 15px); }
  body.home .muestra-inicio { bottom: 15px; }
  body > footer, body footer { flex-direction: row; gap: 0; }
  body > footer { justify-content: space-between; }
  body footer nav { width: calc(var(--c15) * 4 + 3 * 15px); }
  body aside#info footer p { max-width: calc(var(--c15) * 8 + 7 * 15px); }

  body.project #proyecto article { gap: 160px; }
  .hero-lienzo { padding: 0 15px; }
  .hero-nav { padding-bottom: 60px; }
  .hero-nav nav { gap: 15px; }
  .hero-nav a { width: calc(var(--c15) * 2 + 15px); }
  .hero-detalle { flex-direction: row; justify-content: space-between; gap: 0; }
  .hero-detalle .detalle { width: calc(var(--c15) * 3 + 2 * 15px); }
  .hero-detalle .meta { width: calc(var(--c15) * 3 + 2 * 15px); }
  .hero-detalle .creditos { width: calc(var(--c15) * 7 + 6 * 15px); }
  .contenido { gap: 160px; }
  .contenido > div.small figure { width: calc(var(--c15) * 5 + 4 * 15px); }
  .contenido > div.medium figure { width: calc(var(--c15) * 9 + 8 * 15px); }
  .contenido > div.large figure { width: calc(var(--c15) * 11 + 10 * 15px); }
  .descartes-tira { gap: 30px; padding: 0 calc(var(--c15) * 3 + 2 * 15px + 30px); }
  .descartes-tira figure { display: flex; align-items: center; cursor: pointer; width: unset; flex-shrink: 0; }
  .descartes-tira figure img {
    width: auto; height: auto; display: block;
    max-width: calc(var(--c15) * 5 + 4 * 15px); max-height: calc(var(--c15) * 5 + 4 * 15px);
  }
  body.project aside.descartes-vista { padding: 150px 15px; height: calc(100vh - 300px); height: calc(var(--vh, 1vh) * 100 - 300px); }
  body.project aside.descartes-vista > div { column-gap: 30px; row-gap: 30px; }
  body.project aside.descartes-vista > div > div { height: 420px; }
}



@media screen and (max-width: 1019px) {
  .descartes-tira figure { cursor: pointer; }
}



@keyframes entra { 0% { opacity: 0; transform: translateY(90px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes aparece { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes mini-a { 0%, 33% { opacity: 1; } 34%, 100% { opacity: 0; } }
@keyframes mini-b { 0%, 33% { opacity: 0; } 34%, 66% { opacity: 1; } 67%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  body.home.index aside#index nav a { opacity: 1; }
  body aside#index nav a figure div { display: none !important; }
  body.project aside.descartes-vista > div > div { opacity: 1; }
}
