/* Photo decoration for standalone photos: a single photo set beside text (standing rule, see README "Standing rules").
   Not for banners, photo collages, edge-to-edge photos, photos that already carry theme shapes or cards, or infographics.
   Markup:
     <figure class="mm-deco" data-mm-deco>
       <div class="mm-deco__frame"><img ...></div>
       <span class="mm-deco__note mm-deco__note--a"><i></i>Short note</span>   (optional, up to two)
       <span class="mm-deco__note mm-deco__note--b"><i></i>Short note</span>
     </figure>
   Add "mm-deco--fill" when the photo should fill the height of its column (object-fit: cover). */
.mm-deco { position: relative; display: block; margin: 0; isolation: isolate; }
.mm-deco::before { content: ""; position: absolute; inset: 26px -22px -22px 26px; z-index: -1; border-radius: 8px;
  background-image: radial-gradient(rgba(236, 114, 37, .55) 1.6px, transparent 1.8px); background-size: 16px 16px; }
.mm-deco__frame { position: relative; overflow: hidden; border-radius: 8px; box-shadow: 0 18px 50px rgba(0, 0, 0, .1); }
.mm-deco__frame img { display: block; width: 100%; height: auto; transition: transform 6s ease; }
.mm-deco:hover .mm-deco__frame img { transform: scale(1.06); }
.mm-deco__frame::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(to top, rgba(96, 38, 8, .62), rgba(96, 38, 8, 0)); }
.mm-deco--fill, .mm-deco--fill .mm-deco__frame { height: 100%; min-height: inherit; }
.mm-deco--fill .mm-deco__frame img { height: 100%; min-height: inherit; object-fit: cover; }
/* stacked layouts (phones/tablets): there is no text column to take the height from, so give fill photos a real height */
@media (max-width: 900px) { .mm-deco.mm-deco--fill .mm-deco__frame, .mm-deco.mm-deco--fill .mm-deco__frame img { min-height: 360px; } }
@media (max-width: 575px) { .mm-deco.mm-deco--fill .mm-deco__frame, .mm-deco.mm-deco--fill .mm-deco__frame img { min-height: 300px; } }

.mm-deco__note { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; max-width: 250px; padding: 12px 16px; border-radius: 8px;
  background: #fff; box-shadow: 0 14px 34px rgba(0, 0, 0, .18); font: 600 14px/1.3 "Outfit", sans-serif; color: #080A0B; }
.mm-deco__note i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #EC7225; box-shadow: 0 0 0 4px rgba(236, 114, 37, .2); }
.mm-deco__note--a { left: -26px; bottom: 54px; }
.mm-deco__note--b { right: -20px; top: 40px; }
/* notes slide in when the photo scrolls into view, then drift gently (only once the script is running) */
.mm-deco.is-ready .mm-deco__note { opacity: 0; transform: translateX(-18px); transition: opacity .7s ease, transform .7s ease; }
.mm-deco.is-ready .mm-deco__note--b { transform: translateX(18px); transition-delay: .25s; }
.mm-deco.is-ready.is-in .mm-deco__note { opacity: 1; transform: none; animation: mm-deco-drift 6s ease-in-out 1s infinite; }
.mm-deco.is-ready.is-in .mm-deco__note--b { animation-delay: 2.5s; }
@keyframes mm-deco-drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

@media (max-width: 1024px) { .mm-deco__note--a { left: 12px; } .mm-deco__note--b { right: 12px; } }
@media (max-width: 575px) {
  .mm-deco::before { inset: 16px -10px -12px 16px; }
  .mm-deco__note { font-size: 13px; padding: 10px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-deco__frame img, .mm-deco.is-ready .mm-deco__note { transition: none; animation: none; }
  .mm-deco:hover .mm-deco__frame img { transform: none; }
  .mm-deco.is-ready .mm-deco__note { opacity: 1; transform: none; }
}

