/* =============================================
   Bible Reminder — style.css
   Aesthetic: Warm devotional — gold, cream, deep navy
   Fonts: Cormorant Garamond (body) + Cinzel (display)
   ============================================= */

/* ---------- RESET & VARIABLES ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0d1b2a;
  --navy-mid: #162032;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim: rgba(201, 168, 76, 0.15);
  --gold-glow: rgba(201, 168, 76, 0.35);
  --cream: #fdf6e3;
  --cream-dim: rgba(253, 246, 227, 0.85);
  --text-muted: rgba(253, 246, 227, 0.5);
  --rose: #c97a7a;

  --font-display: "Cinzel", serif;
  --font-body: "Cormorant Garamond", serif;
  --font-sans: "Lato", sans-serif;

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html,
body {
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--cream);
  min-height: 100vh;
}

/* ---------- CANVAS LAYERS ---------- */
#particles,
#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

#confetti-canvas {
  z-index: 100;
}

/* ---------- RADIAL BACKGROUND GLOW ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 70% 60% at 50% 30%,
      rgba(201, 168, 76, 0.08) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 50% 40% at 20% 80%,
      rgba(100, 60, 150, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
      ellipse 40% 50% at 80% 70%,
      rgba(60, 90, 150, 0.1) 0%,
      transparent 60%
    );
  pointer-events: none;
  z-index: 0;
}

/* ---------- PAGE LAYOUT ---------- */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 24px 36px;
  text-align: center;
}

/* ---------- GREETING ---------- */
.greeting {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  animation: fadeDown 0.8s ease 0.3s both;
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- CROSS ---------- */
.cross-wrap {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  opacity: 0;
  animation: fadeIn 1s ease 0.6s both;
  transition: transform 0.3s var(--ease-spring);
}

.cross-wrap:hover {
  transform: scale(1.12);
}
.cross-wrap:active {
  transform: scale(0.95);
}

.cross {
  position: relative;
  width: 44px;
  height: 56px;
}

.cross__v {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: 8px;
  height: 100%;
  background: linear-gradient(to bottom, var(--gold-light), var(--gold));
  border-radius: 3px;
  box-shadow: 0 0 12px var(--gold-glow);
}

.cross__h {
  position: absolute;
  left: 0;
  top: 28%;
  width: 100%;
  height: 8px;
  background: linear-gradient(to right, var(--gold-light), var(--gold));
  border-radius: 3px;
  box-shadow: 0 0 12px var(--gold-glow);
}

.cross-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  animation: pulseGlow 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulseGlow {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Cross ring animation on click */
.cross-wrap.ring::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  animation: ringOut 0.6s ease forwards;
}

@keyframes ringOut {
  from {
    opacity: 1;
    transform: scale(0.8);
  }
  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

/* ---------- MAIN MESSAGE ---------- */
.message-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 80px;
}

.message {
  font-family: var(--font-display);
  font-size: clamp(24px, 5.5vw, 52px);
  font-weight: 600;
  color: var(--cream);
  line-height: 1.25;
  letter-spacing: 1px;
  text-shadow: 0 0 40px var(--gold-glow);
  max-width: 780px;
}

/* Highlight "Precious!" in gold */
.message .precious {
  color: var(--gold-light);
  font-style: italic;
}

.cursor {
  font-family: var(--font-display);
  font-size: clamp(24px, 5.5vw, 52px);
  color: var(--gold);
  animation: blink 0.9s step-end infinite;
  line-height: 1;
}

.cursor.hidden {
  display: none;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ---------- SUBTITLE ---------- */
.subtitle {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.5vw, 22px);
  font-style: italic;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  min-height: 28px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.subtitle.visible {
  opacity: 1;
}

/* ---------- VERSE CARD ---------- */
.verse-card {
  background: linear-gradient(
    135deg,
    rgba(201, 168, 76, 0.08),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 18px;
  padding: 24px 32px 20px;
  max-width: 560px;
  width: 100%;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  position: relative;
  overflow: hidden;
}

.verse-card::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: 12px;
  font-family: var(--font-body);
  font-size: 100px;
  color: var(--gold-dim);
  line-height: 1;
  pointer-events: none;
}

.verse-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.verse-text {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.2vw, 20px);
  font-style: italic;
  line-height: 1.75;
  color: var(--cream-dim);
  margin-bottom: 12px;
  transition: opacity 0.4s ease;
}

.verse-ref {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}

.verse-text.fade,
.verse-ref.fade {
  opacity: 0;
}

/* Verse progress bar */
.verse-progress {
  margin-top: 16px;
  height: 2px;
  background: rgba(201, 168, 76, 0.15);
  border-radius: 100px;
  overflow: hidden;
}

.verse-progress__fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold), var(--gold-light));
  border-radius: 100px;
  width: 0%;
  transition: width 0.1s linear;
}

/* ---------- BLESSING BUTTON ---------- */
.btn-blessing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2.5px;
  color: var(--gold);
  cursor: pointer;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.2s var(--ease-spring),
    box-shadow 0.3s ease;
  opacity: 0;
  animation: fadeIn 1s ease 2.5s both;
}

.btn-blessing:hover {
  background: var(--gold-dim);
  box-shadow: 0 0 24px var(--gold-glow);
  transform: translateY(-3px);
}

.btn-blessing:active {
  transform: scale(0.96);
}

.btn-blessing__icon {
  font-size: 12px;
  animation: rotateStar 4s linear infinite;
}

@keyframes rotateStar {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ---------- BLESSING TOAST ---------- */
.blessing-toast {
  background: linear-gradient(135deg, var(--navy-mid), rgba(201, 168, 76, 0.1));
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 14px;
  padding: 16px 24px;
  max-width: 480px;
  font-family: var(--font-body);
  font-size: clamp(15px, 2vw, 18px);
  font-style: italic;
  color: var(--cream-dim);
  text-align: center;
  line-height: 1.6;
  animation: fadeIn 0.4s ease both;
}

.blessing-toast.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- FOOTER ---------- */
.footer {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(253, 246, 227, 0.2);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 540px) {
  .page {
    gap: 22px;
    padding: 36px 20px 60px;
  }
  .verse-card {
    padding: 20px 20px 16px;
  }
  .btn-blessing {
    padding: 12px 24px;
    font-size: 12px;
  }
}
