/*=========================================================
    BBW Brushes - extra motion & effects layer
    (loaded after style.css; everything here is decorative)
=========================================================*/

/* ---------- page curtain (replaces the plain preloader) ---------- */
#preloader {
    background: transparent;
    pointer-events: none;
    transition: none;
}
#preloader::before,
#preloader::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 50.5%;
    background: #0d1621;
    transition: transform .9s cubic-bezier(.77, 0, .175, 1);
    z-index: 0;
}
#preloader::before { top: 0; }
#preloader::after { bottom: 0; background: #0d1621; }
#preloader .preloader-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    transition: opacity .4s ease, transform .6s ease;
}
#preloader .loader-box { display: none; }
.curtain-logo {
    display: inline-block;
    background: #fff;
    padding: 14px 22px;
    border-radius: 4px;
    animation: logoPulse 1.6s ease-in-out infinite;
}
.curtain-logo img { height: 52px; display: block; }
.curtain-bar {
    width: 180px;
    height: 3px;
    margin: 22px auto 0;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
    position: relative;
}
.curtain-bar::after {
    content: "";
    position: absolute;
    left: -40%;
    top: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--theme), var(--red));
    animation: barSlide 1.1s ease-in-out infinite;
}
@keyframes barSlide { to { left: 100%; } }
@keyframes logoPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
#preloader.loaded { opacity: 1; visibility: visible; }
#preloader.loaded::before { transform: translateY(-101%); }
#preloader.loaded::after { transform: translateY(101%); }
#preloader.loaded .preloader-inner { opacity: 0; transform: scale(.9); }
#preloader.done { visibility: hidden; }
/* leaving the page: close the curtain again */
#preloader.leaving { visibility: visible; pointer-events: all; }
#preloader.leaving::before, #preloader.leaving::after { transform: translateY(0); transition-duration: .55s; }
#preloader.leaving .preloader-inner { opacity: 1; transform: none; transition-delay: .3s; }

/* ---------- scroll progress bar ---------- */
.scroll-progress {
    position: fixed;
    left: 0;
    top: 0;
    height: 3px;
    width: 100%;
    z-index: 100000;
    background: linear-gradient(90deg, var(--theme), var(--theme-light) 60%, var(--red));
    transform-origin: left;
    transform: scaleX(0);
    pointer-events: none;
}

/* ---------- custom cursor (fine pointers only) ---------- */
.cursor-dot, .cursor-ring {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 100001;
    border-radius: 50%;
    opacity: 0;
    transition: opacity .3s ease, width .3s ease, height .3s ease, margin .3s ease, background .3s ease, border-color .3s ease;
}
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: var(--theme); }
.cursor-ring {
    width: 38px;
    height: 38px;
    margin: -19px 0 0 -19px;
    border: 2px solid rgba(10, 132, 212, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}
.cursor-ready .cursor-dot, .cursor-ready .cursor-ring { opacity: 1; }
.cursor-hover .cursor-ring { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-color: var(--theme); background: rgba(10, 132, 212, .08); }
.cursor-hover .cursor-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
.cursor-view .cursor-ring { width: 80px; height: 80px; margin: -40px 0 0 -40px; background: var(--theme); border-color: var(--theme); }
.cursor-view .cursor-dot { opacity: 0; }
.cursor-ring span { opacity: 0; transition: opacity .2s; }
.cursor-view .cursor-ring span { opacity: 1; }
.cursor-down .cursor-ring { width: 30px; height: 30px; margin: -15px 0 0 -15px; }

/* ---------- hero extras ---------- */
.hero-slider .hero-bg { transition: transform 1.2s cubic-bezier(.2, .8, .2, 1); }
.hero-slide.active .hero-bg { animation: kenBurns 10s ease-out forwards; }
.hero-parallax { position: absolute; inset: -30px; will-change: transform; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.hero-content { will-change: transform, opacity; }

/* word-by-word title */
[data-layer="words"] { opacity: 1 !important; transform: none !important; }
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split-word > span {
    display: inline-block;
    transform: translateY(110%) rotate(4deg);
    transform-origin: left bottom;
    transition: transform .9s cubic-bezier(.2, .85, .25, 1);
    transition-delay: calc(var(--i) * 70ms);
}
.in .split-word > span,
.split-reveal.revealed .split-word > span { transform: none; }
.hero-slide.leaving .split-word > span { transition-delay: 0s; }

/* slide counter + scroll cue */
.hero-count {
    position: absolute;
    right: 40px;
    bottom: 46px;
    z-index: 20;
    color: #fff;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.hero-count .cur { font-size: 34px; line-height: 1; display: inline-block; min-width: 44px; text-align: right; }
.hero-count .line { width: 50px; height: 2px; background: rgba(255, 255, 255, .4); position: relative; overflow: hidden; }
.hero-count .line::after { content: ""; position: absolute; inset: 0; background: var(--theme-light); transform: scaleX(0); transform-origin: left; }
.hero-count.tick .line::after { animation: countLine 9s linear forwards; }
@keyframes countLine { to { transform: scaleX(1); } }
.hero-count .cur.flip { animation: numFlip .6s cubic-bezier(.2, .85, .25, 1); }
@keyframes numFlip { from { transform: translateY(60%); opacity: 0; } to { transform: none; opacity: 1; } }
.scroll-cue {
    position: absolute;
    left: 40px;
    bottom: 40px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.scroll-cue .mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: 14px;
    position: relative;
}
.scroll-cue .mouse::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 7px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 2px;
    background: var(--theme-light);
    animation: mouseWheel 1.6s ease-in-out infinite;
}
@keyframes mouseWheel { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }
.scroll-cue:hover { color: var(--theme-light); }

/* ---------- section titles ---------- */
.section-title > span::before,
.section-title > span::after { transform: scaleX(0); transition: transform .8s cubic-bezier(.2, .85, .25, 1) .3s; }
.section-title > span::before { transform-origin: right; }
.section-title > span::after { transform-origin: left; }
.section-title.revealed > span::before,
.section-title.revealed > span::after { transform: scaleX(1); }

/* gradient sheen moving across the blue panels */
.single-history, .latest-services-text, .cert-box {
    background-image: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .14) 45%, transparent 60%);
    background-size: 250% 100%;
    background-position: 130% 0;
    animation: panelSheen 6s ease-in-out infinite;
}
.cert-box { background-color: #222; }
@keyframes panelSheen { 0%, 60% { background-position: 130% 0; } 100% { background-position: -130% 0; } }
.single-history { position: relative; overflow: hidden; }
.single-history::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 30px solid rgba(255, 255, 255, .08);
    animation: floatY 6s ease-in-out infinite;
}

/* ---------- marquee band ---------- */
.marquee-band {
    position: relative;
    overflow: hidden;
    background: var(--theme);
    padding: 26px 0;
    transform: rotate(-1.5deg);
    margin: 30px -20px;
    box-shadow: 0 20px 40px rgba(10, 132, 212, .25);
    z-index: 3;
}
.marquee-band.dark { background: #1b1b1b; transform: rotate(1.5deg); margin-top: -60px; z-index: 2; box-shadow: none; }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-band.dark .marquee-track { animation-direction: reverse; animation-duration: 46s; }
.marquee-band:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    display: inline-flex;
    align-items: center;
    font-size: 44px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    white-space: nowrap;
    padding: 0 28px;
    line-height: 1;
}
.marquee-track span.outline { color: transparent; -webkit-text-stroke: 1.5px rgba(255, 255, 255, .85); }
.marquee-track span i { font-size: 22px; margin-left: 56px; color: rgba(255, 255, 255, .7); animation: spinSlow 6s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- tilt + glare ---------- */
.tilt { transform-style: preserve-3d; will-change: transform; }
.tilt.tilting { transition: transform .12s linear, box-shadow .4s !important; }
.tilt-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
    opacity: 0;
    transition: opacity .4s;
    background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .35), transparent 55%);
    mix-blend-mode: soft-light;
}
.tilt.tilting .tilt-glare { opacity: 1; }

/* ---------- shine sweep on images ---------- */
.shine-host { position: relative; overflow: hidden; }
.shine {
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
}
.shine-host:hover .shine { animation: shineSweep .9s ease; }
@keyframes shineSweep { to { left: 130%; } }

/* ---------- magnetic buttons ---------- */
.magnetic { transition: transform .35s cubic-bezier(.2, .85, .25, 1); will-change: transform; }

/* ---------- parallax targets ---------- */
[data-parallax] { will-change: transform; }
.cta-area { background-attachment: scroll; overflow: hidden; }
.cta-area .cta-bg { position: absolute; inset: -18% 0; background-size: cover; background-position: center; z-index: 0; }
.cta-area::before { z-index: 1; }

/* ---------- floating decor ---------- */
.float-decor { position: absolute; pointer-events: none; z-index: 0; opacity: .5; }
.float-decor.dots {
    width: 160px;
    height: 160px;
    background-image: radial-gradient(var(--theme) 2px, transparent 2px);
    background-size: 18px 18px;
    animation: floatY 7s ease-in-out infinite;
}
.float-decor.ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 18px solid rgba(212, 36, 23, .12);
    animation: floatY 9s ease-in-out infinite reverse;
}
.float-decor.plus { font-size: 40px; color: rgba(10, 132, 212, .25); font-weight: 900; animation: spinSlow 14s linear infinite; }
.history-area, .blog-area, .latest-services-area, .team-area, .products-area, .contact-info-area, .events-area, .arena-area { position: relative; }
.history-area > .container, .blog-area > .container, .latest-services-area > .container, .team-area > .container,
.products-area > .container, .contact-info-area > .container, .events-area > .container, .arena-area > .container { position: relative; z-index: 1; }

/* counters pop when done */
.counter-text h1 { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.counter-text h1.pop { animation: countPop .6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes countPop { 40% { transform: scale(1.15); } }
.counter-icon i { animation: floatY 4s ease-in-out infinite; }
.counter-wrapper:nth-child(2n) .counter-icon i, .col-sm-6:nth-child(2n) .counter-icon i { animation-delay: -2s; }

/* back to top with progress ring */
#scrollUp { width: 50px; height: 50px; line-height: 50px; background: #1b1b1b; }
#scrollUp svg { position: absolute; inset: -4px; width: 58px; height: 58px; transform: rotate(-90deg); }
#scrollUp svg circle { fill: none; stroke: var(--theme-light); stroke-width: 3; stroke-dasharray: 163.4; stroke-dashoffset: 163.4; transition: stroke-dashoffset .1s linear; }
#scrollUp i { position: relative; z-index: 1; transition: transform .3s; }
#scrollUp:hover i { transform: translateY(-3px); }

/* header: logo hover wobble + nav underline glow */
.logo img { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.logo a:hover img { transform: scale(1.06) rotate(-2deg); }
.main-menu nav > ul > li .sub-menu li a { position: relative; transition: padding .3s, background .3s, color .3s; }
.main-menu nav > ul > li .sub-menu li a:hover { padding-left: 28px; }
.main-menu nav > ul > li .sub-menu li { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.main-menu nav > ul > li:hover .sub-menu li { opacity: 1; transform: none; }
.main-menu nav > ul > li:hover .sub-menu li:nth-child(2) { transition-delay: .03s; }
.main-menu nav > ul > li:hover .sub-menu li:nth-child(3) { transition-delay: .06s; }
.main-menu nav > ul > li:hover .sub-menu li:nth-child(4) { transition-delay: .09s; }
.main-menu nav > ul > li:hover .sub-menu li:nth-child(5) { transition-delay: .12s; }
.main-menu nav > ul > li:hover .sub-menu li:nth-child(6) { transition-delay: .15s; }
.main-menu nav > ul > li:hover .sub-menu li:nth-child(n+7) { transition-delay: .18s; }

/* footer: animated top border */
footer { position: relative; }
footer::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    z-index: 3;
    background: linear-gradient(90deg, var(--theme), var(--red), var(--theme-light), var(--theme));
    background-size: 300% 100%;
    animation: borderFlow 6s linear infinite;
}
@keyframes borderFlow { to { background-position: 300% 0; } }

/* buttons: arrow nudge + ripple */
.b-btn { overflow: hidden; }
.b-btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .45);
    transform: scale(0);
    animation: ripple .7s ease-out;
    pointer-events: none;
    z-index: 10;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* product / gallery cards: stagger in when filtered */
.product-item, .gallery-item { transition-timing-function: cubic-bezier(.2, .85, .25, 1) !important; }

/* blog/event cards: lift + underline */
.blog-wrapper { transition: transform .5s cubic-bezier(.2, .85, .25, 1), box-shadow .5s; }
.blog-wrapper:hover { transform: translateY(-10px); }
.blog-wrapper:hover .blog-text { box-shadow: 0 25px 60px rgba(10, 132, 212, .18); }

/* responsive */
@media (max-width: 991.98px) {
    .marquee-track span { font-size: 30px; padding: 0 18px; }
    .marquee-track span i { margin-left: 36px; font-size: 16px; }
}
@media (max-width: 767.98px) {
    .scroll-cue, .hero-count { display: none; }
    .marquee-band { padding: 18px 0; }
    .marquee-track span { font-size: 24px; }
    .float-decor { display: none; }
}
@media (hover: none), (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .marquee-track, .float-decor { animation: none !important; }
    .split-word > span { transform: none !important; }
    .cursor-dot, .cursor-ring { display: none; }
}

/* parallax room */
.counter-bg-img[data-parallax] { top: -12%; height: 124%; }
.marquee-wrap { overflow: hidden; padding: 50px 0 40px; position: relative; }

/* never allow sideways scroll (off-canvas panel + slide-in animations) */
html { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }

/* stronger hero overlay for legibility over bright product photos */
.hero-bg::after { background: linear-gradient(90deg, rgba(8, 14, 22, .86) 0%, rgba(8, 14, 22, .6) 50%, rgba(8, 14, 22, .3) 100%); }


/* marquee + parallax tuning */
.marquee-band.dark { margin-top: -14px; }
.marquee-track span.outline { font-weight: 700; -webkit-text-stroke: 1.2px rgba(255, 255, 255, .9); }
.counter-bg-img[data-parallax] { top: -16%; height: 132%; }
.marquee-track span.outline { color: var(--theme); -webkit-text-stroke: 2.4px #fff; paint-order: stroke fill; font-weight: 900; }
.marquee-band.dark .marquee-track span.outline { color: #1b1b1b; -webkit-text-stroke-color: rgba(255, 255, 255, .85); }
