/* Shared, minimal chrome for project pages. Every page's art direction lives in its own css/work-<slug>.css.
   Only the "next slice" hand-off and the footer are shared so the site feels like one publication. */

.work { --page-bg: var(--cream); --page-ink: var(--ink); background: var(--page-bg); color: var(--page-ink); }

/* back link that sits under the floating header */
.back-to-time {
  position: fixed; right: var(--edge); bottom: 22px; z-index: 800;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  display: inline-flex; align-items: center; gap: .55em;
  height: 2.6rem; padding: 0 1.1rem 0 .8rem; border-radius: 999px;
  background: var(--cream); color: var(--ink); font-size: 11px; letter-spacing: .04em;
  box-shadow: 0 4px 30px rgba(59, 50, 44, .25);
  transition: transform .35s var(--ease-out-quart);
}
.back-to-time { transition: opacity .4s, transform .5s var(--ease-out-expo); }
.back-to-time.is-on { opacity: 1; transform: none; pointer-events: auto; }
.back-to-time:hover { transform: translateY(-2px); }
.back-to-time svg { width: 14px; height: 14px; }

/* ---------- next project: "next slice in time" ---------- */
.next-slice {
  position: relative; min-height: 92svh; overflow: hidden;
  display: grid; align-content: end;
  padding: 18vh var(--edge) calc(var(--edge) + 4.5rem);
  background: var(--next-bg, var(--dusk)); color: var(--next-ink, var(--cream));
  isolation: isolate;
}
.next-slice__img {
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  clip-path: inset(38% 30% 38% 30%);
  transition: clip-path 1.2s var(--ease-out-expo);
}
.next-slice__img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.55); transform: scale(1.15); transition: transform 1.6s var(--ease-out-expo); }
.next-slice:hover .next-slice__img, .next-slice:focus-within .next-slice__img { clip-path: inset(0 0 0 0); }
.next-slice:hover .next-slice__img img { transform: scale(1); }
.next-slice__label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; display: flex; gap: 1rem; align-items: center; }
.next-slice__label::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .35; transform-origin: left; transform: scaleX(var(--fill, 0)); }
.next-slice__link { display: block; margin-top: 1.2rem; }
.next-slice__title {
  font-family: var(--font-serif); font-weight: 450; line-height: .9; letter-spacing: -.025em;
  font-size: clamp(3.2rem, 13vw, 13rem);
}
.next-slice__title em { font-style: italic; }
.next-slice__meta { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .6rem 2rem; font-size: 12px; opacity: .85; }
.next-slice__go { display: inline-flex; align-items: center; gap: .6em; }
.next-slice__go svg { width: 1.1em; height: 1.1em; transition: transform .4s var(--ease-out-expo); }
.next-slice:hover .next-slice__go svg { transform: translateX(6px); }

/* ---------- footer ---------- */
.work-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem;
  padding: 1.6rem var(--edge) 5rem; font-size: 11px; letter-spacing: .03em;
  background: var(--next-bg, var(--dusk)); color: var(--next-ink, var(--cream));
  border-top: 1px solid rgba(254, 249, 237, .14);
}
.work-foot a { opacity: .8; }
.work-foot a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.work-foot nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }

@media (max-width: 720px) {
  .next-slice__img { clip-path: inset(0 0 0 0); }
}
