/* Interaction & motion polish — animation vocabulary */

@keyframes pulse-mark {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

.brand-mark {
  animation: pulse-mark 3.2s ease-in-out infinite;
}

.brand:hover .brand-mark {
  animation: none;
  opacity: 1;
}

.hero-frame {
  will-change: transform;
}

.hero-frame.is-parallax {
  transition: none;
}

/* Press / tap feedback — avoid transform on GSAP targets */
.telem-cell {
  transition: background 0.25s ease;
}

.telem-cell:active {
  background: color-mix(in srgb, var(--paper) 94%, var(--ink));
}

/* Ripple (feedback) */
.micro-btn {
  isolation: isolate;
}

.micro-ripple {
  position: absolute;
  border-radius: 0;
  background: currentColor;
  opacity: 0.22;
  transform: scale(0);
  pointer-events: none;
  mix-blend-mode: difference;
  animation: micro-ripple-expand 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes micro-ripple-expand {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* Hover lift on product media — scale + ease-out */
.stack-card-media img,
.telem-media img,
.product-media img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.stack-card:hover .stack-card-media img,
.telem-cell:hover .telem-media img {
  transform: scale(1.04);
  filter: contrast(1.05);
}

/* Accordion — layout animation feel (no transform; GSAP owns that) */
.accordion-item {
  transition:
    flex 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    padding 0.35s ease;
}

/* Number ticker digits */
.stat-digit {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  min-width: 0.6ch;
}

/* Nav link underline reveal via scale-x */
.site-nav > a:not(.micro-btn) {
  position: relative;
}

.site-nav > a:not(.micro-btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--hazard);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.site-nav > a:not(.micro-btn):hover::after,
.site-nav > a:not(.micro-btn):focus-visible::after {
  transform: scaleX(1);
}

/* Scroll progress pill — pop in on load */
.rare-scroll {
  animation: scroll-pop-in 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) 0.6s both;
}

@keyframes scroll-pop-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-mark,
  .rare-scroll,
  .micro-ripple {
    animation: none !important;
  }

  .site-nav > a:not(.micro-btn)::after {
    transition: none;
  }
}
