/* Block 5: meet our queens on light sand. The night above ends in a soft curve; the girls' foil cards rise into a
   curved row (we stand inside the curve, so the cards at the edges come closer) that the guest drags round.
   A tap brings one card to the front, a second tap turns it over, a tap outside puts it back */
:root { --curve: clamp(56px, 9vh, 110px); }
.b5 { position: relative; height: 300vh; color: var(--cream);
  --glyph: "Noto Sans Egyptian Hieroglyphs", serif; --deep: var(--gold); }
.b5__stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }

.b5__head { position: absolute; z-index: 1; left: 0; right: 0; top: 50%; padding: 0 var(--gut); text-align: center; transform-origin: 50% 0; will-change: transform; }
.b5__kicker { font: 700 13px/1 var(--sans); color: var(--deep); margin-bottom: 16px; }
.b5__h { display: grid; justify-items: center; line-height: .9; }
.b5__h span { font: 900 clamp(48px, 6.4vw, 120px)/.9 var(--sans); text-transform: uppercase; letter-spacing: -.02em; }
.b5__h em { font: 700 clamp(46px, 6vw, 112px)/.95 var(--serif); font-style: normal; text-transform: uppercase; color: var(--deep); }

.b5__world { position: absolute; inset: 0; z-index: 2; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.b5__world.is-dragging { cursor: grabbing; }
.b5__veil { position: absolute; inset: 0; z-index: 1; background: rgba(13, 10, 8, .88); opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s; }
.b5.is-focus .b5__veil { opacity: 1; visibility: visible; transition: opacity .5s; }

.b5__foot { position: absolute; z-index: 2; left: 0; right: 0; bottom: 5vh; display: flex; flex-direction: column; align-items: center; gap: 16px; opacity: 0; transition: opacity .5s; }
.b5.is-ready .b5__foot { opacity: 1; }
.b5.is-focus .b5__foot { opacity: 0; pointer-events: none; }
.b5__hint { display: flex; align-items: center; gap: 10px; font: 600 12px/1 var(--sans); color: var(--deep); }
.b5__hint svg { width: 28px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.b5__all { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 3px;
  background: var(--gold); color: var(--night); font: 600 14px/1 var(--sans); text-decoration: none; transition: background .3s, color .3s; }
.b5__all svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.b5__all:hover, .b5__all:focus-visible { background: var(--cream); color: var(--night); }

/* every card is laid out at its front-and-centre size; the row places it further back so it reads smaller */
.qcard { position: absolute; left: 50%; top: var(--cy, 56%); width: var(--cw); height: var(--ch); margin: calc(var(--ch) / -2) 0 0 calc(var(--cw) / -2);
  transform-style: preserve-3d; cursor: pointer; color: var(--cream); font: 500 15px/1.55 var(--sans); outline: none; }
.qcard.is-front { z-index: 4; cursor: default; }
.qcard__tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)); transition: transform .5s var(--ease-out); }
.qcard__in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .9s var(--ease); }
.qcard.is-flipped .qcard__in { transform: rotateY(180deg); }
.qcard__face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 60px -30px rgba(60, 40, 10, .55); }
.qcard__front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.qcard__name { position: absolute; z-index: 3; left: 26px; right: 26px; bottom: 24px; text-shadow: 0 1px 10px rgba(13, 10, 8, .85), 0 0 2px rgba(13, 10, 8, .8); }
/* her name in real gold leaf; the leaf drifts with the light */
.qcard__name b { display: block; font: 700 clamp(28px, 2.8vw, 44px)/1 var(--serif); letter-spacing: .05em; text-transform: uppercase; text-shadow: none;
  color: transparent; background: url("../../assets/img/v4/gold-leaf.webp") var(--mx, 30%) var(--my, 40%) / 500% auto; -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 2px 6px rgba(13, 10, 8, .9)); transition: background-position .6s var(--ease-out); }
/* a frame of real gold leaf, thick enough to read as metal, with a fine black keyline inside it */
.qcard__frame { position: absolute; z-index: 2; inset: 0; border-radius: inherit; padding: 7px; pointer-events: none;
  background: url("../../assets/img/v4/gold-leaf.webp") var(--mx, 20%) var(--my, 30%) / 400% auto; transition: background-position .6s var(--ease-out);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  box-shadow: inset 0 0 0 1px rgba(13, 10, 8, .4); }
.qcard__frame::after { content: ""; position: absolute; inset: 7px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(13, 10, 8, .9); }
.qcard__name span { display: block; font: 400 18px/1.4 var(--glyph); color: var(--cream); margin-top: 6px; }
.qcard__back { transform: rotateY(180deg); background: var(--night-2); padding: 34px 30px 30px; display: flex; flex-direction: column; gap: 14px; }
.qcard__back b { font: 700 clamp(28px, 2.6vw, 40px)/1 var(--serif); color: var(--gold); text-transform: uppercase; letter-spacing: .03em; }
.qcard__back .qcard__glyph { font: 400 20px/1 var(--glyph); color: var(--gold); opacity: .8; }
.qcard__facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-top: 4px; font-size: 13px; }
.qcard__facts dt { color: var(--gold); font-weight: 600; }
.qcard__facts dd { margin: 0; opacity: .85; }
.qcard__ask { display: flex; align-items: center; justify-content: center; min-height: 50px; margin-top: auto; border-radius: 3px; background: var(--gold); color: var(--night); font: 600 14px/1 var(--sans); text-decoration: none; transition: background .3s; }
.qcard__ask:hover, .qcard__ask:focus-visible { background: var(--cream); }
.qcard__turn { font-size: 12px; opacity: .55; text-align: center; }
/* one band of light crosses the foil whenever a card moves to the front or turns over */
.qcard__sheen { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 10px; mix-blend-mode: overlay;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 244, 214, .75) 47%, rgba(255, 255, 255, .95) 50%, rgba(255, 244, 214, .75) 53%, transparent 70%);
  background-size: 300% 100%; background-position: var(--sx, 120%) 0; }

@media (max-width: 760px) {
  .b5 { height: auto; }
  .b5__stage { position: relative; height: 100svh; min-height: 640px; }
  .b5__head { top: calc(var(--curve) + 5svh); }
  .b5__h span { font-size: 13vw; }
  .b5__h em { font-size: 12.4vw; }
  .b5__foot { bottom: 4svh; gap: 14px; }
  .qcard { font-size: 14px; }
  .qcard__back { padding: 26px 22px 22px; gap: 11px; }
}
