/* ── Clarity — Custom Styles & Animations ─────────────────────────────────── */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body { font-family: 'Inter', system-ui, sans-serif; }

/* ── Scroll animations ────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Keyframe animations ──────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(129,140,248,0.3); }
  50%      { box-shadow: 0 0 40px rgba(129,140,248,0.6); }
}
@keyframes heatmap-fill {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes bounce-in {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.05); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

/* ── Utility classes ──────────────────────────────────────────────────────── */
.animate-fade-in-up { animation: fadeInUp 0.6s ease both; }
.animate-fade-in    { animation: fadeIn 0.5s ease both; }
.animate-scale-in   { animation: scaleIn 0.4s ease both; }
.animate-float      { animation: float 3s ease-in-out infinite; }
.animate-pulse-soft { animation: pulse 2s ease-in-out infinite; }
.animate-glow       { animation: glow 2s ease-in-out infinite; }
.animate-bounce-in  { animation: bounce-in 0.5s ease both; }

/* ── Mood colors ──────────────────────────────────────────────────────────── */
.mood-1 { --mood-color: #ef4444; } /* red */
.mood-2 { --mood-color: #f97316; } /* orange */
.mood-3 { --mood-color: #eab308; } /* yellow */
.mood-4 { --mood-color: #22c55e; } /* green */
.mood-5 { --mood-color: #8b5cf6; } /* purple */

/* ── Heatmap tile ─────────────────────────────────────────────────────────── */
.heatmap-tile {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.heatmap-tile:hover {
  transform: scale(1.6);
  box-shadow: 0 0 8px var(--mood-color, rgba(0,0,0,0.2));
  z-index: 10;
}

/* ── Floating orbs (hero background) ──────────────────────────────────────── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
}
.orb-1 {
  width: 400px; height: 400px;
  background: #818cf8;
  top: -100px; left: -100px;
  animation: float 8s ease-in-out infinite;
}
.orb-2 {
  width: 300px; height: 300px;
  background: #c084fc;
  bottom: -50px; right: -50px;
  animation: float 6s ease-in-out infinite reverse;
}
.orb-3 {
  width: 200px; height: 200px;
  background: #f0abfc;
  top: 50%; left: 60%;
  animation: float 10s ease-in-out infinite 2s;
}

/* ── Glass card ───────────────────────────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.3);
}
.dark .glass {
  background: rgba(30,30,40,0.7);
  border-color: rgba(255,255,255,0.08);
}

/* ── Mood selector ────────────────────────────────────────────────────────── */
.mood-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.mood-btn:hover {
  transform: scale(1.15);
}
.mood-btn.active {
  transform: scale(1.2);
  box-shadow: 0 0 24px var(--mood-color);
}

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(129,140,248,0.3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(129,140,248,0.5); }

/* ── Dark mode overrides ──────────────────────────────────────────────────── */
.dark body { background: #0f0f14; color: #e5e7eb; }
.dark .orb { opacity: 0.2; }

/* ── Pro badge shimmer ────────────────────────────────────────────────────── */
.pro-badge {
  background: linear-gradient(135deg, #818cf8, #c084fc, #f0abfc);
  color: white;
  font-weight: 600;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}
.pro-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: pro-sweep 3s ease-in-out infinite;
}
@keyframes pro-sweep {
  0%        { left: -100%; }
  50%, 100% { left: 100%; }
}

/* ── Accessibility: reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .orb { animation: none; }
}
