/* =========================================================
   PPP effects — motion / plugin chrome
   ========================================================= */

:root {
  --fx-accent: #ef3f98;
  --fx-mint: #2ecc71;
  --fx-glow: rgba(239, 63, 152, 0.45);
}

/* Boot curtain */
#fx-curtain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(239, 63, 152, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(46, 204, 113, 0.25), transparent 50%),
    #0a1020;
  opacity: 1;
  transition: opacity 0.7s ease;
}
#fx-curtain.is-done {
  opacity: 0;
}
#fx-curtain .fx-curtain-mark {
  color: #fff;
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  letter-spacing: 0.12em;
  text-shadow: 0 0 18px var(--fx-glow);
  opacity: 0;
  transform: translateY(12px);
  animation: fx-curtain-in 0.7s ease forwards 0.15s;
}
@keyframes fx-curtain-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll progress */
#fx-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 80;
  background: linear-gradient(90deg, var(--fx-mint), var(--fx-accent));
  box-shadow: 0 0 10px var(--fx-glow);
  pointer-events: none;
  transition: width 0.05s linear;
}

/* Starfield host — above .cont (9), below chrome (40+) */
#star {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  overflow: hidden;
  display: block !important;
}
#particles-js,
#fx-particles {
  position: fixed;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  overflow: hidden;
}
.fx-star,
#star .fx-star,
#star span {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 15;
  pointer-events: none;
  color: #ffffff;
  text-shadow: 0 0 4px #fff, 0 0 10px rgba(239, 63, 152, 0.7);
  line-height: 1;
  user-select: none;
  will-change: transform, opacity;
  transform: translate3d(-100px, -100px, 0);
}

/* PC: ★ above sidebar. Phone/tablet: ★ below sidebar (see @media max-width 1023). */
@media (min-width: 1024px) {
  #star,
  .fx-star,
  #star .fx-star,
  #star span {
    z-index: 85;
  }
  #particles-js,
  #fx-particles {
    z-index: 84;
  }
}
@media (max-width: 1023px) {
  #star,
  .fx-star,
  #star .fx-star,
  #star span {
    z-index: 15;
  }
  #particles-js,
  #fx-particles {
    z-index: 14;
  }
}

/* Content reveal */
.fx-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  will-change: opacity, transform;
}
.fx-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Soft pulse for contact */
.form.fx-pulse {
  animation: fx-pulse 2.8s ease-in-out infinite;
}
@keyframes fx-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 63, 152, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(239, 63, 152, 0); }
}

/* Ripple */
.fx-ripple-host {
  position: relative;
  overflow: hidden;
}
.fx-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: fx-ripple 0.55s ease-out forwards;
  background: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}
@keyframes fx-ripple {
  to { transform: scale(2.6); opacity: 0; }
}

/* Sidebar link entrance */
.main a.jump.fx-nav-item {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.35s ease, transform 0.35s ease, color 0.2s;
}
.main.is-open a.jump.fx-nav-item,
.main.main1 a.jump.fx-nav-item {
  opacity: 1;
  transform: none;
}

/* Image hover lift (desktop) */
@media (hover: hover) and (pointer: fine) {
  .cont a.fx-zoom img,
  .cont img.fx-zoom {
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
    cursor: zoom-in;
  }
  .cont a.fx-zoom:hover img,
  .cont img.fx-zoom:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    filter: brightness(1.05);
  }
}

/* Magnific tweaks for dark site */
.mfp-bg {
  background: #050814 !important;
  opacity: 0.88 !important;
}
.mfp-title {
  color: #eee !important;
}
.mfp-counter {
  color: #ccc !important;
}

/* Floating to-top bounce when shown */
#page_top.fx-show,
#page_top1.fx-show {
  animation: fx-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes fx-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 0.75; }
}

/* Contact modal motion */
#cw .over1.fx-modal-in {
  animation: fx-modal-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes fx-modal-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* Typed cursor in sidebar */
.fx-typed-wrap {
  display: block;
  margin: 6px auto 10px;
  min-height: 1.4em;
  color: #ffe9f4;
  font-weight: 700;
  text-shadow: 0 0 12px var(--fx-glow);
}
.typed-cursor {
  opacity: 1;
  animation: fx-blink 0.7s infinite;
}
@keyframes fx-blink {
  50% { opacity: 0; }
}

/* Soft page-swap flash */
#fx-swap {
  position: fixed;
  inset: 0;
  z-index: 28;
  pointer-events: none;
  background: radial-gradient(circle at 50% 40%, rgba(239, 63, 152, 0.22), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
}
#fx-swap.is-on {
  opacity: 1;
}

/* Reduced motion: keep ★ visible (brand), soften other FX only */
@media (prefers-reduced-motion: reduce) {
  #fx-curtain,
  .fx-reveal,
  .form.fx-pulse,
  .main a.jump.fx-nav-item,
  #fx-progress {
    animation: none !important;
    transition: none !important;
  }
  .fx-reveal {
    opacity: 1;
    transform: none;
  }
  #particles-js,
  #fx-particles {
    display: none !important;
  }
}
