/* Perspective Scroll Reveal */
.mm-perspective { position: relative; width: 100%; overflow: clip; isolation: isolate; box-sizing: border-box; }
.mm-perspective *, .mm-perspective *::before, .mm-perspective *::after { box-sizing: border-box; }
.mm-perspective .mmps-body { position: relative; z-index: 1; }
.mm-perspective .mmps-section { position: relative; width: 100%; }
.mm-perspective .mmps-pin { width: 100%; display: flex; justify-content: center; padding: 30vh 1rem; }
.mm-perspective .mmps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--mmps-gap, 32px); width: 100%; max-width: var(--mmps-max, 384px); }
.mm-perspective .mmps-card { position: relative; width: 100%; aspect-ratio: 1 / 1.2; margin: 0; perspective: var(--mmps-persp, 800px); perspective-origin: 50% 50%; cursor: pointer; outline: none; }
.mm-perspective .mmps-card__wrap { position: relative; width: 100%; height: 100%; border-radius: var(--mmps-r, 6px); overflow: hidden; transform-style: preserve-3d; will-change: transform, filter; background: rgba(127, 127, 127, 0.2); }
.mm-perspective .mmps-card:focus-visible .mmps-card__wrap { box-shadow: 0 0 0 3px #fff !important; }
.mm-perspective .mmps-card__img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; pointer-events: none; transform-origin: center center; will-change: transform; }
.mm-perspective.is-horizontal .mmps-pin { height: 100vh; height: 100svh; padding: 0; align-items: center; justify-content: flex-start; overflow: hidden; }
.mm-perspective.is-horizontal .mmps-grid {
  grid-template-columns: none; grid-template-rows: 1fr 1fr; grid-auto-flow: column; grid-auto-columns: calc((min(var(--mmps-h, 70vh), 720px) - var(--mmps-gap, 32px)) / 2 / 1.2);
  max-width: none; width: max-content; height: min(var(--mmps-h, 70vh), 720px); padding: 0 max(6vw, 2rem);
}
.mm-perspective.is-horizontal .mmps-card { width: 100%; height: 100%; aspect-ratio: auto; }
/* 1.3.6: side room so every card passes the middle of the stage (sharp
   state) during the scroll; still frame and reduced motion keep the plain
   padding above. */
.mm-perspective.is-horizontal:not(.is-static):not(.is-reduced) .mmps-grid {
  padding: 0 max(2rem, calc(50% - (min(var(--mmps-h, 70vh), 720px) - var(--mmps-gap, 32px)) / 4.8));
}
.mm-perspective.is-static .mmps-pin, .mm-perspective.is-reduced .mmps-pin { padding: 3rem 1rem; height: auto; }
.mm-perspective.is-static.is-horizontal .mmps-pin, .mm-perspective.is-reduced.is-horizontal .mmps-pin { overflow-x: auto; }
@media (max-width: 767px) { .mm-perspective:not(.is-horizontal) .mmps-grid { max-width: 92%; } }

/* ---- shared gallery kit ---- */
.mmps-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mmps-bg__img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.mmps-bg__ov { position: absolute; inset: 0; }
.mmps-demo {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  min-height: var(--mm-demo-h, clamp(200px, 35vh, 360px)); margin: 0 1rem; border: 2px dotted rgba(140, 140, 160, 0.55); border-radius: 14px;
  color: rgba(160, 160, 180, 0.9); font: 500 13px/1.4 system-ui, sans-serif; letter-spacing: 0.02em;
}
.mmps-demo--before { margin-bottom: 1rem; }
.mmps-demo--after { margin-top: 1rem; }
/* Editor scroll room (1.3.4): same heights as the demo pages; editor preview only, never rendered live. */
.mmps-demo--after { min-height: var(--mm-demo-h-after, 50vh); }
@media (max-width: 640px) { .mmps-demo--before { min-height: var(--mm-demo-h-sm, clamp(160px, 30vh, 260px)); } }
.mmps-lb {
  position: fixed; z-index: 100000; inset: 0; display: grid; place-items: center;
  padding: 1rem; padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s;
  font-family: inherit;
}
.mmps-lb[hidden] { display: none !important; }
.mmps-lb.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mmps-lb__card {
  position: relative; z-index: 1; width: min(96vw, 960px); max-height: min(92dvh, 900px);
  display: flex; flex-direction: column; align-items: center; padding-top: 0.75rem;
  background: var(--mmps-lb-bg, #101014); border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(18px) scale(0.96); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.mmps-lb.is-open .mmps-lb__card { transform: none; }
.mmps-lb__close:hover, .mmps-lb__close:focus, .mmps-lb__close:focus-visible {
  background: rgba(0, 0, 0, 0.7) !important; color: #fff !important; opacity: 1 !important;
  border: 1px solid rgba(255, 255, 255, 0.6) !important; outline: none !important; box-shadow: none !important;
}
.mmps-lb__scrim:hover, .mmps-lb__scrim:focus { background: rgba(0, 0, 0, 0.66) !important; outline: none !important; box-shadow: none !important; }
.mmps-lb__media {
  display: block; width: auto !important; height: auto !important; max-width: 100% !important;
  max-height: min(74dvh, 760px); min-height: min(40dvh, 300px); object-fit: contain;
  border: 0 !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important;
}
.mmps-lb__body { flex: 0 0 auto; align-self: stretch; padding: 0.85rem 1.1rem 1.05rem; overflow-y: auto; text-align: left; }
.mmps-lb__title { margin: 0 0 0.4rem !important; padding: 0 !important; font-size: 21px !important; font-weight: 600 !important; letter-spacing: -0.02em; line-height: 1.2 !important; color: var(--mmps-lb-title, #fff) !important; text-transform: none !important; }
.mmps-lb__desc { margin: 0 !important; padding: 0 !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--mmps-lb-text, #c8c8d0) !important; }
.mmps-lb__title[hidden], .mmps-lb__desc[hidden], .mmps-lb__link[hidden] { display: none !important; }
.mmps-lb__link, .mmps-lb__link:visited {
  display: inline-block; margin-top: 0.8rem; padding: 0.55rem 1.1rem; border-radius: 999px;
  background: var(--mmps-lb-title, #fff) !important; color: var(--mmps-lb-bg, #101014) !important;
  font-size: 0.85rem; font-weight: 600; text-decoration: none !important; border: 0 !important; box-shadow: none !important;
}
.mmps-lb__link:hover, .mmps-lb__link:focus { opacity: 0.88; text-decoration: none !important; outline: none !important; }
/* ---- end kit ---- */
