/* The library: the titles laid on the nine spines and the time on the clock */
/* the titles printed on the nine spines (laid over the 3D books, placed from the camera every frame) and the time on the clock */
  .titres { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
  .spine { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: space-between; overflow: hidden;
    container-type: inline-size; padding: calc(var(--u, 60px) * .14) 0 calc(var(--u, 60px) * .1); gap: calc(var(--u, 60px) * .06); text-transform: uppercase; }
  .spine.dk > * { color: #d9d9d9; mix-blend-mode: screen; }       /* pale foil on the dark books */
  .spine.lt > * { color: #1c1c1c; mix-blend-mode: multiply; }     /* ink on the light ones */
  .spine > * { filter: url(#encre); opacity: 0; translate: 0 6cqw; transition: opacity .6s cubic-bezier(.333,0,.667,1), translate .8s cubic-bezier(.333,0,.667,1); }
  /* --rev (js): very pale as the books come into view, the ink rises with the scroll and is sharp only once we have arrived (a little suspense);
     the opacity follows the scroll closely, only the slide in keeps its stagger */
  .fin .spine > * { opacity: calc(.9 * var(--rev, 1)); translate: 0 0; transition-duration: .25s, .6s; transition-delay: 0s, calc(120ms + var(--i) * 40ms + var(--j) * 25ms); }
  .fin .spine > .k { opacity: calc(.55 * var(--rev, 1)); }
  .fin .spine.venir > * { opacity: calc(.32 * var(--rev, 1)); }   /* still to come: greyed */
  .spine .n { font-size: 20cqw; letter-spacing: .2em; }
  .spine .rule { flex: none; align-self: stretch; height: 5cqw; border-block: 1px solid currentColor; }
  .fin .spine > .rule { opacity: calc(.35 * var(--rev, 1)); }
  .spine .lg { flex: none; width: 58%; aspect-ratio: 1; background: currentColor;
    -webkit-mask: var(--lg) center / contain no-repeat; mask: var(--lg) center / contain no-repeat; }
  .spine .t, .spine .k { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; min-height: 0; overflow: hidden; }
  .spine .t { font-weight: 600; letter-spacing: .06em; font-size: 40cqw; }
  .spine .k { font-size: 15cqw; letter-spacing: .28em; }
  .heure { position: absolute; display: grid; place-items: center; color: #1c1c1c; mix-blend-mode: multiply; filter: url(#encre);
    font-family: "Times New Roman", Times, Georgia, serif; font-size: calc(var(--h, 20px) * .82); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
    -webkit-mask: linear-gradient(#000 calc(50% - 1px), transparent calc(50% - 1px), transparent calc(50% + 1px), #000 calc(50% + 1px));
    mask: linear-gradient(#000 calc(50% - 1px), transparent calc(50% - 1px), transparent calc(50% + 1px), #000 calc(50% + 1px));
    opacity: 0; transition: opacity .6s cubic-bezier(.333,0,.667,1); }
  .fin .heure { opacity: calc(.92 * var(--rev, 1)); transition-duration: .25s; }
  @media (prefers-reduced-motion: reduce) { .spine > *, .heure { transition: none; } }
/* the walk to the books: 218vh of scroll (index.html sets the same for the chained page) */
@media not (prefers-reduced-motion: reduce) { [data-scene="bibliotheque"].studio-scroll { height: 318vh; } }
/* the book opened over the library (a frame on the projects' book, js/bibliotheque.js) */
.livre { position: fixed; inset: 0; z-index: 90; width: 100%; height: 100%; border: 0; background: #070707; animation: livre-in .45s cubic-bezier(.16,1,.3,1) both; }
.livre.out { opacity: 0; transition: opacity .4s; }
@keyframes livre-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .livre { animation: none; } }
/* a spine reached with the keyboard: outlined at once */
.spine:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
