/* ═══════════════════════════════════════════════════════
   REVESTE v2 — Animações
═══════════════════════════════════════════════════════ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.anim-fade-up   { animation: fadeUp   .5s ease both; }
.anim-fade-in   { animation: fadeIn   .4s ease both; }
.anim-scale-in  { animation: scaleIn  .35s cubic-bezier(.34,1.56,.64,1) both; }

.anim-delay-1 { animation-delay: .08s; }
.anim-delay-2 { animation-delay: .16s; }
.anim-delay-3 { animation-delay: .24s; }
.anim-delay-4 { animation-delay: .32s; }

/* Transições de página */
.page-enter { animation: fadeUp .4s ease both; }

/* Hover suaves para cards */
.pcard, .meu-card {
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s ease, border-color .2s;
}
.pcard:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.pcard:hover .pcard__img img {
  transform: scale(1.04);
}

/* Imagem do card */
.pcard__img img {
  transition: transform .4s ease;
}

/* Botão favorito */
.pcard__fav, .btn-fav-lg {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), color .15s;
}
.pcard__fav:hover, .btn-fav-lg:hover { transform: scale(1.2); }
.pcard__fav.active, .btn-fav-lg.active { color: var(--danger); }

/* Botões */
.btn-primary, .btn-secondary, .btn-ghost, .btn-accent, .btn-danger {
  transition: opacity .18s, transform .15s, background .18s, border-color .18s, color .18s;
}

/* Dropdown navbar */
.nav-dropdown {
  transform-origin: top right;
  transition: opacity .18s, transform .18s;
}
.nav-dropdown:not([hidden]) {
  animation: scaleIn .18s cubic-bezier(.34,1.56,.64,1) both;
}

/* Tabs */
.pf-tab, .tipo-btn {
  transition: background .18s, color .18s, border-color .18s;
}

/* Galeria thumb */
.galeria__thumb {
  transition: opacity .15s, transform .15s;
}
.galeria__thumb:hover { opacity: .85; transform: scale(.97); }
.galeria__thumb.active { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Imagem principal da galeria */
#img-main {
  transition: opacity .25s ease;
}

/* Input focus */
.input-field {
  transition: border-color .18s, box-shadow .18s;
}

/* Skeleton pulse */
.sk-img, .sk-line {
  animation-timing-function: ease-in-out;
}

/* Mobile menu */
#nav-mobile {
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
  transform: translateX(-100%);
  opacity: 0;
}
#nav-mobile.open {
  transform: none;
  opacity: 1;
}

/* Tema toggle */
[data-theme] * {
  transition: background-color .2s, color .2s, border-color .2s;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Shake — feedback visual para campos obrigatórios não preenchidos */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.shake { animation: shake .5s ease; }
