/* TRAMADO · tramado.es
   Tres valores: negro (superficie), blanco (texto), gris (lo secundario). Ninguno más.
   Una familia: EB Garamond, alojada en el propio sitio. */

@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --negro: #000000;
  --blanco: #ffffff;
  --gris: #8c8c8c;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }

html { background: var(--negro); scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--negro);
  color: var(--blanco);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.55;
  font-variant-numeric: oldstyle-nums;
  font-kerning: normal;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--blanco); outline-offset: 4px; }

.falta { color: var(--gris); }

/* El wordmark: solo, horizontal, una línea, sin caja. */
.marca {
  text-align: center;
  padding: 4.5rem 1.25rem 0;
}
.marca h1, .marca a {
  display: inline-block;
  margin: 0;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  /* compensa el tracking de la última letra para centrar de verdad */
  margin-right: -0.08em;
}

/* Portada: filmografía como ficha de créditos, partida sobre el eje central. */
.filmo { list-style: none; margin: 5.5rem auto 0; padding: 0 1.25rem; max-width: 38rem; }
.filmo li + li { margin-top: 2.5rem; }
.filmo a { display: grid; grid-template-columns: auto 1fr; column-gap: 2rem; align-items: center; }
.foto { display: block; width: 7.5rem; aspect-ratio: 9 / 16; overflow: hidden; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto.vacio, .obra.vacio {
  outline: 1px solid var(--gris);
  outline-offset: -1px;
  display: grid;
  place-items: center;
  color: var(--gris);
}
.foto.vacio { font-size: 0.875rem; }
.t { display: block; font-size: 1.75rem; line-height: 1.15; text-wrap: balance; }
.c {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
  color: var(--gris);
}
.filmo a:hover .t,
.filmo a:focus-visible .t {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

/* Ficha: la obra, y debajo los créditos en su orden fijo. */
.obra {
  margin: 3.5rem auto 0;
  width: min(100% - 2.5rem, calc(78svh * 9 / 16));
  aspect-ratio: 9 / 16;
  background: var(--negro);
}
.obra video, .obra img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--negro); }
.obra.vacio { font-size: 1rem; }

.creditos {
  max-width: 34rem;
  margin: 3.5rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
}
.creditos h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.15;
  text-wrap: balance;
}
.lugar { margin: 0.5rem 0 2.5rem; color: var(--gris); }
.lineas p { margin: 0; line-height: 1.7; text-wrap: balance; }
.lineas a, .texto a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.cierre { margin: 2.5rem 0 0; }

/* Páginas de texto: Transparencia, aviso legal, privacidad, 404. */
.texto {
  max-width: 34rem;
  margin: 5rem auto 0;
  padding: 0 1.25rem;
  line-height: 1.65;
}
.texto h1 {
  margin: 0 0 2rem;
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.15;
}
.texto p { margin: 0 0 1.1em; hyphens: auto; }
.vacio404 { text-align: center; }

/* Pie, igual en todas las páginas. */
.pie {
  margin-top: 7rem;
  padding: 0 1.25rem 3.5rem;
  text-align: center;
  color: var(--gris);
  font-size: 0.95rem;
  line-height: 1.75;
}
.pie p { margin: 0; }
.pie .descriptor { margin-bottom: 1.25rem; }
.pie a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.pie a:hover, .pie a:focus-visible { color: var(--blanco); }

@media (max-width: 30rem) {
  .marca { padding-top: 3.5rem; }
  .filmo { margin-top: 4rem; }
  .filmo a { grid-template-columns: auto 1fr; column-gap: 1.25rem; }
  .foto { width: 5rem; }
  .t { font-size: 1.375rem; }
  .creditos h1, .texto h1 { font-size: 1.75rem; }
}
