/* ============================================================
   PHOTO SQUARE — Animation System
   ============================================================ */

/* ── Keyframes ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(60px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes slideReveal {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes floatSoft {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.4); }
  50%       { box-shadow: 0 0 20px 8px rgba(201,168,76,0.15); }
}

@keyframes shutterOpen {
  0%   { clip-path: polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%, 50% 50%); }
  100% { clip-path: polygon(0% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 0% 100%, 0% 50%); }
}

@keyframes typeWriter {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes rotateIn {
  from { opacity: 0; transform: rotate(-10deg) scale(0.95); }
  to   { opacity: 1; transform: rotate(0deg) scale(1); }
}

@keyframes blurIn {
  from { opacity: 0; filter: blur(20px); }
  to   { opacity: 1; filter: blur(0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes bounceDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(-8px); opacity: 0.6; }
}

@keyframes kenBurns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(-2%, -1%); }
}

@keyframes navSlideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-6px); }
  80%       { transform: translateX(6px); }
}

/* ── Scroll Animation Classes ── */
[data-animate] {
  opacity: 0;
  will-change: transform, opacity;
}

/* Failsafe: auto-show content if JS never adds .animated (e.g. file:// protocol) */
@keyframes dataAnimateFallback {
  to { opacity: 1; transform: none; }
}
[data-animate]:not(.animated) {
  animation: dataAnimateFallback 0.01s linear 4s forwards;
}

[data-animate].animated {
  animation: none;
  opacity: 1;
}

[data-animate="fade-up"].animated {
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) both;
}

[data-animate="fade-down"].animated {
  animation: fadeInDown var(--duration-slow) var(--ease-out-expo) both;
}

[data-animate="fade-left"].animated {
  animation: fadeInLeft var(--duration-slow) var(--ease-out-expo) both;
}

[data-animate="fade-right"].animated {
  animation: fadeInRight var(--duration-slow) var(--ease-out-expo) both;
}

[data-animate="scale-in"].animated {
  animation: scaleIn var(--duration-slow) var(--ease-out-expo) both;
}

[data-animate="slide-reveal"].animated {
  animation: slideReveal var(--duration-cinematic) var(--ease-out-expo) both;
}

[data-animate="blur-in"].animated {
  animation: blurIn var(--duration-slow) var(--ease-out-expo) both;
}

[data-animate="rotate-in"].animated {
  animation: rotateIn var(--duration-slow) var(--ease-out-expo) both;
}

/* Utility animation classes */
.animate-float      { animation: floatSoft 3s ease-in-out infinite; }
.animate-pulse-glow { animation: pulseGlow 2s ease-in-out infinite; }
.animate-shimmer {
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  background-size: 200% auto;
  animation: shimmer 2s linear infinite;
}
.animate-shake { animation: shake 0.5s ease-in-out; }
