/* Homepage airwaves: animated waves behind the hero and the dark closing panel, and slowly drifting colour blobs (design 9
   on the homepage concepts canvas). On or off with includes/site-switches.php; loaded after home.css.

   js/home-airwaves.js draws the waves and marks the page .has-airwaves; without it the blobs stand still and there are no
   waves. Each wave band is its own layer and sways as a whole, so the browser moves it without redrawing it. An area
   (the hero's layer, Plans, Support, the closing panel) moves only while it is on screen (.vc-aw-on) and the
   visitor hasn't paused it with the header's button. Lime means live: the signal pulses show only while the demo plays
   (.vc-aw-live). On phones nothing moves (no room for the button), and with reduced motion nothing moves either. */

/* The hero's background (blobs and waves) is one layer that runs past the hero into the open space under the stats and
   fades out just above "01 · On every plan" (the features section's top padding, less 22px). The features section is
   see-through (it is the page's own colour). The waves stretch to the layer's size, so they sit in the same place at any
   width. */
.vc-home .vc-hero { overflow-x: clip; overflow-y: visible; }
.vc-home #features { background: transparent; }
.vc-aw-hero { position: absolute; top: 0; left: 0; right: 0; height: calc(100% + clamp(50px, 8vw - 22px, 98px)); overflow: hidden; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - 170px), transparent calc(100% - 4px)); mask-image: linear-gradient(180deg, #000 0%, #000 calc(100% - 170px), transparent calc(100% - 4px)); }
.vc-aw-hero > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vc-aw-hero path { vector-effect: non-scaling-stroke; }

/* The closing panel's waves are wider than the section (which clips them), so their sway never shows an edge, and fade
   out at the top and bottom. */
.vc-closing > .vc-aw-close { position: absolute; top: 0; bottom: 0; left: -48px; right: -48px; width: calc(100% + 96px); height: 100%; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 70%, transparent 100%); }

/* The stats sit on the left band: a halo of the page's colour keeps their words clear where a line passes behind. */
.vc-home .vc-stats strong, .vc-home .vc-stats span { text-shadow: 0 0 2px var(--bg), 0 0 6px var(--bg), 0 0 12px var(--bg); }
.vc-home .vc-stats span { color: var(--mut); }

/* The waves fade in once drawn. */
.vc-aw-band { opacity: 0; overflow: visible; transform-origin: 50% 50%; transition: opacity 1.2s ease; }
.vc-aw-band.is-in { opacity: .85; }
.vc-aw-sway { will-change: transform; }

/* Motion. Everything that moves is .vc-aw-move, paused unless its area is moving. */
.has-airwaves .vc-blob--a, .has-airwaves .vc-blob--e { animation: vcAwDriftA 24s ease-in-out infinite alternate; }
.has-airwaves .vc-blob--b, .has-airwaves .vc-blob--d { animation: vcAwDriftB 28s ease-in-out infinite alternate; }
.has-airwaves .vc-blob--c, .has-airwaves .vc-blob--f { animation: vcAwDriftC 20s ease-in-out infinite alternate; }
.has-airwaves .vc-aw-sway--l { animation: vcAwSwayL 16s ease-in-out infinite alternate; }
.has-airwaves .vc-aw-sway--r { animation: vcAwSwayR 20s ease-in-out -6s infinite alternate; }
.has-airwaves .vc-aw-sway--c { animation: vcAwSwayR 26s ease-in-out infinite alternate; }
.has-airwaves .vc-aw-flow { animation: vcAwFlow 5s linear infinite; }
.has-airwaves .vc-aw-flow--slow { animation-duration: 8s; }
.has-airwaves .vc-aw-signal--l { animation: vcAwSignal 9s linear infinite; }
.has-airwaves .vc-aw-signal--r { animation: vcAwSignal 12s linear -5s infinite; }
.has-airwaves .vc-aw-signal--c { animation: vcAwSignal 14s linear -3s infinite; }
.vc-aw-move { animation-play-state: paused !important; }
.vc-aw-on .vc-aw-move { animation-play-state: running !important; }

/* Lime signal pulses: hidden, and still, unless the demo plays and the visitor hasn't paused the animation. */
.vc-aw-pulse { stroke-opacity: 0; transition: stroke-opacity .8s ease; }
.vc-home.vc-aw-live:not(.vc-aw-still) .vc-aw-pulse { stroke-opacity: .95; }
.vc-home.vc-aw-live:not(.vc-aw-still) .vc-aw-pulse--glow { stroke-opacity: .24; }
.vc-home.vc-aw-live:not(.vc-aw-still) .vc-aw-pulse--halo { stroke-opacity: .1; }
.vc-home:not(.vc-aw-live) .vc-aw-on .vc-aw-pulse, .vc-home.vc-aw-still .vc-aw-on .vc-aw-pulse { animation-play-state: paused !important; }

/* Below 768px the dotted lines stand still. Below 560px the header has no room for the pause button, so nothing moves
   at all (a still picture also saves a phone's battery). */
@media (max-width: 767px) {
    .has-airwaves .vc-aw-flow { animation: none; }
}
@media (max-width: 559px) {
    .has-airwaves .vc-aw-move { animation: none !important; }
    .vc-aw-pulse, .vc-motion-btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .has-airwaves .vc-aw-move { animation: none !important; }
    .vc-aw-pulse { display: none; }
    .vc-aw-band { transition: none; }
    .vc-motion-btn { display: none; }
}

@keyframes vcAwSwayL { 0% { transform: translate3d(0, 0, 0) rotate(0deg) scaleY(1); } 50% { transform: translate3d(34px, -20px, 0) rotate(-1.2deg) scaleY(1.05); } 100% { transform: translate3d(-16px, 12px, 0) rotate(.7deg) scaleY(.97); } }
@keyframes vcAwSwayR { 0% { transform: translate3d(0, 0, 0) rotate(0deg) scaleY(1); } 50% { transform: translate3d(-30px, 18px, 0) rotate(1.1deg) scaleY(.96); } 100% { transform: translate3d(18px, -14px, 0) rotate(-.6deg) scaleY(1.04); } }
@keyframes vcAwFlow { to { stroke-dashoffset: -61; } }
@keyframes vcAwSignal { to { stroke-dashoffset: -1480; } }
@keyframes vcAwDriftA { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(-80px, 60px, 0) scale(1.1); } }
@keyframes vcAwDriftB { 0% { transform: translate3d(0, 0, 0) scale(1.04); } 100% { transform: translate3d(100px, -50px, 0) scale(.94); } }
@keyframes vcAwDriftC { 0% { transform: translate3d(-50px, 0, 0) scale(1); } 100% { transform: translate3d(70px, -40px, 0) scale(1.12); } }

/* The header's pause button (includes/header-v3.php): the icon is what a press does. */
.vc-motion-btn[hidden], .vc-chrome .vc-motion-btn__play { display: none; }   /* the header shows its icons as blocks (.vc-chrome svg, site.css) */
.vc-chrome .vc-motion-btn[data-paused] .vc-motion-btn__pause { display: none; }
.vc-chrome .vc-motion-btn[data-paused] .vc-motion-btn__play { display: block; }
