/* ====================================================================
   THE BIRTHDAY GAZETTE — BESPOKE VINTAGE NEWSPAPER STYLESHEET
   Amber Newsprint: #d97706 | Aged Gold: #f59e0b | Newsroom Obsidian: #181512
   ==================================================================== */

:root {
  --primary: #d97706;
  --primary-glow: rgba(217, 119, 6, 0.35);
  --accent: #f59e0b;
  --accent-glow: rgba(245, 158, 11, 0.35);
  --bg-dark: #181512;
  --bg-card: rgba(36, 31, 26, 0.92);
  --bg-card-border: rgba(217, 119, 6, 0.35);
  --text-main: #fcfbf9;
  --text-muted: #a8a29e;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --radius-md: 8px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Ambient Warm Glow */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  animation: floatOrb 14s ease-in-out infinite alternate;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: var(--primary);
  top: -80px;
  left: -80px;
}

.orb-2 {
  width: 480px;
  height: 480px;
  background: var(--accent);
  bottom: -100px;
  right: -80px;
  animation-duration: 16s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0); }
  100% { transform: translate(30px, -30px); }
}

canvas#particles-canvas,
canvas#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

canvas#confetti-canvas {
  z-index: 999;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 3;
}

/* ====================================================================
   PASSCODE GATE SCREEN (PRESS ARCHIVE)
   ==================================================================== */
.passcode-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 21, 18, 0.96);
  backdrop-filter: blur(12px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.passcode-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.passcode-card {
  background: var(--bg-card);
  border: 2px solid var(--primary);
  box-shadow: 0 0 35px var(--primary-glow);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
}

.passcode-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.passcode-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
  letter-spacing: 0.5px;
}

.passcode-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.passcode-sub strong {
  color: #fff;
}

.passcode-prompt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.passcode-dots-wrapper {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.passcode-dot-box {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  transition: all 0.2s ease;
}

.passcode-dot-box.filled {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.passcode-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.keypad-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(217, 119, 6, 0.3);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  padding: 0.85rem 0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.keypad-btn:hover {
  background: rgba(217, 119, 6, 0.2);
  border-color: var(--accent);
}

.keypad-btn:active {
  transform: scale(0.96);
}

.keypad-btn.action-btn {
  font-size: 0.85rem;
  color: var(--accent);
  font-family: var(--font-body);
}

.passcode-error-msg {
  color: #f87171;
  font-size: 0.85rem;
  min-height: 1.2rem;
}

/* ====================================================================
   UNBOXING OVERLAY (VINTAGE NEWSPAPER BUNDLE)
   ==================================================================== */
.unboxing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(24, 21, 18, 0.96);
  backdrop-filter: blur(12px);
  z-index: 8000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.unboxing-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.unboxing-badge {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--accent);
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid var(--primary);
  padding: 0.4rem 1.2rem;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.news-bundle-box {
  width: 140px;
  height: 140px;
  background: #2a241e;
  border: 2px solid var(--primary);
  box-shadow: 0 0 35px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  cursor: pointer;
  margin-bottom: 2rem;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.news-bundle-box:hover {
  transform: scale(1.06);
}

.unboxing-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.unboxing-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 440px;
  margin-bottom: 2rem;
}

.btn-open-gazette {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #181512;
  border: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.95rem 2.2rem;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 0 25px var(--primary-glow);
  transition: all 0.25s ease;
}

.btn-open-gazette:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px var(--accent);
}

/* Floating Nav */
.floating-nav {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 5000;
  display: flex;
  gap: 0.6rem;
}

.nav-pill-btn {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  color: var(--accent);
  padding: 0.55rem 1rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.nav-pill-btn:hover {
  background: rgba(217, 119, 6, 0.2);
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.music-bar {
  width: 3px;
  background: var(--accent);
  height: 3px;
}

.playing .music-bar:nth-child(1) { animation: barDance 0.7s infinite alternate; }
.playing .music-bar:nth-child(2) { animation: barDance 0.5s infinite alternate 0.2s; }
.playing .music-bar:nth-child(3) { animation: barDance 0.8s infinite alternate 0.4s; }

@keyframes barDance {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* Masthead & Hero Section */
.site-wrapper {
  position: relative;
  z-index: 5;
  padding: 5rem 0 6rem;
}

.newspaper-masthead {
  border-top: 3px double var(--primary);
  border-bottom: 3px double var(--primary);
  padding: 1.5rem 0;
  text-align: center;
  margin-bottom: 2rem;
}

.masthead-title {
  font-family: var(--font-heading);
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.masthead-bar {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(217, 119, 6, 0.4);
  padding-top: 0.5rem;
  color: var(--accent);
  font-size: 0.82rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-section {
  text-align: center;
  padding: 2rem 0 3.5rem;
}

.hero-tag {
  display: inline-block;
  background: rgba(217, 119, 6, 0.15);
  border: 1px solid var(--primary);
  color: var(--accent);
  font-family: var(--font-heading);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  font-weight: 900;
}

.title-glow {
  color: var(--accent);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 2.25rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #181512;
  box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(217, 119, 6, 0.15);
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-badge {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-weight: 800;
}

/* Letter Card (Editorial Broadsheet) */
.letter-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  padding: 3rem 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.apology-badge {
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid var(--primary);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.letter-date {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.letter-salutation {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.letter-body p {
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.letter-postscript {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--primary);
  color: var(--accent);
  font-weight: 600;
}

.letter-closing {
  margin-top: 2rem;
  text-align: right;
}

.signoff {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.author {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--text-main);
  margin-top: 0.25rem;
}

/* Timeline Chronicles */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all 0.25s ease;
}

.timeline-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 0 25px var(--primary-glow);
}

.timeline-era {
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Quotes */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.quote-card {
  background: var(--bg-card);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
}

.quote-mark {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.quote-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-style: italic;
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.quote-author {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Cake Stage */
.cake-section {
  text-align: center;
}

.cake-wrapper {
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.candles-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 8px;
}

.candle {
  width: 14px;
  height: 50px;
  background: repeating-linear-gradient(45deg, var(--accent), var(--accent) 6px, #78350f 6px, #78350f 12px);
  border-radius: 4px;
  position: relative;
}

.flame {
  width: 16px;
  height: 24px;
  background: radial-gradient(ellipse at bottom, #fff 0%, #f59e0b 50%, #d97706 90%);
  border-radius: 50% 50% 35% 35%;
  position: absolute;
  top: -26px;
  left: -1px;
  box-shadow: 0 0 16px #f59e0b;
  animation: flicker 0.15s infinite alternate;
  cursor: pointer;
}

@keyframes flicker {
  0% { transform: scale(1) rotate(-1deg); }
  100% { transform: scale(1.1) rotate(1deg); }
}

.candle.blown .flame {
  display: none;
}

.cake-body {
  width: 240px;
  height: 85px;
  background: #2a221b;
  border: 2px solid var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.cake-label {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
}

.btn-blow-candles {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #181512;
  border: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 0 25px var(--primary-glow);
  transition: all 0.2s ease;
}

.btn-blow-candles:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px var(--accent);
}

.cake-wish-banner {
  margin-top: 1.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--accent);
  display: none;
}

.cake-wish-banner.active {
  display: block;
}

/* Reply Actions */
.reply-card {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  text-align: center;
  margin-top: 3rem;
}

.reply-title {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.reply-sub {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.reply-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-wa {
  background: #25d366;
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}

.btn-ig {
  background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
  color: #fff;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}

.btn-wa:hover, .btn-ig:hover {
  transform: translateY(-2px);
}

footer {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid rgba(217, 119, 6, 0.2);
  margin-top: 3rem;
}

@media (max-width: 768px) {
  .masthead-title { font-size: 2.4rem; }
  .hero-title { font-size: 2.4rem; }
  .section-title { font-size: 1.8rem; }
  .letter-card { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  .masthead-title { font-size: 1.8rem; }
  .hero-title { font-size: 1.9rem; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
}
