

:root {
  --fondo: #f1f1f1;
  --tinta: #464646;
  --logo: #464646;
  --curva: cubic-bezier(0, .15, 0, .99);
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.bloqueado { overflow: hidden; }

body {
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -.02em;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.solo-lector { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.solo-movil { display: list-item; }


.logo { font: inherit; width: 100%; color: var(--logo); transition: color .3s; }
.logo a { display: block; }
.logo svg { width: 100%; height: auto; aspect-ratio: 200 / 162; }


.cab { position: sticky; top: 0; z-index: 50; background: var(--fondo); color: var(--tinta); border-bottom: 1px solid currentColor; }
.cab-barra { display: flex; justify-content: space-between; padding: 24px; }
.boton-menu { display: flex; align-items: center; justify-content: center; margin: -12px; padding: 12px; }
.boton-menu .barras { display: flex; flex-direction: column; gap: 2px; }
.boton-menu i { display: block; width: 24px; height: 1px; background: currentColor; }

.cab-nav {
  position: fixed; left: 0; top: 0; z-index: 30; width: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  max-height: 100vh; overflow-y: auto;
  background: var(--fondo); color: var(--tinta);
  transform: translateY(calc(-100% - 1px));
  transition: transform .5s var(--curva), visibility 0s .5s;
  visibility: hidden;
}
.menu-abierto .cab-nav { transform: none; visibility: visible; transition: transform .5s var(--curva), visibility 0s; }
.cab-nav-logo { display: block; color: var(--logo); }
.cab-nav-logo svg { width: 100%; height: auto; aspect-ratio: 200 / 162; transform-origin: top left; transform: scale(.5); transition: transform .5s var(--curva); }
.menu-abierto .cab-nav-logo svg { transform: none; }
.cab-marca { display: none; }
.cab-lema { display: flex; align-items: center; justify-content: center; height: 58px; margin: 0 8px; padding: 0 24px; border: 1px solid currentColor; border-bottom: 0; text-align: center; }
.cab-lista { margin: 0 8px; border: 1px solid currentColor; }
.cab-lista li { height: 58px; text-transform: uppercase; border-bottom: 1px solid currentColor; }
.cab-lista li:last-child { border-bottom: 0; }
.cab-lista a, .cab-cerrar { display: flex; align-items: center; width: 100%; height: 100%; padding: 0 24px; }
.cab-lista a:focus-visible, .cab-lista a:active { background: var(--tinta); color: var(--fondo); outline: 0; }
.cab-cerrar { justify-content: center; text-transform: none; }


.trabajo {
  position: relative; display: flex; flex-direction: column; align-items: center;
  background: var(--fondo); color: var(--tinta); text-align: center;
}
.trabajo-in { display: flex; flex-direction: column; width: 100%; }
.trabajo-foto { flex-shrink: 0; width: 100%; will-change: transform; transform-origin: left top; }
.trabajo.der .trabajo-foto { transform-origin: right top; }
.trabajo-foto figure { position: relative; width: 100%; aspect-ratio: var(--ar); overflow: hidden; }
.trabajo-foto img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.04) saturate(.94);
}
.trabajo-foto img.bn { filter: grayscale(1) contrast(1.1) brightness(1.04); }

.trabajo-pie { flex-shrink: 0; min-width: 200px; max-width: 100%; margin: 16px 0 80px; will-change: opacity; }
.trabajo.der .trabajo-pie { margin-left: auto; }
.trabajo.izq .trabajo-pie { margin-right: auto; }
.trabajo-pie h2 { font: inherit; padding: 0 8px 8px; border-bottom: 1px solid currentColor; text-transform: uppercase; }
.trabajo-pie p { padding: 8px; }
.lineas { display: flex; flex-direction: column; gap: 8px; }
.lineas span { display: block; width: 100%; height: 1px; background: var(--tinta); }


.banda {
  display: flex; align-items: center; justify-content: center; height: 100vh;
  background: var(--fondo); color: var(--tinta); text-align: center;
}
.banda-in { display: flex; flex-direction: column; align-items: center; gap: 48px; width: 100%; padding: 0 24px; }
.banda-in svg { width: 100%; height: auto; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
.banda-datos { display: flex; align-items: center; height: 20px; font: 500 10px/15px var(--sans); letter-spacing: .1px; text-transform: uppercase; opacity: .7; font-variant-numeric: normal; }
.banda-datos p { display: flex; align-items: center; height: 100%; padding: 0 24px; border-right: 1px solid currentColor; }
.banda-datos p:first-child { border-left: 1px solid currentColor; }


.pie { position: relative; background: var(--fondo); color: var(--tinta); border-top: 1px solid currentColor; }
.pie-in { display: grid; align-items: center; padding: 24px; }
.pie-marca { display: flex; align-items: center; gap: 24px; }
.pie-marca p { margin-left: auto; }
.pie-lema, .pie-nav { display: none; }
.muestra { padding: 0 24px 24px; text-align: center; font-size: 15px; opacity: .6; }
.muestra a { text-decoration: underline; text-underline-offset: 3px; }
.pie a { transition: opacity .3s; }


.hoja {
  position: fixed; left: 0; top: 0; z-index: 80; width: 100%; max-height: 100vh; overflow-y: auto;
  background: var(--fondo); color: var(--tinta); border-bottom: 1px solid currentColor;
  transform: translateY(calc(-100% - 1px)); visibility: hidden;
  transition: transform .5s var(--curva), visibility 0s .5s;
}
.hoja.abierta { transform: none; visibility: visible; transition: transform .5s var(--curva), visibility 0s; }
.hoja-in { display: flex; flex-direction: column; gap: 32px; padding: 24px 24px 0; }
.hoja-titulo { text-transform: uppercase; }
.hoja-cuerpo { display: flex; flex-direction: column; gap: 16px; font-size: 24px; line-height: 1.15; max-width: 34ch; }
.hoja-cuerpo[hidden] { display: none; }
.hoja-cerrar { align-self: stretch; height: 58px; margin: 0 -24px; border-top: 1px solid currentColor; }


@media (min-width: 1024px) {
  .solo-movil { display: none; }

  .logo {
    position: fixed; top: 0; left: 0; z-index: 60; width: auto;
    transform-origin: top left; transform: scale(1.5);
    transition: transform .4s var(--curva), color .3s;
  }
  .logo.chico { transform: scale(1); }
  .logo svg { width: 200px; height: 162px; }

  .cab { position: relative; border-bottom: 0; }
  .cab-barra { display: none; }
  .cab-nav {
    position: relative; left: auto; top: auto; z-index: auto; transform: none; visibility: visible; transition: none;
    display: grid; grid-template-columns: repeat(3, 1fr); align-items: end;
    height: 400px; max-height: none; overflow: visible; padding: 0 24px;
    border-bottom: 1px solid currentColor;
  }
  .cab-nav-logo { display: none; }
  .cab-marca { display: flex; align-items: center; gap: 40px; height: 58px; }
  .cab-lema { height: 58px; margin: 0; padding: 0; border: 0; gap: 40px; }
  .cab-lista { display: flex; align-items: center; justify-content: flex-end; gap: 24px; height: 58px; margin: 0; border: 0; }
  .cab-lista li { height: auto; border: 0; transition: opacity .3s; white-space: pre; }
  .cab-lista li:hover { opacity: .5; }
  .cab-lista a { display: grid; width: auto; height: auto; padding: 0; }

  .trabajo { flex-direction: row; }
  .trabajo.der { flex-direction: row-reverse; }
  .trabajo.vert { height: 100vh; }
  .trabajo-in { width: auto; flex-direction: row; }
  .trabajo.der .trabajo-in { flex-direction: row-reverse; }
  .trabajo.vert .trabajo-foto { height: 100vh; width: calc(100vh * var(--ar)); }
  .trabajo.vert .trabajo-foto figure { height: 100%; width: auto; }
  .trabajo.horiz .trabajo-foto { width: min(80vw, calc(100vh * var(--ar))); }
  .trabajo-pie { align-self: center; margin: 0; }
  .trabajo.der .trabajo-pie { margin-left: auto; }
  .trabajo.izq .trabajo-pie { margin-right: auto; }
  .trabajo.abajo .trabajo-pie { align-self: flex-end; margin-bottom: 40px; }

  .banda-in { gap: 72px; padding: 0 256px; }

  .pie { height: 72px; }
  .pie-in { grid-template-columns: auto auto auto; justify-content: space-between; height: 100%; padding: 0 24px; }
  .pie-lema { display: block; text-align: center; }
  .pie-nav { display: flex; align-items: center; justify-content: flex-end; gap: 24px; text-transform: uppercase; }
  .pie-nav a:hover { opacity: .5; }
  .muestra { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); padding: 0; font-size: 13px; white-space: nowrap; }

  .hoja-in { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: 0 24px; padding: 24px 24px 0; min-height: 400px; }
  .hoja-cuerpo { grid-column: 2; max-width: 36ch; }
  .hoja-cerrar { grid-column: 3; justify-self: end; align-self: start; width: auto; height: auto; margin: 0; padding: 0; border: 0; grid-row: 1; }
  .hoja-cerrar:hover { opacity: .5; }
}


@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo, .cab-nav, .cab-nav-logo svg, .hoja, .cab-lista li, .pie a { transition: none !important; }
  .trabajo-foto { transform: none !important; margin: 0 !important; }
  .trabajo-pie { opacity: 1 !important; }
}
