html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.frame {
  position: relative;
  width: min(100vw, calc(100vh * 1448 / 1086));
  aspect-ratio: 1448 / 1086;
}

.frame picture {
  display: contents;
}

.backdrop {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fade-in 2.4s ease-out 0.2s forwards;
  will-change: opacity;
}

.star-link {
  position: absolute;
  left: 79.5%;
  top: 12.5%;
  display: block;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  opacity: 0;
  cursor: pointer;
  animation: fade-in 3s ease-out 1.6s forwards;
  will-change: opacity;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

.star-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.6);
  outline-offset: 4px;
  border-radius: 50%;
}

.star {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  animation: twinkle 9s linear 1.6s infinite;
  transition: filter 200ms ease-out;
  will-change: opacity;
}

.star-link:hover .star,
.star-link:focus-visible .star {
  animation-play-state: paused;
  filter: brightness(1.6) drop-shadow(0 0 3px rgba(255, 255, 255, 0.7));
}

.star::before,
.star::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  pointer-events: none;
}

.star::before {
  width: 16px;
  height: 1px;
  transform: translate(-50%, -50%);
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
}

.star::after {
  width: 1px;
  height: 16px;
  transform: translate(-50%, -50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
}

@keyframes fade-in {
  to { opacity: 1; }
}

@keyframes twinkle {
  0%    { opacity: 1; }
  3%    { opacity: 1; }
  4%    { opacity: 0.35; }
  5%    { opacity: 1; }
  28%   { opacity: 1; }
  29%   { opacity: 0.5; }
  30%   { opacity: 1; }
  54%   { opacity: 1; }
  55%   { opacity: 0.4; }
  56%   { opacity: 1; }
  79%   { opacity: 1; }
  80%   { opacity: 0.55; }
  81%   { opacity: 1; }
  100%  { opacity: 1; }
}

@media (max-width: 768px) {
  .frame {
    width: min(100vw, calc(100vh * 1448 / 2172));
    aspect-ratio: 1448 / 2172;
  }
  .star-link {
    left: 79.5%;
    top: 56.3%;
  }
  .backdrop {
    filter: brightness(1.65) contrast(1.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop,
  .star-link,
  .star {
    animation: none;
    opacity: 1;
  }
}
