/* =====================================================================
   Feature 1 – private and site photos separate (slide "fotoablage")
   A tight photo library and a quiet project folder. Positions come from
   frs-fotos.js; only transform / opacity are animated.
   ===================================================================== */
.fs { position: absolute; inset: 0; --fs-t: 100px; }

/* ---------- photos: tight library grid, small radius, no cards ---------- */
.fs-tile {
  position: absolute; left: 0; top: 0; z-index: 2;
  width: var(--fs-t); height: var(--fs-t);
  transform-origin: 0 0;
  will-change: transform;
}
.fs-tile i {
  position: absolute; inset: 0;
  border-radius: 4px;
  background: #e6e2da center / cover no-repeat;
  transition: transform 320ms var(--ease), box-shadow 320ms var(--ease), opacity 500ms var(--ease), filter 500ms var(--ease);
}
/* recognised: the site photos lift a little – nothing more */
.fs-tile.is-lifted i { transform: translateY(-3px) scale(1.035); box-shadow: 0 16px 28px -18px rgba(28, 24, 18, 0.55); }
.fs.is-picking .fs-tile--p i { opacity: 0.38; filter: saturate(0.6); }
/* while travelling the photo floats above everything */
.fs-tile.is-flying { z-index: 6; }
.fs-tile.is-flying i { box-shadow: 0 22px 36px -20px rgba(28, 24, 18, 0.5); }
/* inside the folder: printed-photo look, behind the front flap */
.fs-tile.is-in { z-index: 3; }
.fs-tile.is-in i { border-radius: 3px; box-shadow: 0 0 0 calc(4px / var(--k, 0.6)) #fbfaf7, 0 2px 6px rgba(28, 24, 18, 0.18); }

/* ---------- the project folder: back with tab · photos · front flap ---------- */
.fs-folder {
  position: absolute; z-index: 1; pointer-events: none;
  opacity: 0; transform: translateY(12px);
  transition: opacity 600ms var(--ease), transform 700ms var(--ease);
}
.fs-folder--front { z-index: 4; }
.fs.has-folder .fs-folder { opacity: 1; transform: none; }
.fs-folder__back {
  position: absolute; inset: 0;
  border-radius: 9px;
  background: #d9d3c8;
}
.fs-folder__back::before {           /* the tab */
  content: ""; position: absolute; left: 0; top: -13%; width: 40%; height: 20%;
  border-radius: 8px 12px 0 0;
  background: #d9d3c8;
}
.fs-folder__front {
  position: absolute; left: 0; right: 0; bottom: 0; height: 76%;
  border-radius: 9px;
  background: linear-gradient(180deg, #ebe6dd 0%, #e3ddd2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 18px 30px -22px rgba(28, 24, 18, 0.45);
}

/* folder name, like an icon caption */
.fs-name {
  position: absolute; margin: 0; z-index: 4;
  display: grid; justify-items: center; gap: 2px; text-align: center;
  opacity: 0; transition: opacity 600ms var(--ease) 150ms;
}
.fs.has-folder .fs-name { opacity: 1; }
.fs-name b { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; }
.fs-name span { font-size: 12px; color: var(--muted); }
.fs-name i { font-style: normal; font-variant-numeric: tabular-nums; }

/* gallery caption: "Alle Fotos" → "Persönliche Fotos" */
.fs-label {
  position: absolute; left: 0; top: 0; margin: 0;
  display: grid; font-size: 12.5px; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.fs-label > span { grid-area: 1 / 1; align-self: center; transition: opacity 500ms var(--ease); }
/* final caption: a black capsule with a lock – these photos stay private */
.fs-label__b { display: inline-flex; align-items: center; gap: 9px; color: var(--text-2); }
.fs-lock {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px 0 9px;
  border-radius: 999px; background: var(--text); color: #fff; font-size: 12.5px; font-weight: 600;
  transform: scale(0.92); transition: transform 420ms var(--ease) 80ms;
}
.fs-lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fs.is-sorted .fs-lock { transform: none; }
.fs-label__b { opacity: 0; }
.fs.is-sorted .fs-label__a { opacity: 0; }
.fs.is-sorted .fs-label__b { opacity: 1; }

/* soft restart (only reached without auto-rotation) */
.fs.is-fading .fs-tile, .fs.is-fading .fs-folder, .fs.is-fading .fs-label, .fs.is-fading .fs-name { opacity: 0 !important; transition: opacity 420ms var(--ease) !important; }

/* phone: a slightly taller stage, folder below the gallery */
@media (max-width: 560px) {
  .frs__slide[data-slide="fotoablage"] .frs__visual { aspect-ratio: 4 / 5.3; }
  .fs-tile i { border-radius: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  .fs *, .fs { transition: none !important; }
}

/* hand-over to feature 2: the folder with its photos stays, everything else fades */
.frs__slide:not(.is-active) .fs > :not(.fs-folder):not(.fs-tile--c),
.frs__slide:not(.is-active) .fs-tile--c:not(.is-in) { opacity: 0 !important; transition: opacity 320ms var(--ease) !important; }

/* TEST – the folder in black (remove this block to go back to the warm grey) */
.fs-folder__back, .fs-folder__back::before { background: #0d0d0d; }
.fs-folder__front {
  background: linear-gradient(180deg, #2b2b2a 0%, #1a1a19 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 18px 30px -18px rgba(0, 0, 0, 0.55);
}
