/* ==========================================================================
   T09: PARISIAN ANTIQUE LETTER STYLESHEET
   ========================================================================== */
:root {
  --bg-dark: #140f0c;
  --parchment: #fef7ee;
  --parchment-border: #d4b58e;
  --ink-sepia: #3c2415;
  --wax-red: #991b1b;
  --gold-stamp: #b45309;
  --border-gold: rgba(180, 83, 9, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: #fef3c7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

#dust-canvas {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 1; pointer-events: none;
}
#confetti-canvas {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: 100; pointer-events: none;
}

/* Audio control */
.audio-ctrl {
  position: fixed;
  top: 1.25rem; right: 1.25rem;
  z-index: 90;
}
.audio-btn {
  background: rgba(30, 20, 15, 0.85);
  border: 1px solid var(--border-gold);
  color: #fde68a;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(180, 83, 9, 0.2);
  transition: all 0.3s;
}
.audio-btn:hover { background: rgba(180, 83, 9, 0.3); }

/* Passcode Screen */
.passcode-modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #261912 0%, #0d0907 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.passcode-modal.unlocked { opacity: 0; visibility: hidden; pointer-events: none; }
.seal-card {
  background: rgba(36, 24, 18, 0.95);
  border: 1px solid var(--border-gold);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  max-width: 380px; width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 35px rgba(180, 83, 9, 0.2);
}
.seal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  color: #fde68a;
  margin-bottom: 0.5rem;
}
.seal-sub { color: #d5c4a1; font-size: 0.95rem; margin-bottom: 1.5rem; }
.pin-row { display: flex; justify-content: center; gap: 0.8rem; margin-bottom: 1.5rem; }
.pin-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border-gold);
  background: transparent;
  transition: all 0.2s;
}
.pin-dot.filled {
  background: var(--gold-stamp);
  box-shadow: 0 0 12px var(--gold-stamp);
}
.keypad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; max-width: 270px; margin: 0 auto;
}
.key-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(180, 83, 9, 0.2);
  color: #fff;
  font-size: 1.3rem; font-weight: 700;
  border-radius: 14px;
  padding: 0.85rem 0;
  cursor: pointer;
  transition: all 0.2s;
}
.key-btn:hover { background: rgba(180, 83, 9, 0.25); }

/* Main Wrapper */
.main-wrapper {
  position: relative;
  z-index: 10;
  max-width: 1040px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

/* Hero */
.hero { text-align: center; padding: 2rem 0; }
.badge-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  background: rgba(180, 83, 9, 0.15);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  color: #fde68a;
  font-size: 0.85rem; font-weight: 700;
  margin-bottom: 1.5rem;
}
.hero-heading {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  margin-bottom: 1rem;
}
.hero-heading span {
  background: linear-gradient(135deg, #fff 20%, #fef08a 60%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  color: #d5c4a1;
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 2.5rem;
}

/* 3D Wax Seal Unboxing Stamp */
.wax-envelope-card {
  margin: 2rem auto;
  max-width: 320px;
  height: 200px;
  background: #fdf6ec;
  border: 2px dashed #b45309;
  border-radius: 14px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.3s;
}
.wax-envelope-card:hover { transform: scale(1.03); }
.wax-stamp-3d {
  width: 70px; height: 70px;
  background: radial-gradient(circle, #b91c1c 20%, #7f1d1d 90%);
  border: 3px solid #fde047;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.wax-envelope-card.cracked .wax-stamp-3d {
  transform: scale(1.2) rotate(15deg);
  opacity: 0.3;
}

/* Deckle Edge Parchment Letter */
.parchment-sheet {
  background: #fdfbf7;
  color: var(--ink-sepia);
  border: 1px solid var(--parchment-border);
  border-radius: 12px;
  padding: 3.5rem 3rem;
  margin: 4rem 0;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8), inset 0 0 40px rgba(180, 83, 9, 0.1);
  position: relative;
}
.parchment-date { font-weight: 700; font-size: 0.95rem; color: #78350f; }
.parchment-salutation { font-family: 'Outfit'; font-size: 2rem; font-weight: 800; margin: 1.5rem 0; color: #451a03; }
.parchment-body p { font-size: 1.15rem; line-height: 1.85; margin-bottom: 1.5rem; color: #291a10; }
.parchment-ps {
  background: rgba(180, 83, 9, 0.08);
  border-left: 4px solid var(--gold-stamp);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 2rem;
  font-style: italic;
  color: #78350f;
}
.parchment-sig { text-align: right; margin-top: 2.5rem; }
.sig-name { font-family: 'Caveat', cursive; font-size: 2.6rem; color: #78350f; }

/* Memories Cards */
.memories-section { margin: 4rem 0; }
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.memory-card {
  background: rgba(36, 24, 18, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  transition: all 0.3s;
}
.memory-card:hover {
  transform: translateY(-6px);
  border-color: #fde68a;
  box-shadow: 0 12px 30px rgba(180, 83, 9, 0.25);
}
.mem-icon { font-size: 2.2rem; margin-bottom: 0.8rem; }
.mem-era {
  font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase;
  color: #fde68a;
  letter-spacing: 1px;
}
.mem-title { font-family: 'Outfit'; font-size: 1.25rem; font-weight: 700; margin: 0.3rem 0 0.6rem; color: #fff; }
.mem-desc { font-size: 0.95rem; color: #d5c4a1; line-height: 1.5; }

/* Apology */
.apology-box {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  margin: 3.5rem 0;
}

/* Lantern Cake */
.cake-card {
  background: rgba(36, 24, 18, 0.85);
  border: 1px solid var(--border-gold);
  border-radius: 24px;
  padding: 3rem 1.5rem;
  text-align: center;
  margin: 3.5rem 0;
}
.candles-row { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.5rem; }
.candle {
  width: 12px; height: 45px;
  background: linear-gradient(to bottom, #fde047, #d97706);
  border-radius: 6px;
  position: relative;
}
.flame {
  position: absolute;
  top: -22px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 22px;
  background: radial-gradient(circle, #fff 20%, #fde047 60%, #f97316 100%);
  border-radius: 50% 50% 20% 20%;
  animation: flicker 0.8s infinite alternate;
  box-shadow: 0 0 15px #fde047;
  transition: opacity 0.4s;
}
.candle.blown .flame { opacity: 0; }
.cake-tier {
  width: 190px; height: 75px;
  margin: 0 auto;
  background: linear-gradient(135deg, #78350f, #451a03);
  border: 2px solid #fde68a;
  border-radius: 16px 16px 8px 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit'; font-weight: 800; font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.blow-btn {
  background: linear-gradient(135deg, #b45309, #d97706);
  color: #fff;
  font-size: 1rem; font-weight: 800;
  padding: 0.85rem 2.2rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 1.5rem;
  box-shadow: 0 8px 25px rgba(180, 83, 9, 0.4);
  transition: all 0.3s;
}
.blow-btn:hover { transform: scale(1.05); }

/* CTAs */
.cta-row {
  display: flex; justify-content: center; gap: 1.25rem;
  flex-wrap: wrap; margin-top: 2rem;
}
.btn-cta {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1.8rem;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
}
.btn-wa { background: #25d366; color: #fff; box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3); }
.btn-ig { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); color: #fff; box-shadow: 0 8px 25px rgba(220, 39, 67, 0.3); }
.btn-cta:hover { transform: translateY(-3px); }

/* ====================================================================
   MOBILE & TABLET VIEWPORT RESPONSIVENESS
   ==================================================================== */
@media (max-width: 768px) {
  .stage-content, .container, .hero-section {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  .hero-heading, .hero-title, .hero-giant-name {
    font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
    line-height: 1.2 !important;
  }
  .hero-desc, .hero-sub {
    font-size: 1rem !important;
    padding: 0 0.5rem !important;
  }
  .letter-paper, .letter-card, .scroll-letter, .letter-parchment, .notebook-card, .boarding-pass, .manifesto-card, .mixtape-card {
    padding: 1.75rem 1.25rem !important;
  }
  .timeline-grid, .memories-grid, .grid-2 {
    grid-template-columns: 1fr !important;
  }
  .cta-row, .btn-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.85rem !important;
  }
  .btn-cta, .btn-wa, .btn-ig {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .hero-heading, .hero-title, .hero-giant-name {
    font-size: 1.75rem !important;
  }
  .heart-card, .passcode-card, .pin-card {
    padding: 1.75rem 1.25rem !important;
  }
  .cake-tier {
    width: 160px !important;
    height: 65px !important;
    font-size: 1rem !important;
  }
}
