/* Wolf Den entry (preview): fixed medallion button on the front page, full-screen dive clip, and the /wolf-den/ arrival (pure zoom out to the fitted full hero; no pan or scroll).

   FILES (Visual Arts art, all under /assets/wolf-den/entry/):
     wolfden-button-A-medallion.svg                       button art (front page, fixed lower-left)
     dive-16x9.webm/.mp4 + dive-16x9-poster.webp/.jpg     clip for viewports wider than 760px
     dive-9x16.webm/.mp4 + dive-9x16-poster.webp/.jpg     clip for viewports 760px and narrower
   ARRIVAL CROP (the clip's last frame as a crop of the hero, as fractions of the full hero image).
   Used by the pre-paint frame below AND by assets/js/wd-dive.js (it reads these variables):
     --wd-cx / --wd-cy / --wd-cw   crop x, y, width     --wd-ca  clip aspect (w/h)     --wd-ha  hero aspect (h/w)
   The 1.5 s zoom time is CFG.zoomMs in the JS. */
:root{--wd-cx:.18792;--wd-cy:.29778;--wd-cw:.64;--wd-ca:1.77778;--wd-ha:.5625;--wd-frame:url(/assets/wolf-den/wolf-den-v7-B-2400.webp)}
@media(max-width:1200px){:root{--wd-frame:url(/assets/wolf-den/wolf-den-v7-B-1200.webp)}}
@media(max-width:760px){:root{--wd-cx:.21;--wd-cy:.19583;--wd-cw:.58;--wd-ca:.5625;--wd-ha:1.33333;--wd-frame:url(/assets/wolf-den/wolf-den-v7-tall-1800.webp)}}

/* FRONT PAGE BUTTON. Sized so it never reaches the hero's "Enter the galleries" row: the free space under that row is
   100vh minus the hero's bottom edge (min(max(94vh,640px),900px)) plus its 96px bottom padding, less the 24px margin and a 14px gap. */
.wd-enter{position:fixed;left:24px;bottom:24px;z-index:60;display:block;width:clamp(64px,calc(100vh - min(max(94vh,640px),900px) + 58px),152px);line-height:0;border:0;padding:0;background:none;cursor:pointer;
  transition:transform .35s cubic-bezier(.2,.7,.2,1),filter .35s;filter:drop-shadow(0 6px 12px rgba(0,0,0,.4))}
.wd-enter picture{display:block;width:100%;line-height:0}.wd-enter img{width:100%;height:auto;display:block}
.wd-enter:hover,.wd-enter:focus-visible{transform:translateY(-3px);filter:drop-shadow(0 0 10px rgba(233,200,139,.55)) drop-shadow(0 8px 14px rgba(0,0,0,.45))}
.wd-enter:focus-visible{outline:2px solid #e9c88b;outline-offset:6px;border-radius:50%}
.wd-enter .wd-tip{position:absolute;left:calc(100% + 10px);bottom:50%;transform:translateY(50%);white-space:nowrap;line-height:1;
  font:600 11px InterV,Inter,sans-serif;letter-spacing:.18em;text-transform:uppercase;color:#f7f3ea;background:#1c1712;border:1px solid #a8834a;padding:9px 12px;opacity:0;pointer-events:none;transition:opacity .25s}
.wd-enter:hover .wd-tip,.wd-enter:focus-visible .wd-tip{opacity:1}
@media(max-width:760px){.wd-enter{left:14px;bottom:14px;width:clamp(64px,calc(100vh - min(max(94vh,720px),900px) + 38px),112px)}.wd-enter .wd-tip{display:none}}
/* short phones: the hero's button rows run past the fold, so the badge moves to the lower-right corner instead of covering them */
@media(max-width:760px) and (max-height:760px){.wd-enter{left:auto;right:14px}}
@media(prefers-reduced-motion:reduce){.wd-enter{transition:none}.wd-enter:hover,.wd-enter:focus-visible{transform:none}}

/* DIVE OVERLAY (front page) */
.wd-dive{position:fixed;inset:0;z-index:1000;background:#000;opacity:0;transition:opacity .25s;overscroll-behavior:contain;touch-action:none}
.wd-dive.on{opacity:1}
.wd-dive video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.wd-dive.rm{background:#0f0f14;transition:opacity .6s}
.wd-skip{position:absolute;right:18px;bottom:18px;z-index:2;font:600 11px InterV,Inter,sans-serif;letter-spacing:.18em;text-transform:uppercase;color:#f7f3ea;background:rgba(28,23,18,.6);border:1px solid #a8834a;padding:9px 12px;cursor:pointer}
.wd-skip:focus-visible{outline:2px solid #e9c88b;outline-offset:3px}

/* /wolf-den/ ARRIVAL. Before first paint the clip's last frame is drawn from the hero (same maths as the JS), page hidden underneath. */
html.wd-intro::before{--dw:max(100vw,calc(100vh * var(--wd-ca)));content:"";position:fixed;inset:0;z-index:1000;pointer-events:none;opacity:var(--wd-veil,1);
  background-color:#0f0f14;background-image:var(--wd-frame);background-repeat:no-repeat;
  background-size:calc(var(--dw) / var(--wd-cw)) auto;
  background-position:calc((100vw - var(--dw)) / 2 - var(--wd-cx) * var(--dw) / var(--wd-cw)) calc((100vh - var(--dw) / var(--wd-ca)) / 2 - var(--wd-cy) * var(--dw) / var(--wd-cw) * var(--wd-ha))}
@media(prefers-reduced-motion:reduce){html.wd-intro::before{background-image:none}}
html.wd-intro body{opacity:var(--wd-page,0)}
html.wd-intro,html.wd-intro body{overflow:hidden;overscroll-behavior:none}
.wd-arrive{position:fixed;z-index:1001;transform-origin:0 0;will-change:transform;overflow:hidden;background:#0f0f14;pointer-events:none}
.wd-arrive img{display:block;width:100%;height:100%;object-fit:fill}
