/* Bento Focus: supplied by the user, adapted to ART TERRE PAYSAGE albums. */
.bf {
  --bf-gap: 10px;
  --bf-radius: 17px;
  width: 100%;
  container: bento-focus / inline-size;
}

.bf,
.bf * {
  box-sizing: border-box;
}

.bf__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "hero hero a a b"
    "hero hero c d d";
  gap: var(--bf-gap);
  width: 100%;
  aspect-ratio: 2 / 1;
  isolation: isolate;
}

.bf__slot--hero { grid-area: hero; }
.bf__slot--a { grid-area: a; }
.bf__slot--b { grid-area: b; }
.bf__slot--c { grid-area: c; }
.bf__slot--d { grid-area: d; }
.bf__slot--e { grid-area: e; }
.bf__slot--f { grid-area: f; }

.bf--7 .bf__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  grid-template-areas: "hero hero a b" "hero hero c d" "hero hero e f";
  aspect-ratio: 1.7 / 1;
}

.bf--3 .bf__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas: "hero hero a a" "hero hero b b";
}

.bf__tile {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--bf-radius);
  overflow: hidden;
  background: #39403a;
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.bf.is-ready .bf__tile {
  position: absolute;
  grid-area: auto;
  margin: 0;
}

.bf__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, .17) 0%,
    transparent 35%,
    rgba(0, 0, 0, .08) 52%,
    rgba(0, 0, 0, .72) 100%
  );
  opacity: .72;
  transition: opacity 500ms;
}

.bf__tile.is-active::after {
  opacity: 1;
}

.bf__tile:focus-visible {
  outline: 3px solid #18251c;
  outline-offset: 4px;
  z-index: 20 !important;
}

.bf__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--bf-position, 50% 50%);
  user-select: none;
  transition: filter 500ms;
}

@media (hover: hover) {
  .bf__tile:not(.is-active):hover .bf__image {
    filter: brightness(1.12);
  }
}

.bf__number {
  position: absolute;
  z-index: 2;
  top: 19px;
  left: 20px;
  font: .75rem / 1.3 var(--sans);
  letter-spacing: .08em;
  color: rgba(255, 255, 255, .9);
}

.bf__number span {
  opacity: 0;
  transition: opacity 500ms;
}

.bf__tile.is-active .bf__number span {
  opacity: 1;
  transition-delay: 0ms;
}

.bf__content {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  left: 20px;
  right: 20px;
  display: block;
  pointer-events: none;
}

.bf__title {
  display: block;
  font: 400 .9375rem / 1.25 var(--sans);
  letter-spacing: -.2px;
}

.bf__tile.is-active .bf__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.3vw, 2.875rem);
  letter-spacing: -.035em;
}

.bf__description {
  display: none;
  max-width: 290px;
  margin-top: 10px;
  font: 400 .875rem / 1.55 var(--sans);
  color: rgba(255, 255, 255, .86);
}

.bf__tile.is-active .bf__description {
  display: block;
}

.bf__tile.is-active .bf__content {
  bottom: 26px;
  left: 26px;
  right: 26px;
}

.bf__tile.is-active .bf__number {
  top: 24px;
  left: 26px;
}

.bf__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.bf__toolbar { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:14px 24px; padding-top:20px; }
.bf__selection { color:#596b52; font-size:.875rem; line-height:1.6; }
.bf__toolbar .text-link { margin:0; min-height:44px; font-size:.875rem; gap:24px; }
.bf__tile:focus-visible { outline-color:#d9e6b2; outline-offset:-5px; }

@container bento-focus (max-width: 640px) {
  .bf__grid {
    --bf-gap: 8px;
    --bf-radius: 13px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 2fr 1fr 1fr;
    grid-template-areas:
      "hero hero"
      "a b"
      "c d";
    aspect-ratio: 1 / 1.65;
  }

  .bf--3 .bf__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 2fr 1fr;
    grid-template-areas: "hero hero" "a b";
    aspect-ratio: 1 / 1.25;
  }

  .bf--7 .bf__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 2fr 1fr 1fr 1fr;
    grid-template-areas: "hero hero" "a b" "c d" "e f";
    aspect-ratio: 1 / 2.15;
  }

  .bf__number {
    top: 13px;
    left: 14px;
    font-size: .75rem;
  }

  .bf__number span {
    display: none;
  }

  .bf__tile.is-active .bf__number span {
    display: inline;
  }

  .bf__content {
    left: 14px;
    right: 14px;
    bottom: 15px;
  }

  .bf__title {
    font-size: .875rem;
  }

  .bf__tile.is-active .bf__title {
    font-size: clamp(1.6rem, 8cqw, 2.25rem);
  }

  .bf__tile.is-active .bf__content {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

  .bf__tile.is-active .bf__number {
    left: 22px;
    top: 21px;
  }

  .bf__description { margin-top:8px; font-size:.8125rem; line-height:1.4; }
  .bf__toolbar { gap:12px; padding-top:16px; }
}

@media (prefers-reduced-motion: reduce) {
  .bf *,
  .bf *::after {
    transition: none !important;
    animation: none !important;
  }
}
