/*
 * InteliaOps · Public site motion layer
 * ------------------------------------
 * Purpose:
 * - make the public site feel alive without turning it into a visual demo;
 * - reserve persistent motion for concepts that represent flow, processing,
 *   anticipation and progression;
 * - keep text and calls to action visually dominant;
 * - remain fully decorative: no animation carries information by itself;
 * - respect the user's reduced-motion preference.
 *
 * This stylesheet is intentionally scoped to .v4-site so it does not affect
 * the authenticated Client Portal that ships in the same application bundle.
 */

/* --------------------------------------------------------------------------
   0. SECTION REVEAL · perceptible, staggered and bidirectional
   -------------------------------------------------------------------------- */

/*
 * A section becomes active only after entering the reading zone. Its direct
 * children rise in a deliberate cascade, and leaving the viewport resets the
 * scene so it can play again when the user reverses direction.
 */
.v4-site .io-section-reveal.io-section-reveal > * {
  opacity: 0;
  transform: translate3d(0, 64px, 0);
  transition:
    opacity 1.05s cubic-bezier(.22, 1, .36, 1),
    transform 1.05s cubic-bezier(.22, 1, .36, 1);
  transition-delay: 0s;
  will-change: opacity, transform;
}

.v4-site .io-section-reveal[data-reveal-visible='true'] > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.v4-site .io-section-reveal[data-reveal-visible='true'] > :nth-child(1) {
  transition-delay: calc(var(--io-reveal-delay, 0s) + .08s);
}

.v4-site .io-section-reveal[data-reveal-visible='true'] > :nth-child(2) {
  transition-delay: calc(var(--io-reveal-delay, 0s) + .28s);
}

.v4-site .io-section-reveal[data-reveal-visible='true'] > :nth-child(3) {
  transition-delay: calc(var(--io-reveal-delay, 0s) + .48s);
}

.v4-site .io-section-reveal[data-reveal-visible='true'] > :nth-child(4) {
  transition-delay: calc(var(--io-reveal-delay, 0s) + .68s);
}

.v4-site .io-section-reveal[data-reveal-visible='true'] > :nth-child(n + 5) {
  transition-delay: calc(var(--io-reveal-delay, 0s) + .82s);
}

/* --------------------------------------------------------------------------
   1. HERO · ambient data current
   -------------------------------------------------------------------------- */

.v4-site .v4-hero {
  isolation: isolate;
}

/*
 * Original vector artwork built specifically for InteliaOps.
 * It is not a video and does not copy a third-party asset: the paths are
 * rendered by the browser from this inline SVG and drift very slowly.
 */
.v4-site .v4-hero::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: 66px;
  right: -10vw;
  width: min(84vw, 1280px);
  height: min(78vh, 760px);
  pointer-events: none;
  opacity: .68;
  background: center / 142% 116% no-repeat url('/intelia-wave-halo.svg');
  filter: drop-shadow(0 20px 34px rgba(0, 111, 181, .14));
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.16) 20%, #000 47%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.16) 20%, #000 47%, #000 100%);
  transform-origin: 74% 52%;
  animation: io-site-current 11.5s cubic-bezier(.45,.05,.42,.95) infinite alternate;
}

.v4-site .v4-hero-grid {
  position: relative;
  z-index: 1;
}

.v4-site .hero-copy-parallax,
.v4-site .hero-visual-parallax,
.v4-site .method-intro-parallax,
.v4-site .v4-method-grid {
  will-change: transform, opacity;
}

@keyframes io-site-current {
  0% {
    background-position: 40% 57%;
    transform: translate3d(-4.5%, 12px, 0) scale(.96, .985);
    opacity: .48;
  }
  52% {
    background-position: 52% 46%;
    transform: translate3d(.8%, -10px, 0) scale(1.025, 1.04);
    opacity: .76;
  }
  100% {
    background-position: 64% 53%;
    transform: translate3d(5%, 7px, 0) scale(1.07, .99);
    opacity: .64;
  }
}

/* --------------------------------------------------------------------------
   2. HERO VISUAL · the data flow should keep breathing even without hover
   -------------------------------------------------------------------------- */

.v4-site .data-constellation {
  box-shadow: 0 24px 70px rgba(22,53,86,.075);
  transition: border-color .35s ease, box-shadow .35s ease, transform .35s ease;
  animation: io-constellation-breathe 8s ease-in-out infinite alternate;
}

/* The original spotlight was placed behind the card background and was nearly
 * invisible. It now sits below the content, moves on its own and still follows
 * the pointer through the existing --spot-x / --spot-y variables. */
.v4-site .spotlight {
  z-index: 0;
  width: 540px;
  height: 540px;
  left: calc(var(--spot-x) - 270px);
  top: calc(var(--spot-y) - 270px);
  opacity: .96;
  background:
    radial-gradient(circle at 44% 43%, rgba(255,255,255,.98) 0 4%, rgba(116,213,252,.58) 13%, rgba(0,168,236,.27) 29%, rgba(0,129,213,.12) 46%, rgba(0,78,141,.04) 59%, transparent 72%);
  box-shadow: 0 0 95px rgba(0,168,236,.22);
  animation: io-spotlight-drift 7.4s ease-in-out infinite alternate;
}

.v4-site .spotlight::before,
.v4-site .spotlight::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.v4-site .spotlight::before {
  inset: 22%;
  border: 1px solid rgba(0,129,213,.20);
  box-shadow: 0 0 0 28px rgba(0,168,236,.035), 0 0 55px rgba(0,168,236,.18);
}

.v4-site .spotlight::after {
  inset: 35%;
  background: radial-gradient(circle, rgba(255,255,255,.86), rgba(0,168,236,.15) 42%, transparent 70%);
  animation: io-spotlight-core 4.2s ease-in-out infinite alternate;
}

@keyframes io-spotlight-drift {
  from { transform: translate3d(-34px, 24px, 0) scale(.88); }
  to { transform: translate3d(38px, -30px, 0) scale(1.12); }
}

@keyframes io-spotlight-core {
  from { transform: scale(.72); opacity: .46; }
  to { transform: scale(1.24); opacity: 1; }
}

.v4-site .data-constellation::after {
  content: '';
  position: absolute;
  z-index: 0;
  top: -24%;
  bottom: -24%;
  left: -46%;
  width: 34%;
  pointer-events: none;
  opacity: .28;
  background: linear-gradient(90deg, transparent, rgba(117,211,250,.10), rgba(255,255,255,.78), rgba(0,168,236,.08), transparent);
  transform: skewX(-12deg);
  animation: io-constellation-scan 11s ease-in-out infinite;
}

.v4-site .constellation-top,
.v4-site .constellation-stage,
.v4-site .constellation-footer {
  position: relative;
  z-index: 1;
}

.v4-site .data-constellation:hover {
  border-color: #a7c9dc;
  box-shadow: 0 30px 86px rgba(22,53,86,.11);
}

@keyframes io-constellation-breathe {
  from { box-shadow: 0 22px 64px rgba(22,53,86,.055); }
  to { box-shadow: 0 28px 78px rgba(0,129,213,.105); }
}

@keyframes io-constellation-scan {
  0%, 14% { left: -46%; opacity: 0; }
  23% { opacity: .24; }
  48% { opacity: .32; }
  66% { left: 116%; opacity: 0; }
  100% { left: 116%; opacity: 0; }
}

.v4-site .source-cloud span,
.v4-site .outcome-cloud span {
  animation: io-node-listening 8.8s ease-in-out infinite;
}

.v4-site .source-cloud span:nth-child(2),
.v4-site .outcome-cloud span:nth-child(2) { animation-delay: -7.1s; }
.v4-site .source-cloud span:nth-child(3),
.v4-site .outcome-cloud span:nth-child(3) { animation-delay: -5.4s; }
.v4-site .source-cloud span:nth-child(4),
.v4-site .outcome-cloud span:nth-child(4) { animation-delay: -3.7s; }
.v4-site .source-cloud span:nth-child(5) { animation-delay: -2s; }

@keyframes io-node-listening {
  0%, 61%, 100% {
    border-color: #d9e0e7;
    box-shadow: 0 0 0 rgba(0,129,213,0);
  }
  68% {
    border-color: #b9d9ea;
    box-shadow: 0 8px 24px rgba(0,129,213,.055);
  }
  76% {
    border-color: #d9e0e7;
    box-shadow: 0 0 0 rgba(0,129,213,0);
  }
}

/* Outcome nodes use a slightly more luminous resting palette. */
.v4-site .outcome-cloud span {
  animation-name: io-outcome-ready;
}

@keyframes io-outcome-ready {
  0%, 61%, 100% {
    border-color: #c6deec;
    background: #f6fbfe;
    box-shadow: 0 0 0 rgba(0,129,213,0);
  }
  68% {
    border-color: #8dc8e6;
    background: #fbfeff;
    box-shadow: 0 8px 24px rgba(0,129,213,.08);
  }
  76% {
    border-color: #c6deec;
    background: #f6fbfe;
    box-shadow: 0 0 0 rgba(0,129,213,0);
  }
}

.v4-site .intelia-core {
  box-shadow: inset 0 0 0 0 rgba(0,168,236,0);
  animation: io-core-live 5.8s ease-in-out infinite;
}

.v4-site .intelia-core::before,
.v4-site .intelia-core::after {
  animation: io-core-node 3.4s ease-in-out infinite;
}

.v4-site .intelia-core::after { animation-delay: -1.7s; }

@keyframes io-core-live {
  0%, 100% {
    border-color: var(--brand-600);
    box-shadow: inset 0 0 0 0 rgba(0,168,236,0), 0 0 0 rgba(0,129,213,0);
  }
  50% {
    border-color: #38b7ed;
    box-shadow: inset 0 0 36px rgba(0,168,236,.035), 0 12px 32px rgba(0,129,213,.07);
  }
}

@keyframes io-core-node {
  0%, 100% { box-shadow: 0 0 0 5px rgba(0,168,236,.07); opacity: .68; }
  50% { box-shadow: 0 0 0 10px rgba(0,168,236,0); opacity: 1; }
}

.v4-site .flow-lines i::after {
  width: 31%;
  box-shadow: 0 0 9px rgba(0,168,236,.42);
}

/* --------------------------------------------------------------------------
   3. DATA SOURCES · periodic listening signals
   -------------------------------------------------------------------------- */

.v4-site .source-card {
  position: relative;
  overflow: hidden;
}

.v4-site .source-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -44%;
  width: 42%;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, #00a8ec 52%, rgba(255,255,255,.9), transparent);
  filter: drop-shadow(0 0 5px rgba(0,168,236,.38));
  animation: io-source-listen 10.8s ease-in-out infinite;
}

.v4-site .source-grid > div:nth-child(2) .source-card::after { animation-delay: -9s; }
.v4-site .source-grid > div:nth-child(3) .source-card::after { animation-delay: -7.2s; }
.v4-site .source-grid > div:nth-child(4) .source-card::after { animation-delay: -5.4s; }
.v4-site .source-grid > div:nth-child(5) .source-card::after { animation-delay: -3.6s; }
.v4-site .source-grid > div:nth-child(6) .source-card::after { animation-delay: -1.8s; }

.v4-site .source-card svg {
  transition: transform .28s cubic-bezier(.22,1,.36,1), filter .28s ease;
}

.v4-site .source-card:hover svg {
  transform: translateY(-2px) scale(1.08);
  filter: drop-shadow(0 4px 8px rgba(0,129,213,.18));
}

@keyframes io-source-listen {
  0%, 65% { left: -44%; opacity: 0; }
  69% { opacity: .72; }
  81% { left: 108%; opacity: .78; }
  85%, 100% { left: 108%; opacity: 0; }
}

/* --------------------------------------------------------------------------
   4. CAPABILITIES · visuals that feel computational, not decorative
   -------------------------------------------------------------------------- */

.v4-site .v4-capability-card::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -86px;
  top: 68px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(0,168,236,.11), transparent 68%);
  transform: scale(.78);
  transition: opacity .4s ease, transform .55s cubic-bezier(.22,1,.36,1);
}

.v4-site .capability-reveal:hover .v4-capability-card::after,
.v4-site .capability-reveal:focus-within .v4-capability-card::after {
  opacity: 1;
  transform: scale(1);
}

.v4-site .mini-forecast path {
  stroke-dasharray: 7 10;
  animation: io-forecast-stream 7s linear infinite;
}

.v4-site .mini-bars i {
  transform-origin: 50% 100%;
  animation: io-bar-breathe 4.6s ease-in-out infinite alternate;
}

.v4-site .mini-bars i:nth-child(2) { animation-delay: -.8s; }
.v4-site .mini-bars i:nth-child(3) { animation-delay: -1.6s; }
.v4-site .mini-bars i:nth-child(4) { animation-delay: -2.4s; }
.v4-site .mini-bars i:nth-child(5) { animation-delay: -3.2s; }

.v4-site .mini-badge {
  animation: io-forecast-badge 4.8s ease-in-out infinite;
}

@keyframes io-forecast-stream {
  to { stroke-dashoffset: -68; }
}

@keyframes io-bar-breathe {
  from { transform: scaleY(.94); opacity: .72; }
  to { transform: scaleY(1.035); opacity: 1; }
}

@keyframes io-forecast-badge {
  0%, 100% { border-color: #cfd9e1; box-shadow: 0 0 0 rgba(0,129,213,0); }
  50% { border-color: #9ecde4; box-shadow: 0 6px 16px rgba(0,129,213,.08); }
}

/* --------------------------------------------------------------------------
   5. TRANSFORMATION · light visibly travels from current state to outcome
   -------------------------------------------------------------------------- */

.v4-site .transform-action {
  overflow: hidden;
}

.v4-site .transform-action::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  opacity: .36;
  background: linear-gradient(90deg, transparent 0%, rgba(0,168,236,.03) 34%, rgba(120,214,250,.18) 50%, rgba(0,168,236,.03) 66%, transparent 100%);
  transform: translateX(-115%);
  animation: io-transform-sweep 6.9s ease-in-out infinite;
}

.v4-site .transform-action > * {
  position: relative;
  z-index: 1;
}

.v4-site .transformation-row {
  transition: box-shadow .3s ease;
}

.v4-site .transformation-row:hover {
  box-shadow: inset 0 0 0 1px rgba(0,129,213,.08);
}

.v4-site .transformation-row:hover .after-state {
  background: linear-gradient(105deg, #f7fbfe, #fbfeff 66%, #f2faff);
}

@keyframes io-transform-sweep {
  0%, 20% { transform: translateX(-115%); opacity: 0; }
  31% { opacity: .34; }
  62% { transform: translateX(115%); opacity: .42; }
  72%, 100% { transform: translateX(115%); opacity: 0; }
}

.v4-site .transformation-outcomes span {
  position: relative;
  overflow: hidden;
}

.v4-site .transformation-outcomes span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 100%;
  height: 2px;
  background: linear-gradient(90deg, #00a8ec, #8bdcff);
  animation: io-outcome-confirm 8s ease-in-out infinite;
}

.v4-site .transformation-outcomes span:nth-child(2)::before { animation-delay: -6s; }
.v4-site .transformation-outcomes span:nth-child(3)::before { animation-delay: -4s; }
.v4-site .transformation-outcomes span:nth-child(4)::before { animation-delay: -2s; }

@keyframes io-outcome-confirm {
  0%, 70%, 100% { right: 100%; opacity: 0; }
  76% { opacity: .8; }
  88% { right: 0; opacity: 1; }
  94% { right: 0; opacity: 0; }
}

/* --------------------------------------------------------------------------
   6. METHOD · a progress signal moves through the four stages
   -------------------------------------------------------------------------- */

.v4-site .v4-method-grid {
  position: relative;
}

.v4-site .v4-method-grid::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: -1px;
  left: -28%;
  width: 26%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #4dc8ff 55%, #dff7ff, transparent);
  filter: drop-shadow(0 0 7px rgba(77,200,255,.44));
  animation: io-method-progress 9.5s linear infinite;
}

.v4-site .v4-method-grid > div:nth-child(2) .method-dot { animation-delay: -.65s; }
.v4-site .v4-method-grid > div:nth-child(3) .method-dot { animation-delay: -1.3s; }
.v4-site .v4-method-grid > div:nth-child(4) .method-dot { animation-delay: -1.95s; }

@keyframes io-method-progress {
  from { left: -28%; opacity: 0; }
  8% { opacity: 1; }
  88% { opacity: 1; }
  to { left: 104%; opacity: 0; }
}

/* --------------------------------------------------------------------------
   7. APPROACH + CTA · motion closes the story instead of stopping abruptly
   -------------------------------------------------------------------------- */

/* Product scene · the motion values are tied to scroll in ProductExperience. */
.v4-site .product-experience-copy,
.v4-site .pulse-product-preview,
.v4-site .product-scroll-aura {
  will-change: transform, opacity;
}

.v4-site .product-scroll-aura {
  position: absolute;
  z-index: 0;
  top: 8%;
  left: 44%;
  width: min(58vw, 780px);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  opacity: .88;
  background:
    radial-gradient(circle, rgba(67,196,246,.28) 0 9%, rgba(0,168,236,.16) 24%, rgba(0,129,213,.08) 43%, transparent 69%);
  border: 1px solid rgba(111,210,250,.12);
  box-shadow: 0 0 0 72px rgba(0,168,236,.026), 0 0 140px rgba(0,168,236,.15);
}

.v4-site .product-scroll-aura::before,
.v4-site .product-scroll-aura::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.v4-site .product-scroll-aura::before {
  inset: 14%;
  border: 1px solid rgba(119,211,248,.19);
  box-shadow: inset 0 0 70px rgba(0,168,236,.08);
}

.v4-site .product-scroll-aura::after {
  inset: 30%;
  background: radial-gradient(circle at 42% 38%, rgba(255,255,255,.20), rgba(0,168,236,.07) 48%, transparent 70%);
  animation: io-product-aura-breathe 5.4s ease-in-out infinite alternate;
}

@keyframes io-product-aura-breathe {
  from { transform: translate3d(-18px, 12px, 0) scale(.78); opacity: .42; }
  to { transform: translate3d(20px, -16px, 0) scale(1.22); opacity: 1; }
}

.v4-site .approach-points > div {
  transition: transform .28s cubic-bezier(.22,1,.36,1), background .28s ease, border-color .28s ease;
}

.v4-site .approach-points > div:hover {
  transform: translateX(5px);
}

.v4-site .btn svg {
  transition: transform .24s cubic-bezier(.22,1,.36,1);
}

.v4-site .btn:hover svg {
  transform: translateX(3px);
}

.v4-site .v4-cta::before {
  content: '';
  position: absolute;
  width: 520px;
  height: 330px;
  left: 55%;
  top: 48%;
  pointer-events: none;
  border-radius: 50%;
  opacity: .34;
  background: radial-gradient(ellipse, rgba(91,204,247,.18) 0%, rgba(0,129,213,.06) 42%, transparent 70%);
  filter: blur(12px);
  transform: translate3d(-50%, -50%, 0) scale(.94);
  animation: io-cta-aurora 10s ease-in-out infinite alternate;
}

.v4-site .v4-cta::after {
  animation: io-cta-orbit 13s ease-in-out infinite alternate;
}

.v4-site .v4-cta .cta-layout {
  position: relative;
  z-index: 1;
}

@keyframes io-cta-aurora {
  from { transform: translate3d(-55%, -48%, 0) scale(.92); opacity: .23; }
  to { transform: translate3d(-43%, -53%, 0) scale(1.08); opacity: .42; }
}

@keyframes io-cta-orbit {
  from { transform: translate3d(-10px, 9px, 0) scale(.96); opacity: .7; }
  to { transform: translate3d(16px, -12px, 0) scale(1.045); opacity: 1; }
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE + ACCESSIBILITY
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .v4-site .v4-hero::after {
    top: 118px;
    right: -18vw;
    width: 94vw;
    height: 640px;
    opacity: .40;
  }

}

@media (max-width: 900px) {
  /* The method becomes a two-column grid here, so a single horizontal beam
     would no longer communicate the sequence correctly. */
  .v4-site .v4-method-grid::before {
    display: none;
  }
}

@media (max-width: 700px) {
  .v4-site .v4-hero::after {
    top: 170px;
    right: -46vw;
    width: 126vw;
    height: 540px;
    opacity: .34;
  }


  .v4-site .spotlight {
    width: 440px;
    height: 440px;
    left: calc(var(--spot-x) - 220px);
    top: calc(var(--spot-y) - 220px);
  }

  .v4-site .product-scroll-aura {
    left: 36%;
    width: 720px;
    opacity: .58;
  }

  .v4-site .data-constellation {
    animation: none;
    box-shadow: 0 18px 48px rgba(22,53,86,.07);
  }

  .v4-site .source-card::after {
    opacity: .5;
  }

  .v4-site .v4-cta::before {
    width: 360px;
    height: 260px;
    left: 74%;
    opacity: .22;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v4-site .io-section-reveal > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .v4-site .spotlight,
  .v4-site .spotlight::after,
  .v4-site .product-scroll-aura::after,
  .v4-site .v4-hero::after,
  .v4-site .data-constellation,
  .v4-site .data-constellation::after,
  .v4-site .source-cloud span,
  .v4-site .outcome-cloud span,
  .v4-site .intelia-core,
  .v4-site .intelia-core::before,
  .v4-site .intelia-core::after,
  .v4-site .source-card::after,
  .v4-site .mini-forecast path,
  .v4-site .mini-bars i,
  .v4-site .mini-badge,
  .v4-site .transform-action::before,
  .v4-site .transformation-outcomes span::before,
  .v4-site .v4-method-grid::before,
  .v4-site .method-dot,
  .v4-site .v4-cta::before,
  .v4-site .v4-cta::after {
    animation: none !important;
  }

  .v4-site .hero-copy-parallax,
  .v4-site .hero-visual-parallax,
  .v4-site .method-intro-parallax,
  .v4-site .v4-method-grid,
  .v4-site .product-experience-copy,
  .v4-site .pulse-product-preview,
  .v4-site .product-scroll-aura {
    transform: none !important;
    opacity: 1 !important;
  }

  .v4-site .v4-hero::after {
    opacity: .22;
    transform: none;
  }

  .v4-site .approach-points > div,
  .v4-site .btn svg,
  .v4-site .source-card svg,
  .v4-site .v4-capability-card::after {
    transition: none !important;
  }
}
