* {
  box-sizing: border-box;
}

body {
  font-family: Lato, sans-serif;
  margin: 0;
  padding: 0;
}

.caption-below-image {
  color: var(--dark, #11100E);
  margin-top: 10px;
}

.img_gal_ref {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 1000ms;
}

.specsModal-header {
  background: var(--dark-gradient, linear-gradient(135deg, #080806 0%, #171512 55%, #2B2418 100%));
  color: var(--primary-light, #F0D083);
}

.specsModal-body {
  background-color: var(--surface, #FFFCF7);
  max-height: 500px;
  overflow-y: auto;
}

.specsModal-body h3 {
  margin-top: 20px;
  color: var(--dark, #11100E);
  border-bottom: 2px solid var(--primary, #C79045);
  padding-bottom: 10px;
  text-align: center;
}

.specsModal-body ul {
  list-style-type: none;
  padding: 0;
}

.specsModal-body ul li {
  background: var(--light, #F8F2E8);
  border-radius: 5px;
  margin: 5px 0;
  padding: 10px;
  transition: background 0.3s;
}

.specsModal-body ul li:hover {
  background: #E8D9BF;
}

#showSpecsBtn {
  background: var(--gold-gradient, linear-gradient(135deg, #8F642E 0%, #C79045 45%, #F0D083 100%));
  color: var(--dark, #11100E);
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  margin-top: 7px;
}

#showSpecsBtn:hover {
  background: var(--primary-dark, #8F642E);
  color: white;
}

.framed-image {
  border: 1px solid rgba(199, 144, 69, .45);
  padding: 5px;
  display: inline-block;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  justify-content: center;
  max-width: 100%;
  width: 90%;
  margin: auto;
  text-align: center;
}

figure {
  margin: 0;
  position: relative;
  overflow: hidden;
}

figure::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: rgba(8, 8, 6, 0.58);
  transform-origin: center;
  opacity: 0;
  transform: scale(2);
  transition: opacity 300ms;
}

figcaption {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  place-items: center;
  text-align: center;
  padding: 1rem;
  color: white;
  font-size: 1.2rem;
  z-index: 1;
  opacity: 0;
  transition: opacity 600ms, transform 600ms;
}

a:is(:hover, :focus) figure::after {
  opacity: 1;
}

a:is(:hover, :focus) figcaption {
  opacity: 1;
  transition: opacity 600ms;
}

@media (prefers-reduced-motion: no-preference) {
  figcaption {
    transform: translate3d(0, 2rem, 0);
  }

  figure::after {
    border-radius: 50%;
    opacity: 1;
    transform: scale(0);
    transition: transform 900ms;
  }

  a:is(:hover, :focus) figure::after {
    transform: scale(2.5);
  }

  a:is(:hover, :focus) figcaption {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    transition: opacity 600ms 400ms, transform 600ms 400ms;
  }

  a:is(:hover, :focus) img_gal_ref {
    transform: scale(1.2);
  }
}
