/* ------------------------------------------------------------------
   Refunda landing — behaviour layer on top of the compiled Tailwind
   sheet (tw.css). Only holds what the original page did in JS.
   ------------------------------------------------------------------ */

html { scroll-behavior: smooth; }
body { background: #050012; color: #fff; }

/* world map lives under asset/, not at the site root */
.bg-\[url\(\'\/assets\/worldmap\.png\'\)\] {
  background-image: url("../img/worldmap.png") !important;
}

/* ---------- scroll rails ---------- */
.scrollbar-hide::-webkit-scrollbar,
#rf-rail::-webkit-scrollbar { display: none; }

/* ---------- scroll reveal (framer-motion replacement) ---------- */
.rf-js [data-rv] { opacity: 0; }
.rf-js [data-rv].rf-in {
  opacity: 1;
  transform: none !important;
  filter: none !important;
}

/* ---------- feature card scan line ---------- */
.rf-scanline { top: 0; opacity: 0; }
.group:hover .rf-scanline { animation: rf-scan 1.8s linear infinite; }
@keyframes rf-scan {
  0%   { top: 0%;   opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ---------- terminal stages ---------- */
.rf-stage {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .45s ease, transform .5s cubic-bezier(.16,1,.3,1), filter .45s ease;
}
.rf-stage[data-stage="0"] { transform: scale(1.18); filter: blur(10px); }
.rf-stage[data-stage="1"] { transform: translateX(50px); }
.rf-stage[data-stage="2"] { transform: scale(1.4); filter: blur(16px); }
.rf-stage[data-stage="3"] { transform: rotateX(70deg); transform-origin: 50% 100%; }
.rf-stage[data-stage].rf-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  filter: none;
}

.rf-breathe { animation: rf-breathe 2s ease-in-out infinite; }
@keyframes rf-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.rf-log { animation: rf-logIn .3s ease-out both; }
@keyframes rf-logIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }

/* fingerprint scanner line (terminal stage 0) */
.rf-fingerline { animation: rf-fingerline 1.5s linear infinite; }
@keyframes rf-fingerline { from { top: -10%; } to { top: 110%; } }
.rf-glitch-a { animation: rf-blip .1s linear infinite; animation-delay: 0s; }
.rf-glitch-b { animation: rf-blip2 .1s linear infinite; }
@keyframes rf-blip  { 0%,92% { opacity: 0; } 96% { opacity: 1; } 100% { opacity: 0; } }
@keyframes rf-blip2 { 0%,88% { opacity: 0; } 94% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- mobile menu (circular clip reveal from the burger) ---------- */
#rf-mobile-menu {
  clip-path: circle(0px at calc(100% - 48px) 48px);
  opacity: 0;
  pointer-events: none;
  transition: clip-path .55s cubic-bezier(.16,1,.3,1), opacity .3s ease;
}
#rf-mobile-menu.rf-open {
  clip-path: circle(150% at calc(100% - 48px) 48px);
  opacity: 1;
  pointer-events: auto;
}
#rf-mobile-menu .rf-mm {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(12px);
  transition: opacity .4s ease, filter .4s ease, transform .4s cubic-bezier(.16,1,.3,1);
}
#rf-mobile-menu.rf-open .rf-mm { opacity: 1; filter: none; transform: none; }
#rf-mobile-menu.rf-open .rf-mm:nth-child(2) { transition-delay: .08s; }
#rf-mobile-menu.rf-open .rf-mm:nth-child(3) { transition-delay: .16s; }
#rf-mobile-menu.rf-open > .rf-mm { transition-delay: .28s; }

/* ---------- hero trace ---------- */
#rf-trace-console { animation: rf-logIn .4s ease-out both; }
.rf-arc { stroke-dasharray: 160; stroke-dashoffset: 160; animation: rf-arc 1.6s ease-out forwards; }
@keyframes rf-arc { to { stroke-dashoffset: 0; } }
.rf-hit { animation: rf-hit .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes rf-hit { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.rf-shake { animation: rf-shake .4s ease-in-out; }
@keyframes rf-shake {
  0%,100% { transform: translateX(0); }
  25%     { transform: translateX(-6px); }
  75%     { transform: translateX(6px); }
}

/* map beacons keep a slow pulse like the original */
.rf-beacon { animation: rf-beacon 3s ease-in-out infinite; }
@keyframes rf-beacon { 0%,100% { opacity: .45; transform: scale(1); } 50% { opacity: 1; transform: scale(1.8); } }

/* ---------- alien orb (hero + core protocol hub) ---------- */
.rf-orb-glow {
  animation: rf-orbGlow 20s ease-in-out infinite;
  opacity: .3;
  filter: blur(20px);
}
@keyframes rf-orbGlow {
  0%   { transform: scale(1) rotate(0deg);     opacity: .3; filter: blur(20px); }
  25%  { transform: scale(1.3) rotate(90deg);  opacity: .7; filter: blur(40px); }
  50%  { transform: scale(.95) rotate(180deg); opacity: .2; filter: blur(25px); }
  75%  { transform: scale(1.4) rotate(270deg); opacity: .6; filter: blur(45px); }
  100% { transform: scale(1) rotate(360deg);   opacity: .3; filter: blur(20px); }
}

.rf-orb-blob {
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: rf-orbBlob 25s ease-in-out infinite;
}
@keyframes rf-orbBlob {
  0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(0deg); }
  33%  { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; transform: rotate(180deg); }
  66%  { border-radius: 40% 60% 60% 40% / 40% 60% 40% 60%; transform: rotate(-180deg); }
  100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: rotate(360deg); }
}

.rf-orb-rings { animation: rf-orbRings 15s ease-in-out infinite; }
@keyframes rf-orbRings {
  0%   { transform: rotate(0deg) scale(1); }
  33%  { transform: rotate(-60deg) scale(1.02); }
  66%  { transform: rotate(-30deg) scale(.98); }
  100% { transform: rotate(-360deg) scale(1); }
}

.rf-orb-wire { animation: rf-orbWire 30s linear infinite; }
@keyframes rf-orbWire {
  0%   { transform: rotateY(0deg) rotate(0deg); }
  25%  { transform: rotateY(180deg) rotate(90deg); }
  50%  { transform: rotateY(0deg) rotate(180deg); }
  75%  { transform: rotateY(-180deg) rotate(270deg); }
  100% { transform: rotateY(0deg) rotate(360deg); }
}

.rf-orb-diamond { animation: rf-orbDiamond 12s ease-in-out infinite; }
@keyframes rf-orbDiamond {
  0%   { transform: scale(.2, 1) rotate(0deg); }
  25%  { transform: scale(.6, .9) rotate(5deg); }
  50%  { transform: scale(.15, 1.1) rotate(-5deg); }
  75%  { transform: scale(.7, .85) rotate(10deg); }
  100% { transform: scale(.2, 1) rotate(0deg); }
}

.rf-orb-dot { animation: rf-orbDot 6s ease-in-out infinite; }
@keyframes rf-orbDot { 0%,100% { transform: scale(.5); } 50% { transform: scale(1.2); } }

.rf-orb-ring { animation: rf-orbRing 10s ease-in-out infinite; }
@keyframes rf-orbRing {
  0%   { transform: scale(1);   opacity: .3; }
  25%  { transform: scale(1.6); opacity: .7; }
  50%  { transform: scale(.9);  opacity: .2; }
  75%  { transform: scale(1.8); opacity: .6; }
  100% { transform: scale(1);   opacity: .3; }
}

/* ---------- logo mark ---------- */
.rf-spin     { animation: rf-spin 25s linear infinite; }
.rf-spin-rev { animation: rf-spin 15s linear infinite reverse; }
@keyframes rf-spin { to { transform: rotate(360deg); } }

/* ---------- fixed overlays ---------- */
#rf-consent { transition: opacity .5s ease, transform .5s cubic-bezier(.16,1,.3,1); }
#rf-consent.rf-hide { opacity: 0; transform: translateY(30px); pointer-events: none; }
#rf-chat-panel { transform-origin: bottom right; animation: rf-pop .35s cubic-bezier(.16,1,.3,1) both; }
@keyframes rf-pop { from { opacity: 0; transform: scale(.9) translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- hero ambient feed ---------- */
.rf-feed-card { animation: rf-feedIn .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes rf-feedIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .rf-js [data-rv] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .rf-scanline, .rf-breathe, .rf-fingerline, .rf-beacon,
  .rf-orb-glow, .rf-orb-blob, .rf-orb-rings, .rf-orb-wire,
  .rf-orb-diamond, .rf-orb-dot, .rf-orb-ring,
  .rf-spin, .rf-spin-rev { animation: none !important; }
}
