/* ============================================================= *
 *  Portfolio CMS — front-end theme
 *  Responsive · animated · accessible (respects reduced-motion)
 * ============================================================= */
:root{
  --brand:#2563eb;
  --brand-dark:#0f172a;
  --ink:#1e293b;
  --muted:#64748b;
  --ring:color-mix(in srgb,var(--brand) 35%,transparent);
}
*{scroll-margin-top:90px}
html{scroll-behavior:smooth}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans Bengali",sans-serif;
  color:var(--ink);overflow-x:hidden;
}
a{color:var(--brand);text-decoration:none}
img{max-width:100%}

/* ---- Brand helpers ---- */
.btn-brand{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-brand:hover{filter:brightness(.92);color:#fff}
.text-brand{color:var(--brand)!important}
.bg-brand{background:var(--brand)!important}

/* Buttons: lift + sheen */
.btn{transition:transform .18s ease,box-shadow .18s ease,filter .18s ease,background .18s ease}
.btn-lg{border-radius:.7rem}
.btn:hover{transform:translateY(-2px)}
.btn-light:hover{box-shadow:0 .6rem 1.4rem rgba(0,0,0,.18)}
.btn-brand:hover,.btn-outline-dark:hover{box-shadow:0 .6rem 1.4rem var(--ring)}

/* ---- Scroll progress bar ---- */
#scroll-progress{position:fixed;top:0;left:0;height:3px;width:0;z-index:1080;
  background:linear-gradient(90deg,var(--brand),#22d3ee);transition:width .1s linear}

/* ---- Navbar ---- */
.navbar{transition:padding .25s ease,box-shadow .25s ease,background-color .25s ease;padding-top:.9rem;padding-bottom:.9rem}
.navbar .navbar-brand{transition:transform .25s ease}
.navbar.scrolled{padding-top:.45rem;padding-bottom:.45rem;box-shadow:0 .4rem 1.2rem rgba(15,23,42,.18)}
.navbar .nav-link{position:relative;font-weight:500;opacity:.92}
.navbar .nav-link::after{content:"";position:absolute;left:.75rem;right:.75rem;bottom:.35rem;height:2px;
  background:#fff;transform:scaleX(0);transform-origin:left;transition:transform .25s ease;border-radius:2px}
.navbar .nav-link:hover{opacity:1}
.navbar .nav-link:hover::after,.navbar .nav-link.active::after{transform:scaleX(1)}

/* ---- Hero ---- */
.hero{position:relative;overflow:hidden;color:#fff;padding:6.5rem 0;
  background:linear-gradient(135deg,var(--brand),var(--brand-dark))}
.hero::before,.hero::after{content:"";position:absolute;border-radius:50%;
  background:radial-gradient(circle at 30% 30%,rgba(255,255,255,.18),transparent 70%);
  filter:blur(6px);animation:float 9s ease-in-out infinite}
.hero::before{width:420px;height:420px;top:-120px;right:-80px}
.hero::after{width:320px;height:320px;bottom:-120px;left:-60px;animation-delay:-4.5s}
.hero .container{position:relative;z-index:1}
.hero h1{font-weight:800;font-size:clamp(2rem,5vw,3.4rem);line-height:1.12;letter-spacing:-.5px}
.hero .lead{opacity:.92;max-width:680px}
.hero img{animation:floatY 6s ease-in-out infinite}
@keyframes float{0%,100%{transform:translate(0,0)}50%{transform:translate(0,28px)}}
@keyframes floatY{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}

/* ---- Sections ---- */
.section{padding:5rem 0}
.section-title{font-weight:800;margin-bottom:.5rem;letter-spacing:-.4px;position:relative;display:inline-block}
.text-center .section-title::after{content:"";display:block;width:64px;height:4px;border-radius:4px;margin:.7rem auto 0;
  background:linear-gradient(90deg,var(--brand),#22d3ee)}
.section-sub{color:var(--muted);max-width:640px;margin:0 auto 2.75rem}

/* ---- Cards ---- */
.card{border:0}
.svc-card,.proj-card,.post-card,.testi-card{border-radius:1rem;height:100%;
  transition:transform .22s ease,box-shadow .22s ease}
.svc-card:hover,.proj-card:hover,.post-card:hover,.testi-card:hover{
  transform:translateY(-7px);box-shadow:0 1.4rem 2.6rem rgba(15,23,42,.14)!important}
.svc-icon{width:58px;height:58px;border-radius:14px;display:grid;place-items:center;
  background:color-mix(in srgb,var(--brand) 14%,#fff);color:var(--brand);font-size:1.6rem;transition:.22s}
.svc-card:hover .svc-icon{transform:rotate(-6deg) scale(1.06);
  background:var(--brand);color:#fff}

.proj-thumb{aspect-ratio:16/10;object-fit:cover;width:100%;border-radius:1rem 1rem 0 0;display:block}
.post-thumb{aspect-ratio:16/9;object-fit:cover;width:100%;border-radius:1rem 1rem 0 0;display:block}
.proj-card,.post-card{overflow:hidden}
.proj-card .proj-thumb,.post-card .post-thumb{transition:transform .4s ease}
.proj-card:hover .proj-thumb,.post-card:hover .post-thumb{transform:scale(1.06)}

/* ---- Stats ---- */
.stat-num{font-size:2.7rem;font-weight:800;color:var(--brand);line-height:1}

/* ---- Client logos ---- */
.client-logo{height:54px;object-fit:contain;filter:grayscale(1);opacity:.65;transition:.25s}
.client-logo:hover{filter:none;opacity:1;transform:scale(1.06)}

/* ---- Testimonials ---- */
.testi-card{background:#fff}
.stars i{color:#f59e0b}

/* ---- Gallery ---- */
.gallery-item img{aspect-ratio:1;object-fit:cover;width:100%;border-radius:.75rem;cursor:pointer;transition:.25s}
.gallery-item img:hover{transform:scale(1.04);box-shadow:0 .8rem 1.6rem rgba(15,23,42,.18)}

/* ---- Video ---- */
.video-thumb{position:relative;border-radius:1rem;overflow:hidden;display:block}
.video-thumb img{width:100%;aspect-ratio:16/9;object-fit:cover;transition:transform .4s ease}
.video-thumb:hover img{transform:scale(1.06)}
.video-thumb .play{position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:3rem;
  background:rgba(0,0,0,.28);transition:.25s}
.video-thumb:hover .play{background:rgba(0,0,0,.45)}
.video-thumb:hover .play i{transform:scale(1.12)}
.video-thumb .play i{transition:transform .25s ease}

/* ---- Case study ---- */
.case-block{border-left:4px solid var(--brand);padding-left:1.2rem;margin-bottom:1.5rem}

/* ---- Blog content ---- */
.post-body{font-size:1.08rem;line-height:1.85}
.post-body img{max-width:100%;height:auto;border-radius:.5rem}
.post-body h2,.post-body h3{margin-top:1.6rem;font-weight:700}

/* ---- Footer ---- */
footer a{transition:color .2s ease}
footer a:hover{color:#fff!important}
footer .bi{transition:transform .2s ease}
footer a:hover .bi{transform:translateY(-2px)}

/* ---- Back to top ---- */
#to-top{position:fixed;right:20px;bottom:20px;width:46px;height:46px;border:0;border-radius:50%;
  background:var(--brand);color:#fff;font-size:1.25rem;display:grid;place-items:center;cursor:pointer;
  box-shadow:0 .5rem 1.2rem rgba(15,23,42,.25);opacity:0;visibility:hidden;transform:translateY(12px);
  transition:opacity .25s ease,transform .25s ease,visibility .25s;z-index:1070}
#to-top.show{opacity:1;visibility:visible;transform:translateY(0)}
#to-top:hover{filter:brightness(.92);transform:translateY(-3px)}

/* ============================================================= *
 *  Scroll-reveal animation (added by JS, no markup changes)
 * ============================================================= */
.reveal{opacity:0;transform:translateY(28px);transition:opacity .6s ease,transform .6s ease}
.reveal.in{opacity:1;transform:none}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{animation:none!important;transition:none!important}
  .reveal{opacity:1!important;transform:none!important}
  .hero img,.hero::before,.hero::after{animation:none!important}
}

/* ---- Small-screen tuning ---- */
@media (max-width:991.98px){
  .hero{padding:4.5rem 0;text-align:center}
  .hero .lead{margin-left:auto;margin-right:auto}
  .hero .d-flex{justify-content:center}
}
@media (max-width:575.98px){
  .section{padding:3.25rem 0}
  .stat-num{font-size:2.1rem}
  .hero{padding:3.75rem 0}
}
