/* Realisations: proof in pictures, right after the prices. Five filter pills, an even grid of
   4:3 tiles, and a full-screen viewer. The content width comes from the shared section gutter. */
.mm-works {
  background: #fff;
  color: #101827;
  margin-block: 0 !important;
  padding-block: clamp(4rem, 7vw, 6.5rem);
}

.mm-works__inner {
  padding-inline: var(--mm-section-gutter);
}

.mm-works__head {
  margin-bottom: clamp(1.4rem, 2.4vw, 2rem);
}

.mm-works__signal {
  background: #f4c542;
  border-radius: 999px;
  display: block;
  height: 4px;
  margin-bottom: 1.2rem;
  width: 56px;
}

.mm-works__title {
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: clamp(2.6rem, 4.4vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
  margin: 0;
}

.mm-works__title-accent {
  color: #315bff;
}

/* Filters exist only with JavaScript; without it every picture simply shows. */
.mm-works:not(.is-ready) .mm-works__filters {
  display: none;
}

.mm-works__sprite {
  height: 0;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.mm-works__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(1.4rem, 2.4vw, 2rem);
}

/* Filters are small tiles like the situation tiles above: an icon on top, the name and the
   number of photos underneath. */
.mm-works__filter {
  background: #fff;
  border: 1px solid #d5dde7;
  border-radius: 10px;
  color: #101827;
  cursor: pointer;
  display: grid;
  font: inherit;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  gap: 0.45rem;
  justify-items: center;
  line-height: 1;
  min-width: 136px;
  padding: 0.8rem 1rem 0.7rem;
  position: relative;
  text-align: center;
  transition: background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out, box-shadow 140ms ease-out;
  white-space: nowrap;
}

/* The same ring as the service packages, in the corner of the tile: it tells the visitor the
   tiles are a choice, and the filled one shows which group is on. */
.mm-works__filter-radio {
  background: #fff;
  border: 2px solid #6f7d90;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgb(16 24 39 / 14%);
  height: 20px;
  left: 0.55rem;
  position: absolute;
  top: 0.55rem;
  transition: border-color 140ms ease-out, box-shadow 160ms ease-out;
  width: 20px;
}

.mm-works__filter-radio::after {
  background: #315bff;
  border-radius: 50%;
  content: "";
  inset: 3px;
  position: absolute;
  transform: scale(0);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.mm-works__filter[aria-pressed="true"] .mm-works__filter-radio {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 20%);
}

.mm-works__filter[aria-pressed="true"] .mm-works__filter-radio::after {
  transform: scale(1);
}

.mm-works__filter-icon {
  height: 38px;
  width: 38px;
}

.mm-works__filter-icon svg {
  display: block;
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
  width: 100%;
}

.mm-works__filter-name {
  align-items: baseline;
  display: inline-flex;
  gap: 0.4rem;
}

.mm-works__filter:hover {
  background: #f6f8ff;
  border-color: #315bff;
}

/* Under the pointer an empty ring turns blue and shows a faint dot: click, and it fills. */
@media (hover: hover) and (pointer: fine) {
  .mm-works__filter[aria-pressed="false"]:hover .mm-works__filter-radio {
    border-color: #315bff;
    box-shadow: 0 0 0 3px rgb(49 91 255 / 12%);
  }

  .mm-works__filter[aria-pressed="false"]:hover .mm-works__filter-radio::after {
    opacity: 0.4;
    transform: scale(0.6);
  }
}

.mm-works__filter:active {
  background: #f6f8ff;
  border-color: #315bff;
}

.mm-works__filter:focus-visible {
  outline: 3px solid #315bff;
  outline-offset: 3px;
}

.mm-works__filter[aria-pressed="true"] {
  background: #101827;
  border-color: #101827;
  box-shadow: 0 0 0 1px #101827;
  color: #fff;
}

.mm-works__count {
  color: #667180;
  font-size: 0.9rem;
  font-weight: 600;
}

.mm-works__filter[aria-pressed="true"] .mm-works__count {
  color: #f4c542;
}

.mm-works__grid {
  display: grid;
  gap: 1rem 0.9rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.mm-work {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.mm-work[hidden] {
  display: none;
}

/* Every tile is 4:3 so the grid stays even; the viewer shows the whole photo. */
.mm-work__open {
  aspect-ratio: 4 / 3;
  background: #e6ebf1;
  border-radius: 8px;
  display: block;
  overflow: hidden;
  position: relative;
}

.mm-work__open:focus-visible {
  outline: 3px solid #315bff;
  outline-offset: 3px;
}

.mm-work__image {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease-out;
  width: 100%;
}

.mm-work__open:hover .mm-work__image,
.mm-work__open:focus-visible .mm-work__image {
  transform: scale(1.04);
}

.mm-work__zoom {
  align-items: center;
  background: rgb(16 24 39 / 72%);
  border-radius: 999px;
  bottom: 0.6rem;
  color: #fff;
  display: flex;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 0.6rem;
  width: 36px;
}

.mm-work__photo-count {
  background: rgb(16 24 39 / 84%);
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  left: 0.6rem;
  line-height: 1;
  padding: 0.55rem 0.7rem;
  position: absolute;
  top: 0.6rem;
}

.mm-work__zoom svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

.mm-work__caption {
  display: grid;
  gap: 0.1rem;
  margin: 0;
}

.mm-work__name {
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.mm-work__category {
  color: #667180;
  font-size: 0.85rem;
}

.mm-works__more-wrap {
  margin: clamp(1.4rem, 2.4vw, 2rem) 0 0;
  text-align: center;
}

/* Under the grid: the way on, to every photo on the realisations page (front page) or to the
   prices (realisations page). */
.mm-works__more {
  align-items: center;
  background: #fff;
  border: 1px solid #101827;
  border-radius: 8px;
  color: #101827;
  display: inline-flex;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  gap: 0.35rem;
  line-height: 1.2;
  min-height: 52px;
  padding: 0.7rem 1.3rem 0.7rem 1.6rem;
  text-decoration: none;
  transition: background-color 140ms ease-out, color 140ms ease-out;
}

.mm-works__more svg {
  fill: none;
  flex: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 20px;
}

.mm-works__more:hover {
  background: #101827;
  color: #fff;
}

.mm-works__more:focus-visible {
  outline: 3px solid #315bff;
  outline-offset: 3px;
}

/* The viewer: one photo on a dark ground, caption underneath, arrows at the sides. */
.mm-lightbox {
  background: transparent;
  border: 0;
  color: #fff;
  height: 100dvh;
  margin: 0;
  max-height: none;
  max-width: none;
  padding: 0;
  width: 100vw;
}

.mm-lightbox::backdrop {
  background: rgb(4 12 24 / 94%);
}

.mm-lightbox[open] {
  align-items: center;
  display: flex;
  justify-content: center;
}

html.mm-lightbox-open {
  overflow: hidden;
}

.mm-lightbox__figure {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  margin: 0;
  max-width: min(92vw, 1400px);
}

.mm-lightbox__image {
  border-radius: 6px;
  display: block;
  max-height: 74dvh;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.mm-lightbox__caption {
  align-items: center;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
}

.mm-lightbox__title {
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.mm-lightbox__meta {
  color: #c9d3df;
  font-size: 0.92rem;
}

.mm-lightbox__service {
  align-items: center;
  background: #315bff;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-family: "Barlow Semi Condensed", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  gap: 0.3rem;
  margin-top: 0.35rem;
  min-height: 46px;
  padding: 0.6rem 1.1rem;
  text-decoration: none;
}

.mm-lightbox__service svg,
.mm-lightbox__close svg,
.mm-lightbox__arrow svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 20px;
}

.mm-lightbox__close,
.mm-lightbox__arrow {
  align-items: center;
  background: rgb(255 255 255 / 12%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 48px;
  justify-content: center;
  position: fixed;
  transition: background-color 140ms ease-out;
  width: 48px;
}

.mm-lightbox__close:hover,
.mm-lightbox__arrow:hover {
  background: rgb(255 255 255 / 24%);
}

.mm-lightbox__close:focus-visible,
.mm-lightbox__arrow:focus-visible,
.mm-lightbox__service:focus-visible {
  outline: 3px solid #f4c542;
  outline-offset: 3px;
}

.mm-lightbox__close {
  right: 1rem;
  top: 1rem;
}

.mm-lightbox__arrow--prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.mm-lightbox__arrow--next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.mm-lightbox__arrow svg {
  height: 26px;
  width: 26px;
}

@media (max-width: 1279px) {
  .mm-works__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Phones: two photos per row, and all six filters in view at once — three small tiles per row,
   nothing to scroll sideways or to guess. The names may wrap onto two lines. */
@media (max-width: 700px) {
  .mm-works__filters {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 1.2rem;
  }

  .mm-works__filter {
    border-radius: 8px;
    font-size: 0.82rem;
    gap: 0.3rem;
    line-height: 1.15;
    min-width: 0;
    padding: 0.55rem 0.3rem 0.5rem;
    white-space: normal;
  }

  .mm-works__filter-icon {
    height: 28px;
    width: 28px;
  }

  .mm-works__filter-radio {
    height: 16px;
    left: 0.4rem;
    top: 0.4rem;
    width: 16px;
  }

  .mm-works__filter-radio::after {
    inset: 2px;
  }

  .mm-works__filter-name {
    display: block;
  }

  .mm-works__count {
    font-size: 0.78rem;
    margin-left: 0.25rem;
  }

  .mm-works__grid {
    gap: 0.75rem 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mm-work__name {
    font-size: 0.95rem;
  }

  .mm-work__zoom {
    height: 30px;
    width: 30px;
  }

  .mm-lightbox__image {
    max-height: 62dvh;
  }

  .mm-lightbox__arrow {
    bottom: 1rem;
    top: auto;
    transform: none;
  }

  .mm-lightbox__arrow--prev {
    left: 1rem;
  }

  .mm-lightbox__arrow--next {
    right: 1rem;
  }

  .mm-lightbox__figure {
    padding-bottom: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-work__image,
  .mm-works__filter,
  .mm-works__filter-radio,
  .mm-works__filter-radio::after,
  .mm-works__more,
  .mm-lightbox__close,
  .mm-lightbox__arrow {
    transition: none;
  }

  .mm-work__open:hover .mm-work__image,
  .mm-work__open:focus-visible .mm-work__image {
    transform: none;
  }
}
