/* M.M. SOLUTION — shared primitives used by every design proposition.
   Design-specific rules live in each folder's style.css. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body { margin: 0; overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; }
a { color: inherit; }

html.lb-open, html.nav-open { overflow: hidden; }

.mm-skip {
  position: fixed; top: 0; left: 0; z-index: 999;
  padding: .7rem 1.1rem; background: #000; color: #fff;
  font: 600 .8rem/1 system-ui, sans-serif; letter-spacing: .04em;
  transform: translateY(-120%); transition: transform .2s;
}
.mm-skip:focus { transform: none; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------------------------------------------------------------- reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="scale"] { transform: scale(.96); }
/* no-JS / failed-IO safety: content must never stay invisible */
.no-js [data-reveal],
.no-io [data-reveal] { opacity: 1 !important; transform: none !important; }

/* ---------------------------------------------------------------- marquee */
.mm-marquee {
  position: relative; display: flex; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.mm-marquee__inner {
  display: flex; flex: none; gap: 0; align-items: center;
  min-width: 100%; animation: mmMarquee 38s linear infinite;
}
.mm-marquee:hover .mm-marquee__inner { animation-play-state: paused; }
.mm-marquee--rev .mm-marquee__inner { animation-direction: reverse; }
@keyframes mmMarquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------- lightbox */
.mm-lb {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.mm-lb.is-open { opacity: 1; visibility: visible; }
.mm-lb__bd { position: absolute; inset: 0; background: rgba(6,6,8,.93); }
.mm-lb__fig {
  position: relative; margin: 0; max-width: 92vw; max-height: 88vh;
  display: flex; flex-direction: column; gap: .7rem; align-items: center;
  transform: scale(.96); transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.mm-lb.is-open .mm-lb__fig { transform: none; }
.mm-lb__fig img { max-width: 92vw; max-height: 80vh; object-fit: contain; }
.mm-lb__fig figcaption { color: #9aa0a8; font: 400 .78rem/1.4 ui-monospace, monospace; letter-spacing: .04em; text-align: center; }
.mm-lb__x, .mm-lb__nav {
  position: absolute; z-index: 2; display: grid; place-items: center;
  color: #fff; background: rgba(255,255,255,.08);
  width: 3rem; height: 3rem; border-radius: 50%;
  font-size: 1.5rem; line-height: 1; transition: background .2s, transform .2s;
}
.mm-lb__x { top: 1.2rem; right: 1.2rem; }
.mm-lb__nav { top: 50%; margin-top: -1.5rem; font-size: 1.8rem; }
.mm-lb__nav--prev { left: 1.2rem; }
.mm-lb__nav--next { right: 1.2rem; }
.mm-lb__x:hover, .mm-lb__nav:hover { background: rgba(255,255,255,.2); }

/* ---------------------------------------------------------------- form status */
.mm-form__status {
  opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
  font-size: .86rem; line-height: 1.5;
}
.mm-form__status.is-visible { opacity: 1; transform: none; }
.mm-form__status.is-ok { color: #3ddc97; }
.mm-form__status.is-err { color: #ff6b6b; }

/* ---------------------------------------------------------------- misc */
.mm-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mm-wrap { width: min(1280px, calc(100% - 2.5rem)); margin-inline: auto; }
@media (max-width: 640px) { .mm-wrap { width: min(1280px, calc(100% - 1.75rem)); } }
