/* ==========================================================================
   T-FATHER-GUIDING-STAR: THE GUIDING STAR — FATHER'S WISDOM
   ========================================================================== */
:root {
  --bg-deep: #060b19;
  --bg-card: rgba(11, 21, 45, 0.78);
  --bg-card-hover: rgba(18, 32, 68, 0.9);
  --primary-gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.4);
  --cyan-nebula: #38bdf8;
  --cyan-glow: rgba(56, 189, 248, 0.35);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-theme: rgba(245, 158, 11, 0.22);
  --border-cyan: rgba(56, 189, 248, 0.25);
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
}

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

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

/* Background Star & Particle Canvas */
#star-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

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

/* Floating Audio Control */
.audio-ctrl {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 50;
}

.audio-btn {
  background: rgba(11, 21, 45, 0.85);
  color: var(--primary-gold);
  border: 1px solid var(--border-theme);
  padding: 0.6rem 1.1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.audio-btn:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--primary-gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--gold-glow);
}

/* Passcode Modal Screen */
.passcode-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 18, 0.94);
  backdrop-filter: blur(16px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.passcode-card {
  background: linear-gradient(145deg, rgba(16, 28, 58, 0.9), rgba(8, 14, 30, 0.95));
  border: 1px solid var(--border-theme);
  border-radius: 1.5rem;
  padding: 2.25rem 1.75rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 35px var(--gold-glow);
}

.passcode-icon {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 12px var(--primary-gold));
  animation: pulse-slow 3s infinite ease-in-out;
}

.passcode-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--primary-gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

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

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

.pin-row {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--primary-gold);
  background: transparent;
  transition: all 0.2s ease;
}

.pin-dot.filled {
  background: var(--primary-gold);
  box-shadow: 0 0 12px var(--primary-gold);
  transform: scale(1.15);
}

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

.key-btn {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 0.85rem;
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.8rem 0;
  cursor: pointer;
  transition: all 0.18s ease;
}

.key-btn:hover, .key-btn:active {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--primary-gold);
  color: var(--primary-gold);
  transform: scale(1.05);
}

.key-hint {
  margin-top: 1.25rem;
  font-size: 0.8rem;
  color: var(--cyan-nebula);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Main Container */
.main-wrapper {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--border-theme);
  color: var(--primary-gold);
  font-family: var(--font-serif);
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  padding: 0.45rem 1.1rem;
  border-radius: 9999px;
  margin-bottom: 1.25rem;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}

.hero-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  color: #fff;
}

.hero-heading span {
  display: block;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 18px var(--gold-glow));
}

.hero-desc {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--text-muted);
  font-weight: 400;
}

/* Interactive Astrolabe / Compass Stage */
.astrolabe-stage {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.astrolabe-stage:hover {
  transform: scale(1.06);
}

.astrolabe-ring-outer {
  position: absolute;
  inset: 0;
  border: 2px dashed rgba(245, 158, 11, 0.45);
  border-radius: 50%;
  animation: rotate-clockwise 24s linear infinite;
}

.astrolabe-ring-inner {
  position: absolute;
  inset: 16px;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 50%;
  animation: rotate-counter 16s linear infinite;
}

.astrolabe-core {
  position: relative;
  z-index: 2;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28) 0%, rgba(11, 21, 45, 0.95) 70%);
  border: 2px solid var(--primary-gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px var(--gold-glow), inset 0 0 15px rgba(245, 158, 11, 0.2);
}

.astrolabe-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px var(--primary-gold));
  transition: transform 0.4s ease;
}

.astrolabe-stage:hover .astrolabe-icon {
  transform: rotate(45deg);
}

.stage-caption {
  font-size: 0.84rem;
  color: var(--cyan-nebula);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 3.5rem;
}

/* Quotes Section */
.quotes-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 640px) {
  .quotes-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quote-box {
  background: var(--bg-card);
  border: 1px solid var(--border-theme);
  border-radius: 1.25rem;
  padding: 1.75rem;
  position: relative;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.quote-box::before {
  content: "“";
  position: absolute;
  top: 0.5rem;
  left: 1.2rem;
  font-size: 3.5rem;
  color: rgba(245, 158, 11, 0.2);
  font-family: var(--font-serif);
  line-height: 1;
}

.quote-text {
  font-size: 0.96rem;
  font-style: italic;
  color: #e2e8f0;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}

.quote-author {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: var(--primary-gold);
  letter-spacing: 0.05em;
}

/* Memories Timeline Grid */
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  text-align: center;
  color: var(--primary-gold);
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2.25rem;
}

.memories-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 4rem;
}

@media (min-width: 640px) {
  .memories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.memory-card {
  background: var(--bg-card);
  border: 1px solid var(--border-cyan);
  border-radius: 1.25rem;
  padding: 1.6rem;
  backdrop-filter: blur(10px);
  transition: all 0.28s ease;
  position: relative;
  overflow: hidden;
}

.memory-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.2);
}

.mem-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.mem-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.mem-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan-nebula);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.mem-era {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: var(--primary-gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.mem-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

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

/* Heartfelt Letter Article */
.letter-article {
  background: linear-gradient(170deg, rgba(14, 25, 54, 0.92) 0%, rgba(7, 13, 30, 0.96) 100%);
  border: 1.5px solid var(--border-theme);
  border-radius: 1.5rem;
  padding: clamp(1.75rem, 5vw, 3rem);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(245, 158, 11, 0.15);
  backdrop-filter: blur(14px);
  margin-bottom: 3.5rem;
  position: relative;
}

.letter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-theme);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.letter-date {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: var(--primary-gold);
}

.letter-badge {
  font-size: 0.75rem;
  color: var(--cyan-nebula);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.letter-salutation {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  color: #fff;
  margin-bottom: 1.5rem;
}

.letter-body p {
  font-size: clamp(0.96rem, 2.2vw, 1.05rem);
  color: #cbd5e1;
  margin-bottom: 1.25rem;
  line-height: 1.75;
}

.letter-ps {
  margin-top: 2rem;
  padding: 1.25rem;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid var(--primary-gold);
  border-radius: 0 0.75rem 0.75rem 0;
  font-size: 0.95rem;
  color: #fef08a;
  font-style: italic;
}

.letter-sig {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.sig-title {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.sig-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-gold);
}

/* Apology / Late Banner */
.apology-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(56, 189, 248, 0.1));
  border: 1px solid var(--border-theme);
  border-radius: 1.25rem;
  padding: 1.85rem 1.5rem;
  text-align: center;
  margin-bottom: 3.5rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.apology-badge {
  display: inline-block;
  background: var(--primary-gold);
  color: #060b19;
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.apology-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 3.2vw, 1.7rem);
  color: #fef08a;
  margin-bottom: 0.6rem;
}

.apology-subtext {
  color: #e2e8f0;
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Cake Blowout Section */
.cake-section {
  background: var(--bg-card);
  border: 1px solid var(--border-theme);
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-bottom: 3.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
}

.cake-stage {
  margin: 2.5rem auto 2rem;
  display: inline-block;
  cursor: pointer;
  position: relative;
}

.candles-row {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: -4px;
}

.candle {
  width: 14px;
  height: 48px;
  background: linear-gradient(to bottom, #fef08a, #f59e0b);
  border-radius: 6px 6px 0 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.flame {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 24px;
  background: radial-gradient(ellipse at bottom, #ffffff 0%, #fef08a 35%, #f97316 75%, transparent 100%);
  border-radius: 50% 50% 20% 20%;
  animation: flicker 1s infinite alternate ease-in-out;
  box-shadow: 0 0 16px #f59e0b, 0 0 30px #f97316;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.flame.blown-out {
  opacity: 0;
  transform: translateX(-50%) scale(0.2) translateY(-10px);
}

.cake-tier {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid var(--primary-gold);
  border-radius: 1rem 1rem 0.5rem 0.5rem;
  padding: 1.1rem 2.5rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-gold);
  letter-spacing: 0.1em;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px var(--gold-glow);
}

.blow-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #060b19;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 25px var(--gold-glow);
}

.blow-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.6);
}

.blow-btn.blown {
  background: #334155;
  color: #94a3b8;
  box-shadow: none;
  cursor: default;
}

/* Connect / CTA Section */
.cta-section {
  text-align: center;
  padding: 2rem 0;
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  color: #fff;
  margin-bottom: 0.5rem;
}

.cta-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.btn-wa {
  background: #25d366;
  color: #052310;
}

.btn-wa:hover {
  background: #20ba5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-ig {
  background: linear-gradient(135deg, #e1306c, #f77737);
  color: #fff;
}

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

/* Keyframe Animations */
@keyframes rotate-clockwise {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotate-counter {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px var(--primary-gold)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 20px var(--primary-gold)); }
}

@keyframes flicker {
  0% { transform: translateX(-50%) rotate(-1deg) scale(1); }
  50% { transform: translateX(-50%) rotate(2deg) scale(1.08); }
  100% { transform: translateX(-50%) rotate(-2deg) scale(0.96); }
}
