.gh-hero-photo {
  isolation: isolate;
}

.gh-hero-photo .unwrap-stage {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 1100px;
}

.gh-hero-photo .unwrap-paper {
  position: absolute;
  inset: -1%;
  background:
    repeating-linear-gradient(95deg, rgba(108, 62, 52, .028) 0 1px, transparent 1px 4px),
    linear-gradient(138deg, #fff4e9, #f2d9cb 63%, #d3ad9f);
  backface-visibility: hidden;
}

.gh-hero-photo .unwrap-paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(34deg, transparent 37%, rgba(126, 79, 61, .13) 37.12%, rgba(255, 255, 255, .58) 37.42%, transparent 38%),
    linear-gradient(145deg, transparent 58.1%, rgba(130, 86, 70, .08) 58.3%, rgba(255, 255, 255, .44) 58.53%, transparent 59%);
}

/* The ribbon crosses the fold in two pieces that release with the paper. */
.gh-hero-photo .unwrap-paper::after {
  content: "";
  position: absolute;
  left: -15%;
  top: 46%;
  height: clamp(24px, 4vw, 54px);
  width: 130%;
  background: linear-gradient(180deg, #65182a, #8a3849 9%, #6e1c33 25%, #491324 79%, #682238 91%, #501327);
  border-block: 1px solid #9d5a61;
  box-shadow: 0 3px 4px rgba(59, 20, 23, .2);
  transform: rotate(-9deg);
}

.gh-hero-photo .unwrap-paper--right {
  clip-path: polygon(57% 0, 100% 0, 100% 100%, 43% 100%);
  transform-origin: 100% 50%;
  animation: gh-peel-right 1.35s cubic-bezier(.57,.02,.22,1) both;
}

.gh-hero-photo .unwrap-paper--left {
  clip-path: polygon(0 0, 58% 0, 44% 100%, 0 100%);
  transform-origin: 0 52%;
  background-color: #f6e2d5;
  animation: gh-peel-left 1.3s cubic-bezier(.55,.02,.23,1) both;
}

.gh-hero-photo .unwrap-seal {
  position: absolute;
  top: 49.5%;
  left: 50.5%;
  width: clamp(49px, 6.5vw, 94px);
  aspect-ratio: 1;
  border: 1px solid #b77c78;
  border-radius: 49% 52% 47% 51%;
  background: url('/assets/dd-light.png') center / 53% auto no-repeat,
    radial-gradient(ellipse at 34% 23%, #8d3e46, #692332 60%, #481425);
  box-shadow: inset 0 0 0 3px #773140, inset 0 0 0 4px #94505b, 1px 4px 7px #38151c55;
  animation: gh-lift-seal 1s cubic-bezier(.48,.02,.32,1) both;
}

.gh-hero-photo .unwrap-stage--replay {
  animation: gh-wrap-in .19s ease-out both;
}

.gh-hero-photo button.unwrap-replay {
  position: absolute;
  right: clamp(12px, 2.1vw, 32px);
  bottom: clamp(12px, 2.1vw, 32px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .54em;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid #ead1c1b8;
  border-radius: 999px;
  background: #3c111be8;
  color: #fff5e8;
  font: 500 .875rem/1.2 var(--gh-sans, Arial, sans-serif);
  cursor: pointer;
}

.gh-hero-photo .unwrap-replay svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gh-hero-photo .unwrap-stage[hidden],
.gh-hero-photo .unwrap-replay[hidden] {
  display: none;
}

.gh-hero-photo .unwrap-replay:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

@media (hover: hover) {
  .gh-hero-photo .unwrap-replay:hover { background: #611a2c; }
}

@keyframes gh-peel-left {
  0%, 24% { transform: translateX(0) rotateY(0); }
  100% { transform: translateX(-65%) rotateY(-74deg) rotate(-3deg); }
}

@keyframes gh-peel-right {
  0%, 28% { transform: translateX(0) rotateY(0); }
  100% { transform: translateX(66%) rotateY(75deg) rotate(3deg); }
}

@keyframes gh-lift-seal {
  0%, 20% { transform: translate(-50%,-50%) rotate(-5deg); opacity: 1; }
  65%, 100% { transform: translate(-105%,-125%) rotate(-17deg) scale(1.08); opacity: 0; }
}

@keyframes gh-wrap-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .gh-hero-photo .unwrap-stage,
  .gh-hero-photo .unwrap-replay { display: none; }
}
