/* ========================================
   FULL-PAGE SCROLL EXPERIENCE
   ======================================== */

/* ── Container: fixed full viewport ── */
.fp-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
}

/* ── Each section/page ── */
.fp-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, transform;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(50px);
  overflow: hidden;
}

/* Active section */
.fp-section.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  z-index: 2;
}

/* Leaving upward (scrolling down) */
.fp-section.leaving-up {
  opacity: 0;
  transform: translateY(-50px);
  pointer-events: none;
  z-index: 1;
}

/* Leaving downward (scrolling up) */
.fp-section.leaving-down {
  opacity: 0;
  transform: translateY(50px);
  pointer-events: none;
  z-index: 1;
}

/* Entering from below (scrolling down) */
.fp-section.entering-up {
  transform: translateY(50px);
  opacity: 0;
  transition: none;
}

/* Entering from above (scrolling up) */
.fp-section.entering-down {
  transform: translateY(-50px);
  opacity: 0;
  transition: none;
}

/* ── Background variants ── */
.fp-section[data-bg="dark"] {
  background: var(--color-bg-dark);
  color: var(--color-white);
}

.fp-section[data-bg="light"] {
  background: var(--color-bg);
  color: var(--color-text);
}

.fp-section[data-bg="warm"] {
  background: #f5f5f5;
  color: var(--color-text);
}

/* ========================================
   HERO (inside fp-section)
   ======================================== */
.fp-section.fp-hero {
  padding: 0;
}

.fp-section.fp-hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 20px;
}

.fp-section.fp-hero h1 {
  font-family: var(--font-script);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--color-brown);
  margin-bottom: 16px;
  animation: fadeInDown 1.2s ease forwards;
}

.fp-section.fp-hero .subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--color-brown-light);
  font-style: italic;
  margin-bottom: 40px;
  animation: fadeInUp 1.2s ease 0.3s forwards;
  opacity: 0;
}

.fp-section.fp-hero .date-badge {
  display: inline-block;
  background: transparent;
  border: 1px solid #ddd;
  padding: 12px 32px;
  border-radius: 50px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: #333;
  letter-spacing: 2px;
  animation: fadeInUp 1.2s ease 0.6s forwards;
  opacity: 0;
}

.fp-section.fp-hero #hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.fp-section.fp-hero .scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s ease infinite;
  z-index: 2;
}

.fp-section.fp-hero .scroll-indicator svg {
  width: 30px;
  height: 30px;
  stroke: #999;
  stroke-width: 2;
  fill: none;
}

/* ========================================
   TITLE SECTIONS
   ======================================== */
.fp-title {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3rem);
  color: #111;
  text-align: center;
}

/* ========================================
   PHOTO SECTIONS
   ======================================== */
.fp-photo {
  max-width: 480px;
  width: 100%;
  background: #fff;
  padding: 16px 16px 48px 16px;
  box-shadow: var(--shadow-polaroid);
  position: relative;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

.fp-section.active .fp-photo {
  opacity: 1;
  transform: scale(1);
}

.fp-photo .photo-wrapper {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--color-cream);
}

.fp-photo .photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fp-photo .photo-caption {
  text-align: center;
  padding-top: 16px;
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--color-brown-light);
}

/* ── Text below photo ── */
.fp-text {
  max-width: 480px;
  text-align: center;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.fp-section.active .fp-text {
  opacity: 1;
  transform: translateY(0);
}

.fp-date {
  font-family: var(--font-script);
  font-size: 1.2rem;
  color: var(--color-gold);
  margin-bottom: 4px;
}

.fp-heading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--color-brown);
  margin-bottom: 8px;
}

.fp-desc {
  color: var(--color-text-light);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ========================================
   CLUE SECTIONS
   ======================================== */
.fp-clue-card {
  max-width: 550px;
  width: 100%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 44px 36px;
  text-align: center;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease 0.15s, transform 0.5s ease 0.15s;
}

.fp-section.active .fp-clue-card {
  opacity: 1;
  transform: scale(1);
}

.fp-section[data-bg="warm"] .fp-clue-card {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.08);
}

.fp-clue-number {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  color: #999;
  margin-bottom: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.fp-clue-card h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  margin-bottom: 14px;
}

.fp-clue-card p {
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.85;
}

.fp-clue-hint {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 24px;
  border: 1px dashed #888;
  border-radius: 8px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: #555;
  letter-spacing: 1px;
}

.fp-section[data-bg="dark"] .fp-clue-hint {
  border-color: rgba(255,255,255,0.3);
  color: #ccc;
}

/* ========================================
   GAME SECTION (inside fp-section)
   ======================================== */
.fp-game-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: 100%;
}

.fp-game-content h2 {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 8px;
  color: #111;
}

.fp-game-content .game-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: #888;
  margin-bottom: 24px;
  font-size: 1rem;
}

/* ========================================
   VIDEO SECTION (inside fp-section)
   ======================================== */
.fp-video-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.fp-video-content h2 {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: #111;
  margin-bottom: 10px;
}

.fp-video-content .video-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: #888;
  margin-bottom: 30px;
  font-size: 1rem;
}

/* ========================================
   CLOSING SECTION (inside fp-section)
   ======================================== */
.fp-closing h2 {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 20px;
  color: #111;
}

.fp-closing p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto 30px;
  opacity: 0.9;
  line-height: 1.8;
  text-align: center;
}

/* ========================================
   PROGRESS INDICATOR (fixed)
   ======================================== */
.fp-progress {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 100;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.fp-progress:hover {
  opacity: 1;
}

.fp-progress-bar {
  width: 100px;
  height: 2px;
  background: rgba(128, 128, 128, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.fp-progress-fill {
  height: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0%;
}

.fp-counter {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 1px;
  white-space: nowrap;
  color: currentColor;
}

/* Progress adapts to dark/light backgrounds */
.fp-progress[data-theme="dark"] {
  color: rgba(255, 255, 255, 0.5);
}

.fp-progress[data-theme="dark"] .fp-progress-bar {
  background: rgba(255, 255, 255, 0.15);
}

.fp-progress[data-theme="light"] {
  color: rgba(0, 0, 0, 0.4);
}

.fp-progress[data-theme="light"] .fp-progress-bar {
  background: rgba(0, 0, 0, 0.1);
}

/* ── Scroll hint ── */
.fp-scroll-hint {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: #999;
  letter-spacing: 1px;
  z-index: 100;
  animation: hintFade 3s ease infinite;
  transition: opacity 0.5s ease;
}

.fp-scroll-hint.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

.fp-scroll-hint svg {
  width: 16px;
  height: 16px;
  stroke: #999;
  stroke-width: 2;
  fill: none;
  vertical-align: middle;
  margin-left: 4px;
}

@keyframes hintFade {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.9; }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .fp-section {
    padding: 24px 16px;
  }

  .fp-photo {
    max-width: 360px;
    padding: 14px 14px 40px 14px;
  }

  .fp-text {
    margin-top: 14px;
  }

  .fp-heading {
    font-size: 1.15rem;
  }

  .fp-desc {
    font-size: 0.85rem;
  }

  .fp-clue-card {
    padding: 32px 24px;
  }

  .fp-progress-bar {
    width: 70px;
  }
}

@media (max-width: 480px) {
  .fp-photo {
    max-width: 300px;
  }

  .fp-title {
    font-size: 1.8rem;
  }
}
