﻿/* ==========================================================================
   ✨ A BIRTHDAY JOURNEY — EDITORIAL & CINEMATIC STYLES
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-cream: #FAF7F2;
  --bg-cream-dark: #F3ECE2;
  --bg-paper: #FFFFFF;
  --text-main: #2C2421;
  --text-secondary: #635650;
  --text-muted: #948680;
  --accent-blush: #E8A598;
  --accent-peach: #F4C4B5;
  --accent-gold: #C5A059;
  --accent-gold-light: #FBF4E4;
  --accent-gold-dark: #9E7B36;
  --border-subtle: rgba(44, 36, 33, 0.08);
  --border-card: rgba(44, 36, 33, 0.06);
  --shadow-sm: 0 4px 12px rgba(44, 36, 33, 0.04);
  --shadow-md: 0 12px 32px -8px rgba(44, 36, 33, 0.08);
  --shadow-lg: 0 24px 50px -12px rgba(44, 36, 33, 0.12);
  --shadow-polaroid: 0 18px 40px -10px rgba(44, 36, 33, 0.16);
}

/* Base resets & typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-cream);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Editorial Serif & Handwritten Utility Classes */
.font-serif-heading {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-serif-editorial {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-handwriting {
  font-family: 'Caveat', cursive;
}

/* Subtle Film Grain Texture Overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Ambient Particles Canvas */
#ambientCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Celebration Confetti Canvas */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 150;
}

/* Main Container & Journey Steps */
.journey-container {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  /* Keep controls clear of the fixed progress bar and audio pill on small screens. */
  padding: 5rem max(1rem, env(safe-area-inset-right)) 5.5rem max(1rem, env(safe-area-inset-left));
}

.journey-step {
  display: none;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.journey-step.active {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/*
   Opening is deliberately a little more prominent than the interactive acts.
   `clamp` lets it grow on wide displays while retaining a compact, readable
   layout on phones. This avoids viewport-based CSS zoom, which tends to make
   text and touch targets unusably small on one of the two form factors.
*/
#step-0 {
  max-width: 46rem;
}

#openingGreeting {
  font-size: clamp(2.25rem, 7vw, 3.75rem);
  line-height: 1.05;
}

#openingSubtitle {
  max-width: 32rem;
  font-size: clamp(1rem, 3.7vw, 1.35rem);
  line-height: 1.45;
}

#openingCatch {
  max-width: 32rem;
  font-size: clamp(0.875rem, 3.4vw, 1rem);
  line-height: 1.5;
}

/* Luxury Editorial Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #2C2421 0%, #443833 100%);
  color: #FAF7F2;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.935rem;
  letter-spacing: 0.04em;
  padding: 0.95rem 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px -5px rgba(44, 36, 33, 0.25), 0 0 0 1px rgba(44, 36, 33, 0.05);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(44, 36, 33, 0.35);
  background: linear-gradient(135deg, #211B18 0%, #362C28 100%);
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.quiz-option-card:focus-visible,
.mystery-box:focus-visible,
.floating-audio-pill:focus-visible {
  outline: 3px solid rgba(197, 160, 89, 0.65);
  outline-offset: 3px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.85rem 1.65rem;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: #FFFFFF;
  border-color: rgba(44, 36, 33, 0.18);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: linear-gradient(135deg, #C5A059 0%, #D4AF37 50%, #B89243 100%);
  color: #FFFFFF;
  box-shadow: 0 10px 25px -5px rgba(197, 160, 89, 0.4);
}

.btn-gold:hover {
  background: linear-gradient(135deg, #B89243 0%, #C5A059 50%, #A68032 100%);
  box-shadow: 0 14px 30px -5px rgba(197, 160, 89, 0.5);
}

/* Editorial Glass Card */
.editorial-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-md);
  border-radius: 1.5rem;
  position: relative;
}

/* Badges & Tags */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold-dark);
  background: var(--accent-gold-light);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(197, 160, 89, 0.2);
}

/* ==========================================================================
   ACT 02: QUIZ COMPONENT
   ========================================================================== */
.quiz-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: #FFFFFF;
  border: 1.5px solid var(--border-card);
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.quiz-option-card:hover {
  border-color: var(--accent-blush);
  background: #FFFDFC;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.quiz-option-card.selected-correct {
  border-color: #52B788;
  background: #F2FBF6;
  color: #1B4332;
}

.quiz-option-card.selected-wrong {
  border-color: var(--accent-blush);
  background: #FDF4F2;
  color: #8C2F20;
}

.quiz-option-card.disabled {
  pointer-events: none;
  opacity: 0.65;
}

/* ==========================================================================
   ACT 03: MYSTERY GIFT BOXES
   ========================================================================== */
.mystery-box {
  background: #FFFFFF;
  border-radius: 1.25rem;
  border: 1.5px solid var(--border-card);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.mystery-box:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-blush);
}

.mystery-box.opened {
  border-color: var(--accent-gold);
  background: #FFFDF9;
}

.mystery-box-ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 100%;
  background: linear-gradient(180deg, #E8A598 0%, #F4C4B5 100%);
  opacity: 0.25;
  pointer-events: none;
}

/* ==========================================================================
   ACT 04: SCRAPBOOK POLAROID STYLES
   ========================================================================== */
.polaroid-frame {
  background: #FFFFFF;
  padding: 14px 14px 28px 14px;
  border-radius: 6px;
  box-shadow: var(--shadow-polaroid);
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
  margin: 0 auto;
  pointer-events: none;
}

.polaroid-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 90px;
  height: 28px;
  background: rgba(243, 236, 226, 0.85);
  backdrop-filter: blur(2px);
  border: 1px dashed rgba(197, 160, 89, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  z-index: 10;
}

.polaroid-img-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3.8;
  overflow: hidden;
  border-radius: 4px;
  background: #ECE4D8;
  position: relative;
}

.polaroid-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

#memoryActionBtn,
#memoryNextStageBtn {
  position: relative;
  z-index: 20;
}

/* ==========================================================================
   ACT 05: TIMELINE STYLES
   ========================================================================== */
.timeline-year-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  background: #FFFFFF;
  border: 1.5px solid var(--border-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 75px;
}

.timeline-year-pill:hover {
  border-color: var(--accent-blush);
  color: var(--text-main);
}

.timeline-year-pill.active {
  background: #2C2421;
  color: #FAF7F2;
  border-color: #2C2421;
  box-shadow: 0 8px 20px -4px rgba(44, 36, 33, 0.3);
  transform: scale(1.05);
}

/* ==========================================================================
   ACT 06: 3D ENVELOPE & LETTER ANIMATION
   ========================================================================== */
.envelope-container {
  perspective: 1200px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  position: relative;
}

.envelope-wrapper {
  position: relative;
  width: 100%;
  height: 270px;
  background: #EFE6D9;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(44, 36, 33, 0.18);
  border: 1px solid rgba(197, 160, 89, 0.25);
  cursor: pointer;
  transition: transform 0.4s ease;
}

.envelope-wrapper:hover {
  transform: translateY(-4px);
}

/* Envelope Flap */
.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 100% 0, 50% 55%);
  background: #E6DCce;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 5;
}

.envelope-wrapper.opened .envelope-flap {
  transform: rotateX(180deg);
  z-index: 1;
}

/* Envelope Pocket */
.envelope-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  clip-path: polygon(0 0, 0 100%, 100% 100%, 100% 0, 50% 55%);
  background: #F4EFE7;
  border-radius: 12px;
  z-index: 4;
  pointer-events: none;
}

/* Wax Seal */
.wax-seal {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  background: radial-gradient(circle at 35% 35%, #D4AF37, #9E7B36);
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(158, 123, 54, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.35rem;
  z-index: 6;
  transition: transform 0.3s ease, opacity 0.4s ease;
}

.envelope-wrapper.opened .wax-seal {
  opacity: 0;
  pointer-events: none;
}

/* Letter Sheet Modal / Expandable View */
.letter-sheet {
  background: #FFFDF9;
  background-image: radial-gradient(#E8DEC8 0.75px, transparent 0.75px);
  background-size: 18px 18px;
  border: 1px solid rgba(197, 160, 89, 0.25);
  box-shadow: var(--shadow-lg);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  position: relative;
}

/* ==========================================================================
   ACT 07: BIRTHDAY CAKE & REALISTIC CANDLES
   ========================================================================== */
.cake-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem 0;
}

.cake-plate {
  width: 260px;
  height: 14px;
  background: linear-gradient(90deg, #E2D7C7, #FAF6EE, #E2D7C7);
  border-radius: 9999px;
  box-shadow: 0 16px 30px rgba(44, 36, 33, 0.14);
  position: relative;
  z-index: 1;
}

.cake-body-bottom {
  width: 220px;
  height: 65px;
  background: linear-gradient(180deg, #F8EFE4 0%, #EBDBC8 100%);
  border-radius: 12px 12px 6px 6px;
  border: 1px solid rgba(197, 160, 89, 0.2);
  position: relative;
  margin-top: -6px;
  z-index: 2;
  box-shadow: inset 0 -8px 12px rgba(44, 36, 33, 0.05);
}

.cake-body-top {
  width: 170px;
  height: 55px;
  background: linear-gradient(180deg, #FFF8F2 0%, #F5E5D8 100%);
  border-radius: 10px 10px 4px 4px;
  border: 1px solid rgba(232, 165, 152, 0.3);
  position: relative;
  margin: -10px auto 0 auto;
  z-index: 3;
}

/* Cream Drips */
.cream-drips {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 18px;
  background: #FFFDF9;
  border-radius: 10px 10px 8px 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Candle Containers */
.candles-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  position: relative;
  z-index: 4;
  margin-bottom: -6px;
}

.candle-stick {
  width: 8px;
  height: 38px;
  background: repeating-linear-gradient(
    45deg,
    #E8A598,
    #E8A598 4px,
    #FFFFFF 4px,
    #FFFFFF 8px
  );
  border-radius: 3px 3px 1px 1px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.candle-wick {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 6px;
  background: #443833;
}

/* Realistic Animated Candle Flame */
.candle-flame {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 22px;
  background: radial-gradient(ellipse at bottom, #FFF 0%, #FFD166 40%, #FF9F1C 75%, transparent 100%);
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  box-shadow: 0 0 16px 4px rgba(255, 179, 71, 0.7), 0 0 35px 8px rgba(255, 138, 0, 0.3);
  animation: candleFlicker 1.8s infinite ease-in-out alternate;
  transform-origin: bottom center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@keyframes candleFlicker {
  0% { transform: translateX(-50%) scale(1) rotate(-1deg); opacity: 0.95; }
  25% { transform: translateX(-50%) scale(1.08, 0.92) rotate(2deg); opacity: 1; }
  50% { transform: translateX(-50%) scale(0.95, 1.05) rotate(-2deg); opacity: 0.9; }
  75% { transform: translateX(-50%) scale(1.04, 0.96) rotate(1deg); opacity: 1; }
  100% { transform: translateX(-50%) scale(0.98, 1.02) rotate(0deg); opacity: 0.95; }
}

/* Smoke puff after candle is blown */
.smoke-puff {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: rgba(140, 130, 125, 0.6);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.candle-flame.extinguished {
  opacity: 0 !important;
  transform: translateX(-50%) scale(0.1) !important;
}

.candle-flame.extinguished + .smoke-puff {
  animation: smokeRise 1.4s ease-out forwards;
}

@keyframes smokeRise {
  0% { opacity: 0.8; transform: translate(-50%, 0) scale(1); filter: blur(0); }
  50% { opacity: 0.4; transform: translate(-70%, -20px) scale(2.2); filter: blur(2px); }
  100% { opacity: 0; transform: translate(-30%, -45px) scale(3.5); filter: blur(4px); }
}

/* Dim Screen Overlay upon Blowing Candles */
.dim-screen-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 14, 0.82);
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.dim-screen-overlay.active {
  opacity: 1;
}

/* ==========================================================================
   ACT 08: FINAL REVEAL (HERO PORTRAIT & CELEBRATION)
   ========================================================================== */
.hero-portrait-frame {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  border-radius: 1.5rem;
  padding: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(251, 244, 228, 0.7));
  border: 1.5px solid rgba(197, 160, 89, 0.35);
  box-shadow: 0 25px 60px -15px rgba(44, 36, 33, 0.18), 0 0 35px rgba(212, 175, 55, 0.15);
}

.hero-portrait-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 1.15rem;
  display: block;
}

/* ==========================================================================
   ACT 09: REAL SURPRISE GIFT VOUCHER & BOX
   ========================================================================== */
.gift-box-3d {
  width: 140px;
  height: 140px;
  margin: 0 auto;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-box-3d:hover {
  transform: translateY(-8px) scale(1.05);
}

.gift-voucher-card {
  background: #FFFDF9;
  border-radius: 1.25rem;
  border: 2px dashed rgba(197, 160, 89, 0.45);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.gift-voucher-card::before,
.gift-voucher-card::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 24px;
  height: 24px;
  background: var(--bg-cream);
  border-radius: 50%;
  transform: translateY(-50%);
}

.gift-voucher-card::before { left: -13px; }
.gift-voucher-card::after { right: -13px; }

/* Grand finale video memories */
.video-memory-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-card);
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.video-memory-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #2C2421;
  object-fit: cover;
}

/* ==========================================================================
   FLOATING MUSIC & PROGRESS BAR
   ========================================================================== */
.floating-audio-pill {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.55rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.25s ease;
}

.floating-audio-pill:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.music-waves {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.music-wave-bar {
  width: 3px;
  height: 100%;
  background: var(--accent-gold);
  border-radius: 2px;
  animation: waveBar 1.2s ease-in-out infinite alternate;
}

.music-wave-bar:nth-child(2) { animation-delay: 0.2s; height: 70%; }
.music-wave-bar:nth-child(3) { animation-delay: 0.4s; height: 90%; }
.music-wave-bar:nth-child(4) { animation-delay: 0.6s; height: 50%; }

.audio-paused .music-wave-bar {
  animation-play-state: paused;
  height: 30% !important;
}

@keyframes waveBar {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

/* Progress Dots Header */
.journey-progress-bar {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(44, 36, 33, 0.18);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-dot.active {
  width: 22px;
  border-radius: 9999px;
  background: var(--text-main);
}

.progress-dot.passed {
  background: var(--accent-gold);
}

/* Animation Helpers */
.animate-fade-in {
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-up {
  animation: scaleUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .journey-container {
    justify-content: flex-start;
    padding-top: 6.5rem;
    padding-bottom: 6.5rem;
  }
  #step-0 {
    padding-top: 1rem;
  }
  #openingGreeting {
    font-size: clamp(2.1rem, 10vw, 2.75rem);
  }
  #openingSubtitle {
    font-size: 1rem;
  }
  #openingCatch {
    margin-bottom: 2rem;
  }
  .btn-primary {
    min-height: 3.25rem;
    padding: 0.85rem 1.5rem;
    font-size: 0.84rem;
  }
  .polaroid-frame {
    max-width: 320px;
    padding: 10px 10px 22px 10px;
  }
  .envelope-wrapper {
    height: 230px;
  }
  .letter-sheet {
    padding: 1.75rem 1.25rem;
  }
}

/* Tablet and desktop: use the available canvas without producing oversized text. */
@media (min-width: 768px) {
  .journey-container {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .journey-step {
    max-width: 52rem;
  }

  #step-0 {
    max-width: 54rem;
  }

  #openingGreeting {
    font-size: clamp(3.25rem, 4.6vw, 4.75rem);
  }

  #openingSubtitle {
    max-width: 38rem;
    font-size: clamp(1.15rem, 1.7vw, 1.4rem);
  }

  #openingCatch {
    max-width: 38rem;
    font-size: clamp(0.95rem, 1.25vw, 1.08rem);
  }

  #step-0 .btn-primary {
    min-height: 3.6rem;
    padding-inline: 2.35rem;
    font-size: 1rem;
  }
}

@media (min-width: 1280px) {
  .journey-container {
    padding-top: 7rem;
    padding-bottom: 7rem;
  }

  .journey-step {
    max-width: 58rem;
  }
}
