/* ==========================================================================
   Homepage effects pack ("fx") - additive, loaded AFTER home-premium.css.
   Plain CSS, no libraries. Every rule is scoped to body.hp.
   Colours come from the page's own variables (--hp-g1/2/3, --hp-sky), so
   partner (white-label) domains automatically get their own colour.
   Effects that need JavaScript only apply when body has .fx-js.
   Remove the <link> and the <script> to switch the whole pack off.
   ========================================================================== */

@property --fx-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

/* ---------- scroll progress bar ---------- */
.fx-progress {
    position: fixed; left: 0; top: 0; height: 3px; width: 100%; z-index: 3000; pointer-events: none;
    background: linear-gradient(90deg, var(--hp-g2, #0B4FD6), var(--hp-g3, #1E88FF), var(--hp-sky, #8EC5FF));
    transform: scaleX(var(--fx-p, 0)); transform-origin: 0 50%;
    box-shadow: 0 0 10px var(--hp-g3, #1E88FF);
}

/* ---------- hero: aurora + cursor light ---------- */
body.hp .hm-hero__bg::before {
    content: ''; position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1; translate: -50% -50%;
    background: conic-gradient(from var(--fx-a), transparent 0deg, var(--hp-g3) 70deg, transparent 140deg, var(--hp-sky) 220deg, transparent 290deg, var(--hp-g2) 340deg, transparent 360deg);
    filter: blur(90px); opacity: .34; animation: fx-spin 26s linear infinite;
    -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 78%); mask-image: radial-gradient(closest-side, #000 30%, transparent 78%);
}
body.hp .hm-hero__bg::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(380px circle at var(--fx-x, 72%) var(--fx-y, 28%), rgba(255, 255, 255, .17), transparent 62%);
    opacity: .9; transition: opacity .4s ease;
}
/* grid lines light up around the cursor */
body.hp.fx-js .hm-grid {
    opacity: .75;
    -webkit-mask-image: radial-gradient(320px circle at var(--fx-x, 70%) var(--fx-y, 20%), #000, rgba(0, 0, 0, .35) 60%, transparent 100%);
    mask-image: radial-gradient(320px circle at var(--fx-x, 70%) var(--fx-y, 20%), #000, rgba(0, 0, 0, .35) 60%, transparent 100%);
}
@keyframes fx-spin { to { --fx-a: 360deg; } }

/* headline: slow light sweep through the highlighted words */
body.hp .hm-grad {
    background: linear-gradient(100deg, #C9E6FF 0%, #7EC0FF 30%, #fff 46%, #A8EBFF 62%, #7EC0FF 100%);
    background-size: 240% 100%; -webkit-background-clip: text; background-clip: text;
    animation: fx-sheen 6s ease-in-out infinite;
}
@keyframes fx-sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

/* hero mock follows the pointer (3D tilt) and the floating cards drift at their own depth */
body.hp.fx-js .hm-mock {
    transform: rotateY(calc(-7deg + var(--fx-ry, 0deg))) rotateX(calc(2deg + var(--fx-rx, 0deg)));
    transition: transform .25s ease-out, box-shadow .3s ease;
    box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08), 0 0 60px -10px var(--hp-g3);
}
body.hp.fx-js .hm-float--a { translate: calc(var(--fx-px, 0) * -18px) calc(var(--fx-py, 0) * -12px); }
body.hp.fx-js .hm-float--b { translate: calc(var(--fx-px, 0) * 24px) calc(var(--fx-py, 0) * 16px); }

/* ---------- buttons: light sweep ---------- */
body.hp .hm-btn { position: relative; overflow: hidden; }
body.hp .hm-btn--primary::after, body.hp .hm-btn--hot::after, body.hp .hm-btn--solid::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg);
}
body.hp .hm-btn--primary:hover::after, body.hp .hm-btn--hot:hover::after, body.hp .hm-btn--solid:hover::after { left: 130%; transition: left .7s ease; }

/* recommended plan's button: the generic white "primary" style was overriding the blue one */
body.hp .hm-plan .hm-btn--hot, body.hp .hm-plan .hm-btn--hot:hover {
    background: linear-gradient(135deg, var(--hp-g2), var(--hp-g3)); color: #fff; box-shadow: 0 12px 26px -8px var(--hp-g2);
}

/* ---------- cards: spotlight + glowing edge that follow the cursor ---------- */
body.hp .hm-card::after, body.hp .hm-feat::after, body.hp .hm-plan::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s ease;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--hp-g3) 16%, transparent), transparent 65%);
}
body.hp .hm-card:hover::after, body.hp .hm-feat:hover::after, body.hp .hm-plan:hover::after { opacity: 1; }
body.hp .hm-feat { position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
body.hp .hm-feat:hover { transform: translateY(-4px); box-shadow: var(--hp-shadow-2); border-color: color-mix(in srgb, var(--hp-g3) 40%, transparent); }
body.hp .hm-feat:hover .hm-feat__ico { background: linear-gradient(135deg, var(--hp-g2), var(--hp-g3)); color: #fff; transition: background .25s ease, color .25s ease; }
body.hp .hm-card__ico { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), background .25s ease, color .25s ease; }
body.hp .hm-card:hover .hm-card__ico { transform: rotate(-8deg) scale(1.1); }

/* ---------- pricing: the recommended plan glows with a travelling light border ---------- */
body.hp .hm-plan { transition: transform .3s ease, box-shadow .3s ease; overflow: visible; }
body.hp .hm-plan:not(.hm-plan--hot):hover { transform: translateY(-6px); box-shadow: var(--hp-shadow-2); }
body.hp .hm-plan--hot {
    border: 2px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        conic-gradient(from var(--fx-a), var(--hp-g2), var(--hp-g3), var(--hp-sky), #fff, var(--hp-sky), var(--hp-g3), var(--hp-g2)) border-box;
    animation: fx-spin 6s linear infinite, fx-glow 3.6s ease-in-out infinite;
}
@keyframes fx-glow {
    0%, 100% { box-shadow: 0 2px 6px rgba(8, 25, 90, .06), 0 24px 48px -14px color-mix(in srgb, var(--hp-g2) 45%, transparent); }
    50%      { box-shadow: 0 2px 6px rgba(8, 25, 90, .06), 0 30px 64px -10px color-mix(in srgb, var(--hp-g3) 65%, transparent); }
}
body.hp .hm-plan--hot:hover { transform: translateY(-8px) scale(1.012); }
body.hp .hm-plan__badge { overflow: hidden; }
body.hp .hm-plan__badge::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; transform: skewX(-20deg);
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent); animation: fx-badge 3.2s ease-in-out infinite;
}
@keyframes fx-badge { 0%, 55% { left: -60%; } 100% { left: 140%; } }
body.hp .hm-plan__rates li { transition: transform .2s ease; }
body.hp .hm-plan:hover .hm-plan__rates li { transform: translateX(3px); }

/* ---------- steps: the connecting line draws itself, numbers pulse once ---------- */
body.hp.fx-js .hm-steps::before { border-top-color: transparent; }
body.hp.fx-js .hm-steps::after {
    content: ''; position: absolute; left: 12.5%; right: 12.5%; top: 28px; height: 3px; border-radius: 3px; transform: scaleX(0); transform-origin: left;
    background: linear-gradient(90deg, var(--hp-g2), var(--hp-g3), var(--hp-sky)); transition: transform 1.6s cubic-bezier(.4, 0, .2, 1) .2s;
}
body.hp.fx-js .hm-steps.fx-in::after { transform: scaleX(1); }
body.hp.fx-js .hm-steps.fx-in .hm-step__n::after {
    content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--hp-g3); animation: fx-ring 1.4s ease-out 1 both; animation-delay: calc(var(--fx-d, 0) * 1ms + 300ms);
}
@keyframes fx-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }

/* ---------- stats and marquee ---------- */
body.hp .hm-stat__num { filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--hp-g3) 28%, transparent)); }
body.hp .hm-marquee li { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
body.hp .hm-marquee li:hover { transform: translateY(-3px); box-shadow: var(--hp-shadow-1); border-color: color-mix(in srgb, var(--hp-g3) 45%, transparent); }

/* ---------- scroll reveal (only when JS is on) ---------- */
body.hp.fx-js [data-fx] {
    opacity: 0; transform: translateY(26px) scale(.985);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--fx-d, 0) * 1ms);
}
body.hp.fx-js [data-fx].fx-in { opacity: 1; transform: none; }
/* once revealed, hand hover transitions back to the cards' own rules */
body.hp.fx-js [data-fx].fx-in.fx-done { transition-delay: 0ms; }
body.hp.fx-js .hm-plan--hot[data-fx].fx-in { transform: none; }

/* ---------- small screens: keep it light ---------- */
@media (max-width: 767px) {
    body.hp .hm-hero__bg::before { filter: blur(60px); opacity: .3; animation-duration: 34s; }
    body.hp .hm-hero__bg::after { display: none; }
    body.hp .hm-plan--hot:hover { transform: none; }
}

/* ---------- accessibility: no motion when the visitor asks for none ---------- */
@media (prefers-reduced-motion: reduce) {
    .fx-progress { display: none; }
    body.hp .hm-hero__bg::before { animation: none; }
    body.hp .hm-grad { animation: none; background-position: 0 0; }
    body.hp .hm-plan--hot { animation: none; }
    body.hp [data-fx] { opacity: 1 !important; transform: none !important; }
    body.hp.fx-js .hm-steps::after { transform: scaleX(1); transition: none; }
}
