/* ============================================================
   Camada visual — heros, entrada e movimento
   Espelha as animações da home: cascata no hero, postais entrando
   ============================================================ */

/* ---------- Atmosfera dos heros ---------- */
.p-hero,
.p-hub-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.p-hero::before,
.p-hub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(244,239,227,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,239,227,.04) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at 68% 22%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse at 68% 22%, #000 0%, transparent 72%);
}
.p-hero::after,
.p-hub-hero::after {
  content: '';
  position: absolute;
  top: -28%;
  right: -12%;
  z-index: -1;
  width: 52vw;
  max-width: 760px;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(89,211,190,.13), transparent 62%);
  filter: blur(46px);
}

/* ---------- Entrada em cascata (como o hero da home) ---------- */
@keyframes pHeroUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.p-hero-grid > div:first-child > *,
.p-hub-hero-grid > div:first-child > * {
  animation: pHeroUp .6s var(--ease-out) both;
}
.p-hero-grid > div:first-child > *:nth-child(1),
.p-hub-hero-grid > div:first-child > *:nth-child(1) { animation-delay: .05s; }
.p-hero-grid > div:first-child > *:nth-child(2),
.p-hub-hero-grid > div:first-child > *:nth-child(2) { animation-delay: .12s; }
.p-hero-grid > div:first-child > *:nth-child(3),
.p-hub-hero-grid > div:first-child > *:nth-child(3) { animation-delay: .19s; }
.p-hero-grid > div:first-child > *:nth-child(4),
.p-hub-hero-grid > div:first-child > *:nth-child(4) { animation-delay: .26s; }
.p-hero-grid > div:first-child > *:nth-child(5) { animation-delay: .33s; }
.p-hero-grid > div:first-child > *:nth-child(6) { animation-delay: .4s; }
.p-hero-grid > div:first-child > *:nth-child(7) { animation-delay: .47s; }

/* ---------- Imagem de capa ---------- */
@keyframes pImgIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
.p-cover { animation: pImgIn .9s var(--ease-out) .2s both; }

/* ---------- Postais: entram e depois flutuam ---------- */
@keyframes pCardIn {
  from { opacity: 0; transform: translateY(28px) rotate(var(--r, 0deg)); }
  to   { opacity: 1; transform: translateY(0) rotate(var(--r, 0deg)); }
}
@keyframes pFloat {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-7px) rotate(var(--r, 0deg)); }
}

.p-visual .p-card {
  animation: pCardIn .95s var(--ease-out) both, pFloat 7s var(--ease-in-out) infinite;
}
.p-visual--guides .p-card--1 { animation-delay: .3s, 1.5s; }
.p-visual--guides .p-card--2 { animation-delay: .42s, 2.3s; }
.p-visual--guides .p-card--3 { animation-delay: .54s, 3.1s; }
.p-visual--partners .p-card:nth-child(1) { animation-delay: .3s, 1.5s; }
.p-visual--partners .p-card:nth-child(2) { animation-delay: .42s, 2.4s; }

/* ---------- Hover nos cards de conteúdo ---------- */
.p-cell { transition: transform .28s var(--ease-out), border-color .2s ease, background-color .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .p-cell:hover { transform: translateY(-3px); border-color: rgba(22,112,101,.35); }
  .p-sec .p-cell:hover { border-color: rgba(89,211,190,.35); }
}

@media (prefers-reduced-motion: reduce) {
  .p-hero-grid > div:first-child > *,
  .p-hub-hero-grid > div:first-child > *,
  .p-cover,
  .p-visual .p-card { animation: none; opacity: 1; }
  .p-visual .p-card { transform: rotate(var(--r, 0deg)); }
  .p-cell:hover { transform: none; }
}
