/* ==========================================================================
   T08: FAIRY LIGHTS COFFEEHOUSE STYLESHEET
   ========================================================================== */
:root {
  --bg-cafe: #18120c;
  --card-cafe: rgba(38, 28, 19, 0.75);
  --amber-light: #fbbf24;
  --amber-warm: #f59e0b;
  --caramel: #d97706;
  --text-main: #fef3c7;
  --text-muted: #d5c4a1;
  --border-cafe: rgba(245, 158, 11, 0.25);
}

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

#bokeh-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(38, 28, 19, 0.85);
  border: 1px solid var(--border-cafe);
  color: var(--amber-light);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
  transition: all 0.3s;
}
.audio-btn:hover { background: rgba(245, 158, 11, 0.3); }

/* Passcode Screen */
.passcode-modal {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #2e2014 0%, #120c08 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; }
.chalk-card {
  background: rgba(38, 28, 19, 0.92);
  border: 1px solid var(--border-cafe);
  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(245, 158, 11, 0.2);
}
.chalk-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  color: var(--amber-light);
  margin-bottom: 0.5rem;
}
.chalk-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-cafe);
  background: transparent;
  transition: all 0.2s;
}
.pin-dot.filled {
  background: var(--amber-warm);
  box-shadow: 0 0 12px var(--amber-warm);
}
.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(245, 158, 11, 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(245, 158, 11, 0.25); }

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

/* Fairy Lights Rope at top */
.fairy-lights-wire {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  position: relative;
}
.fairy-bulb {
  width: 16px; height: 26px;
  background: #fde047;
  border-radius: 50% 50% 35% 35%;
  box-shadow: 0 0 18px #f59e0b, 0 0 30px #f59e0b;
  cursor: pointer;
  animation: swayLight 3s infinite ease-in-out;
  transform-origin: top center;
  transition: all 0.3s;
}
.fairy-bulb:nth-child(even) { animation-delay: 1.5s; background: #fed7aa; }
@keyframes swayLight {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* 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(245, 158, 11, 0.15);
  border: 1px solid var(--border-cafe);
  border-radius: 999px;
  color: var(--amber-light);
  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%, #f59e0b 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;
}

/* Memories Clothesline */
.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-cafe);
  border: 1px solid var(--border-cafe);
  border-radius: 20px;
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  transition: all 0.3s;
  position: relative;
}
.memory-card:hover {
  transform: translateY(-6px);
  border-color: var(--amber-light);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.25);
}
.clothes-peg {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 24px;
  background: #b45309;
  border-radius: 3px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.mem-icon { font-size: 2.2rem; margin-bottom: 0.8rem; }
.mem-era {
  font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase;
  color: var(--amber-light);
  letter-spacing: 1px;
}
.mem-title { font-family: 'Outfit'; font-size: 1.25rem; font-weight: 700; margin: 0.3rem 0 0.6rem; }
.mem-desc { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }

/* Cafe Letter */
.cafe-letter {
  background: linear-gradient(135deg, rgba(50, 36, 24, 0.8) 0%, rgba(26, 18, 12, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 28px;
  padding: 3.5rem 2.5rem;
  margin: 4rem 0;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  backdrop-filter: blur(16px);
}
.letter-date { color: var(--amber-light); 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: #fef3c7; margin-bottom: 1.5rem; }
.letter-ps {
  background: rgba(245, 158, 11, 0.15);
  border-left: 4px solid var(--amber-warm);
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 2rem;
  font-style: italic;
  color: #fde68a;
}
.letter-sig { text-align: right; margin-top: 2.5rem; }
.sig-name { font-family: 'Caveat', cursive; font-size: 2.2rem; color: var(--amber-light); }

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

/* Coffee Cup Candle Cake */
.cake-card {
  background: var(--card-cafe);
  border: 1px solid var(--border-cafe);
  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, #f59e0b);
  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 var(--amber-light);
  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, #f59e0b, #d97706);
  color: #18120c;
  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(245, 158, 11, 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;
  }
}
