/* The floating showpieces: 28 cards that pile up, form a turning ring, then fly into an Awwwards-style grid (cubes.js). */
.floatfield { position: relative; z-index: 1; margin: 0 calc(-1 * var(--gut)); padding: clamp(90px, 10vw, 130px) 0 40px; }
.ff-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 0 var(--gut); }
.ff-side { display: grid; justify-items: end; gap: 12px; text-align: right; }
.ff-stage { position: relative; height: 280vh; box-sizing: content-box; margin-top: 20px; }
.floatfield { overflow-x: clip; }


/* The floating showpieces, with the Atelier Meridian motion: a pile in the centre swings out into a ring around the label,
   the ring turns as you scroll, then every card flies out to its own floating spot. The script places the cards. */
.ff-squares { position: relative; height: 100%; }
.ff-sticky { position: sticky; top: 0; height: 100vh; overflow: visible; }
.ff-ring-label { position: absolute; left: 50%; top: 50%; translate: -50% -50%; margin: 0; text-align: center; font: 500 clamp(1.4rem, 2.6vw, 2.2rem)/1.1 var(--d); letter-spacing: -.02em; pointer-events: none; }
.ff-ring-label b { display: block; font-size: 2.4em; letter-spacing: -.05em; }
.fsq { position: absolute; left: 0; top: 0; display: block; transform-origin: 50% 40%; will-change: transform; }
.fsq-img { display: block; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; position: relative; background: #111; box-shadow: 0 20px 36px -24px rgb(11 11 12 / .5); }
/* each card is a little scene: the site's own colours as a blurred backdrop, its desktop page as a window rising from the
   bottom edge, and its phone page overlapping at the corner (like the Awwwards thumbnails) */
.fsq-img::before { content: ''; position: absolute; inset: -4%; background: linear-gradient(rgb(0 0 0 / .24), rgb(0 0 0 / .24)), var(--blur) center / cover; }   /* a 64px copy enlarged by the browser: the soft backdrop without any blur filter (Safari and phones redraw filters every frame) */
.fsq-img::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgb(255 255 255 / .1), transparent 60%), linear-gradient(transparent 60%, rgb(0 0 0 / .18)); }
.fsq-win { position: absolute; z-index: 1; left: 7%; right: 13%; top: 12%; aspect-ratio: 16 / 10; border-radius: 6px; background: #fff var(--img) center top / cover;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .18), 0 24px 40px -14px rgb(0 0 0 / .55); transition: transform .7s var(--ease); }
.fsq-ph { position: absolute; z-index: 2; right: 6%; bottom: 7%; width: 21%; aspect-ratio: 600 / 970; border-radius: 9px; background: #111 var(--ph) center top / cover;
  box-shadow: 0 0 0 3px rgb(11 11 12 / .85), 0 22px 34px -12px rgb(0 0 0 / .6); transition: transform .7s var(--ease); }
.fsq.settled:hover .fsq-win { transform: translateY(-6px); }
.fsq.settled:hover .fsq-ph { transform: translateY(-10px) rotate(-2deg); }
.fsq-cap { display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 38px; font-size: 14px; transition: opacity .35s; }
.fsq-cap b { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fsq-cap b i { width: 16px; height: 16px; border-radius: 50%; background: var(--cobalt); flex: none; box-shadow: inset 0 0 0 4px #fff, 0 0 0 1px var(--line); }
.fsq-cap em { font-style: normal; font-size: 12px; color: var(--faint); white-space: nowrap; }
.fsq:not(.settled) .fsq-cap { opacity: 0; }


@media (max-width: 760px) {
  .ff-stage { height: 180vh; }
  .ff-sticky { overflow: visible; }
  .ff-head { flex-direction: column; align-items: flex-start; } .ff-side { justify-items: start; text-align: left; }
}

/* locked showpieces: a small "free ID" pill on the picture */
.fsq-lock { position: absolute; left: 12px; top: 12px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; background: rgb(11 11 12 / .78); color: #fff; font: 500 12px/1 'Geist', system-ui, sans-serif; letter-spacing: 0; pointer-events: none; }
.fsq-lock svg { width: 12px; height: 12px; fill: currentColor; stroke: currentColor; stroke-width: 1.6; }
.fsq-lock svg path { fill: none; }

/* reduced motion: the cards simply sit in their grid; nothing pins or scrolls */
.floatfield.still .ff-stage { height: auto; }
.floatfield.still .ff-sticky { position: static; height: auto; }

/* phones and tablets: the lighter 800px screenshot, and no layer per card (the gallery is a plain grid there, cubes.js) */
@media (max-width: 900px) { .fsq-win { background-image: var(--img-m, var(--img)); } }
.floatfield.still .fsq { will-change: auto; }

/* until cubes.js has placed the cards they stay invisible, so the first layout can't jump (layout shift); never more than 3 s */
.floatfield:not(.placed) .ff-squares, .floatfield:not(.placed) .ff-ring-label { visibility: hidden; animation: ff-show 0s 3s forwards; }
@keyframes ff-show { to { visibility: visible; } }

/* phones: cards rise in one by one (cubes.js adds .reveal and .in) */
.floatfield.reveal .fsq .fsq-img { opacity: 0; transform: translateY(48px) scale(.95); transition: opacity .8s ease, transform 1s cubic-bezier(.2, .8, .2, 1); }
.floatfield.reveal .fsq .fsq-win { transform: translateY(26px); transition: transform 1s .15s cubic-bezier(.2, .8, .2, 1); }
.floatfield.reveal .fsq .fsq-ph { transform: translateY(70px) rotate(5deg); transition: transform 1.1s .3s cubic-bezier(.2, .8, .2, 1); }
.floatfield.reveal .fsq .fsq-cap { opacity: 0; transition: opacity .6s .45s; }
.floatfield.reveal .fsq.in .fsq-img, .floatfield.reveal .fsq.in .fsq-win, .floatfield.reveal .fsq.in .fsq-ph { opacity: 1; transform: none; }
.floatfield.reveal .fsq.in .fsq-cap { opacity: 1; }

/* phones: two cards a row (cubes.js), captions stacked */
@media (max-width: 600px) {
  .fsq-cap { height: auto; min-height: 50px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; font-size: 13px; }
  .fsq-cap b { max-width: 100%; }
  .fsq-cap b i { width: 12px; height: 12px; box-shadow: inset 0 0 0 3px #fff, 0 0 0 1px var(--line); }
  .fsq-cap em { font-size: 12px; }
  .fsq-lock { left: 7px; top: 7px; height: 24px; padding: 0 8px 0 7px; font-size: 12px; }
}
