/* ============================================================
   global-anim.css — Global page animation layer
   ============================================================ */

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes ga-rise {
  from { opacity:0; transform:translateY(34px); }
  to   { opacity:1; transform:none; }
}
@keyframes ga-from-left {
  from { opacity:0; transform:translateX(-44px) translateY(16px); }
  to   { opacity:1; transform:none; }
}
@keyframes ga-from-right {
  from { opacity:0; transform:translateX(44px) translateY(16px); }
  to   { opacity:1; transform:none; }
}
@keyframes ga-clip-up {
  from { clip-path:inset(0 0 110% 0); opacity:0; }
  to   { clip-path:inset(0 0 0 0);    opacity:1; }
}
@keyframes ga-pop {
  from { opacity:0; transform:scale(.86) translateY(22px); }
  to   { opacity:1; transform:none; }
}
@keyframes ga-accent-glow {
  0%   { filter:none; }
  45%  { filter:drop-shadow(0 0 18px rgba(43,212,217,.65)) drop-shadow(0 0 40px rgba(43,212,217,.3)); }
  100% { filter:none; }
}

/* ── Progressive enhancement gate ─────────────────────────── */
.js-ga .g-marker,
.js-ga .g-hero-sub,
.js-ga .g-tagline,
.js-ga .g-cta-row .btn { opacity:0; }

.js-ga .g-hero h1 .gw { display:inline-block; opacity:0; }

.js-ga .g-scale-cell { opacity:0; }
.js-ga .g-svc        { opacity:0; }
.js-ga .g-who-cell   { opacity:0; }
.js-ga .g-cov-left   { opacity:0; }
.js-ga .g-cov-stat   { opacity:0; }
.js-ga .g-award      { opacity:0; }
.js-ga .g-news       { opacity:0; }
.js-ga .g-contact-card .row { opacity:0; }

/* Section heads — animation-based so they can re-fire each scroll-down pass */
.js-ga .section-head { opacity:0; }
.js-ga .section-head.ga-in {
  animation: ga-rise .65s cubic-bezier(.16,1,.3,1) both;
}

/* ── Hero ──────────────────────────────────────────────────── */
.js-ga .g-marker.ga-in {
  animation: ga-from-left .55s cubic-bezier(.16,1,.3,1) both;
}
.js-ga .g-hero h1.ga-in .gw {
  animation: ga-clip-up .62s cubic-bezier(.16,1,.3,1) both;
}
.js-ga .g-hero h1 .accent.ga-glow {
  animation: ga-accent-glow 1.4s ease-out forwards;
}
.js-ga .g-hero-sub.ga-in {
  animation: ga-rise .65s cubic-bezier(.16,1,.3,1) both;
}
.js-ga .g-tagline.ga-in {
  animation: ga-rise .6s cubic-bezier(.16,1,.3,1) both;
}
.js-ga .g-cta-row .btn.ga-in {
  animation: ga-pop .5s cubic-bezier(.16,1,.3,1) both;
}

/* ── Stats ─────────────────────────────────────────────────── */
.js-ga .g-scale-cell.ga-in {
  animation: ga-pop .56s cubic-bezier(.16,1,.3,1) both;
}

/* ── Services — directional per card ───────────────────────── */
.js-ga .g-svc.ga-left.ga-in   { animation: ga-from-left  .7s cubic-bezier(.16,1,.3,1) both; }
.js-ga .g-svc.ga-center.ga-in { animation: ga-rise        .7s cubic-bezier(.16,1,.3,1) both; }
.js-ga .g-svc.ga-right.ga-in  { animation: ga-from-right .7s cubic-bezier(.16,1,.3,1) both; }

/* ── Who We Are — diagonal cascade ─────────────────────────── */
.js-ga .g-who-cell.ga-in {
  animation: ga-pop .52s cubic-bezier(.16,1,.3,1) both;
}

/* ── Coverage ───────────────────────────────────────────────── */
.js-ga .g-cov-left.ga-in {
  animation: ga-from-left .65s cubic-bezier(.16,1,.3,1) both;
}
.js-ga .g-cov-stat.ga-in {
  animation: ga-from-right .55s cubic-bezier(.16,1,.3,1) both;
}

/* ── Awards ─────────────────────────────────────────────────── */
.js-ga .g-award.ga-in {
  animation: ga-pop .5s cubic-bezier(.16,1,.3,1) both;
}

/* ── News ───────────────────────────────────────────────────── */
.js-ga .g-news.ga-in {
  animation: ga-rise .55s cubic-bezier(.16,1,.3,1) both;
}

/* ── Contact card rows ──────────────────────────────────────── */
.js-ga .g-contact-card .row.ga-in {
  animation: ga-from-right .5s cubic-bezier(.16,1,.3,1) both;
}

/* ── Tagline typewriter cursor ──────────────────────────────── */
@keyframes ga-blink {
  0%,49%  { opacity:1; }
  50%,100%{ opacity:0; }
}
@keyframes ga-cursor-out {
  to { opacity:0; }
}
.ga-cursor {
  display:inline-block;
  width:2px; height:.82em;
  background:currentColor;
  vertical-align:text-bottom;
  margin-left:1px;
  border-radius:1px;
  animation: ga-blink .65s step-end infinite;
}
.ga-cursor-done {
  animation: ga-blink .65s step-end 3,
             ga-cursor-out .3s ease 2s forwards;
}

/* ── Instant-show for scroll-up re-entries (no animation) ───── */
.js-ga .ga-snap,
.js-ga .ga-snap * {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ── prefers-reduced-motion ─────────────────────────────────── */
@media (prefers-reduced-motion:reduce) {
  .js-ga .g-marker,
  .js-ga .g-hero h1 .gw,
  .js-ga .g-hero-sub,
  .js-ga .g-tagline,
  .js-ga .g-cta-row .btn,
  .js-ga .g-scale-cell,
  .js-ga .g-svc,
  .js-ga .g-who-cell,
  .js-ga .g-cov-left,
  .js-ga .g-cov-stat,
  .js-ga .g-award,
  .js-ga .g-news,
  .js-ga .g-contact-card .row {
    opacity:1 !important;
    animation:none !important;
    transform:none !important;
  }
  .js-ga .section-head {
    opacity:1 !important; transform:none !important; transition:none !important;
  }
  .ga-cursor { display:none !important; }
}
