/* ==========================================================================
   FX — experiența finală: logo VV din particule în hero, tilt 3D,
   notificări-dovadă pe proiecte, butoane magnetice, aură cursor, orbi parallax
   ========================================================================== */

.hero .container { position: relative; z-index: 1; }

/* ---------- Logo VV din particule (hero) ---------- */
.vv-canvas-wrap {
  position: absolute;
  right: 0;
  top: 70px;
  bottom: 26%;
  width: 46%;
  z-index: 0;
  pointer-events: none;
}
.vv-canvas-wrap canvas { width: 100%; height: 100%; display: block; }

@media (max-width: 1180px) {
  .vv-canvas-wrap { opacity: 0.5; }
}
@media (max-width: 820px) {
  .vv-canvas-wrap { display: none; }
}

/* ---------- Aură care urmărește cursorul (doar pointer fin) ---------- */
.cursor-aura {
  position: fixed;
  left: 0;
  top: 0;
  width: 900px;
  height: 900px;
  margin: -450px 0 0 -450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.065), transparent 60%);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
@media (pointer: coarse) {
  .cursor-aura { display: none; }
}

/* ---------- Butoane magnetice ---------- */
.magnet { will-change: transform; }

/* ---------- Tilt 3D pe carduri ---------- */
.services-grid, .case-side, .pain-grid { perspective: 1400px; }
.tilt {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.16s ease-out, border-color 0.3s, box-shadow 0.4s;
}
.tilt .glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(520px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.085), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 2;
}
.tilt:hover .glare { opacity: 1; }

/* ---------- Notificări-dovadă în jurul cardurilor de proiect ---------- */
@media (max-width: 820px) {
  /* pe desktop cardul e deja poziționat (sticky); sub 821px îi dăm ancoră */
  .case-card { position: relative; }
}
.case-notif {
  position: absolute;
  z-index: 3;
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  transition: opacity 0.55s var(--ease-out), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: 0.25s;
  pointer-events: none;
}
.case-notif.in { opacity: 1; transform: none; }
.case-notif .fc {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 18px 12px 13px;
  border-radius: 14px;
  background: rgba(20, 14, 9, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 55px -16px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: fxBob 7s ease-in-out infinite alternate;
}
.cn-2 .fc { animation-delay: -3.2s; }
@keyframes fxBob {
  from { transform: translateY(-6px) rotate(-0.5deg); }
  to   { transform: translateY(6px) rotate(0.6deg); }
}
.case-notif .fc-ico {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(251, 126, 60, 0.13);
  border: 1px solid rgba(251, 126, 60, 0.32);
  color: var(--accent-2);
}
.case-notif .fc-body { display: grid; line-height: 1.4; }
.case-notif .fc-body strong { font-size: 13px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.case-notif .fc-body em { font-style: normal; font-size: 11.5px; color: var(--ink-mute); white-space: nowrap; }
.case-notif .fc-live {
  width: 7px; height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  animation: pulse 2.4s infinite;
  margin-left: 4px;
}
/* implicit: imediat deasupra cardului, fără să-l atingă */
.cn-1 { right: 4px; bottom: calc(100% + 12px); }
.cn-2 { left: 4px; bottom: calc(100% + 12px); }
/* ecrane late: lateral, în spațiul liber de lângă card */
@media (min-width: 1720px) {
  .cn-1 { right: auto; left: calc(100% + 26px); bottom: auto; top: 9%; }
  .cn-2 { left: auto; right: calc(100% + 26px); bottom: 14%; }
}
@media (max-width: 820px) {
  .case-notif { display: none; }
}

/* ---------- Orbi cu parallax pe scroll ---------- */
.px-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  will-change: transform;
}
.px-orb.o-start {
  width: 460px; height: 460px;
  left: -140px; top: 14%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.13), transparent 70%);
}
.px-orb.o-final {
  width: 520px; height: 520px;
  right: -160px; bottom: -120px;
  background: radial-gradient(circle, rgba(239, 91, 42, 0.16), transparent 70%);
}
.px-orb.o-pain {
  width: 380px; height: 380px;
  right: -100px; top: 30%;
  background: radial-gradient(circle, rgba(255, 160, 94, 0.1), transparent 70%);
}

@media (prefers-reduced-motion: reduce) {
  .vv-canvas-wrap, .cursor-aura { display: none; }
  .case-notif { opacity: 1; transform: none; }
  .case-notif .fc { animation: none; }
  .px-orb { transform: none !important; }
}
