/* ==========================================================
   Darbar Digital — enhancement layer
   Page loader, animated mesh hero, glass header, marquee,
   scroll progress and interactive card tilt.
   Loads after style.css and only adds to the base design.
   ========================================================== */

/* ---------- page loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #3b2ce0, #2e1bd1 45%, #1d0fa0 100%);
  transition: transform .9s cubic-bezier(.76, 0, .24, 1), opacity .6s ease .2s;
}
.loader::before, .loader::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px); opacity: .45;
  animation: loaderOrb 3.2s ease-in-out infinite alternate;
}
.loader::before { width: 380px; height: 380px; background: #f2706a; left: -120px; top: -100px; }
.loader::after  { width: 420px; height: 420px; background: #c4a3ff; right: -140px; bottom: -120px; animation-delay: -1.6s; }
@keyframes loaderOrb { to { transform: translate(40px, 30px) scale(1.15); } }

.loader-inner { position: relative; text-align: center; color: #fff; }
.loader-arch { width: 112px; height: 112px; margin: 0 auto 26px; display: block; }
.loader-arch .outer, .loader-arch .inner {
  fill: none; stroke-linecap: round; stroke-width: 4;
}
.loader-arch .outer { stroke: #fff; stroke-dasharray: 260; stroke-dashoffset: 260; animation: drawArch 1.3s cubic-bezier(.6,.1,.3,1) forwards; }
.loader-arch .inner { stroke: #f2706a; stroke-dasharray: 170; stroke-dashoffset: 170; animation: drawArch 1.1s .35s cubic-bezier(.6,.1,.3,1) forwards; }
.loader-arch .dot { fill: #3ddcb4; opacity: 0; animation: fadeIn .4s 1.2s forwards; }
@keyframes drawArch { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }

.loader-word {
  font-size: 1.5rem; font-weight: 800; letter-spacing: .01em;
  opacity: 0; transform: translateY(10px); animation: riseIn .6s .8s forwards;
}
.loader-word span { color: #ffd6d2; }
.loader-tag {
  margin-top: 6px; font-size: .68rem; letter-spacing: .32em; text-transform: uppercase; opacity: 0;
  animation: riseIn .6s 1s forwards;
}
.loader-bar {
  width: 180px; height: 3px; margin: 26px auto 0; border-radius: 3px; overflow: hidden;
  background: rgba(255, 255, 255, .22);
}
.loader-bar i {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, #f2706a, #ffd166);
  animation: fill 1.6s .2s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes riseIn { to { opacity: 1; transform: none; } }
@keyframes fill { to { width: 100%; } }

.loader.done { transform: translateY(-100%); opacity: 0; pointer-events: none; }
html.is-loading, html.is-loading body { overflow: hidden; }

/* ---------- scroll progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #2e1bd1, #6b2fb3, #f2706a);
}

/* ---------- hero mesh ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -10% -5% auto; height: 120%; z-index: -2;
  background:
    radial-gradient(40% 50% at 15% 25%, rgba(46, 27, 209, .16), transparent 70%),
    radial-gradient(35% 45% at 85% 15%, rgba(242, 112, 106, .18), transparent 70%),
    radial-gradient(40% 50% at 70% 85%, rgba(107, 47, 179, .14), transparent 70%);
  filter: blur(10px); animation: meshShift 14s ease-in-out infinite alternate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(46, 27, 209, .22) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(160deg, #000 0%, transparent 55%);
  -webkit-mask-image: linear-gradient(160deg, #000 0%, transparent 55%);
}
@keyframes meshShift {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to   { transform: translate3d(-3%, 2%, 0) rotate(2deg); }
}

/* glowing gradient text for the rotating word */
.rotator {
  display: inline-block; position: relative; min-width: 9ch; vertical-align: bottom;
  background: linear-gradient(90deg, #2e1bd1, #6b2fb3 55%, #f2706a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rotator span {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  opacity: 0; transform: translateY(40%); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1);
}
.rotator span.on { opacity: 1; transform: none; position: relative; }

/* hero visual: floating ring around the phone */
.hero-visual .ring {
  position: absolute; left: 50%; top: 50%; width: 430px; height: 430px; border-radius: 50%;
  transform: translate(-50%, -50%); border: 1.5px dashed rgba(46, 27, 209, .25);
  animation: spin 40s linear infinite;
}
.hero-visual .ring::after {
  content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: #f2706a; top: -6px; left: 50%; transform: translateX(-50%);
  box-shadow: 0 0 0 6px rgba(242, 112, 106, .18);
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---------- marquee strip ---------- */
.strip {
  background: #16152e; color: #fff; overflow: hidden; padding: 18px 0; position: relative;
}
.strip-track {
  display: flex; width: max-content; gap: 44px; align-items: center;
  font-weight: 800; font-size: 1.15rem; letter-spacing: .02em;
  animation: strip 30s linear infinite;
}
.strip-track span { white-space: nowrap; display: inline-flex; align-items: center; gap: 44px; }
.strip-track span::after { content: "◆"; color: #f2706a; font-size: .8rem; }
.strip:hover .strip-track { animation-play-state: paused; }
@keyframes strip { to { transform: translateX(-50%); } }

/* ---------- glass header ---------- */
.site-header { transition: background .3s ease, box-shadow .3s ease, backdrop-filter .3s; }
.site-header.scrolled {
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.nav-links a { transition: color .2s, transform .2s; }
.nav-links a:hover { transform: translateY(-1px); }

/* nicer primary button sheen */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn-primary:hover::before { left: 120%; }

/* ---------- tilt cards ---------- */
.svc-card, .tile, .value, .info-item {
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt-ready { transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease !important; }

/* decorative arch behind section titles */
.section-head { position: relative; }

/* accent underline draw-in on reveal */
.reveal .accent::after { transform-origin: left; transition: transform .9s .3s cubic-bezier(.2,.7,.2,1); }
.reveal:not(.in) .accent::after { transform: scaleX(0); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .hero::before, .strip-track, .hero-visual .ring { animation: none !important; }
}

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  .hero-visual .ring { width: 300px; height: 300px; }
  .strip-track { font-size: .95rem; }
}
