/* home hero object: "the stack". real prints of our own work, piled on the ink floor. drag (or flick) the top one
   away and it slides under the pile; it also shuffles on its own. hover fans the pile. ddgip keeps the boarding pass. */
.floor__stack {
  grid-area: room;
  align-self: center;
  justify-self: center;
  width: min(100%, 440px);
  padding-block: clamp(28px, 4vw, 60px) clamp(36px, 5vw, 64px);
  transition: opacity 1s ease 0.25s, translate 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s;
}
.js .hero--floor:not(.go) .floor__stack { opacity: 0; translate: 0 60px; }

.stack { position: relative; color: #fff; }
.stack__pile {
  position: relative;
  display: grid;
  width: min(100%, 380px);
  margin-inline: auto;
  touch-action: pan-y;
  user-select: none;
}

.print {
  --dx: 0px;
  --dy: 0px;
  --r: 0deg;
  --x: 0px;
  --y: 0px;
  --s: 1;
  grid-area: 1 / 1;
  display: grid;
  grid-template-rows: auto auto;
  padding: 12px 12px 0;
  border-radius: 6px;
  background: #fbf8f2;
  color: #0b1640;
  text-decoration: none;
  box-shadow: 0 30px 50px -22px rgba(0, 0, 0, 0.85), 0 2px 0 rgba(255, 255, 255, 0.6) inset;
  transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) rotate(calc(var(--r) + var(--tilt, 0deg))) scale(var(--s));
  transition: transform 0.75s cubic-bezier(0.2, 0.75, 0.2, 1), box-shadow 0.4s ease, filter 0.5s ease;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
}
.print img { display: block; width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; border-radius: 2px; pointer-events: none; filter: saturate(0.9) contrast(1.04); }
.print__cap { display: grid; gap: 4px; padding: 12px 4px 16px; min-height: 74px; align-content: start; }
.print__cap small { font: 700 0.62rem/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: #c2630f; }
.floor__stack .print__cap b { color: #0b1640; font: 800 1.02rem/1.2 var(--font); letter-spacing: -0.02em; text-wrap: balance; }
.print:focus-visible { outline: 3px solid #ffb35c; outline-offset: 4px; }

/* pile slots: the top print sits square-ish, the rest peek out at angles */
.print.o0 { --r: -1.5deg; z-index: 5; }
.print.o1 { --r: 4.5deg; --x: 16px; --y: -8px; z-index: 4; filter: brightness(0.93); }
.print.o2 { --r: -6deg; --x: -18px; --y: 4px; z-index: 3; filter: brightness(0.86); }
.print.o3 { --r: 8deg; --x: 22px; --y: 12px; z-index: 2; filter: brightness(0.8); }
.print.o4 { --r: -3deg; --x: -6px; --y: 18px; z-index: 1; filter: brightness(0.75); }
.print:not(.o0) { pointer-events: none; }

/* before the hero opens, the pile is one neat block */
.js .hero--floor:not(.go) .print { --r: 0deg; --x: 0px; --y: 0px; }

@media (hover: hover) and (pointer: fine) {
  .stack__pile:hover .print.o0 { --s: 1.02; --y: -6px; box-shadow: 0 44px 60px -24px rgba(0, 0, 0, 0.9), 0 0 60px rgba(255, 179, 92, 0.18); }
  .stack__pile:hover .print.o1 { --x: 64px; --r: 9deg; }
  .stack__pile:hover .print.o2 { --x: -66px; --r: -10deg; }
  .stack__pile:hover .print.o3 { --x: 96px; --y: 20px; --r: 14deg; }
  .stack__pile:hover .print.o4 { --x: -92px; --y: 24px; --r: -13deg; }
}

.print.drag { transition: box-shadow 0.3s ease; cursor: grabbing; z-index: 6; }
.print.fly { z-index: 6; transition: transform 0.38s cubic-bezier(0.4, 0, 0.9, 0.6); }

.stack__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: min(100%, 380px);
  margin: 34px auto 0;
  font: 700 0.72rem/1 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stack__count { margin: 0; color: rgba(255, 255, 255, 0.55); }
.stack__count b { color: #ffb35c; font-size: 1rem; letter-spacing: 0.04em; }
.stack__hint { margin: 0; color: rgba(255, 255, 255, 0.45); }
.stack__next {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.stack__next span { transition: translate 0.3s ease; }
.stack__next:hover { background: #ffb35c; border-color: #ffb35c; color: #0b1640; }
.stack__next:hover span { translate: 3px 0; }
.stack__next:focus-visible { outline: 2px solid #ffb35c; outline-offset: 3px; }

@media (max-width: 900px) {
  .floor__stack { width: min(100%, 400px); padding-block: 12px 40px; }
}
@media (max-width: 480px) {
  .stack__pile { width: min(82%, 320px); }
  .print { padding: 9px 9px 0; }
  .print__cap { min-height: 64px; padding: 10px 2px 12px; }
  .print__cap b { font-size: 0.92rem; }
  .stack__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .floor__stack, .print { transition: none; }
}
