/* Refokus Treasure Vault — full-screen cinematic entrance (v2).
   Layers on a 1536 × 1024 stage cut from one photographic plate (assets/vault/vault-scene.webp):
   the hall and arch stay still; the two door leaves, four locking bolts and the wheel move in real 3D.
   The stage is scaled to the screen by treasure-vault.js (transform). */
html, body.tv-body { margin: 0; height: 100%; background: #0b0904; overflow: hidden; }
body.tv-body { font-family: Lato, system-ui, sans-serif; color: #fff7e2; -webkit-tap-highlight-color: transparent; }
.tv-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.tv-root { position: fixed; inset: 0; overflow: hidden; background: #0b0904; touch-action: none; user-select: none; -webkit-user-select: none; }
.tv-back { position: absolute; inset: -60px; background: #1a1208 url(assets/vault/vault-scene-768.webp) center 45% / cover no-repeat; filter: blur(30px) brightness(.5) saturate(1.15); transform: scale(1.1); }
.tv-stage { position: absolute; left: 0; top: 0; width: 1536px; height: 1024px; transform-origin: 0 0; will-change: transform; }
.tv-root.s-zoom .tv-stage { transition: transform 3.4s cubic-bezier(.55, 0, .25, 1); }
.tv-stage.lbx { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.tv-stage.lby { -webkit-mask-image: linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(180deg, transparent, #000 7%, #000 93%, transparent); }
.tv-plate { position: absolute; left: 0; top: 0; width: 1536px; height: 1024px; display: block; pointer-events: none; }
.tv-vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 95% at 50% 46%, transparent 52%, rgba(10, 6, 0, .55) 100%); }

/* engraved lettering on the blank green sign and banners of the plate */
.tv-sign { position: absolute; left: 468px; top: 56px; width: 600px; height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.tv-sign .s1 { font: 400 42px/1 'Great Vibes', cursive; margin-bottom: -4px; }
.tv-sign .s2 { font: 700 57px/1.05 'Cormorant Garamond', Georgia, serif; letter-spacing: .01em; }
.tv-gold { background: linear-gradient(180deg, #fff6cf 0%, #f3d27a 38%, #c8922e 62%, #f7dd8f 100%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(40, 22, 0, .85)) drop-shadow(0 0 10px rgba(255, 214, 120, .35)); }
.tv-banner { position: absolute; top: 250px; width: 140px; display: flex; flex-direction: column; align-items: center; gap: 9px; pointer-events: none; text-align: center; }
.tv-banner.l { left: 21px; } .tv-banner.r { left: 1374px; top: 238px; }
.tv-banner span { font: 700 18px/1.05 'Cormorant Garamond', Georgia, serif; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }

/* doorway + leaves */
.tv-doors { position: absolute; left: 455px; top: 268px; width: 625px; height: 566px; perspective: 2300px; perspective-origin: 50% 40%; }
.tv-inside { position: absolute; inset: 0; overflow: hidden; background: #2a1a05; }
.tv-inside img { position: absolute; left: 50%; top: 50%; height: 100%; width: auto; min-width: 100%; transform: translate(-50%, -50%) scale(1.18); transform-origin: 50% 60%; filter: brightness(.35) saturate(.9); transition: transform 6s cubic-bezier(.3, 0, .2, 1), filter 2.6s ease; }
.tv-root.s-open .tv-inside img { filter: brightness(1.02) saturate(1.05); transform: translate(-50%, -50%) scale(1.05); }
.tv-inside .glow { position: absolute; inset: 0; background: radial-gradient(60% 55% at 50% 52%, rgba(255, 238, 180, .95), rgba(255, 196, 90, .35) 45%, transparent 75%); mix-blend-mode: screen; opacity: 0; transition: opacity 1.6s ease; }
.tv-root.s-seam .tv-inside .glow { opacity: .55; } .tv-root.s-open .tv-inside .glow { opacity: .9; } .tv-root.s-fade .tv-inside .glow { opacity: .35; }

.tv-leaf { position: absolute; top: 0; height: 566px; transform-style: preserve-3d; transition: transform 5.2s cubic-bezier(.6, .02, .22, 1); }
.tv-leaf.l { left: 0; width: 312px; transform-origin: 0 50%; }
.tv-leaf.r { left: 312px; width: 313px; transform-origin: 100% 50%; }
.tv-root.s-unlock .tv-leaf.l { transform: rotateY(-2.2deg); transition-duration: .5s; }
.tv-root.s-unlock .tv-leaf.r { transform: rotateY(2.2deg); transition-duration: .5s; }
.tv-root.s-open .tv-leaf.l { transform: rotateY(-97deg); transition-duration: 5.2s; }
.tv-root.s-open .tv-leaf.r { transform: rotateY(97deg); transition-duration: 5.2s; }
.tv-leaf .face, .tv-leaf .back, .tv-leaf .edge { position: absolute; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tv-leaf .face { inset: 0; background-image: url(assets/vault/vault-scene.webp); background-size: 1536px 1024px; background-repeat: no-repeat; transform-style: preserve-3d; }
.tv-leaf.l .face { background-position: -455px -268px; }
.tv-leaf.r .face { background-position: -767px -268px; }
.tv-leaf .shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 5.2s cubic-bezier(.6, .02, .22, 1); }
.tv-leaf.l .shade { background: linear-gradient(90deg, rgba(20, 10, 0, .15), rgba(20, 10, 0, .75)); }
.tv-leaf.r .shade { background: linear-gradient(270deg, rgba(20, 10, 0, .15), rgba(20, 10, 0, .75)); }
.tv-root.s-open .tv-leaf .shade { opacity: 1; }
/* door thickness on the meeting edge (brushed gold with a locking groove) */
.tv-leaf .edge { top: 0; height: 100%; width: 46px; background:
  linear-gradient(180deg, rgba(255, 255, 255, .0) 0 7%, rgba(60, 34, 4, .55) 7% 8.2%, transparent 8.2% 91.8%, rgba(60, 34, 4, .55) 91.8% 93%, transparent 93%),
  repeating-linear-gradient(180deg, rgba(255, 246, 210, .10) 0 2px, rgba(90, 56, 10, .10) 2px 5px),
  linear-gradient(90deg, #7a5214, #f6dc8e 30%, #c99636 55%, #fff0bf 72%, #8c6019); }
.tv-leaf.l .edge { right: 0; transform-origin: 100% 50%; transform: rotateY(-90deg); }
.tv-leaf.r .edge { left: 0; transform-origin: 0 50%; transform: rotateY(90deg); }
/* the inside face of each leaf (seen as the doors pass ninety degrees) */
.tv-leaf .back { inset: 0; transform: translateZ(-46px) rotateY(180deg); background:
  radial-gradient(circle at 50% 46%, rgba(255, 236, 170, .35) 0 9%, transparent 9.5% 15%, rgba(80, 50, 8, .5) 15.5% 16.5%, transparent 17%),
  repeating-linear-gradient(90deg, rgba(255, 240, 190, .06) 0 3px, rgba(60, 36, 4, .08) 3px 7px),
  linear-gradient(90deg, #4a3008, #b88a35 40%, #8a611e 70%, #3d2705); box-shadow: inset 0 0 0 14px rgba(90, 60, 14, .55), inset 0 0 0 16px rgba(255, 230, 160, .25); }

/* locking bolts: crops of the plate that slide out of their keepers */
.tv-bolt { position: absolute; background-image: url(assets/vault/vault-scene.webp); background-size: 1536px 1024px; background-repeat: no-repeat; transition: transform .55s cubic-bezier(.55, 0, .2, 1); }
.tv-keep { position: absolute; border-radius: 10px; background: linear-gradient(180deg, #2b1803, #6d4813 45%, #2b1803); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .7), inset 0 -2px 3px rgba(255, 220, 140, .25); }
.tv-root.s-b1 .tv-bolt.b1, .tv-root.s-b2 .tv-bolt.b2, .tv-root.s-b3 .tv-bolt.b3, .tv-root.s-b4 .tv-bolt.b4 { transform: translateX(var(--bx)); }
.tv-root.s-jiggle .tv-bolt { animation: tvJig .5s ease-in-out 1; }
@keyframes tvJig { 0%, 100% { transform: none } 25% { transform: translateX(calc(var(--bx) * .16)) } 50% { transform: translateX(calc(var(--bx) * -.04)) } 75% { transform: translateX(calc(var(--bx) * .1)) } }

/* the wheel (photographic, mounted on the left leaf, overhanging the seam) */
.tv-wheel { position: absolute; left: 97.4px; top: 56.2px; width: 432.6px; height: 432.6px; transform: translateZ(4px); cursor: grab; touch-action: none; outline: none; border-radius: 50%; }
.tv-wheel.drag { cursor: grabbing; }
.tv-wheel:focus-visible::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; box-shadow: 0 0 0 4px #fff2b8, 0 0 0 8px #0d3b2a; }
.tv-spin { position: absolute; inset: 0; transform-origin: 49.7% 45.6%; will-change: transform; filter: drop-shadow(5px 9px 7px rgba(40, 18, 0, .6)) drop-shadow(0 0 2px rgba(60, 30, 0, .5)); }
.tv-spin > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; -webkit-user-drag: none; }
.tv-mk { position: absolute; left: 49.7%; top: 45.6%; width: 0; height: 0; }
.tv-mk i { position: absolute; left: -17px; top: -127px; width: 34px; height: 22px; display: flex; align-items: center; justify-content: center; font: 700 15px/1 'Cormorant Garamond', Georgia, serif; font-style: normal; color: rgba(74, 44, 6, .9); text-shadow: 0 1px 0 rgba(255, 244, 205, .75), 0 -1px 0 rgba(60, 30, 0, .35); border-radius: 4px; transition: color .25s, text-shadow .25s, background .35s, box-shadow .35s; }
.tv-mk.lit i { color: #fffbe8; text-shadow: 0 0 6px #fff1b0, 0 0 14px #ffc94d, 0 1px 0 rgba(90, 50, 0, .7); background: radial-gradient(closest-side, rgba(255, 244, 190, .75), rgba(255, 205, 90, .35) 60%, transparent); box-shadow: 0 0 18px 4px rgba(255, 210, 100, .55); }
.tv-hub { position: absolute; left: calc(49.7% - 41px); top: calc(45.6% - 41px); width: 82px; height: 82px; border-radius: 50%; overflow: hidden; background: #0c2f22; box-shadow: 0 0 0 2px #f6dc90, 0 0 0 4px rgba(70, 40, 0, .6), inset 0 0 8px rgba(0, 0, 0, .6), 0 3px 6px rgba(30, 12, 0, .5); pointer-events: none; }
.tv-hub img { position: absolute; left: 50%; top: 50%; width: 118%; height: auto; transform: translate(-50%, -50%); display: block; }
.tv-hub::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .45), transparent 42%); }
.tv-flash { position: absolute; inset: -6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 246, 200, .85), rgba(255, 205, 90, .3) 55%, transparent); mix-blend-mode: screen; opacity: 0; pointer-events: none; transition: opacity .5s; }
.tv-root.s-seam .tv-flash { animation: tvFlash 1.1s ease-out 1; }
@keyframes tvFlash { 0% { opacity: 0 } 25% { opacity: 1 } 100% { opacity: 0 } }

/* light */
.tv-seam { position: absolute; left: 765px; top: 268px; width: 4px; height: 566px; background: linear-gradient(180deg, transparent, #fff4c8 12%, #fffbe8 50%, #fff4c8 88%, transparent); box-shadow: 0 0 14px 4px rgba(255, 214, 120, .9), 0 0 60px 18px rgba(255, 190, 80, .45); mix-blend-mode: screen; opacity: 0; transition: opacity .8s ease, box-shadow 1.4s ease; pointer-events: none; }
.tv-root.s-seam .tv-seam { opacity: .55; }
.tv-root.s-unlock .tv-seam { opacity: 1; box-shadow: 0 0 22px 7px rgba(255, 220, 130, 1), 0 0 110px 34px rgba(255, 190, 80, .6); }
.tv-root.s-open .tv-seam { opacity: 0; transition-duration: 2.2s; }
.tv-rays { position: absolute; left: 455px; top: 268px; width: 625px; height: 566px; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 2.4s ease .6s;
  background: radial-gradient(55% 60% at 50% 50%, rgba(255, 240, 190, .55), transparent 70%),
              repeating-conic-gradient(from 0deg at 50% 52%, rgba(255, 230, 160, .16) 0 4deg, transparent 4deg 11deg); }
.tv-root.s-open .tv-rays { opacity: .9; }
.tv-spill { position: absolute; left: 0; top: 834px; width: 1536px; height: 190px; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity 3.2s ease .8s;
  clip-path: polygon(29.6% 0, 70.4% 0, 92% 100%, 8% 100%);
  background: linear-gradient(180deg, rgba(255, 236, 170, .85), rgba(255, 200, 100, .35) 45%, transparent 100%); }
.tv-root.s-open .tv-spill { opacity: .75; }
.tv-bloom { position: absolute; left: 167px; top: 0; width: 1200px; height: 1024px; pointer-events: none; mix-blend-mode: screen; opacity: 0; background: radial-gradient(40% 46% at 50% 54%, rgba(255, 238, 190, .75), rgba(255, 200, 100, .22) 50%, transparent 72%); transition: opacity 3s ease 1s; }
.tv-root.s-open .tv-bloom { opacity: .7; } .tv-root.s-fade .tv-bloom { opacity: 1; }
.tv-mote { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff3c4; box-shadow: 0 0 8px 2px rgba(255, 220, 130, .8); opacity: 0; pointer-events: none; }
.tv-root.s-open .tv-mote { animation: tvMote 7s linear infinite; }
@keyframes tvMote { 0% { opacity: 0; transform: translate(0, 0) } 15% { opacity: .9 } 85% { opacity: .6 } 100% { opacity: 0; transform: translate(var(--mx), -150px) } }

/* full-screen room after the camera passes through */
.tv-room { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1.6s ease, visibility 0s 1.6s; background: #2a1a05; }
.tv-room img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; transform: scale(1.06); transition: transform 9s cubic-bezier(.2, 0, .2, 1); }
.tv-root.s-in .tv-room { opacity: 1; visibility: visible; transition: opacity 1.6s ease, visibility 0s; }
.tv-root.s-in .tv-room img { transform: scale(1); }
.tv-whiteout { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 70% at 50% 50%, #fff8de, #ffd77e 60%, #d99a32); opacity: 0; transition: opacity 1.4s ease; }
.tv-root.s-fade .tv-whiteout { opacity: .9; } .tv-root.s-in .tv-whiteout { opacity: 0; transition-duration: 1.8s; }
.tv-welcome { position: absolute; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(560px, 92vw); text-align: center; padding: 16px 20px 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(10, 38, 28, .78), rgba(6, 26, 19, .86)); border: 1px solid rgba(243, 210, 122, .6); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity 1s ease 1s; }
.tv-root.s-in .tv-welcome { opacity: 1; }
.tv-welcome h2 { margin: 0 0 4px; font: 400 clamp(30px, 5vw, 44px)/1.1 'Great Vibes', cursive; color: #f6d98a; }
.tv-welcome p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: #f3ead2; }
.tv-welcome .row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* controls: discreet, low on the marble floor, never over the doors */
.tv-btn { appearance: none; font: 700 15px/1 Lato, system-ui, sans-serif; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(243, 210, 122, .7); background: rgba(8, 30, 22, .62); color: #fbeec9; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transition: background .2s, transform .15s; }
.tv-btn:hover { background: rgba(12, 48, 34, .8); } .tv-btn:active { transform: translateY(1px); }
.tv-btn:focus-visible { outline: 3px solid #fff2b8; outline-offset: 2px; }
.tv-btn.gold { background: linear-gradient(180deg, #fbe7a6, #d9a84a 55%, #b9832b); color: #2a1803; border-color: #fff0c2; }
.tv-btn.gold:hover { background: linear-gradient(180deg, #fff0c0, #e4b65a 55%, #c18d32); }
.tv-btn.sm { font-size: 13px; min-height: 40px; padding: 0 14px; }
.tv-btn[disabled] { opacity: .45; cursor: default; }
.tv-ui { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: max-content; max-width: 96vw; transition: opacity .8s; }
.tv-root.s-open .tv-ui [data-act=open], .tv-root.s-open .tv-ui [data-act=skip] { display: none; }
.tv-home { position: absolute; left: calc(14px + env(safe-area-inset-left)); top: calc(14px + env(safe-area-inset-top)); z-index: 5; font-size: 13px; min-height: 38px; padding: 0 14px; background: rgba(8, 24, 18, .45); border-color: rgba(243, 210, 122, .45); }
.tv-hint { position: absolute; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); margin: 0; padding: 8px 16px; border-radius: 999px; font: 600 14px/1.2 Lato, sans-serif; color: #fbeec9; background: rgba(8, 24, 18, .45); border: 1px solid rgba(243, 210, 122, .35); white-space: nowrap; transition: opacity .6s; pointer-events: none; }
.tv-hint b { color: #f6d98a; }

/* small progress chip for members still earning (and the signed-out invitation) */
.tv-chip { position: absolute; right: calc(14px + env(safe-area-inset-right)); top: calc(14px + env(safe-area-inset-top)); z-index: 5; width: min(300px, 60vw); padding: 10px 14px 11px; border-radius: 14px; background: rgba(8, 26, 19, .62); border: 1px solid rgba(243, 210, 122, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-size: 13px; line-height: 1.4; color: #f3ead2; opacity: 0; transform: translateY(-6px); transition: opacity .5s, transform .5s, box-shadow .5s; pointer-events: none; }
.tv-chip.on { opacity: 1; transform: none; pointer-events: auto; }
.tv-chip.pulse { box-shadow: 0 0 0 2px rgba(246, 217, 138, .9), 0 0 26px rgba(246, 217, 138, .55); }
.tv-chip b { color: #f6d98a; }
.tv-chip .bar { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .15); margin: 7px 0 6px; overflow: hidden; }
.tv-chip .bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #c8922e, #f6d98a); }
.tv-chip a { color: #f6d98a; font-weight: 700; }
.tv-chip details { margin-top: 4px; } .tv-chip summary { cursor: pointer; color: #f6d98a; font-weight: 700; }
.tv-chip ul { margin: 6px 0 0; padding-left: 18px; } .tv-chip li { margin: 2px 0; }

/* responsive control sizes */
@media (max-width: 600px) {
  .tv-hint { top: auto; bottom: calc(128px + env(safe-area-inset-bottom)); font-size: 13px; }
  .tv-ui { gap: 6px; } .tv-btn { font-size: 14px; padding: 0 14px; } .tv-btn.sm { font-size: 12.5px; padding: 0 11px; }
  .tv-chip { top: calc(60px + env(safe-area-inset-top)); right: 50%; transform: translate(50%, -6px); width: min(340px, 92vw); }
  .tv-chip.on { transform: translate(50%, 0); }
}
@media (max-height: 500px) and (orientation: landscape) { .tv-hint { display: none; } .tv-ui { bottom: 8px; } }

/* gentle motion (reduced-motion users by default): no camera flight, short cross-fades */
.tv-root.gentle .tv-leaf, .tv-root.gentle .tv-leaf .shade { transition-duration: .9s !important; }
.tv-root.gentle.s-zoom .tv-stage { transition: none; }
.tv-root.gentle .tv-bolt { transition-duration: .2s; }
.tv-root.gentle .tv-mote, .tv-root.gentle .tv-flash { display: none; }
.tv-root.gentle .tv-room, .tv-root.gentle .tv-whiteout { transition-duration: .6s; }
.tv-root.instant *, .tv-root.instant { transition: none !important; animation: none !important; }
/* Beacon pass: visitors can look, members turn the wheel */
.tv-guest .tv-wheel { cursor: not-allowed; }
.tv-guest .tv-ui [data-act=open], .tv-guest .tv-ui [data-act=skip] { opacity: .6; }

/* PUBLIC REGISTRATION CLOSED (owner order): hide every link to the join page until PW approves reopening. join.html is kept. */
a[href*="join.html"],a[href="join"],a[href="/join"],section.join{display:none!important}
