/* Bangladesh IT Service - shared styles and animations for the public site (home + service pages). */

body { font-family: 'Manrope', system-ui, sans-serif; color: #0b0d12; background: #ffffff; }
h1, h2, h3, h4, .font-display { font-family: 'Instrument Sans', system-ui, sans-serif; text-wrap: balance; }

/* ---------- Scroll reveal ----------
   "html" prefix outranks Tailwind's transition/transform utilities while the
   reveal runs; bangladeshitservice.js removes data-reveal afterwards so hover effects
   get their own transitions back. */
html [data-reveal] {
    opacity: 0;
    transition: opacity .8s cubic-bezier(.2,.65,.3,1), transform .8s cubic-bezier(.2,.65,.3,1), filter .8s ease;
    transition-delay: var(--d, 0ms);
    will-change: opacity, transform;
}
html [data-reveal="up"]    { transform: translateY(36px); }
html [data-reveal="down"]  { transform: translateY(-24px); }
html [data-reveal="left"]  { transform: translateX(-48px); }
html [data-reveal="right"] { transform: translateX(48px); }
html [data-reveal="zoom"]  { transform: scale(.88); }
html [data-reveal="blur"]  { transform: translateY(16px); filter: blur(10px); }
html [data-reveal].is-visible { opacity: 1; transform: none; filter: none; }

/* ---------- Animated gradient text ---------- */
.text-gradient {
    background: linear-gradient(90deg, #818cf8, #22d3ee, #c084fc, #818cf8);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 6s linear infinite;
}
@keyframes gradientShift { to { background-position: 300% 0; } }

/* ---------- Hero backdrop ---------- */
.hero-dark { background: radial-gradient(ellipse at top, #141a33 0%, #07080c 60%); }
.grid-bg {
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    animation: gridMove 22s linear infinite;
}
@keyframes gridMove { to { background-position: 56px 56px, 56px 56px; } }

.orb { position: absolute; border-radius: 9999px; filter: blur(90px); pointer-events: none; animation: orbFloat 16s ease-in-out infinite; }
.orb-2 { animation-duration: 20s; animation-direction: reverse; }
.orb-3 { animation-duration: 24s; animation-delay: -6s; }
@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(60px, -40px) scale(1.12); }
    66%      { transform: translate(-50px, 30px) scale(.92); }
}

/* ---------- Orbit of service icons (home hero) ---------- */
.orbit { position: absolute; inset: 0; margin: auto; border-radius: 9999px; border: 1px dashed rgba(255,255,255,.12); animation: spin var(--dur, 40s) linear infinite; }
.orbit.reverse { animation-direction: reverse; }
.orbit-item { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(var(--a) * -1)); }
.orbit-icon { width: 100%; height: 100%; animation: spin var(--dur, 40s) linear infinite reverse; }
.orbit-sm .orbit-item { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.orbit.reverse .orbit-icon { animation-direction: normal; }
@keyframes spin { to { transform: rotate(360deg); } }

.core-glow { animation: corePulse 3.2s ease-in-out infinite; }
@keyframes corePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.55), 0 0 60px 10px rgba(99,102,241,.35); }
    50%      { box-shadow: 0 0 0 18px rgba(99,102,241,0), 0 0 90px 24px rgba(34,211,238,.35); }
}

.float-y { animation: floatY 5s ease-in-out infinite; }
.float-y.delay { animation-delay: -2.5s; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Typewriter caret ---------- */
.caret { display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -0.12em; background: #22d3ee; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Buttons ---------- */
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after {
    content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; z-index: -1;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,.55), transparent);
    transform: skewX(-20deg);
    transition: left .7s ease;
}
.btn-shine:hover::after { left: 140%; }
.btn-glow { box-shadow: 0 10px 30px -10px rgba(99,102,241,.8); transition: box-shadow .3s ease, transform .3s ease; }
.btn-glow:hover { box-shadow: 0 16px 40px -8px rgba(99,102,241,.95); transform: translateY(-2px); }

/* ---------- Cards with mouse-follow spotlight ---------- */
.spot-card { position: relative; isolation: isolate; overflow: hidden; }
.spot-card::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s ease;
    background: radial-gradient(420px circle at var(--x, 50%) var(--y, 50%), var(--spot, rgba(99,102,241,.12)), transparent 45%);
}
.spot-card:hover::before { opacity: 1; }
.spot-card .top-line { position: absolute; left: 0; top: 0; height: 2px; width: 0; background: linear-gradient(90deg, #6366f1, #22d3ee); transition: width .5s ease; }
.spot-card:hover .top-line { width: 100%; }
.spot-card .icon-tile { transition: transform .5s cubic-bezier(.34,1.56,.64,1); }
.spot-card:hover .icon-tile { transform: rotate(-8deg) scale(1.15); }

/* Card whose border fades into an indigo->cyan gradient on hover */
.gb-card { position: relative; isolation: isolate; }
.gb-card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: -1;
    background: linear-gradient(135deg, #4f46e5, #22d3ee);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0; transition: opacity .35s ease;
}
.gb-card:hover::before { opacity: 1; }

/* Glass card for dark sections */
.glass { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.glass:hover { border-color: rgba(129,140,248,.45); background: rgba(255,255,255,.06); }

/* ---------- Marquee ---------- */
.marquee { display: flex; width: max-content; animation: marquee var(--speed, 30s) linear infinite; }
.marquee.reverse { animation-direction: reverse; }
.marquee-wrap:hover .marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.fade-x { mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent); }

/* ---------- Process timeline ---------- */
.process-track { position: absolute; left: 0; right: 0; top: 22px; height: 2px; background: #e6e8ec; }
.process-fill { height: 100%; width: 0; background: linear-gradient(90deg, #6366f1, #22d3ee); transition: width 2.2s cubic-bezier(.65,0,.35,1); }
.process.is-active .process-fill { width: 100%; }
.process-dot { transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease, transform .4s ease; transition-delay: var(--d, 0ms); }
.process.is-active .process-dot { background: #4f46e5; border-color: #4f46e5; color: #fff; box-shadow: 0 0 0 6px rgba(79,70,229,.15); transform: scale(1.08); }

/* ---------- Scroll indicator ---------- */
.mouse { width: 22px; height: 36px; border: 2px solid rgba(255,255,255,.35); border-radius: 12px; position: relative; }
.mouse::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Page chrome ---------- */
#scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 70; background: linear-gradient(90deg, #6366f1, #22d3ee, #c084fc); }
#to-top { opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s ease, transform .3s ease; }
#to-top.show { opacity: 1; transform: none; pointer-events: auto; }

.toast-in { animation: toastIn .5s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } }

.panel-in { animation: panelIn .45s ease both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(12px); } }

/* Respect users who turn animations off in their OS */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    html [data-reveal] { opacity: 1; transform: none; filter: none; }
}
