/* Mari · home y archivo de proyectos
   El fichero bordó es la primera hoja. El sobre de papel vegetal está atado con un moño;
   al desatarlo, los títulos se retiran y los trabajos salen a ocupar su lugar. */

/* ---------- intro: el logo sobre el fichero, una sola vez por visita ---------- */
.intro-logo { display: none; }
html.con-intro .intro-logo {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 200;
  background: var(--bordo) url(../img/objetos/textura-bordo.webp) 0 0 / 600px auto; color: var(--papel);
  box-shadow: 0 24px 50px rgba(20, 6, 10, .35);
  animation: intro-sale .7s cubic-bezier(.7, 0, .2, 1) 1s both;
  cursor: pointer;
}
html.con-intro .intro-logo.fuera { animation: intro-sale .4s cubic-bezier(.6, 0, .3, 1) both; }
.intro-logo__marca { width: min(230px, 46vw); }
html.con-intro .intro-logo__marca { animation: intro-logo .8s cubic-bezier(.3, 0, .15, 1) .1s both; }
/* el logo se escribe de izquierda a derecha, como a mano */
@keyframes intro-logo {
  from { clip-path: inset(-10% 100% -10% 0); opacity: .3; translate: 0 6px; }
  to { clip-path: inset(-10% 0 -10% 0); opacity: 1; translate: 0 0; }
}
/* y la ficha se levanta para dejar ver la página */
@keyframes intro-sale { to { translate: 0 -104%; } }

/* ---------- hero ---------- */
.hero { padding-top: 28px; padding-bottom: 140px; }
.escena {
  --sobre-w: clamp(330px, 35vw, 470px);
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--sobre-w) minmax(0, 1fr); column-gap: clamp(24px, 3vw, 56px);
  align-items: end;
  padding-top: calc(var(--sobre-w) * .43);           /* lugar para la solapa cuando se abre */
}
.hero__titulo {
  grid-column: 1; justify-self: start; margin-bottom: calc(var(--sobre-w) * .1);
  font-size: clamp(40px, 4.3vw, 64px); line-height: 1.02; letter-spacing: -.012em;
}
.hero__titulo em { color: var(--rosa); }
.hero__bajada {
  grid-column: 3; justify-self: end; margin-bottom: calc(var(--sobre-w) * .1);
  max-width: 26ch; font-size: 17px; line-height: 1.55; color: rgba(243, 238, 232, .86);
}
.linea { display: block; overflow: hidden; padding: 0 .06em .24em 0; margin-bottom: -.24em; }
.linea > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .linea > span { animation: subir-linea .9s var(--suave) both; }
  .linea:nth-child(2) > span { animation-delay: .08s; }
  .linea:nth-child(3) > span { animation-delay: .16s; }
  .hero__bajada { animation: aparecer .9s .35s var(--suave) both; }
  /* después de la intro, el título entra cuando la ficha ya se levantó */
  .tras-intro .linea > span { animation-delay: 1.4s; }
  .tras-intro .linea:nth-child(2) > span { animation-delay: 1.48s; }
  .tras-intro .linea:nth-child(3) > span { animation-delay: 1.56s; }
  .tras-intro .hero__bajada { animation-delay: 1.75s; }
}
@keyframes subir-linea { from { translate: 0 105%; } to { translate: 0 0; } }
@keyframes aparecer { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* ---------- sobre de papel vegetal ---------- */
.sobre { grid-column: 2; position: relative; width: 100%; aspect-ratio: 897 / 580; perspective: 1800px; }
.sobre > img { position: absolute; left: 0; width: 100%; height: auto; pointer-events: none; user-select: none; }
.sobre__atras { top: 0; z-index: 2; }
.sobre__frente { top: 0; z-index: 5; filter: drop-shadow(0 20px 34px rgba(20, 6, 10, .3)); }
.sobre__solapa { bottom: 100%; z-index: 6; transform-origin: 50% 100%; transform: rotateX(180deg); }
/* el sobre se puede correr a mano sin arrastrar los trabajos (variables que escribe el modo edición) */
.sobre > img, .sobre > .atado { translate: var(--sobre-dx, 0px) var(--sobre-dy, 0px); }

/* trabajos guardados en el sobre */
.grupo { position: absolute; left: 12%; top: 6%; width: 76%; height: 88%; z-index: 3; }
.grupo__papeles { position: absolute; inset: 0; }
.pieza-g { position: absolute; transition: translate .6s var(--suave), rotate .6s var(--suave); }
.ficha-mini {
  aspect-ratio: 1000 / 699; padding: 6%;
  background: url(../img/objetos/ficha-lisa-h.webp) center / 100% 100%;
  filter: drop-shadow(0 10px 16px rgba(20, 6, 10, .25));
}
.ficha-mini > img:not(.clip) { width: 100%; height: 100%; object-fit: cover; }
.ficha-mini .clip { width: 13px; top: -20px; left: 16%; }
.m1 { left: 0; top: 12%; width: 60%; rotate: -7deg; }
.m2 { left: 40%; top: 32%; width: 60%; rotate: 6deg; }
.f1 { left: 0; top: 12%; width: 37%; rotate: -8deg; }
.f2 { left: 31.5%; top: 3%; width: 37%; rotate: 2deg; }
.f3 { left: 63%; top: 13%; width: 37%; rotate: 9deg; }
.grupo__boton { position: absolute; left: 50%; top: 100%; translate: -50% 0; margin-top: 18px; opacity: 0; }
.hero__cta { position: absolute; z-index: 10; left: 50%; top: 54%; translate: calc(-50% + var(--sobre-dx, 0px)) calc(-50% + var(--sobre-dy, 0px)); opacity: 0; box-shadow: 0 10px 24px rgba(20, 6, 10, .3); }
.escena:not([data-estado="abierto"]) .grupo__boton, .escena:not([data-estado="abierto"]) .hero__cta { pointer-events: none; }
@media (hover: hover) {
  .escena[data-estado="abierto"] .grupo--marca:hover .m1 { translate: -14px -6px; rotate: -10deg; }
  .escena[data-estado="abierto"] .grupo--marca:hover .m2 { translate: 14px 4px; rotate: 9deg; }
  .escena[data-estado="abierto"] .grupo--foto:hover .f1 { translate: -18px 0; rotate: -12deg; }
  .escena[data-estado="abierto"] .grupo--foto:hover .f2 { translate: 0 -12px; }
  .escena[data-estado="abierto"] .grupo--foto:hover .f3 { translate: 18px 0; rotate: 13deg; }
}

/* cinta que ata el sobre */
.atado { position: absolute; inset: 0; z-index: 7; pointer-events: none; --bh: calc(var(--sobre-w) * .042); }
.banda { position: absolute; display: block; filter: drop-shadow(0 1px 1.5px rgba(20, 6, 10, .35)); }
.banda--i, .banda--d { top: calc(50% - var(--bh) / 2); width: 54%; height: var(--bh); background: url(../img/objetos/cinta-raso.webp) 0 50% / auto 100% repeat-x; }
.banda--i { left: -1.5%; transform-origin: 96% 50%; }
.banda--d { left: 47.5%; transform-origin: 4% 50%; background-position: 37% 50%; }
.banda--a, .banda--b { left: calc(50% - var(--bh) / 2); width: var(--bh); height: 54%; overflow: hidden; }
.banda--a { top: -1.5%; transform-origin: 50% 96%; }
.banda--b { top: 47.5%; transform-origin: 50% 4%; }
.banda--a::before, .banda--b::before {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: calc(var(--sobre-w) / 1.5466 * .54 + 2px); height: var(--bh); translate: -50% -50%; rotate: 90deg;
  background: url(../img/objetos/cinta-raso.webp) 20% 50% / auto 100% repeat-x;
}
.banda--b::before { background-position: 64% 50%; }
.mono { position: absolute; z-index: 1; left: 24%; top: 30.8%; width: 52%; aspect-ratio: 1280 / 924; filter: drop-shadow(0 6px 8px rgba(20, 6, 10, .35)); }
.mono__pieza { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 33%; transition: scale .5s var(--suave), rotate .5s var(--suave); }
.boton-mono {
  position: absolute; left: 50%; top: 50%; width: 46%; height: 62%; translate: -50% -50%;
  z-index: 9; border: 0; border-radius: 40%; background: transparent; cursor: pointer;
  translate: calc(-50% + var(--sobre-dx, 0px)) calc(-50% + var(--sobre-dy, 0px));
}
.boton-mono:focus-visible { outline: 2px solid var(--rosa); outline-offset: 4px; }
/* invitación al pasar el cursor: el nudo tira de las cintas, los lazos se inflan y las puntas se mecen */
.sobre:has(.boton-mono:hover) .banda--i, .sobre:has(.boton-mono:focus-visible) .banda--i { animation: tira-i 1.6s ease-in-out infinite; }
.sobre:has(.boton-mono:hover) .banda--d, .sobre:has(.boton-mono:focus-visible) .banda--d { animation: tira-d 1.6s ease-in-out infinite; }
.sobre:has(.boton-mono:hover) .banda--a, .sobre:has(.boton-mono:focus-visible) .banda--a { animation: tira-a 1.6s ease-in-out infinite; }
.sobre:has(.boton-mono:hover) .banda--b, .sobre:has(.boton-mono:focus-visible) .banda--b { animation: tira-b 1.6s ease-in-out infinite; }
.sobre:has(.boton-mono:hover) .mono, .sobre:has(.boton-mono:focus-visible) .mono { animation: tira-nudo 1.6s ease-in-out infinite; }
.sobre:has(.boton-mono:hover) .lazo-i, .sobre:has(.boton-mono:focus-visible) .lazo-i { animation: infla-i 1.6s ease-in-out infinite; }
.sobre:has(.boton-mono:hover) .lazo-d, .sobre:has(.boton-mono:focus-visible) .lazo-d { animation: infla-d 1.6s ease-in-out infinite; }
.sobre:has(.boton-mono:hover) .punta-i, .sobre:has(.boton-mono:focus-visible) .punta-i { animation: mece-i 1.6s ease-in-out infinite; }
.sobre:has(.boton-mono:hover) .punta-d, .sobre:has(.boton-mono:focus-visible) .punta-d { animation: mece-d 1.6s ease-in-out infinite; }
@keyframes tira-i { 50% { translate: 4px 0; } }
@keyframes tira-d { 50% { translate: -4px 0; } }
@keyframes tira-a { 50% { translate: 0 4px; } }
@keyframes tira-b { 50% { translate: 0 -4px; } }
@keyframes tira-nudo { 50% { translate: 0 -2px; scale: 1.02; } }
@keyframes infla-i { 50% { scale: 1.05; rotate: -3deg; } }
@keyframes infla-d { 50% { scale: 1.05; rotate: 3deg; } }
@keyframes mece-i { 50% { rotate: 3.5deg; } }
@keyframes mece-d { 50% { rotate: -3.5deg; } }
.escena[data-estado="abierto"] .boton-mono, .escena[data-estado="abriendo"] .boton-mono { visibility: hidden; }
.escena[data-estado="abierto"] .hero__titulo, .escena[data-estado="abierto"] .hero__bajada { pointer-events: none; }

/* ---------- cinta larga (canvas) ---------- */
.cinta-larga { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }

/* ---------- objetos compartidos: sobre abierto y ficha lisa ---------- */
.sobre-ab { position: relative; aspect-ratio: 897 / 977; filter: drop-shadow(0 16px 26px rgba(30, 21, 23, .13)); }
.sobre-ab > img { position: absolute; left: 0; width: 100%; height: auto; pointer-events: none; }
/* sobre el papel claro el vegetal necesita un poco más de cuerpo para leerse */
.hoja--papel .sobre-ab > img { filter: brightness(.93) contrast(1.35); }
.hoja--papel .sobre-ab { filter: drop-shadow(0 0 .6px rgba(30, 21, 23, .45)) drop-shadow(0 16px 26px rgba(30, 21, 23, .14)); }
.sobre-ab__solapa { top: 0; z-index: 1; }
.sobre-ab__atras { bottom: 0; z-index: 2; }
.sobre-ab__frente { bottom: 0; z-index: 4; }
.sobre-ab__dentro { position: absolute; z-index: 3; left: 21%; width: 58%; bottom: 19%; transition: translate .7s var(--suave); }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .sobre-ab .asoma { animation: asomar linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  }
}
@keyframes asomar { from { translate: 0 34%; } to { translate: 0 0; } }

/* ---------- muestra: algunos de mis trabajos ---------- */
.trabajos { padding-top: 92px; padding-bottom: 140px; text-align: center; }
.muestra__titulo { font-size: clamp(34px, 3.8vw, 54px); line-height: 1.05; }
.muestra__titulo em { color: var(--bordo); }
.muestra__fila {
  list-style: none; margin: 60px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 32px); align-items: end;
}
.mini { display: block; text-decoration: none; color: var(--tinta); }
.mini:hover { color: var(--tinta); }
.mini__objeto { height: clamp(150px, 15vw, 196px); display: flex; align-items: flex-end; justify-content: center; transition: translate .5s var(--suave); }
.muestra__fila li:nth-child(odd) .mini__objeto { rotate: -2deg; }
.muestra__fila li:nth-child(even) .mini__objeto { rotate: 2deg; }
.mini:hover .mini__objeto, .mini:focus-visible .mini__objeto { translate: 0 -8px; }
.mini:hover .sobre-ab__dentro, .mini:focus-visible .sobre-ab__dentro { translate: 0 -10%; }
.mini__ficha {
  position: relative; height: 90%; aspect-ratio: 699 / 1000; padding: 8% 8% 24%;
  background: url(../img/objetos/ficha-lisa.webp) center / 100% 100%;
  filter: drop-shadow(0 10px 16px rgba(30, 21, 23, .14));
}
.mini__ficha > img:not(.clip) { width: 100%; height: 100%; object-fit: cover; }
.mini__ficha .clip { width: 12px; top: -20px; left: auto; right: 22%; }
.mini__sobre { height: 100%; }
.hoja--papel .mini__sobre > img { filter: brightness(.88) contrast(1.6); }
.mini__nombre { margin-top: 16px; font-style: italic; font-weight: 400; font-size: 20px; line-height: 1.2; }
.mini__tipo { margin-top: 3px; font-family: var(--f-nota); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.muestra__mas { margin-top: 104px; }

/* ---------- archivo completo (proyectos.html) ---------- */
.archivo-pagina { padding-top: 72px; }
.archivo-pagina__titulo { font-style: italic; font-size: clamp(52px, 6.4vw, 92px); line-height: 1; color: var(--bordo); }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0 24px; }
.filtro {
  padding: 9px 18px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 500;
  background: rgba(132, 34, 54, .08); color: var(--bordo); transition: background-color .2s ease, color .2s ease;
}
.filtro:hover { background: rgba(132, 34, 54, .16); color: var(--bordo); }
.filtro[aria-current="true"] { background: var(--bordo); color: var(--hoja); }
.archivo { padding-top: 40px; align-items: start; }
.archivo[data-filtro="identidad"] .tarjeta[data-tipo="fotografia"],
.archivo[data-filtro="fotografia"] .tarjeta[data-tipo="identidad"] { display: none; }
.archivo[data-filtro="identidad"], .archivo[data-filtro="fotografia"] { row-gap: 90px; }
.archivo[data-filtro="identidad"] .tarjeta, .archivo[data-filtro="fotografia"] .tarjeta { grid-column: span 4; margin-top: 0; }
.tarjeta { display: block; text-decoration: none; color: var(--tinta); rotate: var(--inc, 0deg); transition: opacity .5s ease, translate .9s var(--suave); }
.tarjeta:hover { color: var(--tinta); }
.tarjeta__nombre { margin-top: 18px; font-style: italic; font-weight: 400; font-size: 30px; line-height: 1.15; }
.tarjeta__desc { margin-top: 5px; font-family: var(--f-nota); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.t1 { grid-column: 1 / span 5; --inc: 1.2deg; }
.t2 { grid-column: 7 / span 6; margin-top: 140px; --inc: -1.4deg; }
.t3 { grid-column: 2 / span 5; margin-top: 90px; --inc: 1.6deg; }
.t4 { grid-column: 8 / span 5; margin-top: 160px; --inc: -1.2deg; }
.t5 { grid-column: 1 / span 6; margin-top: 90px; --inc: 1.4deg; }
.t6 { grid-column: 7 / span 6; margin-top: 200px; --inc: -1.6deg; }
.levanta { will-change: transform; }
.ficha {
  position: relative; padding: 6% 6% 0;
  background: url(../img/objetos/ficha-lisa.webp) center / 100% 100%;
  filter: drop-shadow(0 14px 22px rgba(30, 21, 23, .14));
}
.ficha .clip { left: auto; right: 44px; top: -38px; width: 22px; }
.ficha__img { position: relative; aspect-ratio: 4 / 5; overflow: hidden; }
.hojeo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; }
.hojeo img.ver { opacity: 1; }
.ficha__pie { padding: 0 2px 26px; }
.tarjeta:hover .sobre-ab__dentro, .tarjeta:focus-visible .sobre-ab__dentro { translate: 0 -9%; }

/* ---------- cómo trabajo: carpeta con anillas ---------- */
.carpeta { container-type: inline-size; max-width: 1040px; margin-inline: auto; }
.carpeta__cuenta { margin-bottom: 14px; font-family: var(--f-nota); font-size: 14px; letter-spacing: .12em; color: var(--bordo); font-variant-numeric: tabular-nums; }
.carpeta__marco {
  --u: calc(100cqw / 1318);
  border-style: solid; border-color: transparent;
  border-width: calc(205 * var(--u)) calc(76 * var(--u)) calc(88 * var(--u)) calc(72 * var(--u));
  border-image: url(../img/objetos/carpeta.webp) 205 76 88 72 fill / 1 / 0 stretch;
  filter: drop-shadow(0 18px 30px rgba(30, 21, 23, .2));
}
.carpeta__hojas { position: relative; aspect-ratio: 1170 / 720; perspective: 4200px; perspective-origin: 50% 0; touch-action: pan-y; }
.hoja-m {
  position: absolute; inset: 0;
  background: #F4EFE9 url(../img/objetos/papel-hoja.webp) center / cover;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center;
  padding: 36px clamp(20px, 5%, 56px) 40px;
  transform-origin: 50% 0;
  box-shadow: 0 1px 1px rgba(30, 21, 23, .08);
  cursor: pointer;
}
/* el dorso: cuando la hoja pasa del otro lado se ve papel, no el texto espejado */
.hoja-m::after {
  content: ""; position: absolute; inset: 0; z-index: 80; pointer-events: none; opacity: 0;
  background: #EEE8E0 url(../img/objetos/papel-hoja.webp) center / cover;
}
.hoja-m:not(.actual) { pointer-events: none; }
/* la hoja se pasa como con la mano: sube por encima de los aros y queda del otro lado */
.hoja-m::before {
  content: ""; position: absolute; inset: 0; z-index: 81; pointer-events: none; opacity: 0;
  background: linear-gradient(to top, rgba(30, 21, 23, .32), rgba(30, 21, 23, .08) 45%, transparent 75%);
}
.hoja-m.sale { animation: pasar-arriba 1.1s both; }
.hoja-m.vuelve { animation: pasar-arriba 1.1s reverse both; }
.hoja-m.sale::after { animation: dorso 1.1s both; }
.hoja-m.vuelve::after { animation: dorso 1.1s reverse both; }
.hoja-m.sale::before, .hoja-m.vuelve::before { animation: sombra-hoja 1.1s both; }
/* rotateX positivo: el borde de abajo viene hacia quien mira (afuera) y sube por encima de los aros */
@keyframes pasar-arriba {
  0%   { transform: rotateX(0) rotateZ(0) skewX(0); opacity: 1; z-index: 60; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  38%  { transform: translateY(-6px) rotateX(64deg) rotateZ(-1.4deg) skewX(-2.5deg); opacity: 1; z-index: 60; animation-timing-function: cubic-bezier(.3, .2, .3, 1); }
  62%  { opacity: 1; z-index: 60; }
  100% { transform: translateY(-12px) rotateX(174deg) rotateZ(.8deg) skewX(0); opacity: 0; z-index: 60; }
}
@keyframes dorso { 0%, 51% { opacity: 0; } 53%, 100% { opacity: 1; } }
@keyframes sombra-hoja { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: 0; } }
.carpeta__marco.alza { animation: alzar 1s var(--firme); }
@keyframes alzar { 0%, 100% { transform: none; } 35% { transform: translateY(-4px); } }
/* esquina doblada: invita a pasar la hoja */
.esquina {
  position: absolute; right: 0; bottom: 0; z-index: 70; width: 52px; height: 52px; padding: 0; border: 0; cursor: pointer;
  background: linear-gradient(-45deg, var(--rosa) 0 50%, #DDD3C6 50% 60%, #F1ECE5 100%);
  filter: drop-shadow(-3px -2px 3px rgba(30,21,23,.2));
  transform-origin: 100% 100%; transition: scale .35s var(--suave);
}
.esquina:hover, .esquina:focus-visible { scale: 1.35; }
.hoja-m__texto { grid-column: 1 / span 5; }
.hoja-m__verbo { font-style: italic; font-size: clamp(44px, 5.4vw, 76px); line-height: 1; color: var(--bordo); }
.hoja-m__texto p { margin-top: 16px; font-size: 17px; line-height: 1.6; max-width: 32em; }
.hoja-m__texto .boton, .hoja-m__cierre .boton { margin-top: 22px; }
.hoja-m__visual { grid-column: 7 / span 6; position: relative; height: 84%; }
.hoja-m__portada, .hoja-m__cierre { grid-column: 2 / span 10; position: relative; }
.hoja-m__pre { font-family: var(--f-nota); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.hoja-m__pregunta { margin-top: 10px; font-style: italic; font-weight: 700; font-size: clamp(36px, 4.6vw, 64px); line-height: 1.05; color: var(--bordo); text-wrap: balance; }
.servicios { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 4px; }
.servicios li { font-style: italic; font-weight: 400; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.2; }
.recorte { position: absolute; rotate: var(--r, 0deg); filter: drop-shadow(0 8px 14px rgba(30,21,23,.16)); }
.recorte--foto { background: var(--hoja); padding: 8px; }
.recorte--foto > img:not(.clip) { width: 100%; height: 100%; object-fit: cover; }
.recorte .calado-foto { height: 100%; aspect-ratio: auto; }
.nota { position: relative; display: inline-grid; margin-top: 40px; width: min(320px, 70%); rotate: var(--r, 0deg); filter: drop-shadow(0 8px 12px rgba(30,21,23,.14)); }
.nota__papel { grid-area: 1 / 1; width: 100%; height: auto; }
.nota p { grid-area: 1 / 1; align-self: center; padding: 0 12%; font-family: var(--f-nota); font-size: 15px; letter-spacing: .04em; }
.nota .clip { left: auto; right: 22%; top: -30px; }
.paleta { position: absolute; left: 0; top: 4%; width: 62%; height: 90%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.velo-aa { position: absolute; right: 0; top: 20%; width: 56%; height: 64%; display: grid; place-items: center; background: rgba(250,247,243,.66); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 16px 32px rgba(30,21,23,.1); }
.velo-aa span { font-style: italic; font-weight: 700; font-size: 72px; }
/* lo que llega a la hoja cuando queda arriba */
.hoja-m .entra { opacity: 0; translate: 0 18px; transition: opacity .5s ease-out, translate .8s var(--suave); transition-delay: calc(var(--d, 0s) + .45s); }
.hoja-m.actual .entra { opacity: 1; translate: 0 0; }
.hoja-m:not(.actual) .entra { transition-delay: 0s; transition-duration: .2s; }
.velo-aa.entra { translate: 40% 0; }
.hoja-m.actual .velo-aa.entra { translate: 0 0; }

/* ---------- ficha personal: una ficha de verdad ---------- */
.tarjeta-personal {
  position: relative; max-width: 960px; margin-inline: auto;
  background: url(../img/objetos/ficha-lisa-h.webp) center / 100% 100%; color: var(--tinta);
  padding: clamp(28px, 4.4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 290px);
  grid-template-areas: "cabeza cabeza" "datos foto" "boton foto";
  column-gap: clamp(28px, 4vw, 56px); row-gap: 26px; align-items: start;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .4));
}
.tarjeta-personal > .clip { left: 52%; top: -40px; width: 26px; }
.tp__cabeza { grid-area: cabeza; display: flex; justify-content: space-between; gap: 16px; font-family: var(--f-nota); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--gris); }
.tp__datos { grid-area: datos; margin: 0; display: grid; gap: 16px; }
.tp__fila { display: grid; grid-template-columns: 158px minmax(0, 1fr); align-items: baseline; gap: 14px; padding-bottom: 9px; border-bottom: 1px solid rgba(30, 21, 23, .2); }
.tp__fila dt { font-family: var(--f-nota); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.tp__fila dd { margin: 0; font-size: 17px; line-height: 1.45; color: var(--tinta); }
.tp__fila:first-child dd { font-family: var(--f-display); font-style: italic; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; color: var(--bordo); }
.tp__foto { grid-area: foto; margin: 0; position: relative; background: var(--hoja); padding: 9px 9px 34px; rotate: 2.5deg; box-shadow: 0 10px 22px rgba(30, 21, 23, .2); }
.tp__foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.tp__boton { grid-area: boton; justify-self: start; }
.tarjeta-personal .boton { background: var(--bordo); color: var(--hoja); }
.tarjeta-personal .boton:hover, .tarjeta-personal .boton:focus-visible { background: var(--bordo-osc); color: var(--hoja); }

/* ---------- contacto: carta en un sobre de papel vegetal ---------- */
.contacto { padding-bottom: 110px; }
.carta { position: relative; width: min(340px, 100%); }
.sobre-ab--carta { filter: drop-shadow(0 20px 30px rgba(20, 6, 10, .35)); }
.sobre-ab--carta .sobre-ab__dentro { left: 9%; width: 82%; bottom: 13%; }
.carta__hoja {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; aspect-ratio: 10 / 8; padding: 9% 10% 10%;
  background: url(../img/objetos/ficha-lisa-h.webp) center / 100% 100%; color: var(--tinta);
}
.carta__titulo { font-style: italic; font-weight: 400; font-size: 24px; line-height: 1.15; color: var(--bordo); }
.carta__texto { font-size: 13.5px; line-height: 1.5; color: var(--gris); }
.carta__hoja .boton { margin-top: auto; }
.carta .boton { background: var(--bordo); color: var(--hoja); }
.carta .boton:hover, .carta .boton:focus-visible { background: var(--bordo-osc); color: var(--hoja); }
.carta .sobre-ab__dentro { translate: 0 0; transition: translate .8s var(--suave); }
.carta.en-vista .sobre-ab__dentro { translate: 0 -30%; transition-delay: .3s; }
.carta.en-vista:hover .sobre-ab__dentro, .carta.en-vista:focus-within .sobre-ab__dentro { translate: 0 -36%; transition-delay: 0s; }

/* ---------- volver arriba ---------- */
.subir {
  position: fixed; z-index: 30;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--hoja); color: var(--bordo); box-shadow: 0 6px 18px rgba(30, 21, 23, .25);
  display: grid; place-items: center;
  opacity: 0; translate: 0 12px; pointer-events: none; transition: opacity .3s ease, translate .4s var(--suave);
}
.subir.visible { opacity: 1; translate: 0 0; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .pieza-g, .mono__pieza, .sobre-ab__dentro, .tarjeta, .esquina, .hoja-m .entra, .mini__objeto { transition-duration: .01s !important; transition-delay: 0s !important; }
}

/* ---------- móvil ---------- */
@media (max-width: 760px) {
  .hero { padding-top: 32px; padding-bottom: 170px; }
  .escena { --sobre-w: min(84vw, 420px); grid-template-columns: minmax(0, 1fr); padding-top: 0; row-gap: 0; justify-items: center; }
  .hero__titulo { grid-column: 1; justify-self: start; margin: 0; font-size: clamp(38px, 11vw, 52px); }
  .sobre { grid-column: 1; margin-top: calc(var(--sobre-w) * .5); }
  .hero__bajada { grid-column: 1; justify-self: start; margin: 40px 0 0; max-width: 30ch; font-size: 17px; }
  .grupo__boton { margin-top: 10px; }
  .trabajos { padding-bottom: 96px; }
  .muestra__fila {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 22px;
    margin: 44px calc(-1 * var(--margen)) 0; padding: 26px var(--margen) 14px; scrollbar-width: none;
  }
  .muestra__fila::-webkit-scrollbar { display: none; }
  .muestra__fila li { flex: 0 0 44%; scroll-snap-align: center; }
  .mini__objeto { height: 170px; }
  .archivo { padding-top: 24px; row-gap: 72px; }
  .archivo[data-filtro="identidad"] .tarjeta, .archivo[data-filtro="fotografia"] .tarjeta { grid-column: 1 / -1; }
  .tarjeta { rotate: calc(var(--inc, 0deg) * .6); }
  .carpeta__hojas { aspect-ratio: auto; height: 600px; }
  .hoja-m { grid-template-columns: minmax(0,1fr); align-content: start; row-gap: 22px; padding-top: 28px; }
  .hoja-m__texto, .hoja-m__visual, .hoja-m__portada, .hoja-m__cierre { grid-column: 1; }
  .hoja-m__visual { height: 260px; }
  .hoja-m__texto p { font-size: 16px; }
  .tarjeta-personal { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cabeza" "foto" "datos" "boton"; background-image: url(../img/objetos/ficha-lisa.webp); }
  .tp__foto { width: min(240px, 80%); justify-self: center; }
  .tp__fila { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tp__cabeza { flex-direction: column; gap: 2px; }
  .tarjeta-personal > .clip { left: auto; right: 14%; }
  .subir { width: 46px; height: 46px; }
}
