/* ============================================================
   Dhanmondi Group — Premium Animations & Visual Upgrades
   ============================================================ */

/* ── CUSTOM CURSOR ── */
.cursor-dot {
  width: 8px; height: 8px;
  background: #f5871f;
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
}
.cursor-ring {
  width: 36px; height: 36px;
  border: 2px solid rgba(245,135,31,0.6);
  border-radius: 50%;
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99998;
  transition: transform 0.12s ease, width 0.2s ease, height 0.2s ease, border-color 0.2s ease;
}
.cursor-ring.hovered {
  width: 54px; height: 54px;
  border-color: rgba(245,135,31,1);
}
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ── PAGE TRANSITION OVERLAY ── */
#page-transition {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #071a2e, #1e56a0);
  z-index: 99990;
  transform: translateY(-100%);
  pointer-events: none;
}
#page-transition.enter { animation: ptEnter 0.5s cubic-bezier(0.76,0,0.24,1) forwards; }
#page-transition.exit  { animation: ptExit  0.5s cubic-bezier(0.76,0,0.24,1) forwards; }

@keyframes ptEnter {
  from { transform: translateY(100%); }
  to   { transform: translateY(0%); }
}
@keyframes ptExit {
  from { transform: translateY(0%); }
  to   { transform: translateY(-100%); }
}

/* ── PRELOADER ── */
#preloader {
  position: fixed;
  inset: 0;
  background: #071a2e;
  z-index: 99997;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-logo-wrap {
  position: relative;
  width: 80px; height: 80px;
}
.preloader-logo-mark {
  width: 80px; height: 80px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f5871f, #ffb347);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800; font-size: 1.6rem;
  color: #071a2e;
  animation: plPulse 1.4s ease-in-out infinite;
}
.preloader-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #f5871f;
  border-right-color: rgba(245,135,31,0.3);
  animation: spin 1s linear infinite;
}
.preloader-text {
  color: #8fa0b8;
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.preloader-bar {
  width: 180px; height: 2px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.preloader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f5871f, #ffb347);
  border-radius: 2px;
  width: 0%;
  animation: barFill 2s ease forwards;
}

@keyframes plPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,135,31,0.4); }
  50%       { box-shadow: 0 0 0 20px rgba(245,135,31,0); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes barFill { to { width: 100%; } }

/* ── HERO PARTICLE CANVAS ── */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
}

/* ── HERO CONTENT ANIMATIONS ── */
.hero-inner .eyebrow  { animation: heroFadeUp 0.7s 0.3s both; }
.hero-inner h1        { animation: heroFadeUp 0.7s 0.45s both; }
.hero-inner .lead     { animation: heroFadeUp 0.7s 0.6s both; }
.hero-inner .hero-actions { animation: heroFadeUp 0.7s 0.75s both; }
.hero-inner .breadcrumb   { animation: heroFadeUp 0.6s 0.2s both; }
.hero-inner .subpage-tag  { animation: heroFadeUp 0.6s 0.3s both; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── ENHANCED REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.22,1,0.36,1),
              transform 0.65s cubic-bezier(0.22,1,0.36,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }

/* ── MAGNETIC BUTTON EFFECT ── */
.btn {
  position: relative;
  overflow: hidden;
  transform-origin: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.15);
  transform: translateX(-110%) skewX(-20deg);
  transition: transform 0.45s ease;
}
.btn:hover::after { transform: translateX(110%) skewX(-20deg); }

/* ── NAVBAR SCROLL EFFECT ── */
.site-header {
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.site-header.scrolled {
  background: rgba(7,26,46,1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
.site-header.scrolled .nav-wrap { padding-top: 10px; padding-bottom: 10px; }

/* ── COMPANY CARDS — PREMIUM HOVER ── */
.company-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.22,1,0.36,1),
              box-shadow 0.3s cubic-bezier(0.22,1,0.36,1),
              border-color 0.3s ease;
}
.company-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f5871f, #ffb347);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
}
.company-card:hover::before { transform: scaleX(1); }
.company-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 24px 48px rgba(7,26,46,0.16);
}
.company-card .icon {
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              background 0.3s ease;
}
.company-card:hover .icon {
  transform: scale(1.15) rotate(-5deg);
  background: linear-gradient(135deg, #f5871f22, #ffb34722);
}
.company-card .go {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.25s ease;
}
.company-card:hover .go { gap: 10px; }

/* ── STAT BAND — COUNT-UP GLOW ── */
.stat .num {
  position: relative;
  display: inline-block;
}
.stat .num::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f5871f, transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s ease 0.3s;
}
.stat-band.counted .num::after { transform: scaleX(1); }

/* ── TIMELINE — ANIMATED LINE ── */
.timeline {
  border-left: 2px solid transparent;
  background: linear-gradient(#e3e7ed,#e3e7ed) no-repeat left/2px 0%;
  transition: background-size 1.5s cubic-bezier(0.22,1,0.36,1);
}
.timeline.animated { background-size: 2px 100%; }
.timeline-item {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.timeline-item.in {
  opacity: 1;
  transform: translateX(0);
}
.timeline-item::before {
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  transform: scale(0);
}
.timeline-item.in::before { transform: scale(1); }

/* ── SECTION -- NAVY GRADIENT UPGRADE ── */
.section--navy {
  background: linear-gradient(160deg, #071a2e 0%, #0a2540 50%, #0d3060 100%);
  position: relative;
  overflow: hidden;
}
.section--navy::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30,86,160,0.15), transparent 70%);
  pointer-events: none;
}

/* ── HERO SKYLINE PARALLAX ── */
.skyline {
  will-change: transform;
  transition: transform 0.05s linear;
}

/* ── FLOATING ELEMENTS ── */
.float-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,135,31,0.12);
  border: 1px solid rgba(245,135,31,0.25);
  border-radius: 50px;
  padding: 8px 16px;
  font-size: 0.8rem; font-weight: 600;
  color: #f5871f;
  margin-bottom: 20px;
  animation: floatBadge 3s ease-in-out infinite;
}
.float-badge::before {
  content: '';
  width: 7px; height: 7px;
  background: #f5871f;
  border-radius: 50%;
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,135,31,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(245,135,31,0); }
}

/* ── PLACEHOLDER PHOTO — ANIMATED GRADIENT ── */
.placeholder-photo {
  background: linear-gradient(
    -45deg,
    #0a2540, #0d3060, #1e56a0, #0a2540
  );
  background-size: 400% 400%;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.placeholder-photo svg {
  filter: drop-shadow(0 8px 24px rgba(245,135,31,0.3));
  animation: svgFloat 4s ease-in-out infinite;
}
@keyframes svgFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* ── SCROLL PROGRESS BAR ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #f5871f, #ffb347);
  z-index: 99999;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(245,135,31,0.6);
}

/* ── BACK TO TOP ── */
#back-to-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #f5871f, #ffb347);
  border: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(245,135,31,0.35);
  z-index: 9990;
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, visibility 0.3s ease,
              transform 0.3s ease, box-shadow 0.2s ease;
  color: #fff;
}
#back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover   { box-shadow: 0 10px 30px rgba(245,135,31,0.5); transform: translateY(-3px); }
#back-to-top svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── TICKER / MARQUEE ── */
.ticker-wrap {
  background: linear-gradient(90deg, #f5871f, #e07715);
  overflow: hidden;
  padding: 10px 0;
}
.ticker-inner {
  display: flex;
  white-space: nowrap;
  animation: ticker 28s linear infinite;
  gap: 0;
}
.ticker-inner:hover { animation-play-state: paused; }
.ticker-item {
  padding: 0 40px;
  font-family: 'Sora', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px;
}
.ticker-item::before {
  content: '✦';
  font-size: 0.65rem;
  opacity: 0.7;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── SECTION DIVIDER WAVES ── */
.wave-divider { line-height: 0; }
.wave-divider svg { display: block; width: 100%; }

/* ── GLASS CARD EFFECT ── */
.glass-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 32px;
}

/* ── HERO STATS CHIPS ── */
.hero-chips {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 32px;
  animation: heroFadeUp 0.7s 0.9s both;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50px;
  padding: 7px 14px;
  font-size: 0.82rem; font-weight: 500;
  color: #cfd8e3;
  backdrop-filter: blur(6px);
}
.hero-chip strong { color: #f5871f; }

/* ── NUMBER COUNTER ANIMATION ── */
.count-up {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ── FOCUS / ACCESSIBLE SKIP LINK ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  background: #f5871f;
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 99999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── MOBILE NAV SLIDE IN ── */
@media (max-width: 960px) {
  .main-nav {
    transition: transform 0.35s cubic-bezier(0.22,1,0.36,1);
  }
  .main-nav.open {
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
  }
  .nav-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    backdrop-filter: blur(2px);
    animation: fadeIn 0.25s ease;
  }
  .nav-overlay.active { display: block; }
  @keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
}

/* ── BRAND-MARK SPIN ON HOVER ── */
.brand:hover .brand-mark {
  animation: brandSpin 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes brandSpin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(-15deg) scale(1.1); }
  100% { transform: rotate(0deg) scale(1); }
}

/* ── FOOTER SOCIAL BOUNCE ── */
.footer-social a {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              background 0.2s ease, border-color 0.2s ease;
}
.footer-social a:hover { transform: translateY(-5px) scale(1.12); }

/* ── LINK UNDERLINE ANIMATION ── */
.footer-grid a,
.main-nav a {
  position: relative;
}

/* ── CHECK LIST STAGGER ── */
.check-list li {
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.check-list.in-view li { opacity: 1; transform: translateX(0); }
.check-list.in-view li:nth-child(1) { transition-delay: 0.05s; }
.check-list.in-view li:nth-child(2) { transition-delay: 0.12s; }
.check-list.in-view li:nth-child(3) { transition-delay: 0.19s; }
.check-list.in-view li:nth-child(4) { transition-delay: 0.26s; }
.check-list.in-view li:nth-child(5) { transition-delay: 0.33s; }
.check-list.in-view li:nth-child(6) { transition-delay: 0.40s; }

/* ── CONTACT FORM FIELD FOCUS ── */
.field {
  position: relative;
}
.field input, .field textarea, .field select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  transform: translateY(-1px);
}
.field label {
  transition: color 0.2s ease;
}
.field:focus-within label { color: #1e56a0; }

/* ── TILT CARD (desktop only) ── */
@media (hover: hover) {
  .company-card.tilt-active {
    transition: transform 0.1s ease, box-shadow 0.3s ease;
  }
}

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(135deg, #f5871f, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LOADING SKELETON (for future API data) ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e3e7ed 25%, #f0f2f5 50%, #e3e7ed 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

/* ── NOTIFICATION TOAST ── */
.toast {
  position: fixed;
  bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #fff;
  border-left: 4px solid #f5871f;
  border-radius: 10px;
  padding: 14px 24px;
  box-shadow: 0 12px 40px rgba(7,26,46,0.15);
  font-size: 0.9rem; font-weight: 500;
  color: #071a2e;
  z-index: 99999;
  opacity: 0; visibility: hidden;
  transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
  white-space: nowrap;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ── HERO ANIMATED UNDERLINE ── */
h1 .highlight {
  position: relative;
  display: inline-block;
}
h1 .highlight::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f5871f, #ffb347);
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underlineGrow 0.6s 1.2s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes underlineGrow {
  to { transform: scaleX(1); }
}

/* ── SECTION ENTRY — CLIP PATH ── */
@supports (clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%)) {
  .reveal-clip {
    clip-path: polygon(0 30%, 100% 30%, 100% 70%, 0 70%);
    opacity: 0;
    transition: clip-path 0.7s cubic-bezier(0.22,1,0.36,1),
                opacity 0.4s ease;
  }
  .reveal-clip.in {
    clip-path: polygon(0 0%, 100% 0%, 100% 100%, 0 100%);
    opacity: 1;
  }
}
