
/* PFBOX Animation Pack v1.3 - Content Pages
   Designed to coexist with v1.1 Home Animation.
   This pack runs only on NON-home public pages.
*/

:root {
  --pf13-cyan: #39e7ff;
  --pf13-blue: #1677ff;
  --pf13-green: #37f3a2;
  --pf13-gold: #ffc64a;
  --pf13-navy: #061428;
}

/* only enabled by JS on inner pages */
body.pf13-content-page {
  overflow-x: hidden;
}

/* ---------- HERO: animation lives inside the hero itself ---------- */

body.pf13-content-page .pf13-hero-host {
  position: relative !important;
  overflow: hidden !important;
  isolation: isolate;
}

body.pf13-content-page .pf13-hero-host::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(57,231,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57,231,255,.055) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .85;
  animation: pf13Grid 22s linear infinite;
}

body.pf13-content-page .pf13-hero-host::after {
  content: "";
  position: absolute;
  inset: -35%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 45%, rgba(57,231,255,.16), transparent 18%),
    radial-gradient(circle at 74% 38%, rgba(22,119,255,.18), transparent 21%),
    radial-gradient(circle at 68% 78%, rgba(255,198,74,.09), transparent 17%);
  filter: blur(10px);
  animation: pf13Aurora 11s ease-in-out infinite alternate;
}

body.pf13-content-page .pf13-hero-host > *:not(.pf13-layer) {
  position: relative;
  z-index: 2;
}

@keyframes pf13Grid {
  from { transform: translate3d(0,0,0); }
  to   { transform: translate3d(42px,42px,0); }
}

@keyframes pf13Aurora {
  0%   { transform: translate3d(-2%, -1%, 0) rotate(-1deg) scale(1); }
  100% { transform: translate3d(2%, 1%, 0) rotate(1deg) scale(1.06); }
}

/* ---------- particle + packet layer ---------- */

.pf13-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.pf13-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--pf13-cyan);
  box-shadow: 0 0 9px rgba(57,231,255,.9);
  opacity: .55;
  animation: pf13DotFloat var(--dur, 10s) ease-in-out infinite alternate;
  animation-delay: var(--delay, 0s);
}

@keyframes pf13DotFloat {
  0%   { transform: translate3d(0,0,0) scale(.65); opacity: .25; }
  50%  { opacity: .9; }
  100% { transform: translate3d(var(--dx, 20px), var(--dy, -18px),0) scale(1.15); opacity: .42; }
}

.pf13-packet {
  position: absolute;
  height: 1px;
  width: 150px;
  opacity: .5;
  background: linear-gradient(90deg, transparent, var(--pf13-cyan), var(--pf13-gold), transparent);
  filter: drop-shadow(0 0 5px rgba(57,231,255,.65));
  transform: rotate(var(--angle, -8deg));
  animation: pf13Packet var(--dur, 8s) linear infinite;
  animation-delay: var(--delay, 0s);
}

.pf13-packet::after {
  content: "";
  position: absolute;
  right: 18%;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 7px var(--pf13-cyan),
    0 0 15px var(--pf13-cyan);
}

@keyframes pf13Packet {
  from { transform: translate3d(-220px, 70px, 0) rotate(var(--angle, -8deg)); }
  to   { transform: translate3d(calc(100vw + 260px), -70px, 0) rotate(var(--angle, -8deg)); }
}

/* ---------- Hero heading ---------- */

body.pf13-content-page .pf13-hero-host h1,
body.pf13-content-page .pf13-hero-host h2 {
  text-shadow:
    0 0 1px rgba(255,255,255,.15),
    0 0 26px rgba(57,231,255,.08);
}

body.pf13-content-page .pf13-hero-host h1::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  margin-top: .35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pf13-cyan), var(--pf13-green), transparent);
  box-shadow: 0 0 14px rgba(57,231,255,.42);
  animation: pf13TitleLine .85s .25s ease forwards;
}

@keyframes pf13TitleLine {
  to { width: min(180px, 42%); }
}

/* ---------- Content reveal ---------- */

body.pf13-content-page .pf13-reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(.994);
  transition:
    opacity .68s cubic-bezier(.2,.65,.2,1),
    transform .68s cubic-bezier(.2,.65,.2,1);
  will-change: opacity, transform;
}

body.pf13-content-page .pf13-reveal.pf13-visible {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}

/* ---------- Cards have their own visible animation ---------- */

body.pf13-content-page .pf13-card {
  position: relative;
  overflow: hidden;
  transition:
    transform .28s ease,
    box-shadow .28s ease,
    border-color .28s ease;
}

body.pf13-content-page .pf13-card::after {
  content: "";
  position: absolute;
  inset: auto -25% -70% auto;
  width: 170px;
  height: 170px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57,231,255,.105), transparent 65%);
  transition: transform .4s ease, opacity .4s ease;
  opacity: .55;
}

@media (hover:hover) {
  body.pf13-content-page .pf13-card:hover {
    transform: translateY(-5px);
    border-color: rgba(57,231,255,.25) !important;
    box-shadow:
      0 18px 48px rgba(8,32,66,.13),
      0 0 26px rgba(57,231,255,.055);
  }

  body.pf13-content-page .pf13-card:hover::after {
    transform: scale(1.35);
    opacity: .9;
  }
}

/* ---------- Internal page background: subtle motion ABOVE white background ---------- */

body.pf13-content-page .pf13-content-host {
  position: relative;
  isolation: isolate;
}

body.pf13-content-page .pf13-content-host::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 18%, rgba(57,231,255,.07), transparent 22%),
    radial-gradient(circle at 90% 42%, rgba(22,119,255,.055), transparent 20%);
  animation: pf13ContentGlow 14s ease-in-out infinite alternate;
}

@keyframes pf13ContentGlow {
  from { transform: translate3d(-.5%,0,0); opacity: .65; }
  to   { transform: translate3d(.5%,0,0); opacity: 1; }
}

/* ---------- Links / buttons ---------- */

body.pf13-content-page main a,
body.pf13-content-page main button {
  transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

@media (hover:hover) {
  body.pf13-content-page main a[class*="btn"]:hover,
  body.pf13-content-page main button:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
  }
}

/* ---------- Sidebar menu animation ---------- */

body.pf13-content-page aside a,
body.pf13-content-page .sidebar a {
  transition:
    transform .2s ease,
    background-color .2s ease,
    color .2s ease,
    padding-left .2s ease;
}

@media (hover:hover) {
  body.pf13-content-page aside a:hover,
  body.pf13-content-page .sidebar a:hover {
    transform: translateX(3px);
  }
}

/* ---------- respect accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  body.pf13-content-page *,
  body.pf13-content-page *::before,
  body.pf13-content-page *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  body.pf13-content-page .pf13-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .pf13-layer { display:none !important; }
}

@media (max-width: 768px) {
  .pf13-packet:nth-child(n+3) { display:none; }
  .pf13-dot:nth-child(n+16) { display:none; }
}
