/* Gladys Silva — vidrio y textil. Lienzo crudo, tinta, hilo rojo. */

:root {
  --papel: #f4f0e8;
  --papel-2: #ebe5d9;
  --tinta: #1c1a17;
  --tinta-2: #57514a;
  --linea: #d6cdbf;
  --hilo: #a3281d;
  --marco: #e6e0d4;
  --serif: "EB Garamond", "Garamond", "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "Courier New", monospace;
  --margen: clamp(32px, 5vw, 72px);
  --salida: cubic-bezier(.2, .7, .2, 1);
}

@view-transition { navigation: auto; }

*, *::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: 400 clamp(18px, 1.05vw + 12px, 21px)/1.6 var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
/* Grano de lienzo: ruido fijo, sin color. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: .07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--hilo); color: var(--papel); }
:focus-visible { outline: 1.5px solid var(--hilo); outline-offset: 3px; }

.mono, .rotulo {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .06em;
  line-height: 1.55;
}
.rotulo { text-transform: uppercase; color: var(--tinta-2); }

/* Links con subrayado que crece */
.link {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--salida), color .2s;
  padding-bottom: 1px;
}
.link:hover, .link[aria-current="page"] { background-size: 100% 1px; }

/* Borrador */
.borrador {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-align: center;
  padding: 8px var(--margen);
  background: var(--tinta);
  color: var(--papel);
}

/* Cabecera */
.cab {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--margen);
  padding-top: max(18px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--papel) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.cab.con-borde { border-bottom-color: var(--linea); }
/* Lo que se está viendo: en el celular, a la izquierda de la barra */
.cab-actual {
  position: relative;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 0;
}
.cab-actual::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1.5px; background: var(--hilo); }
.cab-actual.cambia { animation: cambia .45s var(--salida); }
@keyframes cambia { from { opacity: 0; filter: blur(4px); transform: translateY(4px); } to { opacity: 1; filter: none; transform: none; } }
.nav { display: none; gap: clamp(18px, 2.4vw, 34px); width: 100%; }
.nav a { position: relative; font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-2); text-decoration: none; padding: 6px 0; background: none; transition: color .25s; }
.nav a:last-child { margin-left: auto; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--hilo); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--salida); }
.nav a:hover { color: var(--tinta); }
.nav a[aria-current="true"], .nav a[aria-current="page"] { color: var(--tinta); }
.nav a[aria-current="true"]::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.hoja nav a[aria-current="true"], .hoja nav a[aria-current="page"] { font-style: italic; text-decoration: underline; text-decoration-color: var(--hilo); text-decoration-thickness: 1.5px; text-underline-offset: 8px; }
.menu-btn {
  font: inherit;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: none;
  border: 0;
  color: inherit;
  min-height: 44px;
  padding: 0 4px;
  cursor: pointer;
}
@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-btn, .cab-actual { display: none; }
}

/* Menú del celular */
.hoja {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: color-mix(in srgb, var(--papel) 82%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: var(--tinta);
}
.hoja::backdrop { background: transparent; }
.hoja[open] { animation: aparecer .35s var(--salida); }
.hoja nav { display: flex; flex-direction: column; gap: 6px; padding: 96px var(--margen) 40px; }
.hoja nav a { font-size: 34px; text-decoration: none; padding: 6px 0; }
.hoja .cerrar { position: absolute; top: max(14px, env(safe-area-inset-top)); right: var(--margen); }

/* Botón */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--tinta);
  background: var(--tinta);
  color: var(--papel);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, transform .12s var(--salida);
}
.btn:hover { background: var(--hilo); border-color: var(--hilo); }
.btn:active { transform: scale(.97); }
.btn.claro { background: transparent; color: var(--tinta); }
.btn.claro:hover { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }

/* Hilos: los dibuja site.js y avanzan o se retraen con el scroll */
.hilos { position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; overflow: visible; }
.hilos path { fill: none; stroke: var(--hilo); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.hilos .fibra { stroke-width: 1.15; opacity: .9; }
.hilos .hilacha { stroke-width: 1.3; }
@media (max-width: 899px) { .hilos .fibra { stroke-width: 1.1; opacity: 1; } .hilos .hilacha { stroke-width: 1.25; } }
/* Sin el haz del margen, cada título lleva su puntada roja bordada debajo (lo textil que le gusta a Gladys) */

/* Puntada bajo los títulos */
.puntada { display: block; width: 76px; height: 14px; margin-top: 14px; overflow: visible; }
.puntada path { fill: none; stroke: var(--hilo); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--salida) .2s; }
.rv.in .puntada path, .in > .puntada path { stroke-dashoffset: 0; }

/* Secciones */
main { position: relative; }
.sec { padding: clamp(72px, 12vw, 160px) var(--margen); }
.sec-tit {
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.04;
  letter-spacing: -.01em;
  margin: 0 0 clamp(32px, 5vw, 64px);
}
.sec-tit .rotulo { display: block; margin-bottom: 14px; }
.ancho { max-width: 1320px; margin-inline: auto; }

/* Portada */
.hero {
  display: grid;
  gap: 40px;
  padding: clamp(36px, 7vw, 96px) var(--margen) clamp(64px, 9vw, 120px);
  align-items: end;
}
.hero h1 {
  font-weight: 400;
  font-size: clamp(56px, 10.5vw, 168px);
  line-height: .92;
  letter-spacing: -.025em;
  margin: 0;
}
.hero h1 span { display: block; }
.hero h1 .seg { padding-left: .55em; }
.hero .bajada { margin: 28px 0 0; color: var(--tinta-2); }
.frase {
  display: block;
  margin-top: 26px;
  font-style: italic;
  font-size: clamp(22px, 2vw, 30px);
  min-height: 1.4em;
}
.frase span { display: inline-block; transition: opacity .55s var(--salida), filter .55s var(--salida), transform .55s var(--salida); }
.frase span.fuera { opacity: 0; filter: blur(8px); transform: translateY(-6px); }
.frase span.entra { opacity: 0; filter: blur(8px); transform: translateY(6px); transition: none; }
.hero figure { margin: 0; }
.hero figure img, .hero figure video { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--papel-2); }
@media (min-width: 900px) {
  .hero { min-height: calc(100svh - 110px); }
  .hero figure img, .hero figure video { aspect-ratio: auto; height: min(calc(100svh - 230px), 820px); }
}
.hero figcaption { margin-top: 10px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 110px); }
  .hero figure { margin-bottom: 8px; }
}

/* Portada: el nombre con su puntada roja (el hilo que subraya lo textil) y su retrato cubierto de cartas de
   tela. Celular primero: el nombre arriba, apenas debajo del menú, y la foto enseguida; en la compu, la foto al
   costado. La carta bordada que ocupaba la parte de arriba se sacó el 28/10 a pedido de Gladys: sus reglas
   (.carta) y su código en site.js quedan, pero sin el <svg class="carta"> no se dibuja nada. */
.portada { position: relative; padding: 36px var(--margen) 8px; }
.portada-texto { position: relative; z-index: 1; }
.portada h1 {
  font-weight: 400;
  font-size: clamp(46px, 13.5vw, 64px);
  line-height: .9;
  letter-spacing: -.03em;
  margin: 0;
}
.portada h1 .puntada { width: 104px; height: 19px; margin-top: 14px; }
.portada h1 .puntada path { stroke-width: 1.15; }
.portada .bajada { margin: 20px 0 0; color: var(--tinta-2); }
.portada .frase { margin-top: 8px; min-height: 1.3em; }
.portada-foto { margin: 22px 0 0; background: var(--marco); }
.portada-foto img { display: block; width: 100%; height: auto; aspect-ratio: 542 / 720; object-fit: cover; }
@media (min-width: 760px) {
  .portada {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: clamp(40px, 6vw, 110px);
    padding: clamp(48px, 9vh, 110px) var(--margen) clamp(16px, 4vh, 48px);
  }
  .portada h1 { font-size: clamp(58px, 11vw, 176px); }
  .portada h1 .puntada { width: 168px; height: 31px; margin-top: 22px; }
  .portada h1 .puntada path { stroke-width: .9; }
  .portada .bajada { margin-top: 24px; }
  .portada .frase { margin-top: 14px; }
  .portada-foto { margin: 0; }
  .portada-foto img { width: auto; height: min(calc(100svh - 200px), 720px, 62vw); min-height: 360px; }
}
.carta { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.carta path { fill: none; stroke: var(--tinta); stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: .7; }
.carta path.roja { stroke: var(--hilo); stroke-width: 1.35; opacity: 1; }
.carta path.hebra { stroke-width: 1; opacity: .62; }
.carta path.roja.hebra { stroke-width: 1.25; opacity: .9; }
.carta.bordando path { animation: bordar var(--dur, 1.6s) cubic-bezier(.45, .05, .25, 1) var(--espera, 0s) forwards; }
@keyframes bordar { to { stroke-dashoffset: 0; } }
@media (max-width: 759px) {
  #obra { padding-top: 56px; }
  .sec-tit { font-size: clamp(30px, 8.6vw, 40px); margin-bottom: 26px; }
  .grupo-tit { margin-bottom: 18px; }
  .grupo + .grupo { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { .carta path { stroke-dashoffset: 0; } }

/* Costura: puntadas rojas cruzadas sobre un borde; las dibuja site.js */
.costura { position: absolute; left: 0; pointer-events: none; overflow: visible; z-index: 3; }
.costura path { fill: none; stroke: var(--hilo); stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.costura .eje { stroke-width: 1.3; }
.costura .punto { stroke-width: 1.5; }
.costura.cosida path { transition: stroke-dashoffset .5s var(--salida); stroke-dashoffset: 0; }

/* Grilla de obra */
.grupo + .grupo { margin-top: clamp(64px, 9vw, 120px); }
.grupo-tit { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--linea); padding-top: 14px; margin-bottom: 28px; }
.grupo-tit h3 { font-weight: 400; font-style: italic; font-size: clamp(26px, 2.6vw, 36px); margin: 0; }
/* Obras: todas con el mismo marco (pedido de Gladys): un paspartú de lienzo claro, igual para todas, con la
   foto entera y nítida adentro. Nada recortado. En el celular, una columna. */
.fila { display: grid; grid-template-columns: 1fr; gap: 44px; }
.pieza { margin: 0; }
.pieza button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--marco);
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: inset 0 0 0 1px rgba(28, 26, 23, .05);
}
.pieza img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10%;
  filter: drop-shadow(0 1px 2px rgba(28, 26, 23, .12));
  transition: transform 1.1s var(--salida), filter .9s var(--salida), opacity .9s var(--salida);
}
.pieza img.cubre { object-fit: cover; padding: 0; filter: none; }
.pieza button:hover img { transform: scale(1.03); }
.pieza button:active img { transform: scale(1.01); }
.insignia { position: absolute; left: 12px; top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--papel); background: rgba(28, 26, 23, .7); padding: 4px 8px; }
.pieza figcaption { margin-top: 12px; }
.pieza .t { font-size: 19px; line-height: 1.3; }
.t.sin-titulo { font-size: 17px; color: var(--tinta-2); }
@media (min-width: 640px) { .fila { grid-template-columns: repeat(2, 1fr); gap: 48px 28px; } }
@media (min-width: 1100px) { .fila { grid-template-columns: repeat(3, 1fr); gap: 64px 36px; } }

/* Fondos de tela de su obra: muy tenues, fundidos hacia los bordes, nunca detrás de una foto de obra */
.con-tela, .grupo-vidrio { position: relative; isolation: isolate; }
.con-tela::before, .grupo-vidrio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: center / cover no-repeat;
  mix-blend-mode: multiply;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent), linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 78%, transparent), linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
  mask-composite: intersect;
}
.tela-cruda::before { background-image: url("../img/texturas/tejido-crudo.webp"); opacity: .17; }
.grupo-vidrio::before { background-image: url("../img/texturas/malla-vidrio.webp"); background-size: 100% auto; background-position: center top; opacity: .16; inset: -60px -4vw auto; height: 900px; }

/* Franja de tela negra (Portfolio), cosida arriba y abajo con hilo rojo */
.banda-negra {
  position: relative;
  isolation: isolate;
  color: var(--papel);
  background: #1c1a17;
  padding: clamp(72px, 11vw, 140px) var(--margen);
  margin: 24px 0;
}
.banda-negra::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/texturas/tela-negra.webp") 75% center / cover; opacity: .36; -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 55%); mask-image: linear-gradient(to right, transparent 0%, #000 55%); }
.banda-negra .rotulo { color: rgba(244, 240, 232, .7); }
.banda-negra .sec-tit { max-width: 14em; }
.btn.claro-sobre-negro { background: var(--papel); color: var(--tinta); border-color: var(--papel); }
.btn.claro-sobre-negro:hover { background: var(--hilo); color: var(--papel); border-color: var(--hilo); }
.btn.borde-sobre-negro { background: transparent; color: var(--papel); border-color: rgba(244, 240, 232, .6); }
.btn.borde-sobre-negro:hover { background: var(--papel); color: var(--tinta); }

/* Taller */
.taller { display: grid; gap: 40px; align-items: center; }
.taller img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.cita { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.35; font-style: italic; margin: 0; }
.cita footer { font-style: normal; margin-top: 22px; }
@media (min-width: 900px) { .taller { grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 120px); } }

/* Texto largo */
.texto { max-width: 34em; }
.texto p { margin: 0 0 1.1em; }
.texto p:first-of-type { font-size: 1.22em; line-height: 1.45; }
.dos-col { display: grid; gap: 40px; }
@media (min-width: 1000px) { .dos-col { grid-template-columns: 1fr 1.4fr; gap: clamp(48px, 8vw, 140px); } }

/* Listas de trayectoria */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--linea); }
.lista li:last-child { border-bottom: 1px solid var(--linea); }
.lista .anio { font-family: var(--mono); font-size: 13px; padding-top: 4px; color: var(--tinta-2); }
.lista.simple li { grid-template-columns: 1fr; }
.verif { font-family: var(--mono); font-size: 11px; color: var(--hilo); margin-left: 6px; white-space: nowrap; }

/* Bloque portfolio */
.cierre { text-align: left; border-top: 1px solid var(--linea); }
.cierre .sec-tit { max-width: 14em; }
.acciones { display: flex; flex-wrap: wrap; gap: 14px; }

/* Pie: la franja de tela negra cosida, con el contacto, en todas las páginas */
.pie { padding-bottom: max(64px, env(safe-area-inset-bottom)); margin: 0; }
.pie a { text-decoration: none; }
.pie-in { position: relative; max-width: 1320px; margin-inline: auto; display: grid; gap: 30px; }
.pie-mail { font-size: clamp(24px, 3.4vw, 44px); line-height: 1.2; overflow-wrap: anywhere; }
.pie-firma { color: rgba(244, 240, 232, .6); }
@media (min-width: 900px) { .pie-in { grid-template-columns: 1fr auto; align-items: end; } .pie-firma { grid-column: 1 / -1; } }

/* Bio: el retrato que Gladys marcó como importante */
.bio-retrato { margin: 0; background: var(--marco); }
.bio-retrato img { width: 100%; height: auto; max-height: 82vh; object-fit: cover; object-position: center 30%; }
.pagina-texto { padding-top: clamp(48px, 8vw, 110px); }

/* Revelado: entra desenfocado y se asienta */
.js .rv { opacity: 0; filter: blur(10px); transform: translateY(14px); transition: opacity .9s var(--salida), filter .9s var(--salida), transform .9s var(--salida); }
.js .rv.in { opacity: 1; filter: none; transform: none; }

/* Visor de obra */
.visor {
  border: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: color-mix(in srgb, var(--papel) 94%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  color: var(--tinta);
}
.visor::backdrop { background: transparent; }
.visor[open] { animation: aparecer .4s var(--salida); }
.visor-in { height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: max(10px, env(safe-area-inset-top)) var(--margen) max(12px, env(safe-area-inset-bottom)); }
.visor-bar, .visor-nav { display: flex; justify-content: space-between; align-items: center; }
.visor-cuerpo { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; }
.visor-fig { margin: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; background: var(--marco); padding: clamp(12px, 3vw, 36px); transition: opacity .25s var(--salida), filter .25s var(--salida); }
.visor-fig.cambia { opacity: 0; filter: blur(6px); }
.visor-fig img, .visor-fig video { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.visor-fig img { cursor: zoom-in; transition: transform .45s var(--salida); touch-action: manipulation; }
.visor-fig.zoom img { transform: scale(2.3); cursor: zoom-out; }
.visor-fig video { width: 100%; }
.visor-lado { display: grid; gap: 12px; }
.ficha { display: grid; gap: 2px; }
.ficha .t { font-size: 22px; line-height: 1.2; margin-bottom: 4px; }
.ficha .t.sin-titulo { font-size: 18px; }
.ficha-nota { margin-top: 8px; }
.ficha-foto, .ficha-cuenta, .visor-ayuda { color: var(--tinta-2); }
.ficha-cuenta { margin-top: 8px; }
.visor-ayuda { margin: 0; font-size: 11.5px; }
.visor-detalles { display: flex; gap: 8px; overflow-x: auto; }
.visor-detalles:empty { display: none; }
.visor-detalles button { flex: none; width: 56px; height: 56px; padding: 0; border: 1px solid transparent; background: var(--fondo); cursor: pointer; transition: border-color .2s, opacity .2s; opacity: .7; }
.visor-detalles button[aria-current="true"] { border-color: var(--hilo); opacity: 1; }
.visor-detalles img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .visor-cuerpo { grid-template-rows: none; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 48px; }
  .visor-fig { height: 100%; }
}
::view-transition-group(obra) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }

@keyframes aparecer { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- Portfolio ---------- */
.pf-tapa { min-height: calc(100svh - 110px); display: grid; align-content: end; gap: 40px; padding: clamp(36px, 7vw, 96px) var(--margen); }
.pf-tapa figure { margin: 0; }
.pf-tapa figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 900px) {
  .pf-tapa { grid-template-columns: 1.15fr .85fr; align-items: end; gap: clamp(40px, 6vw, 110px); }
  .pf-tapa figure img { aspect-ratio: auto; height: min(calc(100svh - 230px), 820px); }
}
.pf-indice-sec { padding: clamp(48px, 7vw, 96px) var(--margen); border-top: 1px solid var(--linea); }
.pf-tapa h1 { font-weight: 400; font-size: clamp(56px, 10vw, 156px); line-height: .92; letter-spacing: -.025em; margin: 0; }
.pf-tapa h1 em { display: block; padding-left: .55em; font-style: normal; }
.pf-tapa .datos { display: grid; gap: 4px; }
.pf-indice { columns: 2 220px; column-gap: 40px; list-style: none; padding: 0; margin: 0; counter-reset: n; }
.pf-indice li { break-inside: avoid; padding: 8px 0; border-top: 1px solid var(--linea); }
.pf-indice a { text-decoration: none; display: flex; gap: 14px; }
.pf-indice a:hover .t { font-style: italic; }
/* En el índice todas las obras van al mismo tamaño (en el PDF las «sin título» salían más grandes que las tituladas) */
.pf-indice .t.sin-titulo { font-size: inherit; }
.lamina { display: grid; gap: 28px; padding: clamp(56px, 9vw, 120px) var(--margen); border-top: 1px solid var(--linea); }
.lamina figure { margin: 0; }
.lamina-fig { background: var(--marco); display: grid; place-items: center; padding: clamp(18px, 5vw, 64px); }
.lamina img { width: auto; max-width: 100%; max-height: 78vh; }
.lamina .num { font-family: var(--mono); font-size: 13px; color: var(--hilo); }
.lamina .t { font-size: clamp(28px, 3vw, 40px); line-height: 1.15; margin: 8px 0 18px; font-weight: 400; }
.lamina .t.sin-titulo { color: var(--tinta-2); font-size: clamp(22px, 2.2vw, 30px); }
.lamina dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; }
.lamina dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--tinta-2); padding-top: 5px; }
.lamina dd { margin: 0; }
.lamina .extra { margin-top: 20px; width: min(240px, 60%); aspect-ratio: 3 / 2; background: var(--marco); overflow: hidden; }
.lamina .extra img { width: 100%; height: 100%; object-fit: cover; }
.presentacion { max-width: 34em; margin: 28px 0 0; font-size: 1.05em; line-height: 1.55; color: var(--tinta-2); }
@media (min-width: 1000px) {
  .lamina { grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
  .lamina > .rv:last-child { padding-bottom: 76px; }
}
.flota { position: fixed; right: var(--margen); bottom: max(20px, env(safe-area-inset-bottom)); z-index: 45; box-shadow: 0 6px 22px rgba(28, 26, 23, .18); transition: opacity .35s var(--salida), transform .35s var(--salida), background-color .2s, color .2s; }
/* Al llegar al pie (donde ya está «Guardar en PDF») el flotante se va */
.flota.oculta { opacity: 0; transform: translateY(14px); pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; filter: none; transform: none; }
}

/* PDF: lo genera scripts/pdf.sh imprimiendo /portfolio/?pdf con Chromium */
.para-pdf .rv { opacity: 1 !important; filter: none !important; transform: none !important; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  body::after, .cab, .borrador, .flota, .hilos, .pie .acciones, .no-print { display: none !important; }
  .js .rv { opacity: 1 !important; filter: none !important; transform: none !important; }
  .pf-tapa { min-height: 0; break-after: page; grid-template-columns: 1fr; }
  .pf-tapa { break-inside: avoid; gap: 8mm; }
  .pf-tapa figure img { height: auto; max-height: 105mm; aspect-ratio: auto; width: auto; }
  .pf-tapa h1 { font-size: 46pt; }
  .presentacion { font-size: 10.5pt; margin-top: 6mm; }
  .pie { break-before: avoid; padding: 6mm 0 0; }
  .pf-indice-sec { break-after: page; }
  .lamina { break-inside: avoid; break-after: page; grid-template-columns: 1fr; padding: 0; border: 0; }
  .lamina img { max-height: 170mm; background: none; }
  .lamina .extra { display: none; }
  .sec { padding: 0 0 10mm; break-before: page; }
  a { text-decoration: none; }
  .verif { display: none; }
  .banda-negra { background: none !important; color: var(--tinta) !important; padding: 8mm 0 0 !important; margin: 0 !important; }
  .banda-negra::before, .costura { display: none !important; }
  .banda-negra .rotulo, .pie-firma { color: var(--tinta-2) !important; }
}

/* Áreas táctiles de 44 px sin mover el diseño */
.pf-indice li { padding: 0; }
.pf-indice a { padding-block: 8px; }
.pie .mono a, .pf-tapa .mono a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.pie-mail a { display: inline-block; padding-block: 6px; }
@media (prefers-reduced-motion: reduce) { .costura path { transition-delay: 0s !important; } }
