/* ============================================
   Act 1 — The Letter
   ============================================ */

/* Entry Point */
#entry-point {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-lg);
  background: var(--bg-deep);
  position: relative;
  z-index: 1;
}

#entry-point > *:not(#entry-particles) {
  position: relative;
  z-index: 1;
}

#entry-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#entry-point .name-reveal {
  font-family: var(--font-handwriting);
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--purple-soft);
  text-shadow: 0 0 40px var(--glow-purple), 0 0 80px var(--glow-purple);
  opacity: 0;
}

#entry-point .subtitle {
  font-family: var(--font-body);
  color: var(--text-secondary);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-style: italic;
  opacity: 0;
}

#entry-point .begin-btn {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 2.5rem;
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-default);
  position: relative;
  overflow: hidden;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(160, 120, 72, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(160, 120, 72, 0); }
}

#entry-point .begin-btn.visible {
  animation: pulse-border 2.5s ease-in-out infinite;
}

#entry-point .begin-btn:hover {
  background: rgba(160, 120, 72, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--glow);
}

/* ---- Letter Viewport (pinned single section) ---- */
#letter-viewport {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gap-lg);
  position: relative;
  background: transparent;
  overflow: hidden;
}

.letter-content {
  max-width: var(--content-max);
  text-align: center;
  position: relative;
}

.letter-paragraph {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  line-height: 1.85;
  color: var(--text-primary);
  opacity: 0;
  margin: 0;
}

/* Signoff styling */
.letter-paragraph.signoff {
  font-family: var(--font-handwriting);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--gold);
}

/* Progress dots */
.letter-progress-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.letter-progress-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.3;
  transition: all 0.3s ease;
}

.letter-progress-dots .dot.active {
  opacity: 1;
  background: var(--gold);
  transform: scale(1.3);
}

.letter-progress-dots .dot.completed {
  opacity: 0.6;
  background: var(--gold);
}

/* Spacer: provides virtual scroll height (overridden by JS) */
#letter-spacer {
  height: 0;
}

/* Transition card to Act 2 */
.transition-card {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-deep);
  padding: var(--gap-lg);
}

.transition-card p {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 500;
  font-style: italic;
  color: var(--text-primary);
  text-align: center;
  max-width: var(--content-narrow);
  opacity: 0;
}

/* Emphasis — applied dynamically */
.emphasis-phrase {
  transition: all 0.6s var(--ease-default);
}

.emphasis-phrase.active {
  transform: scale(1.03);
}
