/* ── ANIMATIONS — Atmospheric Modernism ──────────── */

/* ── REVEAL UP ───────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(24px) translateZ(0);
  transition: opacity 1s cubic-bezier(0.22,1,0.36,1),
              transform 1s cubic-bezier(0.22,1,0.36,1);
  transition-delay: var(--delay, 0s);
  backface-visibility: hidden;
}
[data-animate="left"]  { transform: translateX(-32px); }
[data-animate="right"] { transform: translateX(32px); }
[data-animate="scale"] { transform: scale(.94); }
[data-animate="fade"]  { transform: none; }
[data-animate].is-visible { opacity: 1 !important; transform: none !important; }

/* Stagger */
[data-stagger] > * {
  opacity: 0; transform: translateY(20px);
  transition: opacity .9s cubic-bezier(0.22,1,0.36,1),
              transform .9s cubic-bezier(0.22,1,0.36,1);
}
[data-stagger].is-visible > * { opacity: 1; transform: none; }
[data-stagger].is-visible > *:nth-child(1)  { transition-delay: 0s; }
[data-stagger].is-visible > *:nth-child(2)  { transition-delay: .08s; }
[data-stagger].is-visible > *:nth-child(3)  { transition-delay: .16s; }
[data-stagger].is-visible > *:nth-child(4)  { transition-delay: .24s; }
[data-stagger].is-visible > *:nth-child(5)  { transition-delay: .32s; }
[data-stagger].is-visible > *:nth-child(6)  { transition-delay: .40s; }
[data-stagger].is-visible > *:nth-child(n+7){ transition-delay: .48s; }

/* ── FILM GRAIN ───────────────────────────────────── */
.grain {
  position: fixed;
  inset: 0;           /* exactly covers the viewport — no overflow */
  width: 100vw;
  height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.022;
  pointer-events: none;
  z-index: 9999;
  animation: grain 10s steps(4) infinite;
  transform: translateZ(0);
  overflow: hidden;
}
@keyframes grain {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-4%,-8%); }
  50%  { transform: translate(6%,4%); }
  75%  { transform: translate(-3%,10%); }
  100% { transform: translate(0,0); }
}

/* ── SKELETON ─────────────────────────────────────── */
@keyframes sk-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.skeleton, .sk {
  background: linear-gradient(90deg, #201f1f 25%, #2a2a2a 50%, #201f1f 75%);
  background-size: 600px 100%;
  animation: sk-shimmer 1.5s infinite linear;
}

/* ── WISHLIST POP ─────────────────────────────────── */
@keyframes heartBurst {
  0%   { transform: scale(1); }
  25%  { transform: scale(1.4); }
  50%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.product-card__wishlist.burst { animation: heartBurst .4s cubic-bezier(.36,.07,.19,.97); }
.product-card__wishlist.active { color: #f87171 !important; }

/* ── BADGE BUMP ───────────────────────────────────── */
@keyframes badgePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.6); }
  70%  { transform: scale(.85); }
  100% { transform: scale(1); }
}
.navbar__badge.bump { animation: badgePop .35s cubic-bezier(.34,1.56,.64,1); }

/* ── COUNTER ──────────────────────────────────────── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stats-banner__number { animation: countUp .5s ease both; }

/* ── SPINNER ──────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.icon-spin { animation: spin 1s linear infinite; }

/* ── SLIDE IN ─────────────────────────────────────── */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── PREFERS-REDUCED-MOTION ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .grain          { animation: none !important; display: none; }
  .hero__bg-img   { transform: none !important; transition: none !important; }
  [data-animate]  { opacity: 1 !important; transform: none !important; transition: none !important; }
  [data-stagger] > * { opacity: 1 !important; transform: none !important; }
  .pc             { animation: none !important; opacity: 1 !important; transform: none !important; }
  .rg-card        { animation: none !important; }
  .journal-card   { animation: none !important; }
  .cta-card       { animation: none !important; opacity: 1 !important; transform: none !important; }
}