/* Specimen identity background; the stamp remains exclusive to type records. */
#main.detail-page .type-specimen-stamp { display: none; }

#main.detail-page .detail-hero {
  position: relative;
  isolation: isolate;
}

#main.detail-page .detail-hero::before,
#main.detail-page .detail-hero::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  color: #cb501c;
}

#main.detail-page .detail-hero::before {
  content: 'SPECIMEN';
  top: 16%;
  right: -10%;
  white-space: nowrap;
  font: 700 clamp(100px, 17vw, 260px)/1 Anuphan, sans-serif;
  letter-spacing: -.075em;
  opacity: .025;
}

#main.detail-page .detail-hero::after {
  content: '';
  width: clamp(270px, 36vw, 510px);
  aspect-ratio: 1;
  top: -24%;
  right: -13%;
  border: 2px solid rgba(203, 80, 28, .035);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(203, 80, 28, .014),
              0 0 0 103px rgba(203, 80, 28, .009);
}

#main.detail-page[data-type-specimen="true"] .specimen-scientific-name {
  position: relative;
}

#main.detail-page[data-type-specimen="true"] .type-specimen-stamp {
  --stamp-orange: #d64b18;
  position: absolute;
  z-index: 2;
  top: 105px;
  right: 203px;
  display: grid;
  place-items: center;
  width: clamp(110px, 9vw, 126px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 248, 242, .94);
  color: var(--stamp-orange);
  box-shadow: 0 5px 15px rgba(137, 62, 25, .09);
  transform-origin: center;
}

#main.detail-page[data-type-specimen="true"] .type-specimen-stamp__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  transform-origin: center;
}

#main.detail-page[data-type-specimen="true"] .type-specimen-stamp__ring circle {
  stroke: var(--stamp-orange);
  stroke-width: 1.8;
}

#main.detail-page[data-type-specimen="true"] .type-specimen-stamp__ring circle + circle {
  stroke-width: 1;
  opacity: .72;
}

#main.detail-page[data-type-specimen="true"] .type-specimen-stamp__ring text {
  fill: var(--stamp-orange);
  stroke: none;
  font: 700 9px Anuphan, sans-serif;
  letter-spacing: 1.5px;
}

#main.detail-page[data-type-specimen="true"] .type-specimen-stamp__center {
  display: grid;
  justify-items: center;
  gap: 0;
  text-align: center;
  line-height: 1;
  transform: rotate(-6deg);
}

#main.detail-page[data-type-specimen="true"] .type-specimen-stamp__center strong {
  font: 800 clamp(24px, 2vw, 29px)/1 Anuphan, sans-serif;
  letter-spacing: -.035em;
}

#main.detail-page[data-type-specimen="true"] .type-specimen-stamp__center span {
  margin-top: 5px;
  font: 700 9px/1 Anuphan, sans-serif;
  letter-spacing: .2em;
}

@keyframes type-stamp-arrive {
  0% { opacity: 0; transform: scale(.8); }
  70% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  #main.detail-page[data-type-specimen="true"] .type-specimen-stamp.is-entering {
    animation: type-stamp-arrive 1.4s cubic-bezier(.18,.73,.25,1) both;
  }
}

@media (max-width: 1299px) {
  #main.detail-page[data-type-specimen="true"] .type-specimen-stamp {
    position: relative;
    top: auto;
    right: auto;
    width: 94px;
    margin: 36px clamp(30px, 8vw, 80px) 22px auto;
  }

  #main.detail-page[data-type-specimen="true"] .type-specimen-stamp__center strong { font-size: 23px; }
  #main.detail-page[data-type-specimen="true"] .type-specimen-stamp__center span { font-size: 7px; }
}

@media (max-width: 900px) {
  #main.detail-page[data-type-specimen="true"] .type-specimen-stamp {
    width: 82px;
    margin: 24px clamp(30px, 8vw, 80px) 16px auto;
  }

  #main.detail-page .detail-hero::before { top: 28%; right: -30%; }
}
@media (max-width: 600px) {
  #main.detail-page[data-type-specimen="true"] .type-specimen-stamp {
    margin-left: 0;
    margin-right: 0;
  }

  #main.detail-page .detail-hero::before {
    top: 36%;
    right: auto;
    left: -15%;
    opacity: .02;
  }

  #main.detail-page .detail-hero::after {
    top: 19%;
    right: auto;
    left: -120px;
  }
}