/* Section "moments": atmosphere cards (loop video or photo, inset photo, short text). Prefix: .mo- */

.mo { overflow-x: clip; }
.mo-head { max-width: var(--measure); margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.mo-lead { margin: 0; }

/* ---------- Grid ---------- */
.mo-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: clamp(1rem, 2vw, 1.6rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mo-item { display: flex; min-width: 0; }
@media (max-width: 999px) { .mo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Phones: swipeable row with a visible peek of the next card (works without JS). */
@media (max-width: 639px) {
  .mo-grid {
    display: flex; gap: .85rem;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1); padding: .3rem var(--gutter) 1rem;
    scrollbar-width: none;
  }
  .mo-grid::-webkit-scrollbar { display: none; }
  .mo-item { flex: 0 0 min(84%, 21rem); scroll-snap-align: start; }
  .mo-grid .reveal { opacity: 1; transform: none; }
}

/* ---------- Card ---------- */
.mo-card {
  display: flex; flex-direction: column; width: 100%;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg2); border: 1px solid var(--line);
}
.mo-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg2); isolation: isolate; }
.mo-img, .mo-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mo-img { transition: transform 1.2s var(--ease); }
.mo-media::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgb(var(--bg-rgb) / .45) 0%, transparent 22%, transparent 72%, rgb(var(--bg-rgb) / .55) 100%);
}
.mo-tag {
  position: absolute; top: .85rem; left: .85rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .38rem .7rem; border-radius: 999px;
  background: rgb(var(--bg-rgb) / .6); border: 1px solid var(--line2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 700 .66rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.mo-tag .mono { color: var(--primary); letter-spacing: .04em; }
.mo-inset {
  position: absolute; right: .85rem; bottom: .85rem; z-index: 2;
  width: 34%; aspect-ratio: 3 / 4; height: auto; object-fit: cover;
  border-radius: .6rem; border: 3px solid var(--bg2);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .8);
  transform: rotate(3deg); transition: transform .6s var(--ease);
}
.mo-play {
  position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%);
  display: none; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: rgb(var(--primary-rgb) / .9); color: var(--on-primary); pointer-events: none;
}
.mo-play svg { width: 1.1rem; height: 1.1rem; margin-left: .12rem; fill: currentColor; }
/* JS on: no native controls; the loop plays while visible. With reduced motion a play badge shows. */
.mo--js .mo-video { cursor: pointer; }
.mo--js .mo-card.is-paused .mo-play { display: grid; }

.mo-body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.mo-title { margin: 0; font: 800 1.22rem/1.2 var(--font); letter-spacing: -.015em; color: var(--ink); }
.mo-text { margin: 0; font-size: .97rem; line-height: 1.6; color: var(--text); }
.mo-credit { margin: auto 0 0; padding-top: .3rem; font: 500 .7rem/1.3 var(--font-mono); letter-spacing: .04em; color: var(--dim); }

@media (hover: hover) and (pointer: fine) {
  .mo-card:hover .mo-img { transform: scale(1.04); }
  .mo-card:hover .mo-inset { transform: rotate(0deg) scale(1.04); }
}
@media (max-width: 639px) {
  .mo-media { aspect-ratio: 4 / 4.4; }
  .mo-text { font-size: .93rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mo-img, .mo-inset { transition: none; }
}
