* { box-sizing: border-box; }

html, body {
  margin: 0;
}

/* film grain overlay, sits over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.5rem;
  padding: 0 0 10rem;
}

/* extra breathing room between images further down the page —
   the gap between the 1st and 2nd image (the cover) stays as-is */
main > *:nth-child(n+3) {
  margin-top: 4.5rem;
}

/* opening / cover treatment for plate 1 */
.cover {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover .frame {
  max-width: min(92vw, 38cm);
}

.frame {
  position: relative;
  width: 100%;
  max-width: 29.7cm;
  aspect-ratio: 2000 / 707;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.frame.is-visible {
  opacity: 1;
  transform: none;
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* the closing plate: longer pause before it, slower fade */
.plate-final {
  transition: opacity 2.4s ease, transform 2.4s ease;
}

/* album nav button */
.album-toggle {
  position: absolute;
  top: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  padding: 0.5rem 0.95rem;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #eae4d8;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.album-toggle:hover,
.album-toggle:focus-visible {
  background: rgba(255,255,255,0.16);
}

@media (prefers-reduced-motion: reduce) {
  .frame {
    transition: none;
    opacity: 1;
    transform: none;
  }
  body::before { display: none; }
}
