:root {
  --rose:       #c0143c;
  --rose-mid:   #e0365a;
  --rose-light: #f48fb1;
  --gold:       #d4a853;
  --white:      #ffffff;
  --font-display: 'Cinzel', serif;
  --font-serif:   'Cormorant Garamond', serif;
  --font-sans:    'Lato', sans-serif;
  --ease-expo:    cubic-bezier(0.16, 1, 0.3, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #02000a; overflow: hidden; }

#final-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

/* Moon */
#moon-btn {
  position: fixed; top: 1.2rem; right: 1.6rem;
  z-index: 50; font-size: 1.3rem;
  opacity: 0.14; cursor: pointer;
  transition: opacity 0.4s, transform 0.3s;
  user-select: none;
}
#moon-btn:hover { opacity: 0.55; transform: scale(1.2); }
#moon-btn.lit   { opacity: 1; animation: moon-glow 1.2s ease-in-out infinite; }

#moon-progress {
  position: fixed; top: 3rem; right: 1.6rem;
  z-index: 50; width: 24px; height: 2px;
  background: rgba(255,255,255,0.08);
  opacity: 0; transition: opacity 0.4s;
}
#moon-progress.show { opacity: 1; }
#moon-fill {
  height: 100%; width: 0%;
  background: var(--gold);
  transition: width 0.3s var(--ease-expo);
}

/* Main content */
#final-content {
  position: fixed; inset: 0;
  z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0; transition: opacity 2s var(--ease-expo);
}
#final-content.visible { opacity: 1; }

.f-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.56rem; font-weight: 300;
  letter-spacing: 0.45em; text-transform: uppercase;
  color: var(--rose-mid); margin-bottom: 0.5rem;
  opacity: 0; animation: rise 1s var(--ease-expo) 0.2s forwards;
}
.f-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300; letter-spacing: 0.14em;
  color: var(--white);
  text-shadow: 0 0 80px rgba(192,20,60,0.5), 0 0 160px rgba(192,20,60,0.2);
  margin-bottom: 1.2rem;
  opacity: 0; animation: rise 1.2s var(--ease-expo) 0.5s forwards;
}

.f-messages {
  text-align: center; margin-top: 0.8rem;
}
.f-line {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.2vw, 1.55rem);
  font-style: italic; color: rgba(255,255,255,0.72);
  line-height: 2.0;
  opacity: 0;
  animation: rise 1s var(--ease-expo) calc(1.2s + var(--i) * 0.55s) forwards;
}
.f-gap { margin-top: 0.8rem; }
.f-sign {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-style: italic; color: var(--rose-light);
  margin-top: 0.4rem;
  opacity: 0;
  animation: rise 1.2s var(--ease-expo) calc(1.2s + 3 * 0.55s) forwards;
}

/* Nav — fixed at bottom, never overlaps content */
#final-nav {
  position: fixed; bottom: 1.8rem; left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  opacity: 0; transition: opacity 1s ease 0.5s;
}
#final-nav.visible { opacity: 1; }

.ch-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-sans); font-size: 0.65rem;
  font-weight: 300; letter-spacing: 0.28em; text-transform: uppercase;
  text-decoration: none; color: var(--white);
  border: 1px solid rgba(255,255,255,0.18);
  position: relative; overflow: hidden;
  white-space: nowrap; transition: border-color 0.4s;
}
.ch-btn::before {
  content: ''; position: absolute; inset: 0;
  background: var(--rose); transform: translateX(-101%);
  transition: transform 0.5s var(--ease-expo);
}
.ch-btn:hover::before { transform: translateX(0); }
.ch-btn:hover { border-color: var(--rose); }
.ch-btn span, .ch-btn svg { position: relative; z-index: 1; }
.ch-btn--next { border-color: rgba(192,20,60,0.4); }

/* Secret overlay */
#secret-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.82); backdrop-filter: blur(16px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.6s;
}
#secret-overlay.show { opacity: 1; pointer-events: auto; }

.secret-card {
  width: min(400px, 88vw); padding: 2.8rem 2.2rem 2.2rem;
  background: rgba(6,0,14,0.96);
  border: 1px solid rgba(212,168,83,0.3);
  text-align: center; position: relative;
  animation: paper-open 0.7s var(--ease-expo) both;
}
.secret-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), rgba(255,220,150,0.9), var(--gold), transparent);
}
#secret-star-canvas { margin: 0 auto 1rem; display: block; }
.secret-label {
  font-family: var(--font-sans); font-size: 0.54rem;
  letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 0.6rem;
}
.secret-title {
  font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 300; letter-spacing: 0.08em; color: var(--white); margin-bottom: 0.6rem;
}
.secret-desc {
  font-family: var(--font-serif); font-size: 1rem;
  font-style: italic; color: rgba(255,255,255,0.4); margin-bottom: 1.8rem;
}
#secret-close {
  display: block; margin: 1rem auto 0;
  background: none; border: none;
  font-family: var(--font-sans); font-size: 0.52rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.18); cursor: pointer;
  transition: color 0.3s;
}
#secret-close:hover { color: rgba(255,255,255,0.5); }

@keyframes rise       { from{opacity:0;transform:translateY(18px);} to{opacity:1;transform:translateY(0);} }
@keyframes moon-glow  { 0%,100%{filter:drop-shadow(0 0 6px #d4a853);} 50%{filter:drop-shadow(0 0 18px #d4a853);} }
@keyframes paper-open { from{opacity:0;transform:scale(0.9) translateY(16px);} to{opacity:1;transform:scale(1) translateY(0);} }
@keyframes confetti-drop {
  0%   { opacity:1; transform:translate(0,0) rotate(var(--cr)); }
  100% { opacity:0; transform:translate(var(--cx),calc(var(--cy) + 300px)) rotate(calc(var(--cr)+540deg)); }
}

@media (max-width: 700px) {
  .f-title { font-size: clamp(2.4rem, 10vw, 3.5rem); }
  .f-line  { font-size: clamp(0.95rem, 4vw, 1.2rem); }
  .f-sign  { font-size: clamp(1.2rem, 5vw, 1.6rem); }
  #final-nav { bottom: 1rem; }
  .ch-btn { padding: 0.75rem 1.4rem; font-size: 0.6rem; }
}
