/* Pyari Consultancy - public website animations (CSS first, tiny JS helper in animations.js) */

/* page entrance: pure CSS, always ends fully visible */
@keyframes pageIn { from { opacity: 0 } to { opacity: 1 } }
body[data-animate] { animation: pageIn .45s ease both; }

/* scroll reveal: only active when JS has added the "js" class */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* buttons & cards */
.btn, button, .btn-primary, .project-btn { transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, color .22s ease, border-color .22s ease; }
.btn:hover:not(:disabled), button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.btn:active, button:active { transform: translateY(0); box-shadow: none; }
.card, .card-btn, .job-box, .service-card, .why-card, .project, .info-box, .box { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.card:hover, .card-btn:hover, .service-card:hover, .why-card:hover, .info-box:hover, .box:hover { transform: translateY(-5px); box-shadow: 0 14px 30px rgba(0,0,0,.16); }
.project-image img, .founder-image img { transition: transform .5s ease; }
.project:hover .project-image img, .founder-image:hover img { transform: scale(1.03); }

/* navigation */
nav ul li a { position: relative; transition: color .2s ease; }
nav ul li a:not(.nav-login)::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
nav ul li a:not(.nav-login):hover::after { transform: scaleX(1); }
@media (max-width: 768px) {
  nav ul { transition: opacity .25s ease; }
  nav ul.active { animation: menuIn .28s ease both; }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }
}

/* forms */
input, select, textarea { transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #239CD3 !important; box-shadow: 0 0 0 3px rgba(35,156,211,.22); }
a:focus-visible, button:focus-visible, [role="button"]:focus-visible { outline: 3px solid #239CD3; outline-offset: 2px; }
input:user-invalid, select:user-invalid, textarea:user-invalid { border-color: #d64545 !important; }

/* submit button loading feedback */
button.is-loading { position: relative; pointer-events: none; opacity: .85; }
button.is-loading::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* respect visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
