/* ==========================================================================
   FLOW (Deann 10/7: "the sections seem cut apart and don't flow"). Light
   sections share one canvas: no per-section tints, no glows or lines sliced
   off at section edges. js/flow.js adds one page-wide background layer with
   a current of lines that weaves from section to section (crossing each seam),
   soft glows at the crossings, and a gold flight path that draws itself as
   you scroll. Dark sections (FAQ + quote, footer) sit on top as before.
   ========================================================================== */

/* One canvas: drop the faint section tints */
section[style*="rgba(0,110,239"],
section[style*="rgba(0, 110, 239"],
#clients {
    background-image: none !important;
}
.site-process,
#map-locations {
    background-color: transparent !important;
}

/* Glows and wave lines can cross section edges (x still clipped, so no
   sideways scroll). Sections whose cards rise in keep their clipping; their
   glows live in the page layer instead. */
.site-hero,
.site-inner-hero,
.site-intro {
    overflow: clip visible;
}
#hero > [aria-hidden="true"],
#inner-hero > [aria-hidden="true"] {
    overflow: clip visible;
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

/* ---- Page-wide flow layer (built by js/flow.js) ---- */
.mx-flow {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.mx-flow svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.mx-flow__line {
    fill: none;
    stroke: #b9bbd6;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
    opacity: 0.75;
}
.mx-flow__path {
    fill: none;
    stroke: #d4af37;
    stroke-width: 2;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.7));
}
.mx-flow__drone {
    transition: opacity 0.3s;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.7));
}
.mx-flow__rotor {
    transform-box: fill-box;
    transform-origin: center;
    animation: mx-flow-rotor 0.18s linear infinite;
}
@keyframes mx-flow-rotor {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* Touch-down on the review strip: a soft gold ring pulses once the drone lands */
.mx-flow__land {
    position: absolute;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.7);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.4s, transform 0.4s;
}
.mx-flow__land.is-landed {
    opacity: 1;
    transform: scale(1);
    animation: mx-flow-land 1.8s ease-out infinite;
}
@keyframes mx-flow-land {
    0% { transform: scale(0.5); opacity: 0.9; }
    100% { transform: scale(1.6); opacity: 0; }
}
.mx-flow__glow {
    position: absolute;
    width: 620px;
    height: 420px;
    margin: -210px 0 0 -310px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(212, 175, 55, 0.16), rgba(2, 34, 90, 0.05) 60%, transparent);
    filter: blur(40px);
}
@media (prefers-reduced-motion: no-preference) {
    /* 10/22: the sway moves the lines' own <svg> as a GPU layer (was the <g>, which repainted
       the page-tall SVG every frame). Same 8px sway. */
    .mx-flow svg.mx-flow__lines-svg {
        animation: mx-flow-sway 14s ease-in-out infinite alternate;
        will-change: translate;
    }
    .mx-flow__glow {
        animation: mx-drift 18s ease-in-out infinite alternate;
    }
    .mx-flow__glow:nth-child(even) {
        animation-duration: 23s;
        animation-delay: -9s;
    }
}
@keyframes mx-flow-sway {
    from { translate: 0 0; }
    to { translate: 0 8px; }
}
@media (max-width: 1023px) {
    .mx-flow { display: none; }
}

/* ---- Flight guide (js/flight-guide.js, Home): one drone that tours the page ---- */
.mx-guided .mx-flow__path,
.mx-guided .mx-flow__drone,
.mx-guided .mx-flow__land {
    display: none;
}
.mx-guide {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 20; /* on the page (under the fixed header, 50) */
    pointer-events: none;
    overflow: hidden;
}
.mx-guide svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}
.mx-guide__path {
    fill: none;
    stroke: #d4af37;
    stroke-width: 2;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.6));
}
.mx-guide__drone,
.mx-guide__shadow {
    transition: opacity 0.35s;
}
.mx-guide__drone {
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
}
.mx-guide__shadow {
    fill: #02225a;
    opacity: 0.16;
    filter: blur(3px);
}
.mx-guide__rotor {
    transform-box: fill-box;
    transform-origin: center;
    animation: mx-flow-rotor 0.18s linear infinite;
}
/* Waypoint above a section heading: a small gold ring that lights up when the drone arrives */
.mx-guide__wp {
    position: absolute;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    border: 1.5px solid rgba(190, 145, 65, 0.45);
    background: #fff;
    transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
}
.mx-guide__wp.is-lit {
    border-color: #d4af37;
    background: #fff6d8;
    box-shadow: 0 0 0 5px rgba(212, 175, 55, 0.16), 0 0 14px rgba(212, 175, 55, 0.55);
}
.mx-guide__land {
    position: absolute;
    width: 46px;
    height: 46px;
    margin: -23px 0 0 -23px;
    border-radius: 50%;
    border: 2px solid rgba(212, 175, 55, 0.7);
    opacity: 0;
    transform: scale(0.4);
    transition: opacity 0.4s, transform 0.4s;
}
.mx-guide__land.is-landed {
    opacity: 1;
    animation: mx-flow-land 1.8s ease-out infinite;
}
/* The section's gold heading words glint once when the drone reaches its waypoint */
.mx-visited h2 .highlight {
    animation: mx-guide-glint 1.4s ease-out 1;
}
@keyframes mx-guide-glint {
    0% { filter: brightness(1); }
    35% { filter: brightness(1.35) drop-shadow(0 0 10px rgba(212, 175, 55, 0.45)); }
    100% { filter: brightness(1); }
}
@media (max-width: 1023px) {
    .mx-guide { display: none; }
}

/* Hero scroll cue (preview, js/flight-guide.js): pinned under the video in the first screen */
.hx-cue-preview #hero .hx-cue {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 40;
    margin: 0;
    transform: translateX(-50%);
    transition: opacity 0.45s, transform 0.45s;
}
.hx-cue-preview #hero .hx-cue.is-gone {
    opacity: 0 !important;
    transform: translate(-50%, 10px);
    pointer-events: none;
}
.hx-cue-preview #hero .hero-scroll {
    flex-direction: row;
    gap: 12px;
    padding: 8px 18px 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 6px 22px rgba(2, 34, 90, 0.12);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.hx-cue-preview #hero .hero-scroll > span:first-child {
    height: 36px;
    width: 22px;
    padding-top: 6px;
}
.hx-cue-preview #hero .hero-scroll > span:nth-child(2) {
    display: none; /* chevrons: the label says it */
}
.hx-cue__label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #02225a;
    white-space: nowrap;
}
.hx-cue-preview #hero .hx-cue.is-side {
    left: 24px;
    transform: none;
}
.hx-cue-preview #hero .hx-cue.is-side.is-gone {
    transform: translateY(10px);
}
/* Stage 2 cue (preview): over the full-screen hero video */
.hx-keep {
    position: fixed;
    left: 50%;
    bottom: 16px; /* set by JS to the chip + Watch the Video row */
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(2, 24, 66, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity 0.45s, transform 0.45s;
}
.hx-keep.is-on {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}
.hx-keep svg {
    color: #e2c36d;
    animation: hx-keep-bob 1.6s ease-in-out infinite;
}
@keyframes hx-keep-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}
@media (prefers-reduced-motion: reduce) {
    .hx-keep svg { animation: none; }
}
.hx-keep.is-right {
    left: auto;
    right: 16px;
    transform: translateY(12px);
}
.hx-keep.is-right.is-on {
    transform: none;
}
