/* dgm_section_moments "Eindrücke" (Veranstaltungen task 19, 2026-11-13): a light band of photographs of people at DGM
   events as prints. Complete in itself (no page or group file needed). No script: the drift is a CSS animation over a
   set printed twice (the copy aria-hidden and inert); touch screens (hover none + coarse pointer) and reduced motion get
   the rows to swipe by hand with snap instead, the copy hidden. Head at the family's left edge and measures (pill, h2
   700 Inter Tight, body 16 px). Notes: Tools/VeranstaltungenRedesign/design/elements/moments.md
   Task 22 (agent D, 2026-11-13): no drawing (the sparkle and the dotted arc are gone), nothing under 12px. */

.mb {
  --mb-primary: #00abe3; --mb-primary-rgb: 0 171 227; --mb-ink: #003e52; --mb-text: #0f2233; --mb-muted: #475569; --mb-line: #dce6ec;
  --mb-head: Heading-Font, Theme-Font, Inter, system-ui, sans-serif; --mb-body: Theme-Font, Inter, system-ui, sans-serif;
  --mb-ease: cubic-bezier(.22, .8, .24, 1); --mb-spring: cubic-bezier(.16, 1, .3, 1);   /* task 22: the lift without overshoot */
  --mb-g: clamp(20px, 5.5vw, 96px);                                   /* the family's gutter: left edge of every section head */
  --mb-wrap: min(1440px, 100% - 2 * var(--mb-g));
  --mb-h: clamp(220px, calc(14vw + 100px), 320px);                    /* height of an upright print (one row) */
  --mb-wf: .92;                                                       /* a wide print is a little lower than an upright one */
  --mb-gap: clamp(26px, 2.7vw, 44px);
  --mb-step: 15s;                                                     /* seconds per print: slow, about 24 px/s at 1440 */
  --mb-dur: calc(var(--mb-n, 10) * var(--mb-step));
  --mb-f-h2: 700 1.5rem/1.25 var(--mb-head);
  position: relative; display: block; overflow-x: clip; margin: 0; padding: clamp(56px, 6.2vw, 88px) 0 clamp(20px, 2.6vw, 40px);
  background: #fff; color: var(--mb-text); font: 400 1rem/1.55 var(--mb-body); letter-spacing: -.006em; text-align: left;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
.mb--bare { padding-top: clamp(20px, 2.6vw, 40px); }
.mb--sky { background: linear-gradient(180deg, #f4fbfe 0%, #e6f6fd 100%); }
.mb--medium { --mb-step: 10s; }
.mb--r2 { --mb-h: clamp(186px, calc(9vw + 110px), 260px); --mb-dur: calc(var(--mb-n, 12) / 2 * var(--mb-step)); }
.mb * { box-sizing: border-box; }
@media (min-width: 640px) { .mb { --mb-f-h2: 700 1.875rem/1.25 var(--mb-head); } }
@media (min-width: 1024px) { .mb { --mb-f-h2: 700 2.25rem/1.25 var(--mb-head); } }

/* head: the left-aligned section head of the family (as "Alle Veranstaltungen"), the link on the right */
.mb__in { position: relative; width: var(--mb-wrap); margin-inline: auto; }
.mb__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 16px clamp(32px, 5vw, 72px); }
.mb__head > .mb__btn { justify-self: end; }
.mb__copy { position: relative; min-width: 0; }
.mb__copy:only-child { grid-column: 1 / -1; max-width: 760px; }
.mb__eyebrow { font: 700 12px/1.5 var(--mb-body); display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 8px; margin: 0; padding: 6px 12px;
  border: 1px solid rgb(var(--mb-primary-rgb) / .3); border-radius: 999px; background: rgb(var(--mb-primary-rgb) / .05); color: var(--mb-primary); letter-spacing: .1em; text-transform: uppercase; }
.mb__eyebrow i { font-size: 12px; line-height: 12px; }
.mb__h2 { font: var(--mb-f-h2); margin: 0; letter-spacing: -.025em; text-wrap: balance; color: var(--mb-text); }
.mb__eyebrow + .mb__h2 { margin-top: 14px; }
.mb__lead { max-width: 60ch; margin-top: 12px; color: var(--mb-muted); text-wrap: pretty; }
.mb__lead > :first-child { margin-top: 0; }
.mb__lead > :last-child { margin-bottom: 0; }
.mb__lead p { margin: 0 0 .6em; }
.mb__btn { font: 600 1rem/1.35 var(--mb-body); display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px;
  border: 1px solid var(--mb-line); border-radius: 10px; background: #fff; color: var(--mb-text) !important; text-decoration: none !important; white-space: nowrap;
  transition: transform .25s var(--mb-ease), border-color .2s, color .2s; }
.mb__btn i { font-size: 14px; color: var(--mb-primary); }
.mb__btn:hover { transform: translateY(-2px); border-color: var(--mb-primary); color: var(--mb-primary) !important; }
.mb :is(.mb__btn, .mb__row, .mb__print):focus-visible { outline: 3px solid var(--mb-primary); outline-offset: 3px; }
.mb__row:focus-visible { outline-width: 2px; outline-offset: -2px; }
@media (max-width: 767.98px) { .mb__head { grid-template-columns: minmax(0, 1fr); } .mb__head > .mb__btn { justify-self: start; } }

/* rows: each a full-width scroller (hidden scrollbar while it drifts), the belt holds the set twice */
.mb__rows { display: grid; margin-top: clamp(4px, 1.2vw, 16px); }
.mb__in + .mb__rows { margin-top: clamp(8px, 1.6vw, 22px); }
.mb__row { position: relative; container-type: inline-size; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; padding: 34px 0 54px; scrollbar-width: none; }
.mb__row::-webkit-scrollbar { display: none; }
.mb--r2 .mb__row { padding-block: 26px 40px; }
.mb--r2 .mb__row + .mb__row { margin-top: -14px; }
.mb__belt { display: flex; width: max-content; }
.mb__set { display: flex; align-items: center; margin: 0; padding: 0; list-style: none; }
.mb__belt { animation: mb-drift var(--mb-dur) linear infinite; animation-delay: calc(var(--mb-dur) * -.012); will-change: transform; }
.mb__row--1 .mb__belt { animation-direction: reverse; animation-delay: calc(var(--mb-dur) * -.37); }
.mb__row:hover .mb__belt, .mb__row:focus-within .mb__belt { animation-play-state: paused; }
/* a linked print reached by keyboard: the belt stops at its start, so the row can scroll the print into view */
.mb__row:has(.mb__print:focus-visible) .mb__belt { animation: none; }
@keyframes mb-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* a print: white edge, round corners, soft shadow, a little tilted; upright 4:5 and wide 3:2 alternate */
.mb__item { --mb-tilt: 0deg; --mb-y: 0px; --mb-c: #00abe3; position: relative; flex: none; margin: 0 var(--mb-gap) 0 0; padding: 0; translate: 0 var(--mb-y); }
.mb__item:hover, .mb__item:focus-within { z-index: 2; }
.mb__print { position: relative; display: block; width: calc(var(--mb-h) * .8); height: var(--mb-h); padding: 6px; border-radius: 20px; background: #fff; color: inherit; text-decoration: none;
  rotate: var(--mb-tilt);
  box-shadow: 0 0 0 1px rgb(0 62 82 / .05), 0 2px 4px rgb(0 62 82 / .06), 0 12px 26px -10px rgb(0 62 82 / .26), 0 26px 44px -26px rgb(0 62 82 / .3);
  transition: rotate .55s var(--mb-spring), translate .55s var(--mb-spring), scale .55s var(--mb-spring), box-shadow .35s var(--mb-ease); }
.mb__item--w .mb__print { width: calc(var(--mb-h) * var(--mb-wf) * 1.5); height: calc(var(--mb-h) * var(--mb-wf)); }
.mb__img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; background: color-mix(in srgb, var(--mb-c) 12%, #f2f7fa); }
.mb__print:hover, .mb__print:focus-visible { rotate: 0deg; translate: 0 -10px; scale: 1.06;
  box-shadow: 0 0 0 1px rgb(0 62 82 / .05), 0 4px 8px rgb(0 62 82 / .06), 0 22px 40px -14px rgb(0 62 82 / .34), 0 40px 64px -34px rgb(0 62 82 / .34); }
/* rhythm: seven tilts (at most 3 degrees) and small vertical offsets, so no two neighbours lie alike */
.mb__item:nth-child(7n+1) { --mb-tilt: -2.2deg; --mb-y: 4px; }
.mb__item:nth-child(7n+2) { --mb-tilt: 1.7deg; --mb-y: -9px; }
.mb__item:nth-child(7n+3) { --mb-tilt: -1deg; --mb-y: 8px; }
.mb__item:nth-child(7n+4) { --mb-tilt: 2.6deg; --mb-y: -3px; }
.mb__item:nth-child(7n+5) { --mb-tilt: -2.8deg; --mb-y: -8px; }
.mb__item:nth-child(7n+6) { --mb-tilt: 1.2deg; --mb-y: 9px; }
.mb__item:nth-child(7n+7) { --mb-tilt: 2deg; --mb-y: -4px; }
/* sticker colours: the calendar's event-type colours as soft tints (cyan, green, violet, amber, pink) */
.mb__item:nth-child(5n+2) { --mb-c: #12a182; }
.mb__item:nth-child(5n+3) { --mb-c: #7a5ad8; }
.mb__item:nth-child(5n+4) { --mb-c: #ee9b1c; }
.mb__item:nth-child(5n+5) { --mb-c: #e0587c; }

/* caption: a small tilted sticker on a tint at a corner of the print */
.mb__tag { position: absolute; left: -9px; bottom: 20px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 8px); padding: 6px 11px 6px 9px;
  border: 1px solid color-mix(in srgb, var(--mb-c) 30%, #fff); border-radius: 999px; background: color-mix(in srgb, var(--mb-c) 13%, #fff); color: var(--mb-ink);
  font: 600 13px/1.2 var(--mb-body); letter-spacing: -.003em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; rotate: -4deg;
  box-shadow: 0 2px 6px -1px rgb(0 62 82 / .16); }
.mb__item:nth-child(even) .mb__tag { left: auto; right: -9px; bottom: auto; top: 20px; rotate: 3.5deg; }
.mb__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--mb-c); }
/* a linked print: a small round arrow in the corner opposite the sticker */
.mb__go { position: absolute; right: 16px; bottom: 16px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--mb-primary);
  font-size: 14px; box-shadow: 0 3px 10px -2px rgb(0 62 82 / .28); transition: scale .45s var(--mb-spring), background-color .2s, color .2s; }
.mb__item:nth-child(even) .mb__go { right: auto; left: 16px; }
.mb__print--link:hover .mb__go, .mb__print--link:focus-visible .mb__go { scale: 1.12; background: var(--mb-primary); color: #fff; }

/* by hand: touch screens and reduced motion; the row starts at the head's left edge and snaps */
@media (hover: none) and (pointer: coarse), (prefers-reduced-motion: reduce) {
  .mb__belt { animation: none; will-change: auto; }
  .mb__set--copy { display: none; }
  .mb__row { scroll-snap-type: x proximity; scroll-padding-inline: max(var(--mb-g), (100% - 1440px) / 2); }
  .mb__set { padding-inline: max(var(--mb-g), (100cqw - 1440px) / 2) calc(max(var(--mb-g), (100cqw - 1440px) / 2) - var(--mb-gap)); }
  .mb__item { scroll-snap-align: start; }
}
@media (hover: none) and (pointer: coarse) {
  .mb__row { scroll-snap-type: x mandatory; }
  .mb__print:hover { rotate: var(--mb-tilt); translate: none; scale: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mb__print, .mb__go, .mb__btn { transition: none; }
  .mb__print:hover, .mb__print:focus-visible { scale: 1.03; translate: none; }
  .mb__row { scrollbar-width: thin; scrollbar-color: #b9e4f4 transparent; }
  .mb__row::-webkit-scrollbar { display: block; height: 8px; }
  .mb__row::-webkit-scrollbar-thumb { border-radius: 4px; background: #b9e4f4; }
}
@media (max-width: 639.98px) {
  .mb { --mb-gap: 22px; }
  .mb__row { padding-block: 26px 44px; }
  .mb__tag { font-size: 13px; padding: 5px 10px 5px 8px; }
  .mb__go { width: 30px; height: 30px; right: 12px; bottom: 12px; font-size: 13px; }
}

/* ---------- the endless band (task 22, agent D, 2026-11-13): assets/frontend.js sets .is-endless and moves each belt by one
   transform (offset modulo one set, copies as needed); the CSS loop above stays as the fallback without script. Wheel and
   drag are the script's, vertical swipes stay the page's (touch-action: pan-y). These rules win over the "by hand" ones. */
.mb.is-endless .mb__row { overflow: clip; scroll-snap-type: none; touch-action: pan-y; cursor: grab; -webkit-user-select: none; user-select: none; }
.mb.is-endless .mb__row.is-drag { cursor: grabbing; }
.mb.is-endless .mb__belt { animation: none; will-change: transform; }
.mb.is-endless .mb__set { padding-inline: 0; }
.mb.is-endless .mb__set--copy { display: flex; }
.mb.is-endless .mb__item { scroll-snap-align: none; }
.mb.is-endless .mb__img { -webkit-user-drag: none; }
.mb.is-endless .mb__row.is-drag .mb__print { pointer-events: none; }
