:root {
  --paper: #fff6e6;
  --ink: #221b14;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #020304;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

.landing {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  background: #020304;
}

.slideshow,
.flash-layer {
  position: fixed;
  inset: 0;
}

.slideshow {
  overflow: hidden;
  background: #020304;
}

.slideshow::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 42%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), transparent 34%, rgba(0, 0, 0, 0.24));
}

.slide-image {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.035);
  transition:
    opacity 1500ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 7200ms linear;
  will-change: opacity, transform;
}

.slide-image.is-active {
  z-index: 2;
  opacity: 1;
  transform: scale(1.105);
}

.flash-layer {
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(104deg, transparent 0 38%, rgba(255, 255, 255, 0.92) 47%, transparent 58% 100%),
    radial-gradient(circle at 46% 48%, rgba(255, 255, 255, 0.88), transparent 18%),
    rgba(255, 255, 255, 0.22);
  mix-blend-mode: screen;
}

.flash-layer.is-flashing {
  animation: photo-flash 960ms ease-out;
}

.credits-link {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0.46;
  transition: opacity 160ms ease, transform 160ms ease;
}

.credits-link:hover,
.credits-link:focus-visible {
  opacity: 1;
  transform: scale(1.25);
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.credits-page {
  min-height: 100vh;
  overflow: auto;
  padding: clamp(24px, 6vw, 70px);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(248, 197, 111, 0.32), transparent 34%),
    linear-gradient(180deg, var(--paper) 0%, #ead9bd 100%);
}

.credits {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(34, 27, 20, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 22px 60px rgba(45, 33, 20, 0.12);
}

.credits h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Hoefler Text", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.credits p,
.credits li {
  color: #554638;
  line-height: 1.7;
}

.credits a {
  color: #7a4100;
}

.credits ul {
  padding-left: 20px;
}

.back-link {
  display: inline-flex;
  margin-top: 24px;
  font-weight: 800;
}

@keyframes photo-flash {
  0% {
    opacity: 0;
    transform: translateX(-10%) scale(1.08) skewX(-8deg);
  }
  12% {
    opacity: 0.95;
  }
  28% {
    opacity: 0.18;
  }
  43% {
    opacity: 0.72;
  }
  100% {
    opacity: 0;
    transform: translateX(10%) scale(1.08) skewX(-8deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide-image {
    transition: opacity 1ms linear;
    transform: none;
  }

  .slide-image.is-active {
    transform: none;
  }

  .flash-layer.is-flashing {
    animation: none;
  }
}
