/* =====================================================================
   DIGIRISE — GEMINI / STITCH-STYLE ANIMATED LIGHT-MODE BACKGROUND
   Multi-color morphing blob mesh that renders ONLY in light mode.
   Uses CSS-only animation: transform drift + organic border-radius
   morph.  Blur softens; mix-blend-mode blends into the cream page.
   Fully performant on mobile; respects prefers-reduced-motion.
   ===================================================================== */

.gemini-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 480ms var(--ease-expo-out, ease-out);
  contain: layout paint;
}
html[data-theme="light"] .gemini-mesh { opacity: 1; }

/* Warm paper wash — subtle pink+purple tint instead of full white,
   so the palette stays unified. */
html[data-theme="light"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(255, 245, 250, 0.65), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(240, 220, 255, 0.55), transparent 60%),
    radial-gradient(80% 60% at 0% 110%, rgba(255, 220, 240, 0.55), transparent 60%);
  pointer-events: none;
}

.gemini-blob {
  position: absolute;
  border-radius: 42% 58% 63% 37% / 42% 62% 38% 58%;
  filter: blur(60px) saturate(180%);
  mix-blend-mode: multiply;
  opacity: 0.85;
  will-change: transform, border-radius;
}

/* PURPLE + PINK ONLY palette — fast visible movement across the page.
   4 blobs total (2 purple, 2 pink) drifting from opposite corners so the
   whole background feels alive.  Durations 9–13s per drift + 7–10s
   morph — Google Gemini / Stitch fast-motion feel. */
.gemini-blob-1 { /* PURPLE — top-left */
  width: 72vmax; height: 72vmax;
  left: -26vmax; top: -24vmax;
  background: radial-gradient(closest-side, #A855F7 0%, rgba(168,85,247,0) 68%);
  animation: geminiDrift1 12s cubic-bezier(.6,.05,.4,.95) infinite alternate,
             geminiMorph 8s ease-in-out infinite alternate;
}
.gemini-blob-2 { /* PINK — top-right */
  width: 68vmax; height: 68vmax;
  right: -22vmax; top: -18vmax;
  background: radial-gradient(closest-side, #EC4899 0%, rgba(236,72,153,0) 68%);
  animation: geminiDrift2 10s cubic-bezier(.4,.1,.6,.9) infinite alternate,
             geminiMorph 9s ease-in-out infinite alternate;
}
.gemini-blob-3 { /* PINK — bottom-left */
  width: 66vmax; height: 66vmax;
  left: -20vmax; bottom: -22vmax;
  background: radial-gradient(closest-side, #F472B6 0%, rgba(244,114,182,0) 68%);
  animation: geminiDrift3 13s cubic-bezier(.5,.05,.5,.95) infinite alternate,
             geminiMorph 10s ease-in-out infinite alternate;
  animation-delay: -3s, -1s;
}
.gemini-blob-4 { /* PURPLE — bottom-right */
  width: 70vmax; height: 70vmax;
  right: -22vmax; bottom: -20vmax;
  background: radial-gradient(closest-side, #C084FC 0%, rgba(192,132,252,0) 68%);
  animation: geminiDrift4 11s cubic-bezier(.5,.1,.5,.9) infinite alternate,
             geminiMorph 8s ease-in-out infinite alternate;
  animation-delay: -5s, -3s;
}
.gemini-blob-5 { /* extra deep PURPLE — center-wandering */
  width: 58vmax; height: 58vmax;
  left: 25vw; top: 30vh;
  background: radial-gradient(closest-side, #8B5CF6 0%, rgba(139,92,246,0) 68%);
  animation: geminiDrift5 9s cubic-bezier(.4,.05,.6,.95) infinite alternate,
             geminiMorph 7s ease-in-out infinite alternate;
  animation-delay: -6s, -4s;
}
.gemini-blob-6 { /* extra bright PINK — off-center */
  width: 55vmax; height: 55vmax;
  right: 15vw; bottom: 20vh;
  background: radial-gradient(closest-side, #F9A8D4 0%, rgba(249,168,212,0) 68%);
  animation: geminiDrift6 13s cubic-bezier(.5,.1,.5,.9) infinite alternate,
             geminiMorph 9s ease-in-out infinite alternate;
  animation-delay: -4s, -2s;
}

/* Grain / noise overlay adds a tactile Stitch-like paper texture
   without needing an image asset — pure SVG data URI. */
html[data-theme="light"] .gemini-mesh::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.15 0 0 0 0 0.12 0 0 0 0 0.06 0 0 0 0.25 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.22;
  mix-blend-mode: multiply;
  pointer-events: none;
}

/* ── Motion keyframes — WIDE movement range for visible motion ─── */
@keyframes geminiDrift1 {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(22vw, 18vh, 0) scale(1.15); }
  100% { transform: translate3d(-8vw, 26vh, 0) scale(0.92); }
}
@keyframes geminiDrift2 {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-20vw, 22vh, 0) scale(1.18); }
  100% { transform: translate3d(14vw, -8vh, 0) scale(0.94); }
}
@keyframes geminiDrift3 {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(24vw, -14vh, 0) scale(1.12); }
  100% { transform: translate3d(8vw, 18vh, 0) scale(1.02); }
}
@keyframes geminiDrift4 {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-22vw, -18vh, 0) scale(1.14); }
  100% { transform: translate3d(-10vw, -26vh, 0) scale(1.05); }
}
@keyframes geminiDrift5 {
  0%   { transform: translate3d(0,0,0) scale(1); }
  33%  { transform: translate3d(-24vw, -22vh, 0) scale(1.15); }
  66%  { transform: translate3d(20vw, 16vh, 0) scale(0.90); }
  100% { transform: translate3d(-6vw, -10vh, 0) scale(1.08); }
}
@keyframes geminiDrift6 {
  0%   { transform: translate3d(0,0,0) scale(1); }
  33%  { transform: translate3d(18vw, -20vh, 0) scale(0.95); }
  66%  { transform: translate3d(-16vw, 22vh, 0) scale(1.15); }
  100% { transform: translate3d(4vw, -8vh, 0) scale(1.02); }
}

@keyframes geminiMorph {
  0%   { border-radius: 42% 58% 63% 37% / 42% 62% 38% 58%; }
  20%  { border-radius: 61% 39% 41% 59% / 55% 43% 57% 45%; }
  40%  { border-radius: 34% 66% 47% 53% / 63% 38% 62% 37%; }
  60%  { border-radius: 55% 45% 58% 42% / 40% 61% 39% 60%; }
  80%  { border-radius: 40% 60% 55% 45% / 47% 55% 45% 53%; }
  100% { border-radius: 58% 42% 40% 60% / 60% 45% 55% 40%; }
}

/* ── Reduced motion ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .gemini-blob { animation: none !important; }
}

/* ── Dark mode: hide the whole layer + remove the wash ────────── */
html:not([data-theme="light"]) .gemini-mesh { display: none; }

/* Ensure dashboard/card surfaces stay legible over the mesh in light
   mode by lifting them onto their own opaque paper layer. */
html[data-theme="light"] .glass-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .glass-panel,
html[data-theme="light"] .trust-card,
html[data-theme="light"] .comm-card,
html[data-theme="light"] .step-card,
html[data-theme="light"] .showcase-card,
html[data-theme="light"] .tier-pub-card,
html[data-theme="light"] .payout-item,
html[data-theme="light"] .cult-box,
html[data-theme="light"] .settings-group,
html[data-theme="light"] .profile-hero,
html[data-theme="light"] .motiv-card,
html[data-theme="light"] .trophy-tile,
html[data-theme="light"] .insight-card,
html[data-theme="light"] .real-stats-grid,
html[data-theme="light"] .hero-live-badge {
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background-color: rgba(255, 253, 248, 0.72);
}

html[data-theme="light"] .top-header {
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  background: rgba(255, 253, 248, 0.72);
  border-bottom: 1px solid rgba(120, 90, 30, 0.08);
}

/* =====================================================================
   Partner Login button visibility fix (BOTH themes)
   ===================================================================== */
.btn-ghost {
  color: var(--text-primary) !important;
  border: 1.5px solid var(--border-default);
  background: rgba(200, 137, 10, 0.05);
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: var(--elevation-soft);
}
.btn-ghost:hover {
  background: rgba(200, 137, 10, 0.12);
  border-color: var(--gold);
  color: var(--gold) !important;
  transform: translateY(-1px);
  box-shadow: var(--elevation-halo-gold);
}
html[data-theme="light"] .btn-ghost {
  color: #4a3410 !important;
  border-color: rgba(200, 137, 10, 0.35);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 12px rgba(120, 90, 30, 0.10);
}
html[data-theme="light"] .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #a67509 !important;
  border-color: var(--gold);
}
