/* ═══════════════════════════════════════════════════════════════
   D5 — Header CTA glow ("SPOJME SA") — variant A: Orbiting Comet
   Ported from design-variants/D5-cta-glow.html, variant A only.

   Effect: a continuous, always-visible thin gold outline hugs the
   button's pill shape, and a single bright point of light orbits
   around that exact same capsule path (no dashed gaps, no seam).
   The outline itself never moves — only the small light node does,
   via a native SVG <animateMotion> path (see markup in header.php).

   CSS-only for the static ring; the orbit motion is SVG-native and
   is paused/resumed for prefers-reduced-motion by js/d5-cta-glow.js.

   Colors are derived from css/premium.css :root tokens (--accent,
   --white) via color-mix() rather than introducing new hex values,
   so the existing gold palette is reused, not changed.
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* Local aliases, all derived from premium.css tokens */
    --d5-glow-hot: var(--white);
    --d5-glow-bright: color-mix(in srgb, var(--white) 65%, var(--accent) 35%);
    --d5-glow-deep: color-mix(in srgb, var(--accent) 55%, black 45%);
}

/* ─── Wrapper: gives the decorative SVG a positioning context
       without altering the button element itself ─────────────── */
.header-btn.cta-wrap {
    position: relative;
    isolation: isolate;
}

.header-btn.cta-wrap .btn-two {
    position: relative;
    z-index: 3;
}

/* Hidden gradient definitions (no visible footprint) */
.d5-svg-defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* Gradient <stop> colors set via CSS classes rather than the raw
   stop-color attribute, since var() in SVG presentation attributes
   is not resolved consistently across browsers. */
.d5-stop-deep {
    stop-color: var(--d5-glow-deep);
}

.d5-stop-accent {
    stop-color: var(--accent);
}

.d5-stop-hot {
    stop-color: var(--d5-glow-hot);
}

/* The orbiting ring sits just outside the button's own border,
   above the background but below the button label/content. */
.d5-orbit-svg {
    position: absolute;
    inset: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    overflow: visible;
    pointer-events: none;
    z-index: 2;
}

.d5-orbit-svg rect {
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
}

/* Faint always-on track, gives the ring a resting presence */
.d5-track {
    stroke: color-mix(in srgb, var(--accent) 20%, transparent);
    stroke-width: 1;
}

/* Soft blurred trail behind the comet's bright stroke */
.d5-a-trail {
    stroke: color-mix(in srgb, var(--accent) 34%, transparent);
    stroke-width: 5;
    filter: blur(3px);
}

/* The continuous gold ribbon itself (shared "lit" look) */
.d5-light {
    stroke: var(--d5-glow-bright);
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--d5-glow-bright) 80%, transparent));
}

.d5-a-comet {
    stroke: url(#d5-continuous-gold);
    stroke-width: 2;
}

/* Orbiting light point (node) that travels the capsule path */
.d5-orbit-node {
    pointer-events: none;
    filter: drop-shadow(0 0 4px color-mix(in srgb, var(--d5-glow-hot) 85%, transparent));
}

.d5-node-aura {
    fill: color-mix(in srgb, var(--accent) 25%, transparent);
    transition: opacity 0.3s ease;
}

.d5-node-core {
    fill: var(--d5-glow-hot);
}

.cta-wrap:is(:hover, :focus-within) .d5-node-aura {
    opacity: 1;
}

/* ─── Keyboard focus visibility ───────────────────────────────── */
.header-btn.cta-wrap .btn-two:focus-visible {
    outline: 2px solid var(--d5-glow-hot);
    outline-offset: 5px;
}

/* ─── Reduced motion: SMIL orbit motion is paused via JS
       (see js/d5-cta-glow.js); this covers any CSS transitions. ── */
@media (prefers-reduced-motion: reduce) {
    .cta-wrap * {
        transition-duration: 0.01ms !important;
    }
}

/* ─── Windows High Contrast / forced-colors: drop the decorative
       ring entirely, keep a clear system-colored focus outline. ── */
@media (forced-colors: active) {
    .d5-orbit-svg {
        display: none !important;
    }

    .header-btn.cta-wrap .btn-two:focus-visible {
        outline-color: CanvasText;
    }
}
