/* WEBLIXFLOW — cinematic motion layer
   Kept separate so the original visual system remains easy to maintain. */
:root {
  --wf-motion-ease: cubic-bezier(.2,.75,.25,1);
  --wf-scroll-progress: 0;
}
html { scroll-behavior: smooth; }
body { perspective: 1200px; }
.hero-copy-wrap,
.hero-visual {
  will-change: transform;
  transition: translate .12s linear, rotate .12s linear;
}
.hero-copy-wrap { translate: 0 calc(var(--wf-copy-y, 0) * 1px); }
.hero-visual {
  translate: 0 calc(var(--wf-visual-y, 0) * 1px);
  rotate: var(--wf-camera-rotate, 0deg);
  transform-style: preserve-3d;
}
.hero-visual .wf-hero-stage,
.hero-visual .network-stage {
  transform-style: preserve-3d;
}
section:not(.hero) { transform-origin: 50% 30%; }
.reveal {
  transition:
    opacity .8s var(--wf-motion-ease),
    transform .8s var(--wf-motion-ease),
    filter .8s var(--wf-motion-ease);
}
.reveal:not(.visible) { filter: blur(3px); }
.reveal.visible { filter: blur(0); }
.service-card,
.project {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.service-card::after,
.project::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--wf-sheen-opacity, 0);
  background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.09) 48%, transparent 72%);
  transform: translateX(var(--wf-sheen-x, -100%));
  transition: opacity .35s ease;
}
.service-card:hover::after,
.project:hover::after { opacity: 1; }

/* Horizontal story rails — desktop and large tablets only.
   Native overflow keeps touch, trackpads and keyboard scrolling accessible. */
@media (min-width: 961px) {
  .services-grid,
  .project-grid-upgraded {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 3px 24px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 3px;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(167,139,250,.55) rgba(167,139,250,.08);
  }
  .services-grid { align-items: stretch; }
  .services-grid .service-card {
    flex: 0 0 clamp(275px, 27vw, 330px);
    min-height: 320px;
    scroll-snap-align: start;
  }
  .project-grid-upgraded .project {
    flex: 0 0 clamp(430px, 48vw, 570px);
    min-height: 440px;
    scroll-snap-align: start;
  }
  .services-grid::-webkit-scrollbar,
  .project-grid-upgraded::-webkit-scrollbar { height: 7px; }
  .services-grid::-webkit-scrollbar-track,
  .project-grid-upgraded::-webkit-scrollbar-track {
    background: rgba(167,139,250,.08);
    border-radius: 99px;
  }
  .services-grid::-webkit-scrollbar-thumb,
  .project-grid-upgraded::-webkit-scrollbar-thumb {
    background: rgba(167,139,250,.48);
    border-radius: 99px;
  }
}
@media (max-width: 960px) {
  .hero-copy-wrap, .hero-visual { translate: none; rotate: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .hero-copy-wrap, .hero-visual { translate: none !important; rotate: none !important; }
  .reveal:not(.visible) { filter: none; }
}
