.heart-showcase[hidden] { display: none !important; }

.heart-showcase {
  position: fixed;
  z-index: 20000;
  inset: 0;
  overflow: hidden;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 46%, rgba(76,32,85,.24), transparent 42%),
    rgba(7,4,11,.78);
  backdrop-filter: blur(16px) saturate(118%);
  transition: opacity .42s ease;
}

.heart-showcase.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.heart-showcase.is-closing {
  pointer-events: none;
}

.heart-showcase__stage {
  position: absolute;
  inset: max(20px, 3vh) max(20px, 3vw);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 32px;
  background: #100916;
  box-shadow: 0 34px 110px rgba(0,0,0,.62), inset 0 1px rgba(255,255,255,.09);
  opacity: 0;
  transform: scale(.985);
  transition: opacity .5s ease, transform .7s var(--ease);
}

.heart-showcase.is-stage-ready .heart-showcase__stage {
  opacity: 1;
  transform: scale(1);
}

.heart-showcase.is-closing .heart-showcase__stage {
  opacity: 0;
  transform: scale(.99);
  transition-duration: .28s;
}

.heart-showcase__visuals,
.heart-showcase__visual,
.heart-showcase__backdrop,
.heart-showcase__picture,
.heart-showcase__shade,
.heart-showcase__grain {
  position: absolute;
  inset: 0;
}

.heart-showcase__visual {
  opacity: 0;
  overflow: hidden;
  transition: opacity .9s ease;
}

.heart-showcase__visual.is-active { opacity: 1; }

.heart-showcase__backdrop {
  inset: -8%;
  background-position: center;
  background-size: cover;
  filter: blur(30px) saturate(112%);
  opacity: .3;
  transform: scale(1.1);
}

.heart-showcase__picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

.heart-showcase__visual.motion-zoom-in.is-active .heart-showcase__picture {
  animation: heart-showcase-zoom-in 6.2s linear both;
}

.heart-showcase__visual.motion-zoom-out.is-active .heart-showcase__picture {
  animation: heart-showcase-zoom-out 6.2s linear both;
}

.heart-showcase__visual.motion-pan-left.is-active .heart-showcase__picture {
  animation: heart-showcase-pan-left 6.2s linear both;
}

.heart-showcase__visual.motion-pan-right.is-active .heart-showcase__picture {
  animation: heart-showcase-pan-right 6.2s linear both;
}

.heart-showcase__shade {
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,4,11,.62) 0%, transparent 24%, transparent 58%, rgba(7,4,11,.78) 100%),
    linear-gradient(90deg, rgba(7,4,11,.18), transparent 28%, transparent 72%, rgba(7,4,11,.16));
}

.heart-showcase__grain {
  z-index: 4;
  pointer-events: none;
  opacity: .08;
  mix-blend-mode: overlay;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.86) 0 1px, transparent 1.35px),
    radial-gradient(circle, rgba(255,255,255,.64) 0 .75px, transparent 1.15px);
  background-position: 0 0, 19px 13px;
  background-size: 37px 41px, 47px 53px;
}

.heart-showcase__topbar {
  position: absolute;
  z-index: 8;
  top: 24px;
  left: 28px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.heart-showcase__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,.5);
}

.heart-showcase__brand img {
  width: 26px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(206,229,124,.22));
}

.heart-showcase__close {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  color: #fff;
  background: rgba(16,9,22,.52);
  box-shadow: inset 0 1px rgba(255,255,255,.09), 0 10px 28px rgba(0,0,0,.24);
  backdrop-filter: blur(15px);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: transform .25s var(--ease), border-color .25s ease, background .25s ease;
}

.heart-showcase__close:hover,
.heart-showcase__close:focus-visible {
  transform: rotate(7deg) scale(1.06);
  border-color: rgba(206,229,124,.6);
  background: rgba(36,16,44,.78);
}

.heart-showcase__close:focus-visible,
.heart-showcase__control:focus-visible,
.heart-showcase__action:focus-visible {
  outline: 2px solid var(--lime-soft);
  outline-offset: 3px;
}

.heart-showcase__caption {
  position: absolute;
  z-index: 8;
  left: clamp(28px, 5vw, 76px);
  right: clamp(28px, 5vw, 76px);
  bottom: clamp(30px, 6vh, 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
  transition: opacity .35s ease, transform .45s var(--ease);
}

.heart-showcase.is-finished .heart-showcase__caption {
  opacity: .14;
  transform: translateY(14px);
}

.heart-showcase__eyebrow {
  margin: 0 0 9px;
  color: var(--lime-soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-shadow: 0 2px 16px rgba(0,0,0,.56);
}

.heart-showcase__title {
  margin: 0;
  max-width: 900px;
  font-family: var(--display);
  font-size: clamp(54px, 7.3vw, 118px);
  font-weight: 400;
  line-height: .84;
  letter-spacing: .025em;
  text-transform: uppercase;
  text-shadow: 0 18px 42px rgba(0,0,0,.5);
}

.heart-showcase__counter {
  margin: 12px 0 0;
  color: rgba(255,255,255,.66);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.heart-showcase__progress {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 180px;
  padding-bottom: 5px;
}

.heart-showcase__dot {
  width: 30px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255,255,255,.28);
  cursor: pointer;
  transition: width .28s var(--ease), background .28s ease, opacity .28s ease;
}

.heart-showcase__dot.is-active {
  width: 48px;
  background: var(--lime-soft);
}

.heart-showcase__dot.is-seen:not(.is-active) { background: rgba(255,255,255,.56); }

.heart-showcase__controls {
  position: absolute;
  z-index: 9;
  top: 50%;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  transition: opacity .3s ease;
}

.heart-showcase.is-finished .heart-showcase__controls { opacity: 0; }

.heart-showcase__control {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  color: rgba(255,255,255,.88);
  background: rgba(16,9,22,.38);
  backdrop-filter: blur(12px);
  cursor: pointer;
  pointer-events: auto;
  font-size: 22px;
  transition: transform .25s var(--ease), background .25s ease, border-color .25s ease;
}

.heart-showcase__control:hover {
  transform: scale(1.08);
  border-color: rgba(206,229,124,.5);
  background: rgba(36,16,44,.68);
}

.heart-showcase__end {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 52%, rgba(23,12,30,.26), rgba(7,4,11,.72) 72%);
  transition: opacity .48s ease, visibility .48s ease;
}

.heart-showcase.is-finished .heart-showcase__end {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.heart-showcase__end-card {
  width: min(680px, calc(100vw - 70px));
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 30px;
  text-align: center;
  background: rgba(23,12,30,.72);
  box-shadow: 0 28px 80px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.09);
  backdrop-filter: blur(22px) saturate(120%);
}

.heart-showcase__end-heart {
  width: 86px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.35)) drop-shadow(0 0 20px rgba(169,205,71,.18));
}

.heart-showcase__end-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--lime-soft);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.heart-showcase__end-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(58px, 8vw, 96px);
  font-weight: 400;
  line-height: .88;
  letter-spacing: .025em;
}

.heart-showcase__end-card p {
  margin: 15px auto 24px;
  max-width: 470px;
  color: rgba(255,255,255,.68);
  font-size: 12px;
  line-height: 1.65;
}

.heart-showcase__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.heart-showcase__action {
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.07);
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: transform .25s var(--ease), background .25s ease, border-color .25s ease, color .25s ease;
}

.heart-showcase__action:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.12);
}

.heart-showcase__action.is-primary {
  color: var(--ink);
  border-color: var(--lime-soft);
  background: var(--lime-soft);
}

.heart-showcase__action.is-primary:hover { background: var(--lime); }

.heart-showcase__portal {
  position: fixed;
  z-index: 20002;
  pointer-events: none;
  opacity: 0;
  will-change: left, top, width, height, opacity, transform, filter;
}

.heart-showcase__portal img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 28px 46px rgba(0,0,0,.52)) drop-shadow(0 0 40px rgba(169,205,71,.3));
}

@keyframes heart-showcase-zoom-in {
  from { transform: scale(1.015); }
  to { transform: scale(1.105); }
}

@keyframes heart-showcase-zoom-out {
  from { transform: scale(1.11); }
  to { transform: scale(1.015); }
}

@keyframes heart-showcase-pan-left {
  from { transform: scale(1.08) translateX(1.8%); }
  to { transform: scale(1.08) translateX(-1.8%); }
}

@keyframes heart-showcase-pan-right {
  from { transform: scale(1.08) translateX(-1.8%); }
  to { transform: scale(1.08) translateX(1.8%); }
}

@media (max-width: 760px) {
  .heart-showcase { backdrop-filter: blur(10px) saturate(112%); }
  .heart-showcase__stage {
    inset: 0;
    border: 0;
    border-radius: 0;
  }
  .heart-showcase__picture {
    object-fit: contain;
    padding: 0;
  }
  .heart-showcase__backdrop {
    inset: -14%;
    opacity: .48;
    filter: blur(32px) saturate(118%);
  }
  .heart-showcase__shade {
    background: linear-gradient(180deg, rgba(7,4,11,.65) 0%, rgba(7,4,11,.04) 24%, rgba(7,4,11,.1) 55%, rgba(7,4,11,.82) 100%);
  }
  .heart-showcase__topbar {
    top: max(15px, env(safe-area-inset-top));
    left: 17px;
    right: 15px;
  }
  .heart-showcase__brand {
    max-width: calc(100vw - 92px);
    font-size: 8px;
    letter-spacing: .14em;
  }
  .heart-showcase__brand img {
    width: 20px;
    height: 30px;
  }
  .heart-showcase__close {
    width: 44px;
    height: 44px;
  }
  .heart-showcase__caption {
    left: 22px;
    right: 22px;
    bottom: max(30px, calc(env(safe-area-inset-bottom) + 18px));
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .heart-showcase__title {
    max-width: 94%;
    font-size: clamp(48px, 15vw, 72px);
  }
  .heart-showcase__counter { margin-top: 9px; }
  .heart-showcase__progress {
    min-width: 0;
    justify-content: flex-start;
    padding: 0;
  }
  .heart-showcase__dot { width: 22px; }
  .heart-showcase__dot.is-active { width: 38px; }
  .heart-showcase__controls {
    left: 10px;
    right: 10px;
  }
  .heart-showcase__control {
    width: 44px;
    height: 44px;
    background: rgba(16,9,22,.48);
  }
  .heart-showcase__end {
    padding: 18px;
  }
  .heart-showcase__end-card {
    width: min(520px, calc(100vw - 34px));
    padding: 28px 20px;
    border-radius: 24px;
  }
  .heart-showcase__end-heart { width: 68px; }
  .heart-showcase__end-card h2 { font-size: clamp(54px, 18vw, 76px); }
  .heart-showcase__end-card p { font-size: 11px; }
  .heart-showcase__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .heart-showcase__action.is-primary { grid-column: 1 / -1; }
}

@media (max-width: 390px) {
  .heart-showcase__brand span { display: none; }
  .heart-showcase__title { font-size: clamp(44px, 14.5vw, 62px); }
  .heart-showcase__controls { top: 47%; }
}

@media (prefers-reduced-motion: reduce) {
  .heart-showcase,
  .heart-showcase__stage,
  .heart-showcase__visual,
  .heart-showcase__caption,
  .heart-showcase__end,
  .heart-showcase__control,
  .heart-showcase__action,
  .heart-showcase__close {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
  .heart-showcase__picture { animation: none !important; transform: none !important; }
}
