/* Javi Espárrago — hoja de estilos
   Tipografía tomada de la ficha de Mubox: Barlow Medium para títulos,
   Poppins ExtraLight para texto y Poppins Regular para los datos. */

:root {
  --papel: #ece8de;
  --papel-hondo: #dfd9cb;
  --tinta: #0f0f0f;
  --gris: #55534b;
  --linea: #cdc7b8;
  --musgo: #5d6446;
  --margen: clamp(1.25rem, 4.5vw, 4.5rem);
  --ancho: 92rem;
  --titulos: "Barlow", "Arial Narrow", Arial, sans-serif;
  --texto: "Poppins", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--texto);
  font-weight: 200;
  font-size: 1rem;      /* 16px, como en la ficha de referencia */
  line-height: 1.4;     /* 22,4px */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--linea);
  transition: color 0.2s, text-decoration-color 0.2s;
}
a:hover { color: var(--musgo); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--musgo); outline-offset: 3px; }

h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.saltar {
  position: absolute; left: -999px; top: 0;
  background: var(--tinta); color: var(--papel); padding: 0.5rem 1rem;
}
.saltar:focus { left: 0; z-index: 10; }

/* Rótulo de sección: Poppins ExtraLight en mayúsculas con tracking de 0,8px */
.seccion > h2,
.bloque > h2,
.sobre h2 {
  font-family: var(--texto);
  font-weight: 200;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ---------- Cabecera ---------- */

.cabecera {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 1.6rem var(--margen);
}
.cabecera a { text-decoration: none; }
.cabecera a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.cabecera__nombre {
  font-family: var(--titulos);
  font-weight: 500;
  font-size: 1.4375rem;
  line-height: 1;
}
.cabecera__nombre em { font-style: normal; }
.cabecera nav ul { display: flex; gap: clamp(1.1rem, 3vw, 2.2rem); }
.cabecera nav a[aria-current="page"] { font-weight: 400; }
.cabecera__nombre,
.cabecera nav a { white-space: nowrap; }
/* En pantallas estrechas el contacto queda en "Sobre mí" y en el pie */
@media (max-width: 30rem) {
  .cabecera nav li:last-child { display: none; }
}

main {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 var(--margen);
}

/* ---------- Portada ---------- */

.presentacion {
  padding: clamp(2.5rem, 9vh, 6rem) 0 clamp(3rem, 9vh, 6rem);
}
.presentacion h1 {
  font-family: var(--titulos);
  font-weight: 500;
  font-size: clamp(2.5rem, 8vw, 3.5rem);   /* 56px */
  line-height: 1.05;
}
.presentacion h1 em { font-style: normal; }
.presentacion p {
  max-width: 34em;
  margin-top: 1.1rem;
}

.obras {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  row-gap: clamp(3.5rem, 8vw, 7rem);
}
.obra { grid-column: 1 / -1; }
.obra a { display: block; text-decoration: none; }
.obra a:hover { color: inherit; }
.obra__imagen {
  overflow: hidden;
  background: var(--papel-hondo);
  aspect-ratio: var(--formato, 5 / 3);
}
.obra__imagen img {
  width: 100%; height: 100%;
  object-fit: cover;
  scale: var(--recorte, 1); /* amplía la imagen para ocultar bandas negras del original */
  transition: transform 1.2s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.obra a:hover .obra__imagen img { transform: scale(1.025); }
.obra h2 {
  margin-top: 1.1rem;
  font-family: var(--titulos);
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
}
.obra a:hover h2 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }
.obra p { margin-top: 0.4rem; }

@media (min-width: 52rem) {
  .obra:nth-child(2) { grid-column: 1 / span 7; }
  .obra:nth-child(3) { grid-column: 9 / span 4; align-self: end; }
  .obra:nth-child(4) { grid-column: 4 / span 9; }
}

.seccion {
  margin-top: clamp(5rem, 12vw, 10rem);
}

.lista { border-top: 1px solid var(--linea); }
.lista li { border-bottom: 1px solid var(--linea); }
.lista a,
.lista .lista__fila {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  column-gap: 1rem;
  padding: 1.05rem 0;
  text-decoration: none;
}
.lista__titulo {
  font-family: var(--titulos);
  font-weight: 500;
  font-size: 1.4375rem;
  line-height: 1.2;
}
.lista a:hover .lista__titulo { text-decoration: underline; text-decoration-thickness: 1px; }
.lista__papel { grid-column: 2; }

@media (min-width: 52rem) {
  .lista a,
  .lista .lista__fila { grid-template-columns: 6rem 1.2fr 1fr; align-items: baseline; }
  .lista__papel { grid-column: auto; }
}

/* ---------- Ficha de obra ---------- */

.titulo {
  padding: clamp(1.5rem, 5vh, 3rem) 0 clamp(1.75rem, 4vh, 2.5rem);
}
.titulo h1 {
  font-family: var(--titulos);
  font-weight: 500;
  font-size: clamp(2.25rem, 7.5vw, 3.5rem);   /* 56px */
  line-height: 1.05;
  text-wrap: balance;
}
/* Título internacional: Poppins cursiva a 23px */
.titulo__internacional {
  margin-top: 0.5rem;
  font-style: italic;
  font-weight: 400;
  font-size: 1.4375rem;
  line-height: 1.25;
}
.titulo__datos { margin-top: 1.4rem; }
.titulo__datos strong { font-weight: 400; }

.pantalla {
  position: relative;
  background: #14140f;
  aspect-ratio: var(--formato, 16 / 9);
  overflow: hidden;
}
.pantalla iframe,
.pantalla img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
}
.pie { margin-top: 0.6rem; }

.cuerpo {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  margin-top: clamp(3rem, 8vw, 6rem);
}
@media (min-width: 60rem) {
  .cuerpo { grid-template-columns: 7fr 5fr; align-items: start; }
}

.sinopsis p { max-width: 40em; text-wrap: pretty; }
.sinopsis p + p { margin-top: 1.4em; }

/* Datos: etiqueta en ExtraLight, valor en Regular y mayúsculas */
.ficha { border-top: 1px solid var(--linea); }
.ficha div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 2fr) 3fr;
  column-gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linea);
}
.ficha dd { font-weight: 400; text-transform: uppercase; }

.bloque { margin-top: clamp(4rem, 9vw, 7rem); }

.festivales { border-top: 1px solid var(--linea); max-width: 52rem; }
.festivales li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--linea);
}
.festivales li span:last-child { font-weight: 400; white-space: nowrap; }
.festivales--reparto li span:first-child { font-weight: 400; text-transform: uppercase; }
.festivales--reparto li span:last-child { font-weight: 200; }

.fotogramas {
  display: grid;
  gap: clamp(0.6rem, 1.4vw, 1.25rem);
}
.fotogramas img { width: 100%; background: var(--papel-hondo); }
@media (min-width: 40rem) {
  .fotogramas { grid-template-columns: repeat(2, 1fr); }
  .fotogramas img:nth-child(3n + 1) { grid-column: 1 / -1; }
}

.cartel { max-width: 24rem; }
.cartel img { width: 100%; background: var(--papel-hondo); }

.siguiente {
  display: block;
  margin-top: clamp(5rem, 12vw, 10rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--linea);
  text-decoration: none;
}
.siguiente span {
  display: block;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.siguiente strong {
  display: block;
  font-family: var(--titulos);
  font-weight: 500;
  font-size: clamp(2.25rem, 7.5vw, 3.5rem);
  line-height: 1.05;
  margin-top: 0.35rem;
}
.siguiente:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.1em; }

/* ---------- Sobre mí ---------- */

.sobre {
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  padding-top: clamp(1rem, 4vh, 3rem);
}
@media (min-width: 56rem) {
  .sobre { grid-template-columns: 5fr 7fr; align-items: start; }
  .sobre__retrato { position: sticky; top: 2rem; }
}
.sobre__retrato img { width: 100%; background: var(--papel-hondo); }
.sobre h1 {
  font-family: var(--titulos);
  font-weight: 500;
  font-size: clamp(2.25rem, 7.5vw, 3.5rem);
  line-height: 1.05;
}
.sobre h1 em { font-style: normal; }
.sobre__texto p {
  margin-top: 1.4em;
  max-width: 40em;
  text-wrap: pretty;
}
.sobre__texto cite { font-style: normal; font-weight: 400; }
.sobre h2 { margin-top: clamp(3rem, 6vw, 4.5rem); }
.enlaces { border-top: 1px solid var(--linea); max-width: 40rem; }
.enlaces li { padding: 0.6rem 0; border-bottom: 1px solid var(--linea); }
.enlaces a { font-weight: 400; }

/* ---------- Pie ---------- */

.pie-pagina {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  max-width: var(--ancho);
  margin: clamp(5rem, 12vw, 10rem) auto 0;
  padding: 1.5rem var(--margen) 2.5rem;
  border-top: 1px solid var(--linea);
}
.pie-pagina ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
