/* PIVOTAL ENHANCE · CHRIS 5.0 GRAPHICAL LAYER · DO NOT MODIFY WITHOUT CHRISTOPHER AUTHORITY */
/* Locked: 2026-05-01. Scroll-reveal, ambient depth, shimmer, hover precision. */

/* ═══ REVEAL ENGINE ═══ */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.72s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal="left"] {
  transform: translateX(-24px);
}
[data-reveal="right"] {
  transform: translateX(24px);
}
[data-reveal="scale"] {
  transform: scale(0.94);
  opacity: 0;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Staggered children */
[data-reveal-group] > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 0.04s; opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 0.10s; opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 0.22s; opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 0.28s; opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 0.34s; opacity: 1; transform: none; }
[data-reveal-group].is-visible > *:nth-child(n+7) { transition-delay: 0.38s; opacity: 1; transform: none; }

/* ═══ NOISE + SCAN OVERLAY (injected as divs by pivotal-anim.js to avoid body::before conflicts) ═══ */
.piv-noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
.piv-scan-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.012;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.06) 2px,
    rgba(255,255,255,0.06) 3px
  );
}

/* ═══ GOLD SHIMMER on gradient text ═══ */
@keyframes goldShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.shimmer-gold {
  background: linear-gradient(
    105deg,
    #6d5720 0%,
    #c9a84c 30%,
    #f0cc6a 45%,
    #ffe999 50%,
    #f0cc6a 55%,
    #c9a84c 70%,
    #6d5720 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 4.5s linear infinite;
}

/* ═══ ENHANCED BUTTON HOVER ═══ */
a[style*="background:linear-gradient(135deg,#a88536"] {
  position: relative;
  overflow: hidden;
}
a[style*="background:linear-gradient(135deg,#a88536"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.14) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}
a[style*="background:linear-gradient(135deg,#a88536"]:hover::after {
  transform: translateX(100%);
}

/* ═══ GOLD BORDER GLOW HOVER ═══ */
a[style*="border:1px solid rgba(201,162,76"],
a[style*="border:1px solid rgba(201,168,76"] {
  transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}
a[style*="border:1px solid rgba(201,162,76"]:hover,
a[style*="border:1px solid rgba(201,168,76"]:hover {
  box-shadow: 0 0 18px rgba(201,168,76,0.22), inset 0 0 12px rgba(201,168,76,0.06) !important;
  border-color: rgba(201,168,76,0.65) !important;
}

/* ═══ CARD DEPTH HOVER ═══ */
.compound, .nav-card, article[class], .marker {
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1), box-shadow 0.28s ease !important;
}
.compound:hover, .nav-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 24px rgba(201,168,76,0.1) !important;
}

/* ═══ CITE SUPERSCRIPT GLOW ═══ */
sup.cite-sup:hover {
  opacity: 1 !important;
  text-shadow: 0 0 8px rgba(201,168,76,0.6);
}

/* ═══ FOCUS VISIBLE ═══ */
:focus-visible {
  outline: 2px solid rgba(201,168,76,0.6);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ═══ SCROLL BAR ═══ */
::-webkit-scrollbar { width: 6px; background: #020203; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #6d5720, #c9a84c);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: #c9a84c; }

/* ═══ SELECTION ═══ */
::selection {
  background: rgba(201,168,76,0.25);
  color: #f0cc6a;
}

/* ═══ LINK UNDERLINE PRECISION ═══ */
a.piv-link {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
a.piv-link:hover {
  border-bottom-color: rgba(201,168,76,0.5);
}

/* ═══ AMBIENT ORBIT RING ═══ */
@keyframes orbitPulse {
  0%, 100% { opacity: 0.18; transform: scale(1); }
  50%       { opacity: 0.28; transform: scale(1.04); }
}
.ambient-ring {
  animation: orbitPulse 6s ease-in-out infinite;
}

/* ═══ REDUCE MOTION ═══ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-group] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .shimmer-gold { animation: none; }
  .ambient-ring { animation: none; }
}
