/* ============================================================================
   GOC Bible Study — 2026 Design System
   Motion, glass, gradients, and micro-interactions layered on top of Tailwind.
   ============================================================================ */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* ---- Reduced motion respect ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Header glass effect --------------------------------------------------- */
.glass-header {
  background: linear-gradient(180deg, rgba(10, 26, 60, 0.97), rgba(10, 26, 60, 0.9));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 4px 24px rgba(10, 26, 60, 0.18);
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #d4af37, #e6cb6b);
  transition: width 0.3s ease;
  border-radius: 2px;
}
.nav-link:hover::after {
  width: 100%;
}

/* ---- Flashcard 3D flip ------------------------------------------------------ */
#flashcard-inner {
  transform-style: preserve-3d;
}

#card-back {
  scrollbar-width: thin;
}
#card-back::-webkit-scrollbar {
  width: 6px;
}
#card-back::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 3px;
}

#reading-pane sup {
  user-select: none;
}

.font-display {
  letter-spacing: 0.01em;
}

/* ---- Floating WhatsApp button ----------------------------------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
#whatsapp-float {
  animation: float 3s ease-in-out infinite;
}

/* ---- 2026 motion keyframes --------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(20px, -30px) scale(1.08); }
  66%      { transform: translate(-15px, 15px) scale(0.95); }
}
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
  50%      { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
}
@keyframes gentleBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(0.6) translateY(10px); }
  70%  { opacity: 1; transform: scale(1.05) translateY(-2px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- Scroll-reveal utility (JS toggles .revealed on intersect) ------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.fade-in {
  animation: fadeIn 0.6s ease-out both;
}

/* ---- Hero animated gradient blobs -------------------------------------------- */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: blob 12s ease-in-out infinite;
  pointer-events: none;
}

/* ---- Buttons: shine sweep on hover -------------------------------------------- */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  z-index: 1;
}
.btn-shine:hover::before {
  left: 125%;
}

/* ---- Card hover lift ------------------------------------------------------------ */
.hover-lift {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(10, 26, 60, 0.25);
}

/* ---- Stat card gentle bounce on load ------------------------------------------- */
.stat-card {
  animation: popIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---- Selected option state (roadmap wizard) ------------------------------------ */
.selected-option {
  border-color: #d4af37 !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.15);
}

/* ---- View toggle active pill ---------------------------------------------------- */
.view-toggle-btn {
  background: #f1f5f9;
  color: #64748b;
}
.active-view {
  background: #0a1a3c !important;
  color: white !important;
}

/* ---- Toast notifications --------------------------------------------------------- */
.goc-toast {
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.goc-toast-show {
  transform: translateX(0);
  opacity: 1;
}
.goc-toast-hide {
  transform: translateX(120%);
  opacity: 0;
}

/* ---- Quest / badge cards -------------------------------------------------------- */
.quest-card, .badge-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}
.quest-card:hover, .badge-card:hover {
  transform: translateY(-4px);
}

/* ---- Skeleton shimmer loading state ---------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, #eef1f6 25%, #f8f9fb 37%, #eef1f6 63%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
}

/* ---- Pulse glow ring for CTA emphasis -------------------------------------------- */
.pulse-glow {
  animation: pulseGlow 2.4s ease-in-out infinite;
}

/* ---- Gentle floating icon accents ------------------------------------------------ */
.float-icon {
  animation: gentleBounce 3.2s ease-in-out infinite;
}

/* ---- Marquee for translation strip (optional decorative motion) ----------------- */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-wrap:hover .marquee-track {
  animation-play-state: paused;
}

/* ---- Mobile menu smooth open ------------------------------------------------------ */
#mobile-menu {
  transition: max-height 0.3s ease;
}

/* ---- Progress bar shine sweep ----------------------------------------------------- */
.progress-shine {
  position: relative;
  overflow: hidden;
}
.progress-shine::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shimmer 2s linear infinite;
}

/* =====================================================================================
   SPIRITUAL MOTION SYSTEM — used sparingly ("where professionally necessary") for
   dove / cross / Jesus imagery. Distinct from the generic icon/CTA motion above:
   slower, quieter, more reverent easing — never distracting from Scripture text.
   ===================================================================================== */

/* ---- Dove glide: a slow, wide, gentle drifting flight path ------------------------- */
@keyframes doveGlide {
  0%   { transform: translate(0, 0) rotate(-2deg); }
  25%  { transform: translate(14px, -18px) rotate(1deg); }
  50%  { transform: translate(0, -28px) rotate(-1deg); }
  75%  { transform: translate(-14px, -12px) rotate(2deg); }
  100% { transform: translate(0, 0) rotate(-2deg); }
}
.dove-glide {
  animation: doveGlide 9s ease-in-out infinite;
  filter: drop-shadow(0 8px 16px rgba(10, 26, 60, 0.25));
}
.dove-glide-slow {
  animation: doveGlide 13s ease-in-out infinite;
}

/* ---- Soft halo / glow pulse for cross & Jesus imagery ------------------------------- */
@keyframes haloGlow {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50%      { opacity: 0.6;  transform: scale(1.08); }
}
.halo-glow {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.55) 0%, rgba(212, 175, 55, 0) 70%);
  animation: haloGlow 6s ease-in-out infinite;
  pointer-events: none;
}

/* ---- Reverent fade-in for sacred imagery (slower, softer than fade-in-up) ---------- */
@keyframes reverentFade {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}
.reverent-fade {
  animation: reverentFade 1.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ---- Light-ray sweep behind Jesus imagery (subtle, slow diagonal shimmer) ---------- */
@keyframes lightRay {
  0%   { transform: translateX(-30%) rotate(15deg); opacity: 0.12; }
  50%  { transform: translateX(10%) rotate(15deg); opacity: 0.22; }
  100% { transform: translateX(-30%) rotate(15deg); opacity: 0.12; }
}
.light-ray {
  position: absolute;
  top: -20%;
  width: 60%;
  height: 140%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
  animation: lightRay 8s ease-in-out infinite;
  pointer-events: none;
}

/* ---- Cross line-draw: crossbar/upright "written on the heart" reveal --------------- */
.cross-mark {
  display: inline-block;
  color: #d4af37;
}
.cross-mark.reveal.revealed {
  animation: popIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ---- Frame treatment for the Good Shepherd / Jesus portrait ------------------------ */
.sacred-frame {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(10, 26, 60, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.3);
}
.sacred-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  box-shadow: inset 0 0 60px 10px rgba(10, 26, 60, 0.5);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .dove-glide, .dove-glide-slow, .halo-glow, .light-ray {
    animation: none !important;
  }
}
