/* =========================================================
   EarnWise — custom styles layered on top of Tailwind CDN
   ========================================================= */

:root {
  --primary: #4F46E5;
  --secondary: #06B6D4;
  --accent: #22C55E;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body { background: var(--tw-color-bg, #F8FAFC); }

/* ---------------- Focus visibility ---------------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------------- Loader ---------------- */
.loader-ring {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 4px solid #E2E8F0;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Cursor glow ---------------- */
.cursor-glow {
  position: fixed;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,70,229,0.08) 0%, rgba(6,182,212,0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  left: -400px; top: -400px;
  transition: left 0.12s ease-out, top 0.12s ease-out;
}

/* ---------------- Header ---------------- */
#siteHeader { background: transparent; }
#siteHeader.scrolled {
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px -12px rgba(15, 23, 42, 0.1);
}
.nav-link { color: #475569; transition: all .25s ease; }
.nav-link:hover { color: var(--primary); background: rgba(79,70,229,0.08); }
.mobile-link { color: #334155; transition: background .2s ease; }
.mobile-link:hover { background: rgba(79,70,229,0.06); color: var(--primary); }

/* ---------------- Background blobs ---------------- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}
.blob-1 { width: 420px; height: 420px; background: var(--primary); top: -120px; left: -140px; animation: drift 14s ease-in-out infinite; }
.blob-2 { width: 340px; height: 340px; background: var(--secondary); top: 60px; right: -120px; animation: drift 16s ease-in-out infinite reverse; }
.blob-3 { width: 260px; height: 260px; background: var(--accent); bottom: -80px; left: 30%; opacity: 0.2; animation: drift 18s ease-in-out infinite; }
.blob-cta { width: 500px; height: 500px; background: white; top: -200px; right: -160px; opacity: 0.08; }
@keyframes drift {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(30px,-20px) scale(1.08); }
}

/* ---------------- Glass ---------------- */
.glass-panel {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 20px 60px -20px rgba(79,70,229,0.25);
}
.glass-card {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.5);
}

/* ---------------- Phone mockup ---------------- */
.phone-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 310 / 620;
  background: linear-gradient(155deg, #0f172a, #1e293b);
  border-radius: 44px;
  padding: 14px;
  box-shadow: 0 40px 80px -25px rgba(79,70,229,0.45), 0 0 0 2px rgba(255,255,255,0.06) inset;
}
.phone-notch {
  position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #0f172a;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone-screen {
  position: relative;
  height: 100%;
  background: linear-gradient(180deg, #ffffff, #F8FAFC);
  border-radius: 32px;
 
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-screen img { width: 100%; height: 100%; object-fit: contain; }
.phone-float { animation: floaty 5s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(1deg); }
}

.ring-progress { animation: ringFill 1.6s ease-out forwards .3s; }
@keyframes ringFill { to { stroke-dashoffset: 49; } }

.notif-pop { animation: notifIn .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes notifIn {
  from { opacity: 0; transform: translateY(12px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.floating-coin {
  position: absolute;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-size: 16px;
  background: linear-gradient(135deg, var(--accent), #16a34a);
  box-shadow: 0 12px 24px -8px rgba(34,197,94,0.5);
}
.coin-1 { top: 8%; left: -8%; background: linear-gradient(135deg, #FBBF24, #F59E0B); animation: coinFloat 4s ease-in-out infinite; }
.coin-2 { bottom: 20%; right: -10%; animation: coinFloat 5s ease-in-out infinite .5s; }
.coin-3 { top: 45%; right: -14%; background: linear-gradient(135deg, var(--secondary), #0891b2); animation: coinFloat 4.5s ease-in-out infinite 1s; }
@keyframes coinFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

/* ---------------- Buttons / ripple ---------------- */
.btn-ripple { -webkit-tap-highlight-color: transparent; }
.ripple-el {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  transform: scale(0);
  animation: rippleAnim .6s linear;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(3); opacity: 0; } }

/* ---------------- Section headers ---------------- */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(79,70,229,0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ---------------- Stat items ---------------- */
.stat-item { transition: transform .3s ease; }
.stat-item:hover { transform: translateY(-4px); }

/* ---------------- Feature bento cards ---------------- */
.feature-card {
  background: #fff;
  border-radius: 26px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--tw-shadow, 8px 8px 20px #e2e7f0, -8px -8px 20px #ffffff);
  border: 1px solid rgba(226,232,240,0.6);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-6px) rotate(-0.4deg);
  box-shadow: 0 30px 60px -20px rgba(79,70,229,0.28);
}
.feature-card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(79,70,229,0.35), rgba(6,182,212,0.15), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s ease;
}
.feature-card:hover::after { opacity: 1; }
.feature-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: rgba(79,70,229,0.1);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.spin-slow { animation: spin 5s linear infinite; }

/* ---------------- Timeline steps ---------------- */
.step-card {
  background: #fff;
  border-radius: 24px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 8px 8px 20px #e2e7f0, -8px -8px 20px #ffffff;
  position: relative;
  transition: transform .3s ease;
}
.step-card:hover { transform: translateY(-6px); }
.step-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: grid; place-items: center;
  font-size: 20px;
  box-shadow: 0 14px 30px -10px rgba(79,70,229,0.5);
}
.step-num {
  position: absolute;
  top: 12px; right: 18px;
  font-size: 11px;
  font-weight: 800;
  color: #CBD5E1;
}

/* ---------------- Task cards ---------------- */
.task-card {
  background: #fff;
  border-radius: 24px;
  padding: 22px;
  border: 1px solid #EEF2F7;
  box-shadow: 0 6px 20px -10px rgba(15,23,42,0.08);
  transition: transform .3s ease, box-shadow .3s ease;
}
.task-card:hover {
  transform: translateY(-5px) rotate(0.3deg);
  box-shadow: 0 20px 40px -16px rgba(79,70,229,0.25);
}
.task-top { display: flex; align-items: center; justify-content: space-between; }
.task-top i {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(6,182,212,0.1);
  color: var(--secondary);
  display: grid; place-items: center;
  font-size: 16px;
}
.reward-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(34,197,94,0.1);
  padding: 5px 10px;
  border-radius: 999px;
}

/* ---------------- Mini phone previews ---------------- */
.mini-phone { width: 230px; }
.mini-phone-shell {
  background: linear-gradient(155deg,#0f172a,#1e293b);
  border-radius: 20px;
  padding: 25px 15px;  
  box-shadow: 0 30px 60px -20px rgba(79,70,229,0.35);
}
.mini-block {
  background: #fff;
  border-radius: 12px;
  height: 32px;
}
.mini-phone-shell p { color: white; }
.mini-float-1 { animation: floaty 5s ease-in-out infinite; }
.mini-float-2 { animation: floaty 5.5s ease-in-out infinite .3s; }
.mini-float-3 { animation: floaty 4.5s ease-in-out infinite .6s; }

/* ---------------- Reward tiles ---------------- */
.reward-tile {
  background: #fff;
  border-radius: 22px;
  padding: 24px 14px;
  text-align: center;
  box-shadow: 8px 8px 20px #e2e7f0, -8px -8px 20px #ffffff;
  transition: transform .3s ease;
}
.reward-tile:hover { transform: translateY(-5px) scale(1.03); }
.reward-tile i {
  font-size: 26px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  margin-bottom: 10px;
}
.reward-tile span { font-size: 13px; font-weight: 600; color: #334155; }

/* ---------------- Why choose us ---------------- */
.why-card {
  background: #fff;
  border-radius: 22px;
  padding: 26px;
  border: 1px solid #EEF2F7;
  transition: transform .3s ease, box-shadow .3s ease;
}
.why-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -18px rgba(79,70,229,0.25); }
.why-card i { font-size: 22px; color: var(--primary); }

/* ---------------- Testimonials ---------------- */
.testi-track { animation: scrollX 34s linear infinite; }
.testi-track:hover { animation-play-state: paused; }
@keyframes scrollX {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.testi-card {
  width: 300px;
  flex: 0 0 auto;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 40px -22px rgba(15,23,42,0.18);
}
.testi-card .stars { color: #FBBF24; font-size: 12px; margin-bottom: 10px; }
.testi-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
}

/* ---------------- Referral floating coins ---------------- */
.referral-coin {
  position: absolute;
  color: rgba(255,255,255,0.18);
  font-size: 60px;
}
.rc-1 { top: -10px; right: 8%; animation: coinFloat 5s ease-in-out infinite; }
.rc-2 { bottom: -20px; left: 6%; font-size: 48px; animation: coinFloat 6s ease-in-out infinite .5s; }
.rc-3 { top: 40%; right: -20px; font-size: 90px; animation: coinFloat 7s ease-in-out infinite 1s; }
.graph-line { stroke-dasharray: 500; stroke-dashoffset: 500; animation: drawLine 2s ease-out forwards .3s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* ---------------- Achievements ---------------- */
.badge-card {
  background: #fff;
  border-radius: 24px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 8px 8px 20px #e2e7f0, -8px -8px 20px #ffffff;
}
.badge-icon {
  width: 60px; height: 60px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: white;
  display: grid; place-items: center;
  font-size: 24px;
  box-shadow: 0 14px 26px -10px rgba(0,0,0,0.25);
}
.progress-track {
  height: 8px;
  background: #EEF2F7;
  border-radius: 999px;
  margin-top: 14px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 1.4s cubic-bezier(.2,.8,.2,1);
}
.progress-fill.filled { width: var(--w); }

/* ---------------- Download / store buttons ---------------- */
.store-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink, #0F172A);
  color: white;
  padding: 10px 18px;
  border-radius: 16px;
  transition: transform .25s ease;
}
.store-btn:hover { transform: translateY(-3px); }
.qr-fake {
  width: 100%; height: 100%;
  background-image:
    linear-gradient(#0F172A 40%, transparent 0),
    linear-gradient(90deg, #0F172A 40%, transparent 0);
  background-size: 6px 6px;
  opacity: 0.85;
}

/* ---------------- FAQ ---------------- */
.faq-item {
  background: #fff;
  border-radius: 20px;
  border: 1px solid #EEF2F7;
  overflow: hidden;
}
.faq-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 15px;
  text-align: left;
}
.faq-chevron { transition: transform .3s ease; color: var(--primary); font-size: 13px; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 22px;
  color: #64748B;
  font-size: 14px;
  line-height: 1.6;
}
.faq-item.open .faq-panel { padding: 0 22px 20px; }

/* ---------------- Social icons ---------------- */
.social-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
  color: white;
  transition: background .25s ease, transform .25s ease;
}
.social-icon:hover { background: var(--primary); transform: translateY(-3px); }

/* ---------------- Scroll reveal ---------------- */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- Typed text ---------------- */
.typed-cursor { animation: blink 0.9s step-end infinite; color: var(--primary); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------------- Utility ---------------- */
.rounded-app-lg { border-radius: 34px; }