/* 3D Scroll Image Reveal */
.mm-gridreveal { position: relative; width: 100%; overflow: clip; isolation: isolate; box-sizing: border-box; }
.mm-gridreveal *, .mm-gridreveal *::before, .mm-gridreveal *::after { box-sizing: border-box; }
.mm-gridreveal .mmsr-body { position: relative; z-index: 1; }
.mm-gridreveal .mmsr-pin {
  position: relative; width: 100%; height: 100vh; height: 100svh; display: flex; align-items: center; justify-content: center;
  perspective: var(--mmsr-persp, 420px); perspective-origin: 50% 45%; overflow: hidden; padding: 0 clamp(0.75rem, 3vw, 2.5rem);
}
.mm-gridreveal .mmsr-inner { width: var(--mmsr-max, 1100px); max-width: 100%; transform-style: preserve-3d; }
.mm-gridreveal .mmsr-grid { display: grid; grid-template-columns: repeat(var(--mmsr-cols, 5), 1fr); gap: var(--mmsr-gap, 9px); width: 100%; transform-style: preserve-3d; }
.mm-gridreveal .mmsr-card { position: relative; margin: 0; aspect-ratio: 4 / 5; transform-style: preserve-3d; cursor: pointer; outline: none; }
.mm-gridreveal .mmsr-card__wrap {
  position: relative; width: 100%; height: 100%; border-radius: var(--mmsr-r, 4px); overflow: hidden; background: var(--mmsr-card-bg, #d9d4cc);
  transform-style: preserve-3d; transform-origin: 50% 100%; will-change: transform, opacity;
}
.mm-gridreveal .mmsr-card:focus-visible .mmsr-card__wrap { box-shadow: 0 0 0 3px currentColor !important; }
.mm-gridreveal .mmsr-card__img { display: block; width: 100% !important; height: 100% !important; object-fit: cover; pointer-events: none; transition: transform 0.4s ease; }
.mm-gridreveal .mmsr-card:hover .mmsr-card__img { transform: scale(1.04); }
.mm-gridreveal.is-static .mmsr-pin, .mm-gridreveal.is-reduced .mmsr-pin { height: auto; padding-top: 3rem; padding-bottom: 3rem; }
.mm-gridreveal.is-static .mmsr-card__wrap { will-change: auto; }

/* ---- shared gallery kit ---- */
.mmsr-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.mmsr-bg__img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.mmsr-bg__ov { position: absolute; inset: 0; }
.mmsr-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;
}
.mmsr-demo--before { margin-bottom: 1rem; }
.mmsr-demo--after { margin-top: 1rem; }
/* Editor scroll room (1.3.4): same heights as the demo pages; editor preview only, never rendered live. */
.mmsr-demo--after { min-height: var(--mm-demo-h-after, 50vh); }
@media (max-width: 640px) { .mmsr-demo--before { min-height: var(--mm-demo-h-sm, clamp(160px, 30vh, 260px)); } }
.mmsr-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;
}
.mmsr-lb[hidden] { display: none !important; }
.mmsr-lb.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mmsr-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(--mmsr-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);
}
.mmsr-lb.is-open .mmsr-lb__card { transform: none; }
.mmsr-lb__close:hover, .mmsr-lb__close:focus, .mmsr-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;
}
.mmsr-lb__scrim:hover, .mmsr-lb__scrim:focus { background: rgba(0, 0, 0, 0.66) !important; outline: none !important; box-shadow: none !important; }
.mmsr-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;
}
.mmsr-lb__body { flex: 0 0 auto; align-self: stretch; padding: 0.85rem 1.1rem 1.05rem; overflow-y: auto; text-align: left; }
.mmsr-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(--mmsr-lb-title, #fff) !important; text-transform: none !important; }
.mmsr-lb__desc { margin: 0 !important; padding: 0 !important; font-size: 14px !important; line-height: 1.5 !important; color: var(--mmsr-lb-text, #c8c8d0) !important; }
.mmsr-lb__title[hidden], .mmsr-lb__desc[hidden], .mmsr-lb__link[hidden] { display: none !important; }
.mmsr-lb__link, .mmsr-lb__link:visited {
  display: inline-block; margin-top: 0.8rem; padding: 0.55rem 1.1rem; border-radius: 999px;
  background: var(--mmsr-lb-title, #fff) !important; color: var(--mmsr-lb-bg, #101014) !important;
  font-size: 0.85rem; font-weight: 600; text-decoration: none !important; border: 0 !important; box-shadow: none !important;
}
.mmsr-lb__link:hover, .mmsr-lb__link:focus { opacity: 0.88; text-decoration: none !important; outline: none !important; }
/* ---- end kit ---- */
