/* ============================================================
   tikva-anim.css — Animation layer for infra/tikva/index.html
   ============================================================ */

/* ── Keyframes ─────────────────────────────────────────────── */
@keyframes tk-rise {
  from { opacity:0; transform:translateY(30px); }
  to   { opacity:1; transform:none; }
}
@keyframes tk-from-left {
  from { opacity:0; transform:translateX(-48px) translateY(10px); }
  to   { opacity:1; transform:none; }
}
@keyframes tk-from-right {
  from { opacity:0; transform:translateX(48px) translateY(10px); }
  to   { opacity:1; transform:none; }
}
@keyframes tk-pop {
  from { opacity:0; transform:scale(.88) translateY(20px); }
  to   { opacity:1; transform:none; }
}
@keyframes tk-clip-up {
  from { clip-path:inset(0 0 110% 0); opacity:0; }
  to   { clip-path:inset(0 0 0 0);    opacity:1; }
}

/* ── Neutralize the existing inline reveal system ───────────
   Container .reveal elements become visible instantly; their
   children are gated and animated individually below.         */
.js-tk .sec-head.reveal,        .js-tk .sec-head.reveal.in,
.js-tk .spec-grid.reveal,       .js-tk .spec-grid.reveal.in,
.js-tk .headline.reveal,        .js-tk .headline.reveal.in,
.js-tk .svc-grid.reveal,        .js-tk .svc-grid.reveal.in,
.js-tk .ila-flow.reveal,        .js-tk .ila-flow.reveal.in,
.js-tk .duct-feature.reveal,    .js-tk .duct-feature.reveal.in,
.js-tk .route-progress.reveal,  .js-tk .route-progress.reveal.in {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ── CSS gate ───────────────────────────────────────────────── */
/* Hero */
.js-tk .hero h1 .gw         { display:inline-block; opacity:0; }
.js-tk .hero .hero-sub      { opacity:0; }
.js-tk .hero-stat           { opacity:0; }
.js-tk .hero-cta-row        { opacity:0; }

/* Section heads */
.js-tk .sec-head .marker    { opacity:0; }
.js-tk .sec-head h2         { opacity:0; }
.js-tk .sec-head .lead      { opacity:0; }

/* Spec grids */
.js-tk .spec-image          { opacity:0; }
.js-tk .spec-row            { opacity:0; }
.js-tk .duct-feature .feature-image { opacity:0; }
.js-tk .duct-feature .duct-big      { opacity:0; }

/* Headline cells */
.js-tk .headline-cell       { opacity:0; }

/* Service cards */
.js-tk .svc-card            { opacity:0; }

/* ILA flow */
.js-tk .ila-head            { opacity:0; }
.js-tk .ila-item            { opacity:0; }
.js-tk .ila-foot            { opacity:0; }

/* Route progress */
.js-tk .rp-main             { opacity:0; }
.js-tk .rp-bar              { opacity:0; }
.js-tk .rp-stats            { opacity:0; }

/* Final CTA */
.js-tk .final-cta .marker   { opacity:0; }
.js-tk .final-cta h2        { opacity:0; }
.js-tk .final-cta .lead     { opacity:0; }
.js-tk .tikva-form-wrap     { opacity:0; }

/* ── Hero animations (on load) ──────────────────────────────── */
.js-tk .hero h1.tk-in .gw {
  animation: tk-clip-up .6s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .hero .hero-sub.tk-in {
  animation: tk-rise .7s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .hero-stat.tk-in {
  animation: tk-pop .55s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .hero-cta-row.tk-in {
  animation: tk-rise .6s cubic-bezier(.16,1,.3,1) both;
}

/* ── Section heads ──────────────────────────────────────────── */
.js-tk .sec-head .marker.tk-in {
  animation: tk-from-left .52s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .sec-head h2.tk-in {
  animation: tk-rise .65s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .sec-head .lead.tk-in {
  animation: tk-rise .6s cubic-bezier(.16,1,.3,1) both;
}

/* ── Spec grid — image ──────────────────────────────────────── */
/* Default: image from left (ILA, Trench) */
.js-tk .spec-image.tk-in {
  animation: tk-from-left .72s cubic-bezier(.16,1,.3,1) both;
}
/* Override: image from right (ODF, Cable) */
.js-tk .spec-image.tk-right.tk-in {
  animation: tk-from-right .72s cubic-bezier(.16,1,.3,1) both;
}

/* ── Spec rows ──────────────────────────────────────────────── */
/* Default: rows from right */
.js-tk .spec-row.tk-in {
  animation: tk-from-right .5s cubic-bezier(.16,1,.3,1) both;
}
/* Override: rows from left (ODF, Cable — image is on the right) */
.js-tk .spec-row.tk-left.tk-in {
  animation: tk-from-left .5s cubic-bezier(.16,1,.3,1) both;
}

/* ── Duct feature ────────────────────────────────────────────── */
.js-tk .duct-feature .feature-image.tk-in {
  animation: tk-from-left .72s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .duct-feature .duct-big.tk-in {
  animation: tk-rise .65s cubic-bezier(.16,1,.3,1) both;
}

/* ── Headline cells ─────────────────────────────────────────── */
.js-tk .headline-cell.tk-in {
  animation: tk-pop .52s cubic-bezier(.16,1,.3,1) both;
}

/* ── Service cards ──────────────────────────────────────────── */
.js-tk .svc-card.tk-in {
  animation: tk-pop .55s cubic-bezier(.16,1,.3,1) both;
}

/* ── ILA flow ───────────────────────────────────────────────── */
.js-tk .ila-head.tk-in {
  animation: tk-rise .6s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .ila-item.tk-in {
  animation: tk-from-left .38s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .ila-foot.tk-in {
  animation: tk-rise .5s cubic-bezier(.16,1,.3,1) both;
}

/* ── Route progress ─────────────────────────────────────────── */
.js-tk .rp-main.tk-in {
  animation: tk-rise .7s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .rp-bar.tk-in {
  animation: tk-rise .55s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .rp-stats.tk-in {
  animation: tk-rise .6s cubic-bezier(.16,1,.3,1) both;
}

/* ── Final CTA ──────────────────────────────────────────────── */
.js-tk .final-cta .marker.tk-in {
  animation: tk-from-left .52s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .final-cta h2.tk-in {
  animation: tk-rise .65s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .final-cta .lead.tk-in {
  animation: tk-rise .6s cubic-bezier(.16,1,.3,1) both;
}
.js-tk .tikva-form-wrap.tk-in {
  animation: tk-rise .7s cubic-bezier(.16,1,.3,1) both;
}

/* ── Instant-show on scroll-up ──────────────────────────────── */
.js-tk .tk-snap,
.js-tk .tk-snap * {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ── prefers-reduced-motion ─────────────────────────────────── */
@media (prefers-reduced-motion:reduce) {
  .js-tk .hero h1 .gw,
  .js-tk .hero .hero-sub,
  .js-tk .hero-stat,
  .js-tk .hero-cta-row,
  .js-tk .sec-head .marker,
  .js-tk .sec-head h2,
  .js-tk .sec-head .lead,
  .js-tk .spec-image,
  .js-tk .spec-row,
  .js-tk .duct-feature .feature-image,
  .js-tk .duct-feature .duct-big,
  .js-tk .headline-cell,
  .js-tk .svc-card,
  .js-tk .ila-head,
  .js-tk .ila-item,
  .js-tk .ila-foot,
  .js-tk .rp-main,
  .js-tk .rp-bar,
  .js-tk .rp-stats,
  .js-tk .final-cta .marker,
  .js-tk .final-cta h2,
  .js-tk .final-cta .lead,
  .js-tk .tikva-form-wrap {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
