/* Starwink website v8 (2026-09-29): the keepsakes become a pinned scene with depth (founder: "large blurred keepsakes ...
   on the sides, close to the camera, other keepsakes closer to the center ... the card in the very center").
   Far: small soft treasures in the gaps. Mid: the sixteen sharp keepsakes, the only ones you can tap. Near: large
   treasures blurred in their image files, at the frame's corners. v4.js places every plane and moves it; CSS only
   sets the planes, sizes and stacking. Phones keep their grid. */

@media (min-width: 820px) {
  .keeps4 { overflow: clip; }   /* hidden would stop the scene from holding (sticky) */
  .k8-pin { position: relative; height: calc(100vh + 70vh); }
  .k4-field { position: sticky; top: 0; height: 100vh; max-width: none; margin: 0; overflow: clip; isolation: isolate; --hdr: 72px; }
  .k4-card { top: calc(50% + var(--hdr) / 2); transition: scale 120ms linear, opacity calc(200ms * var(--dz-k)) var(--ease-light), transform calc(200ms * var(--dz-k)) var(--ease-light); }

  /* the sharp ones: JS owns their transform (position + camera + pointer); the float stays on the picture inside */
  .k4-t { transition: none; will-change: transform; }

  .k8-far, .k8-near { position: absolute; inset: 0; pointer-events: none; }
  .k8-far { z-index: 0; }
  .k8-f { position: absolute; left: var(--x); top: var(--y); width: var(--s, 3rem); aspect-ratio: 1; will-change: transform; }
  .k8-f.is-off { display: none; }
  .k8-f img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0.5; filter: blur(1.4px) saturate(0.8) drop-shadow(0 6px 10px rgba(var(--shadow-rgb), 0.4));
    animation: k5-float calc(var(--bob) * var(--dz-air)) ease-in-out var(--delay) infinite alternate; }
  .k4-field:not(.is-live) .k8-f img { animation-play-state: paused; }

  .k8-near { z-index: 30;   /* in front of everything, the card included; it never reaches the card */
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 6%, #000 93%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 6%, #000 93%, transparent 100%); }
  .k8-n { position: absolute; left: var(--x); top: var(--y); width: var(--s, 20rem); height: var(--s, 20rem); object-fit: contain; opacity: 0.94; will-change: transform; }

  /* the hint rides under the card, inside the scene, when there is room */
  .k8-hint { position: absolute; left: 50%; bottom: var(--sp-4); z-index: 12; translate: -50% 0; margin: 0; white-space: nowrap; transition: opacity calc(var(--dur-medium) * var(--dz-k)) var(--ease-light); }
  .k8-hint.is-hidden { opacity: 0; }
}
/* short laptop screens: the tallest card (Romanian, a long fact) must fit under the header */
@media (min-width: 820px) and (max-height: 820px) {
  .k4-card { padding: var(--sp-5) var(--sp-5) var(--sp-4); }
  .k4-img { width: 6rem; height: 6rem; }
  .k4-desc { font-size: 0.95rem; line-height: 1.45; }
  .k4-fact { margin-top: var(--sp-3); }
  .k4-fact p { font-size: 0.9rem; line-height: 1.42; }
  .k4-from { margin-top: var(--sp-3); }
}
@media (max-width: 819.98px) {
  .k8-far, .k8-near { display: none; }
  .k8-hint { margin: var(--sp-4) 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .k8-pin { height: auto; }
  .k8-f img { animation: none !important; }
}

/* the hint is an instruction: title ink so it reads on either ground (body ink measured 4.39 on the phone light ground) */
.k8-hint { color: var(--ink-title); }
