/* ==========================================================================
   T11-ROYALE-24K-GOLD STYLESHEET
   ========================================================================== */
:root {
  --bg-main: #080808;
  --card-bg: rgba(24, 24, 27, 0.85);
  --primary: #eab308;
  --accent: #fef08a;
  --border-theme: rgba(234, 179, 8, 0.35);
  --glow-color: rgba(234, 179, 8, 0.25);
  --text-main: #fafaf9;
  --text-muted: #d6d3d1;
}

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

#bg-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: var(--card-bg);
  border: 1px solid var(--border-theme);
  color: var(--primary);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: all 0.3s;
}
.audio-btn:hover { background: rgba(255,255,255,0.1); transform: scale(1.04); }

/* Passcode Screen */
.passcode-modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #1e1b2e 0%, var(--bg-main) 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; }
.passcode-card {
  background: var(--card-bg);
  border: 1px solid var(--border-theme);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  max-width: 380px; width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0,0,0,0.9), 0 0 35px var(--glow-color);
  backdrop-filter: blur(20px);
}
.passcode-icon { font-size: 3.5rem; margin-bottom: 0.8rem; animation: float 3s infinite ease-in-out; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.passcode-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.passcode-sub { color: var(--text-muted); 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-theme);
  background: transparent;
  transition: all 0.2s;
}
.pin-dot.filled {
  background: var(--primary);
  box-shadow: 0 0 12px var(--primary);
}
.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 var(--border-theme);
  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(255, 255, 255, 0.15); }

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

/* Hero */
.hero { text-align: center; padding: 2.5rem 0; }
.badge-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-theme);
  border-radius: 999px;
  color: var(--primary);
  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, #ffffff 20%, var(--primary) 70%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 2.5rem;
}

/* Interactive Hero Emblem / Unbox */
.interactive-stage {
  margin: 2rem auto;
  width: 200px; height: 160px;
  background: var(--card-bg);
  border: 2px solid var(--border-theme);
  border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 15px 40px rgba(0,0,0,0.7), 0 0 30px var(--glow-color);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.interactive-stage:hover { transform: scale(1.06); }
.stage-emblem { font-size: 3.5rem; margin-bottom: 0.5rem; }

/* Memories Grid */
.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: var(--card-bg);
  border: 1px solid var(--border-theme);
  border-radius: 20px;
  padding: 1.75rem;
  backdrop-filter: blur(14px);
  transition: all 0.3s;
}
.memory-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: 0 12px 30px var(--glow-color);
}
.mem-icon { font-size: 2.2rem; margin-bottom: 0.8rem; }
.mem-era {
  font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  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: var(--text-muted); line-height: 1.5; }

/* Letter */
.luxury-letter {
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, var(--card-bg) 100%);
  border: 1px solid var(--border-theme);
  border-radius: 28px;
  padding: 3.5rem 2.5rem;
  margin: 4rem 0;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8);
  backdrop-filter: blur(16px);
}
.letter-date { color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.letter-salutation { font-family: 'Outfit'; font-size: 1.8rem; font-weight: 800; margin: 1.5rem 0; color: #fff; }
.letter-body p { font-size: 1.1rem; line-height: 1.8; color: var(--text-main); margin-bottom: 1.5rem; }
.letter-ps {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 2rem;
  font-style: italic;
  color: var(--accent);
}
.letter-sig { text-align: right; margin-top: 2.5rem; }
.sig-name { font-family: 'Caveat', cursive; font-size: 2.4rem; color: var(--primary); }

/* 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;
}

/* Cake */
.cake-card {
  background: var(--card-bg);
  border: 1px solid var(--border-theme);
  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, var(--primary), var(--accent));
  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%, var(--primary) 100%);
  border-radius: 50% 50% 20% 20%;
  animation: flicker 0.8s infinite alternate;
  box-shadow: 0 0 15px var(--primary);
  transition: opacity 0.4s;
}
.candle.blown .flame { opacity: 0; }
.cake-tier {
  width: 190px; height: 75px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(0,0,0,0.5));
  border: 2px solid var(--primary);
  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, var(--primary), var(--accent));
  color: #000;
  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 var(--glow-color);
  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;
  }
}
