/* ============================================================
   foto.co.pl — animation.css
   All keyframes, transitions, and animation utilities
   ============================================================ */

/* ============================================================
   KEYFRAMES
   ============================================================ */

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

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.3); opacity: 0.7; }
}

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

@keyframes floatX {
  0%, 100% { transform: translateX(0); }
  50%       { transform: translateX(-8px); }
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

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

@keyframes counterUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes progressFill {
  from { width: 0; }
}

/* ============================================================
   APERTURE ANIMATION (Hero background element)
   ============================================================ */
.aperture-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(28,22,18,0.08);
}
.ring-1 { width: 100%; height: 100%; }
.ring-2 { width: 75%; height: 75%; }
.ring-3 { width: 50%; height: 50%; animation: apertureSpin 20s linear infinite; }

.aperture-blade {
  position: absolute;
  width: 48%;
  height: 2px;
  background: rgba(28,22,18,0.06);
  top: 50%;
  left: 26%;
  transform-origin: center;
  transform: rotate(var(--r)) translateY(-50%);
}

/* ============================================================
   HERO ENTRANCE ANIMATIONS
   ============================================================ */
.hero-eyebrow  { animation: fadeInDown 0.6s ease both; }
.hero-title    { animation: fadeInUp 0.8s ease 0.15s both; }
.hero-subtitle { animation: fadeInUp 0.8s ease 0.25s both; }
.hero-actions  { animation: fadeInUp 0.8s ease 0.35s both; }
.hero-social-proof { animation: fadeInUp 0.8s ease 0.45s both; }

.camera-illustration {
  animation: fadeInRight 1s ease 0.25s both;
}
.camera-badge-price  { animation: float 4s ease-in-out 0.5s infinite; }
.camera-badge-location { animation: floatX 5s ease-in-out 1s infinite; }

/* ============================================================
   SCROLL HINT ANIMATION
   ============================================================ */
.hero-scroll-hint {
  animation: fadeInUp 1s ease 1.5s both, float 3s ease-in-out 2.5s infinite;
}

/* ============================================================
   HOVER EFFECTS — Program Cards
   ============================================================ */
.program-card {
  --card-lift: 0;
  transition:
    transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 250ms ease,
    border-color 250ms ease;
}
.program-card:hover { transform: translateY(-6px) scale(1.01); }

/* ============================================================
   HOVER EFFECTS — Testimonials
   ============================================================ */
.testimonial-card {
  transition:
    transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 250ms ease;
}

/* ============================================================
   HOVER EFFECTS — Blog Cards
   ============================================================ */
.blog-card {
  transition:
    transform 250ms cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 250ms ease;
}

/* ============================================================
   COUNTER ANIMATION
   ============================================================ */
.count-animated {
  animation: counterUp 0.6s ease both;
}

/* ============================================================
   LINK UNDERLINE HOVER
   ============================================================ */
.animated-link {
  position: relative;
  display: inline-block;
}
.animated-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--color-amber);
  transition: width 250ms ease;
}
.animated-link:hover::after { width: 100%; }

/* ============================================================
   GRADIENT TEXT
   ============================================================ */
.gradient-text {
  background: linear-gradient(
    90deg,
    var(--color-amber),
    var(--color-amber-dark),
    var(--color-amber)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ============================================================
   LOADING SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-alt) 25%,
    var(--color-border-light) 50%,
    var(--color-bg-alt) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   FAQ ANIMATED ANSWERS
   ============================================================ */
.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-bottom: 0;
  transition:
    max-height 400ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 350ms ease,
    padding-bottom 400ms ease;
}
.faq-answer.is-open {
  max-height: 600px;
  opacity: 1;
  padding-bottom: var(--space-6);
}

/* ============================================================
   NUMBER COUNTER ANIMATION HELPER
   ============================================================ */
.stat-number-animated {
  display: inline-block;
  transition: all 0.3s ease;
}

/* ============================================================
   PAGE TRANSITION
   ============================================================ */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background: var(--color-amber);
  z-index: 9999;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.page-transition-overlay.active {
  animation: pageSlide 600ms cubic-bezier(0.77, 0, 0.175, 1) forwards;
}
@keyframes pageSlide {
  0%   { transform: scaleX(0); transform-origin: left; }
  50%  { transform: scaleX(1); transform-origin: left; }
  51%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ============================================================
   MICROINTERACTIONS — Buttons
   ============================================================ */
.btn-primary-cta,
.btn-pricing-cta,
.btn-form-submit,
.btn-newsletter,
.btn-cta-nav {
  position: relative;
  overflow: hidden;
}
.btn-primary-cta::after,
.btn-pricing-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms ease;
}
.btn-primary-cta:hover::after,
.btn-pricing-cta:hover::after {
  transform: scaleX(1);
}

/* ============================================================
   FOCUS RING ANIMATIONS
   ============================================================ */
:focus-visible {
  animation: focusRingPop 200ms ease both;
}
@keyframes focusRingPop {
  from { outline-width: 0; }
  to   { outline-width: 2px; }
}

/* ============================================================
   PREFERS REDUCED MOTION — Respect accessibility
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-eyebrow,
  .hero-title,
  .hero-subtitle,
  .hero-actions,
  .hero-social-proof,
  .camera-illustration,
  .camera-badge-price,
  .camera-badge-location,
  .hero-scroll-hint { animation: none; opacity: 1; transform: none; }
}
