:root {
  /* Common */
  --emerald: #10b981;
  --emerald-dark: #059669;
  
  /* Pure Light Mode (Locked) */
  --bg: #ffffff;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(226, 232, 240, 0.8);
  --nav-bg: rgba(255, 255, 255, 0.95);
}

/* Base styles */
body {
  background-color: var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.glass, .cat-card, .feat-card, footer {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Utility classes to use theme variables */
.theme-bg { background-color: var(--bg); }
.theme-card { background-color: var(--card); border-color: var(--border); }
.theme-text { color: var(--text-main); }
.theme-muted { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   QR Studio — Shared Animation Library
   Applies across all pages for a consistent, premium motion experience.
═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. TOP PROGRESS LOADER ───────────────────────────────────────────────── */
#top-loader {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #34d399, #059669);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.8), 0 0 24px rgba(16, 185, 129, 0.4);
  z-index: 9999;
  border-radius: 0 2px 2px 0;
  transition: width 0.3s ease, opacity 0.4s ease;
  pointer-events: none;
}
#top-loader.running { opacity: 1; }
#top-loader.done    { opacity: 0; width: 100% !important; }

/* ── 2. PAGE TRANSITION OVERLAY ───────────────────────────────────────────── */
#page-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(16,185,129,0.2) 0%, #06100c 70%);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#page-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ── 3. PAGE ENTRANCE ANIMATION ───────────────────────────────────────────── */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-enter {
  animation: pageEnter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── 4. HERO TEXT REVEAL ──────────────────────────────────────────────────── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(30px) skewY(1deg); clip-path: inset(100% 0 0 0); }
  to   { opacity: 1; transform: translateY(0)    skewY(0deg); clip-path: inset(0% 0 0 0); }
}
.reveal-up {
  animation: revealUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.reveal-up-d1 { animation-delay: 0.1s; }
.reveal-up-d2 { animation-delay: 0.22s; }
.reveal-up-d3 { animation-delay: 0.35s; }
.reveal-up-d4 { animation-delay: 0.5s; }

/* ── 5. FLOATING ANIMATION ────────────────────────────────────────────────── */
@keyframes floatUpDown {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-12px) rotate(0.3deg); }
  66%       { transform: translateY(-6px)  rotate(-0.2deg); }
}
.float-anim {
  animation: floatUpDown 6s ease-in-out infinite;
  will-change: transform;
}

/* ── 6. BUTTON SPRING / BOUNCE CLICK EFFECT ──────────────────────────────── */
@keyframes springPress {
  0%   { transform: scale(1); }
  30%  { transform: scale(0.93); }
  60%  { transform: scale(1.05); }
  80%  { transform: scale(0.98); }
  100% { transform: scale(1); }
}
.btn-spring:active {
  animation: springPress 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 7. BUTTON HOVER ENHANCED GLOW ───────────────────────────────────────── */
.btn-glow {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              filter 0.3s ease !important;
}
.btn-glow:hover {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 0 35px rgba(16,185,129, 0.75), 0 0 90px rgba(5,150,105, 0.3) !important;
  filter: brightness(1.1);
}
.btn-glow:active {
  transform: scale(0.96) !important;
  box-shadow: 0 0 15px rgba(16,185,129, 0.5) !important;
}

/* ── 8. CARD HOVER LIFT + GLOW ────────────────────────────────────────────── */
.card-hover {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 16px 40px -8px rgba(16,185,129, 0.3),
              0 0 0 1px rgba(16,185,129, 0.2);
  border-color: rgba(16,185,129, 0.45) !important;
}

/* ── 9. QR PREVIEW FADE TRANSITION ───────────────────────────────────────── */
@keyframes qrFadeIn {
  from { opacity: 0; filter: blur(4px); transform: scale(0.97); }
  to   { opacity: 1; filter: blur(0px); transform: scale(1); }
}
.qr-fade {
  animation: qrFadeIn 0.25s ease-out both;
}

/* ── 10. GLOW SPINNER ────────────────────────────────────────────────────── */
@keyframes spinGlow {
  0%   { transform: rotate(0deg);   box-shadow: 0 0 10px rgba(16,185,129,0.5); }
  50%  { transform: rotate(180deg); box-shadow: 0 0 25px rgba(16,185,129,0.9); }
  100% { transform: rotate(360deg); box-shadow: 0 0 10px rgba(16,185,129,0.5); }
}
.spinner-glow {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(16,185,129, 0.2);
  border-top-color: #10b981;
  animation: spinGlow 0.8s linear infinite;
}

/* ── 11. NAVBAR SHRINK ON SCROLL ─────────────────────────────────────────── */
.navbar-scrolled {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
#navbar { transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1); }

/* ── 12. SMOOTH SECTION SCROLL HIGHLIGHT ─────────────────────────────────── */
@keyframes sectionPop {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129, 0); }
  50%  { box-shadow: 0 0 40px 4px rgba(16,185,129, 0.12); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129, 0); }
}

/* ── 13. STAGGER FADE FOR LISTS ──────────────────────────────────────────── */
@keyframes staggerFade {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.stagger-child {
  opacity: 0;
  animation: staggerFade 0.4s ease forwards;
}
.stagger-child:nth-child(1) { animation-delay: 0.05s; }
.stagger-child:nth-child(2) { animation-delay: 0.12s; }
.stagger-child:nth-child(3) { animation-delay: 0.19s; }
.stagger-child:nth-child(4) { animation-delay: 0.26s; }
.stagger-child:nth-child(5) { animation-delay: 0.33s; }
.stagger-child:nth-child(6) { animation-delay: 0.40s; }

/* ── 14. MODAL / TOAST ENTRANCE ─────────────────────────────────────────── */
@keyframes slideUpFade {
  from { opacity:0; transform: translateY(20px) scale(0.96); }
  to   { opacity:1; transform: translateY(0)    scale(1); }
}
.slide-up-fade { animation: slideUpFade 0.4s cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ── 15. RIPPLE CLICK EFFECT ─────────────────────────────────────────────── */
.ripple-container { position: relative; overflow: hidden; }
.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: scale(0);
  animation: ripple 0.55s linear;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}
