/* screens.css — Section UI: stories modal/card, gallery marquee, keyframes */

/* Stories Modal */
.story-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  place-items: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.story-modal.active {
  display: grid;
  opacity: 1;
}
.story-modal-card {
  background: var(--cream);
  width: 100%;
  max-width: 580px;
  max-height: 80vh;
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  padding: 24px;
  position: relative;
  animation: scaleIn 0.4s cubic-bezier(0.3, 1.4, 0.5, 1) both;
}
.story-modal-body {
  overflow-y: auto;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.7;
  margin-top: 14px;
  padding-right: 4px;
}
.story-modal-body::-webkit-scrollbar {
  width: 6px;
}
.story-modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

@keyframes scaleIn {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Stories Card */
.story-card {
  transition:
    transform 0.3s cubic-bezier(0.3, 1.4, 0.5, 1),
    box-shadow 0.3s;
}
.story-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-soft);
}

/* ── Gallery Marquee (memory polaroid scroll) ── */
.gallery-marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 24px 0;
  mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}
.gallery-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee-scroll 45s linear infinite;
  will-change: transform;
}
.gallery-slide {
  flex: 0 0 200px;
}
.gallery-polaroid-card {
  width: 200px;
}
.gallery-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 2;
}
.gallery-fade-l {
  left: 0;
  background: linear-gradient(to right, var(--bg-2), transparent);
}
.gallery-fade-r {
  right: 0;
  background: linear-gradient(to left, var(--bg-2), transparent);
}
@keyframes marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (max-width: 460px) {
  .gallery-slide,
  .gallery-polaroid-card {
    flex-basis: 160px;
    width: 160px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-track {
    animation: none;
  }
}

/* ── Missing keyframes restored from React-era refactor ── */
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes medallionFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-modal-card,
  [style*="animation: floaty"],
  [style*="animation: medallionFloat"] {
    animation: none !important;
  }
}
