/* Effects layer, Images, Contact and the footer (docs/FX.md). Normal and Turn it up.
   - Gallery tiles tilt toward the cursor (assets/js/fx/tilt.js) with a chrome glint, and
     a picture flies out of the grid into the viewer with an overshoot and a 3D swing.
   - Typing in a field throws sparks (assets/js/fx/sparks.js).
   - The Contact button sends out chrome rings.
   - The footer is a pool of liquid chrome (assets/js/fx/footer.js). */

:where(html:not([data-fx="calm"])) .shot {
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.18s ease, box-shadow 0.3s ease;
}
:where(html:not([data-fx="calm"])) .shot:hover {
  box-shadow: 0 24px 40px -18px #000, 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 30px -8px var(--section-accent);
}
:where(html:not([data-fx="calm"])) .shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 48%, transparent 62%);
  background-size: 300% 100%;
  background-position: calc(var(--px, 0.5) * 100%) 0;
  mix-blend-mode: overlay;
  opacity: 0;
  transition: opacity 0.3s ease;
}
:where(html:not([data-fx="calm"])) .shot:hover::after { opacity: 1; }

@keyframes fx-fly {
  0% { transform: perspective(1200px) rotateY(-28deg) rotateX(8deg) scale(0.9); }
  65% { transform: perspective(1200px) rotateY(6deg) rotateX(-2deg) scale(1.03); }
  100% { transform: none; }
}
html:not([data-fx="calm"])::view-transition-group(gallery-photo) {
  animation-duration: 0.75s;
  animation-timing-function: cubic-bezier(0.2, 1.3, 0.4, 1);
}
html:not([data-fx="calm"])::view-transition-image-pair(gallery-photo) {
  animation: fx-fly 0.75s cubic-bezier(0.2, 1, 0.3, 1) both;
}
:where(html:not([data-fx="calm"])) .lightbox::backdrop {
  background:
    radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--accent1) 22%, transparent), transparent 70%),
    rgba(4, 4, 10, 0.86);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
}

@keyframes fx-spark {
  from { opacity: 1; translate: 0 0; scale: 1; }
  to { opacity: 0; translate: var(--dx) var(--dy); scale: 0.2; }
}
.fx-spark {
  position: fixed;
  z-index: 97;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px #fff, 0 0 12px var(--accent2), 0 0 18px var(--accent1);
  pointer-events: none;
  animation: fx-spark 0.6s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes fx-rings {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6), 0 0 0 0 color-mix(in srgb, var(--section-accent) 60%, transparent), 0 10px 30px -12px var(--accent1); }
  100% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0), 0 0 0 30px color-mix(in srgb, var(--section-accent) 0%, transparent), 0 10px 30px -12px var(--accent1); }
}
:where(html:not([data-fx="calm"])) #contact .button {
  min-height: 56px;
  padding: 0 2.2rem;
  font-size: 0.95rem;
  animation: fx-drift 8s ease-in-out infinite alternate, fx-rings 2.2s ease-out infinite;
}

:where(html:not([data-fx="calm"])) .site-foot.fx-pool-host {
  position: relative;
  isolation: isolate;
  background: linear-gradient(180deg, transparent, rgba(139, 152, 168, 0.06) 40%, rgba(167, 139, 250, 0.08));
}
.fx-pool {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
