/* =========================================================
   PATH WAY INTERNATIONAL – MOTION DESIGN
   Add this file as animation.css next to the HTML document.
   ========================================================= */

.pwi {
  --pwi-ease: cubic-bezier(.2, .7, .2, 1);
}

/* Navigation: subtle entrance */
.pwi .nav {
  animation: pwi-nav-in .9s var(--pwi-ease) both;
}

@keyframes pwi-nav-in {
  from { opacity: 0; transform: translateY(-22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero content: staggered entrance */
.pwi .hero .wrap > h1,
.pwi .hero .wrap > .big,
.pwi .hero .wrap > .intro,
.pwi .hero .wrap > .cta {
  animation: pwi-hero-in .85s var(--pwi-ease) both;
}
.pwi .hero .wrap > .big    { animation-delay: .12s; }
.pwi .hero .wrap > .intro  { animation-delay: .22s; }
.pwi .hero .wrap > .cta    { animation-delay: .32s; }

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

/* Draw the underline beneath “Talent” */
.pwi .hero .big svg path {
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: pwi-draw-underline 1.1s .45s ease forwards;
}
@keyframes pwi-draw-underline {
  to { stroke-dashoffset: 0; }
}

/* Portrait bubbles: gentle independent floating motion */
.pwi .hero .bubble {
  overflow: hidden;
  border-radius: 50%;
  background: #e9ecff;
  will-change: transform;
}
.pwi .hero .bubble img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 50%;
}
.pwi .hero .b1 { animation: pwi-bubble-float 6.4s ease-in-out infinite; }
.pwi .hero .b2 { animation: pwi-bubble-float 7.1s -1.2s ease-in-out infinite; }
.pwi .hero .b3 { animation: pwi-bubble-float 6.8s -2.3s ease-in-out infinite; }
.pwi .hero .b4 { animation: pwi-bubble-float 7.4s -3.1s ease-in-out infinite; }
.pwi .hero .b5 { animation: pwi-bubble-float 6.6s -4s ease-in-out infinite; }

@keyframes pwi-bubble-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

/* 360° orbit: rotate the outer group while keeping labels upright */
.pwi .orbit { position: relative; }
.pwi .orbit-rotation {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  animation: pwi-orbit-rotate 60s linear infinite;
}
.pwi .orbit-rotation .node {
  animation: pwi-node-counter-rotate 60s linear infinite;
}
@keyframes pwi-orbit-rotate {
  to { transform: rotate(360deg); }
}
@keyframes pwi-node-counter-rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(-360deg); }
}
.pwi .orbit .core {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Hover details for cards and buttons */
.pwi .why,
.pwi .pillar,
.pwi .logo-slot {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.pwi .why:hover,
.pwi .pillar:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 34px -22px rgba(22, 32, 79, .45);
}
.pwi .logo-slot:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
}
.pwi .btn {
  transition: transform .22s ease, background-color .22s ease,
              color .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.pwi .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 20px -12px rgba(22, 32, 79, .55);
}
.pwi .btn:active { transform: translateY(0) scale(.98); }

.pwi .node i {
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.pwi .node:hover i {
  transform: scale(1.12);
  background: var(--lav);
  box-shadow: 0 8px 20px -7px rgba(58, 76, 242, .45);
}

/* FAQ and form micro-interactions */
.pwi details {
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pwi details[open] {
  border-color: rgba(58, 76, 242, .35);
  box-shadow: 0 8px 24px -20px rgba(22, 32, 79, .5);
}
.pwi summary { transition: color .2s ease; }
.pwi summary:hover { color: var(--blue); }
.pwi .form input,
.pwi .form textarea {
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pwi .form input:focus,
.pwi .form textarea:focus {
  box-shadow: 0 0 0 3px rgba(58, 76, 242, .10);
}

/* Scroll reveal is progressive: content stays visible without JS */
.pwi.pwi-motion-ready [data-pwi-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity .7s var(--pwi-ease),
    transform .7s var(--pwi-ease);
  transition-delay: var(--pwi-reveal-delay, 0ms);
}
.pwi.pwi-motion-ready [data-pwi-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive positioning: retain all five portraits on small screens */
@media (max-width: 900px) {
  .pwi .b1 { width: 70px; height: 70px; left: 3%; top: 14px; }
  .pwi .b2 { width: 56px; height: 56px; right: 3%; top: 18px; }
  .pwi .b3 { width: 60px; height: 60px; right: 7%; top: auto; bottom: 14px; }
  .pwi .b4 { width: 64px; height: 64px; left: 4%; bottom: 14px; }
  .pwi .b5 { width: 52px; height: 52px; right: 42%; bottom: 4px; }
}
@media (max-width: 560px) {
  .pwi .hero { padding-top: 92px; padding-bottom: 82px; }
  .pwi .hero .bubble { border-width: 3px; }
  .pwi .b1 { width: 54px; height: 54px; left: 3%; top: 14px; }
  .pwi .b2 { width: 48px; height: 48px; right: 3%; top: 18px; }
  .pwi .b3 { width: 48px; height: 48px; right: 4%; bottom: 10px; }
  .pwi .b4 { width: 50px; height: 50px; left: 3%; bottom: 10px; }
  .pwi .b5 { width: 42px; height: 42px; right: 43%; bottom: 2px; }
}

/* Respect the visitor’s reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .pwi *,
  .pwi *::before,
  .pwi *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
  .pwi.pwi-motion-ready [data-pwi-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
