/* ====================================================================
   Template: t50-father-golden-heritage (Golden Heritage & Roots)
   Responsive Mobile, Tablet & Desktop CSS
   ==================================================================== */

:root {
  --primary: #b45309;
  --accent: #f59e0b;
  --bg: #140b02;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-border: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --font-h: 'Cinzel', serif, sans-serif;
  --font-b: 'Outfit', sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

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

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

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: floatOrb 12s ease-in-out infinite alternate;
}

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

.orb-2 {
  width: 320px;
  height: 320px;
  background: var(--accent);
  bottom: 10%;
  right: -80px;
  animation-delay: -4s;
}

.orb-3 {
  width: 250px;
  height: 250px;
  background: var(--primary);
  top: 50%;
  left: 30%;
  opacity: 0.2;
  animation-delay: -7s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 40px) scale(1.15); }
}

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

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

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 0. Passcode Overlay */
.passcode-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.passcode-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.passcode-icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
}

.passcode-title {
  font-family: var(--font-h);
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 6px;
}

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

.passcode-dots-wrapper {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 24px;
}

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

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

.passcode-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 260px;
  margin: 0 auto;
}

.keypad-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 1.3rem;
  font-weight: 600;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.keypad-btn:active {
  transform: scale(0.92);
  background: var(--primary);
  color: #fff;
}

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

.passcode-error-msg {
  color: #f43f5e;
  font-size: 0.85rem;
  margin-top: 14px;
  min-height: 20px;
}

/* 1. Unboxing Overlay */
.unboxing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.unboxing-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 24px;
}

.gift-box-container {
  width: 140px;
  height: 140px;
  position: relative;
  cursor: pointer;
  margin-bottom: 24px;
  transition: transform 0.3s ease;
}

.gift-box-container:hover {
  transform: scale(1.08);
}

.gift-box-3d {
  width: 100%;
  height: 100%;
  position: relative;
}

.box-lid {
  width: 140px;
  height: 34px;
  background: var(--primary);
  border-radius: 8px;
  position: relative;
  box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.box-body {
  width: 120px;
  height: 90px;
  background: var(--accent);
  margin: 0 auto;
  border-radius: 0 0 10px 10px;
  position: relative;
  box-shadow: 0 12px 24px rgba(0,0,0,0.5);
}

.box-ribbon-v {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  background: #fff;
  opacity: 0.85;
}

.box-ribbon-h {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  background: #fff;
  opacity: 0.85;
}

.box-bow {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 20px;
}

.bow-center {
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  margin: 4px auto 0;
}

.unboxing-title {
  font-family: var(--font-h);
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 8px;
}

.unboxing-sub {
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 24px;
}

.btn-open-gift {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: all 0.3s ease;
}

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

/* Floating Navigation */
.floating-nav {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  gap: 10px;
}

.nav-pill-btn {
  background: rgba(20, 20, 30, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--surface-border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.nav-pill-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

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

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

.music-bar:nth-child(2) { animation-delay: 0.2s; }
.music-bar:nth-child(3) { animation-delay: 0.4s; }

@keyframes barBounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Site Wrapper & Hero */
.site-wrapper {
  position: relative;
  z-index: 2;
  padding-bottom: 60px;
}

.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 0 60px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--surface-border);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-h);
  font-size: 3.4rem;
  line-height: 1.15;
  margin-bottom: 18px;
}

.title-glow {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

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

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--surface-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 70px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-h);
  font-size: 2.2rem;
  color: var(--text);
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
}

/* Letter Section */
.letter-card-wrapper {
  max-width: 680px;
  margin: 0 auto;
}

.letter-paper {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  position: relative;
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--surface-border);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.letter-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.letter-stamp {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.letter-salutation {
  font-family: var(--font-h);
  font-size: 1.6rem;
  color: var(--accent);
  margin-bottom: 18px;
}

.letter-body p {
  color: #e2e8f0;
  font-size: 1.05rem;
  margin-bottom: 16px;
  line-height: 1.75;
}

.letter-postscript {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 24px;
  font-style: italic;
  color: var(--text-muted);
}

.letter-footer {
  margin-top: 32px;
  text-align: right;
}

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

.letter-signature {
  font-family: var(--font-h);
  font-size: 1.4rem;
  color: var(--primary);
  margin-top: 4px;
}

/* Cake Section */
.cake-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0;
}

.cake-wrapper {
  cursor: pointer;
  position: relative;
  width: 180px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.candles-row {
  display: flex;
  gap: 22px;
  margin-bottom: 6px;
}

.candle {
  width: 10px;
  height: 34px;
  background: repeating-linear-gradient(45deg, var(--accent), var(--accent) 4px, #fff 4px, #fff 8px);
  border-radius: 4px;
  position: relative;
}

.flame {
  width: 14px;
  height: 18px;
  background: radial-gradient(circle, #fef08a 0%, #f97316 60%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  position: absolute;
  top: -18px;
  left: -2px;
  animation: flicker 0.6s infinite alternate;
  transition: opacity 0.4s ease;
}

.smoke {
  position: absolute;
  top: -24px;
  left: 3px;
  width: 4px;
  height: 14px;
  background: #cbd5e1;
  opacity: 0;
  border-radius: 50%;
  transition: opacity 0.5s ease;
}

.candle.blown .flame {
  opacity: 0;
}

.candle.blown .smoke {
  opacity: 0.7;
  animation: riseSmoke 1.2s forwards;
}

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

@keyframes riseSmoke {
  0% { transform: translateY(0) scale(1); opacity: 0.7; }
  100% { transform: translateY(-20px) scale(2); opacity: 0; }
}

.cake-tier {
  border-radius: 8px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.tier-top {
  width: 120px;
  height: 40px;
}

.tier-bottom {
  width: 160px;
  height: 50px;
  margin-top: -6px;
}

.cake-plate {
  width: 190px;
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  margin-top: -4px;
}

.btn-blow-candles {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--surface-border);
  color: var(--text);
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  transition: all 0.25s ease;
}

.btn-blow-candles:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.cake-wish-banner {
  display: none;
  max-width: 520px;
  margin: 20px auto 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  animation: fadeIn 0.6s ease forwards;
}

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

/* Memories Grid */
.memories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.memory-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.memory-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.memory-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.memory-title {
  font-family: var(--font-h);
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text);
}

.memory-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.quote-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 28px;
  position: relative;
}

.quote-icon {
  font-size: 2.4rem;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 8px;
}

.quote-text {
  color: #e2e8f0;
  font-size: 1rem;
  margin-bottom: 14px;
  font-style: italic;
}

.quote-author {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* CTA Section */
.cta-section {
  padding: 40px 0;
}

.cta-box {
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.cta-box h2 {
  font-family: var(--font-h);
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 10px;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.reply-buttons-wrapper {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-whatsapp, .btn-instagram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.btn-instagram {
  background: #e1306c;
  color: #fff;
}

.btn-instagram:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(225, 48, 108, 0.4);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--surface-border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.love-icon {
  color: #f43f5e;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .letter-paper {
    padding: 30px 20px;
  }
  .passcode-card {
    padding: 24px 18px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .cta-box {
    padding: 30px 18px;
  }
}
