/* Montega Tombstone Hero — rolodex tombstone rotator.
   Card styles live in cards.css (loaded as a dependency). */

.mtx-hero{
  --mtx-r:400px;           /* drum radius (min; JS expands for more cards) */
  --mtx-step:45deg;        /* angle between slots (set by JS) */
  --mtx-cw:280px;          /* card width */
  --mtx-ch:340px;          /* card height */
  --mtx-spin:2.4s;         /* spin duration (set inline from settings) */
  --mtx-stage-h:560px;     /* design height of the stage */
  --mtx-footprint:1180px;  /* real scene width: 2r + cw (set by JS) */
  --mtx-fit:1;             /* scale factor when the container is narrow (set by JS) */
  position:relative;overflow:hidden;
  user-select:none;-webkit-user-select:none;
  min-height:calc(var(--mtx-stage-h)*var(--mtx-fit) + 80px);
  display:flex;align-items:center;
  background:radial-gradient(120% 120% at 70% 15%,#1d4148 0%,#12282d 55%,#0d1f24 100%);
  font-family:"Segoe UI",Helvetica,Arial,sans-serif;
}
.mtx-hero::after{
  content:"";position:absolute;left:0;right:0;bottom:0;height:34%;
  background:linear-gradient(180deg,rgba(13,31,36,0),rgba(9,22,26,.85));
  pointer-events:none;
}
.mtx-hero.mtx-bg-none{background:none;}
.mtx-hero.mtx-no-fade::after{display:none;}

.mtx-inner{position:relative;z-index:2;width:100%;max-width:1200px;margin:0 auto;padding:40px 24px;}
.mtx-stage{
  position:relative;width:100%;
  height:calc(var(--mtx-stage-h)*var(--mtx-fit));
  display:flex;align-items:center;justify-content:center;
}
/* the real scene, centred in the stage and scaled down to fit narrow containers.
   stays visible by default – the JS hides it briefly while it builds the drum */
.mtx-fit{
  position:relative;flex:0 0 auto;
  width:var(--mtx-footprint);height:var(--mtx-stage-h);
  display:flex;align-items:center;justify-content:center;
  perspective:1500px;
  transform:scale(var(--mtx-fit));
  transition:opacity .35s ease;
}

.mtx-arc{position:absolute;width:900px;height:900px;left:50%;top:50%;translate:-50% -50%;pointer-events:none;opacity:.8;}
.mtx-arc-1{transform:rotate(-14deg);animation:mtxSpin 26s linear infinite;}
.mtx-arc-2{transform:rotate(22deg) scale(1.12);animation:mtxSpin2 34s linear infinite reverse;}
@keyframes mtxSpin{to{transform:rotate(346deg);}}
@keyframes mtxSpin2{to{transform:rotate(22deg) scale(1.12);}}
.mtx-ground{
  position:absolute;left:50%;bottom:14px;width:480px;height:74px;margin-left:-240px;
  background:radial-gradient(50% 50% at 50% 50%,rgba(0,0,0,.5) 0%,rgba(0,0,0,0) 70%);
}
.mtx-float{transform-style:preserve-3d;animation:mtxIdle 8s ease-in-out infinite;}
@keyframes mtxIdle{
  0%,100%{transform:translateY(0) rotateY(4deg);}
  50%{transform:translateY(-14px) rotateY(-4deg);}
}
.mtx-drum{
  position:relative;width:var(--mtx-cw);height:var(--mtx-ch);
  transform-style:preserve-3d;
  transform:rotateX(-8deg);
  transition:transform var(--mtx-spin) cubic-bezier(.15,.75,.25,1.02);
  will-change:transform;
}
.mtx-slot{
  position:absolute;inset:0;transform-style:preserve-3d;
  transform:rotateY(calc(var(--i)*var(--mtx-step))) translateZ(var(--mtx-r));
}

/* motion blur while spinning (card styles are in cards.css) */
.mtx-drum.mtx-spinning .mtx-tomb,
.mtx-drum.mtx-spinning .mtx-tomb-back{filter:blur(3px);}

@media (max-width:560px){
  .mtx-hero{--mtx-r:290px;--mtx-cw:230px;--mtx-ch:300px;--mtx-stage-h:460px;}
  .mtx-fit{perspective:1100px;}
  .mtx-arc{width:640px;height:640px;}
  .mtx-ground{width:380px;margin-left:-190px;}
}
@media (prefers-reduced-motion:reduce){
  .mtx-float,.mtx-arc-1,.mtx-arc-2{animation:none;}
  .mtx-drum{transition-duration:1.2s;}
}
