/* Animation-page motion effects — adapted from a reference agency theme
   (downloaded_theme_assets/css/styles.css + splide-core.min.css), re-themed to Nauf
   Network Studio's charcoal + electric-blue palette instead of the source theme's
   purple/orange so it doesn't clash with the rest of the site. Scoped to animation.html
   only — not linked site-wide, since the source stylesheet redefines body/h1-h6/header/
   footer globally and would otherwise fight with assets/css/style.css. */

/* ---- Headline entrance: one-time per-character rise-in on load ----
   NOTE: this previously animated `font-variation-settings: "wght"` on each inline-block
   .char span as an infinite "breathing" pulse. That caused exactly the overlapping/
   collapsing-letter glitch reported: increasing a variable font's weight renders wider
   glyphs, but each character's inline-block layout box doesn't always resize in lockstep
   with the live-interpolated glyph metrics, so neighboring letters crowd or overlap
   mid-animation. Fixed by animating only opacity + transform (translateY) — properties
   that never change a glyph's rendered width — and making it a single on-load reveal
   instead of an infinite loop, which reads cleaner and more modern anyway. */
.breathing-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  animation: char-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: calc(var(--char-index, 0) * 26ms);
}

@keyframes char-rise {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .breathing-title .char { animation: none; opacity: 1; transform: none; }
}

/* ---- "Marquee double" sentence reveal — two fragments slide in from opposite
   edges and converge into one line, exactly like the reference theme's
   `.marquee.double span { transform: translateX(100vw)/-100vw }` pattern (there it's
   driven by GSAP; here a scroll IntersectionObserver toggles .in-view instead). ---- */
.marquee-double-heading {
  overflow: hidden;
}

.marquee-double-heading .frag {
  display: block;
  width: 100%;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.marquee-double-heading .frag-left { transform: translateX(60%); }
.marquee-double-heading .frag-right { transform: translateX(-60%); }

.marquee-double-heading.in-view .frag-left,
.marquee-double-heading.in-view .frag-right {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .marquee-double-heading .frag { transition: none; transform: none; }
}

/* ---- Hover-zoom showreel card ---- */
.zoom-card {
  overflow: hidden;
  border-radius: 8px;
}

.zoom-card video, .zoom-card img {
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1);
  display: block;
}

.zoom-card:hover video, .zoom-card:hover img {
  transform: scale(1.1);
}

/* ---- Blurred play-button overlay (frosted-glass circle) ---- */
.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.2);
}

/* ---- "Innovation at work" style showcase: header row + full-bleed video cards ---- */
.showcase-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.showcase-card {
  position: relative;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

.showcase-card video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.showcase-card:hover video {
  transform: scale(1.06);
}

.showcase-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

.showcase-card .showcase-title {
  position: absolute;
  bottom: 24px;
  left: 28px;
  right: 28px;
  z-index: 2;
  color: #fff;
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
  margin: 0;
  pointer-events: none;
}

.showcase-card .showcase-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  box-shadow: 0 0 16px rgba(0,85,255,0.5);
}

@media (min-width: 768px) {
  .showcase-card { height: 480px; }
}

/* ---- Giant tagline with per-character fly-up-fade-in (the reference theme's
   `.footer-tagline[data-splitting]` pattern, normally driven by Splitting() + GSAP
   stagger — reproduced here with the same char-splitter script + IntersectionObserver
   used elsewhere on this page instead of pulling in GSAP). ---- */
.tagline-display {
  font-size: clamp(2.25rem, 8vw, 5.5rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.tagline-display .char {
  display: inline-block;
  transform: translateY(60px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.5s ease;
  transition-delay: calc(var(--char-index, 0) * 35ms);
}

.tagline-display.in-view .char {
  transform: translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .tagline-display .char { transform: none; opacity: 1; transition: none; }
}
