.finder-visual {
  --mix-surface: #d7e1d0;
  --mix-photo-x: -4%;
  --mix-photo-angle: -5deg;
  --mix-photo-scale: 1;
  --mix-paprika-x: 8%;
  --mix-paprika-y: 3%;
  --mix-herbs-x: -8%;
  --mix-herbs-y: 4%;
  --mix-blend-x: 8%;
  --mix-blend-y: -2%;
  min-height: 530px;
  background: var(--mix-surface);
  border-radius: 0;
  isolation: isolate;
  transition: background-color 420ms ease;
}

.finder-visual[data-finder-product="delicacies"] {
  --mix-surface: #d9cfbc;
  --mix-photo-x: 5%;
  --mix-photo-angle: 5deg;
  --mix-photo-scale: 0.95;
  --mix-paprika-x: -26%;
  --mix-paprika-y: 12%;
  --mix-herbs-x: 18%;
  --mix-herbs-y: -12%;
  --mix-blend-x: -32%;
  --mix-blend-y: -18%;
}

.finder-visual[data-finder-product="grill"] {
  --mix-surface: #1b2337;
  --mix-photo-x: -1%;
  --mix-photo-angle: 6deg;
  --mix-photo-scale: 1.08;
  --mix-paprika-x: 16%;
  --mix-paprika-y: -14%;
  --mix-herbs-x: -28%;
  --mix-herbs-y: 20%;
  --mix-blend-x: 26%;
  --mix-blend-y: 18%;
}

.finder-visual[data-finder-product="canned"] {
  --mix-surface: #a34a32;
  --mix-photo-x: 5%;
  --mix-photo-angle: -2deg;
  --mix-photo-scale: 0.93;
  --mix-paprika-x: -18%;
  --mix-paprika-y: -8%;
  --mix-herbs-x: 22%;
  --mix-herbs-y: -18%;
  --mix-blend-x: -14%;
  --mix-blend-y: 8%;
}

.finder-visual[data-finder-product="pates"] {
  --mix-surface: #c9d4bc;
  --mix-photo-x: -2%;
  --mix-photo-angle: 3deg;
  --mix-photo-scale: 1.04;
  --mix-paprika-x: 20%;
  --mix-paprika-y: 24%;
  --mix-herbs-x: -30%;
  --mix-herbs-y: -10%;
  --mix-blend-x: -20%;
  --mix-blend-y: -8%;
}

.finder-photo {
  position: relative;
  z-index: 2;
  width: 80%;
  margin: 66px auto 64px;
  transform: translateX(var(--mix-photo-x)) rotate(var(--mix-photo-angle)) scale(var(--mix-photo-scale));
  transition: transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
}

.finder-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1000 / 667;
  object-fit: cover;
  object-position: 50% 50%;
}

.ingredient-mix {
  position: absolute;
  inset: 0 0 115px;
  z-index: 3;
  pointer-events: none;
}

.mix-layer {
  position: absolute;
  display: block;
  width: 45%;
  max-width: 240px;
  transition: transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

.mix-layer svg {
  display: block;
  width: 100%;
  height: auto;
  fill: currentColor;
}

.mix-layer-paprika {
  color: #a04c32;
  left: -9%;
  top: 1%;
  transform: translate(var(--mix-paprika-x), var(--mix-paprika-y)) rotate(-18deg);
}

.mix-layer-herbs {
  color: #52613c;
  right: -7%;
  top: 18%;
  transform: translate(var(--mix-herbs-x), var(--mix-herbs-y)) rotate(26deg);
}

.mix-layer-blend {
  color: #d9c391;
  right: 11%;
  bottom: -7%;
  transform: translate(var(--mix-blend-x), var(--mix-blend-y)) rotate(-12deg);
}

.finder-caption {
  position: relative;
  z-index: 4;
  align-items: flex-end;
  padding: 24px;
  min-height: 116px;
}

.finder-caption > strong {
  max-width: 210px;
  font-size: 24px;
  line-height: 1.2;
}

.finder-stats {
  display: flex;
  gap: 23px;
}

.finder-stats > span {
  display: grid;
  gap: 4px;
  color: #cdd5cb;
}

.finder-stats b {
  display: inline-block;
  font-size: 36px;
  line-height: 1;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}

.product-choice {
  position: relative;
  min-height: 48px;
  transition: background-color 180ms ease, color 180ms ease, transform 140ms ease;
}

.product-choice:active,
.catalog-select:active {
  transform: scale(0.98);
}

.finder-match {
  position: relative;
  overflow: hidden;
}

.finder-match svg {
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.catalog-select {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  margin: 10px 22px 0 0;
  min-height: 44px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  transition: transform 140ms ease;
}

.catalog-select::before {
  content: '';
  width: 13px;
  height: 13px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.catalog-select[aria-pressed="true"]::before {
  background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--ink);
}

.catalog-layout .catalog-item {
  transition: background-color 260ms ease, color 260ms ease;
}

.catalog-layout .catalog-item.is-explore-selected,
.catalog-layout:not(.explore-catalog-ready) .catalog-item:target {
  background: var(--ink);
  color: var(--paper);
  padding-block: 34px;
}

.catalog-item.is-explore-selected h2,
.catalog-layout:not(.explore-catalog-ready) .catalog-item:target h2 {
  font-size: clamp(27px, 2.8vw, 35px);
}

.catalog-item.is-explore-selected p,
.catalog-layout:not(.explore-catalog-ready) .catalog-item:target p {
  color: #d6dfd1;
}

.catalog-item.is-explore-selected .tag,
.catalog-layout:not(.explore-catalog-ready) .catalog-item:target .tag {
  background: #354252;
  color: var(--paper);
}

.catalog-item.is-explore-selected .catalog-select,
.catalog-item.is-explore-selected .text-link,
.catalog-layout:not(.explore-catalog-ready) .catalog-item:target .catalog-select,
.catalog-layout:not(.explore-catalog-ready) .catalog-item:target .text-link {
  color: var(--paper);
}

.catalog-selection {
  margin-top: 26px;
  padding-top: 23px;
  border-top: 1px solid #aebca5;
}

.catalog-selection p {
  font-size: 12px;
  margin-bottom: 10px;
  color: var(--muted);
}

.catalog-selection strong {
  display: block;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 500;
}

.catalog-selection .text-link {
  display: inline-flex;
  margin-top: 18px;
  font-size: 13px;
}

.catalog-selection-clear {
  display: block;
  background: transparent;
  color: var(--muted);
  padding: 10px 0;
  margin-top: 8px;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .finder-match:hover svg {
    transform: translateX(5px);
  }

  .catalog-select:hover,
  .catalog-selection-clear:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

@media (max-width: 1100px) {
  .finder-visual {
    min-height: 455px;
  }

  .finder-photo {
    margin-block: 55px;
  }

  .finder-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .finder-caption > strong {
    max-width: none;
  }
}

@media (max-width: 820px) {
  .finder-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .finder-controls {
    display: contents;
  }

  .product-choices,
  .finder-controls > noscript {
    order: 0;
  }

  .finder-visual {
    position: relative;
    top: auto;
    order: 1;
    width: 100%;
    max-width: 680px;
    min-height: 0;
    margin-inline: auto;
  }

  .finder-results {
    order: 2;
    margin-top: 0;
  }

  .finder-disclaimer {
    order: 3;
  }

  .finder-controls > .text-link {
    order: 4;
    margin-top: 0;
  }

  .finder-photo {
    width: 77%;
    margin-block: 44px;
  }

  .finder-photo img {
    aspect-ratio: 1000 / 667;
  }

  .finder-caption {
    flex-direction: row;
    align-items: flex-end;
    min-height: 104px;
  }

  .finder-caption > strong {
    max-width: 220px;
    font-size: 23px;
  }

  .catalog-selection {
    padding: 20px;
    background: var(--sage);
    border-top: 0;
  }
}

@media (max-width: 480px) {
  .finder-caption {
    padding: 19px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .finder-caption > strong {
    font-size: 20px;
    max-width: 135px;
  }

  .finder-stats {
    gap: 15px;
  }

  .finder-stats b {
    font-size: 29px;
  }

  .finder-stats > span > span {
    font-size: 10px;
  }

  .catalog-layout .catalog-item.is-explore-selected,
  .catalog-layout:not(.explore-catalog-ready) .catalog-item:target {
    padding-block: 28px;
  }
}

.explore-instant .finder-photo,
.explore-instant .mix-layer,
.explore-instant .finder-visual {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .finder-visual,
  .finder-photo,
  .mix-layer,
  .product-choice,
  .catalog-layout .catalog-item,
  .catalog-select,
  .finder-match svg {
    transition: none;
  }

  .product-choice:active,
  .catalog-select:active,
  .finder-match:hover svg {
    transform: none;
  }
}
