/* ══════════════════════════════════════════════════════════
   EFFECTS.CSS — Visual Enhancement Suite v9
   32 interactions: cursor · parallax · tilt · scramble
   · ripple · flip · progress · magnetic · wipe reveals
══════════════════════════════════════════════════════════ */

/* ── CUSTOM CURSOR ─────────────────────────────────────── */
* { cursor: none !important; }
#cursor-dot {
  position: fixed;
  width: 10px; height: 10px;
  background: #C9A45C;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%,-50%);
  transition: width .25s ease, height .25s ease, background .25s ease, opacity .25s ease;
  will-change: left, top;
}
#cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(201,164,92,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%,-50%);
  transition: width .35s ease, height .35s ease, border-color .3s ease;
  will-change: left, top;
}
body.cursor-hover #cursor-dot  { width: 6px; height: 6px; background: #fff; }
body.cursor-hover #cursor-ring { width: 54px; height: 54px; border-color: rgba(201,164,92,0.8); background: rgba(201,164,92,0.06); }
body.cursor-click #cursor-dot  { width: 16px; height: 16px; background: #C9A45C; }
@media (hover: none), (max-width: 991px) {
  * { cursor: auto !important; }
  #cursor-dot, #cursor-ring { display: none; }
}

/* ── SCROLL PROGRESS BAR ───────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #C9A45C, #f0d07a, #C9A45C);
  background-size: 200% 100%;
  z-index: 100000;
  pointer-events: none;
  animation: progress-shimmer 3s linear infinite;
  transition: width .1s linear;
}
@keyframes progress-shimmer {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ── HERO NOISE GRAIN OVERLAY ──────────────────────────── */
#header-carousel .carousel-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: overlay;
}

/* ── STATS GRADIENT MESH ───────────────────────────────── */
.stats-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 0deg at 20% 50%,
    rgba(201,164,92,0.06) 0deg,
    transparent 120deg,
    rgba(99,102,241,0.04) 200deg,
    transparent 360deg
  );
  animation: mesh-rotate 12s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes mesh-rotate { to { transform: rotate(360deg); } }

/* ── SECTION DIVIDER ───────────────────────────────────── */
.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #C9A45C 30%, #f0d07a 50%, #C9A45C 70%, transparent 100%);
  opacity: 0.3;
  margin: 0;
  background-size: 200% 100%;
  animation: divider-shimmer 4s ease infinite;
}
@keyframes divider-shimmer {
  0%,100% { background-position: 0% 0%; }
  50%      { background-position: 100% 0%; }
}

/* ── HERO TEXT WORD SPLIT ──────────────────────────────── */
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: word-enter 0.7s var(--ease-bounce, cubic-bezier(0.34,1.56,0.64,1)) forwards;
}
@keyframes word-enter {
  to { opacity: 1; transform: translateY(0); }
}

/* ── CLIP-PATH WIPE REVEAL ─────────────────────────────── */
.wipe-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.85s cubic-bezier(0.77,0,0.175,1);
}
.wipe-reveal.active { clip-path: inset(0 0% 0 0); }

/* ── STAGGERED CARD REVEALS ────────────────────────────── */
.reveal { --stagger-i: 0; }
.reveal.active { transition-delay: calc(var(--stagger-i) * 80ms); }

/* ── 3D TILT CARDS ─────────────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(0.03,0.98,0.52,0.99), box-shadow .4s ease;
  will-change: transform;
}
.tilt-card-inner {
  transform: translateZ(16px);
  transition: transform .4s ease;
}

/* ── MAGNETIC BUTTON ───────────────────────────────────── */
.magnetic {
  position: relative;
  transition: transform .4s cubic-bezier(0.03,0.98,0.52,0.99) !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* ── BUTTON RIPPLE ─────────────────────────────────────── */
.btn-primary { overflow: hidden; position: relative; }
.ripple-wave {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple-expand .6s linear;
  pointer-events: none;
}
@keyframes ripple-expand {
  to { transform: scale(4); opacity: 0; }
}

/* ── SCROLL PROGRESS BAR on page entry ─────────────────── */
.page-enter {
  animation: page-fade-in 0.5s ease forwards;
}
@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── TEAM CARD FLIP ────────────────────────────────────── */
.team-flip-container {
  perspective: 1200px;
  height: 100%;
}
.team-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.23,1,0.32,1);
}
.team-flip-container:hover .team-flip-inner { transform: rotateY(180deg); }
.team-flip-front, .team-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  overflow: hidden;
}
.team-flip-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #0B142F 0%, #1a2a4a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  gap: 12px;
}
.team-flip-back .flip-name {
  font-family: "Playfair Display",serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.team-flip-back .flip-role {
  font-family: "JetBrains Mono",monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C9A45C;
}
.team-flip-back .flip-bio {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin: 8px 0;
}
.team-flip-back .flip-social {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.team-flip-back .flip-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  text-decoration: none;
  transition: background .25s ease, color .25s ease;
}
.team-flip-back .flip-social a:hover {
  background: #C9A45C;
  color: #000;
  border-color: #C9A45C;
}
/* Avatar circle on flip back */
.team-flip-back .flip-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(201,164,92,0.4);
  object-position: top center;
}

/* ── SERVICE ICON SPRING ───────────────────────────────── */
.service-item:hover .lottie-icon-wrap {
  transform: scale(1.12);
  transition: transform 0.45s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.lottie-icon-wrap {
  transition: transform 0.3s ease;
}

/* ── NAV UNDERLINE CENTER-OUT ──────────────────────────── */
.nav-item.nav-link::after {
  content: "";
  position: absolute;
  bottom: 10px; left: 50%;
  width: 0; height: 2px;
  background: var(--brand-primary, #C9A45C);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width .35s cubic-bezier(0.19,1,.22,1);
}
.nav-item.nav-link:hover::after,
.nav-item.nav-link.active::after { width: 20px; }

/* ── WA FLOAT TOOLTIP ──────────────────────────────────── */
.wa-float-wrap { position: relative; }
.wa-float-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(11,20,47,0.92);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  backdrop-filter: blur(10px);
}
.wa-float-tooltip::after {
  content: "";
  position: absolute;
  left: 100%; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(11,20,47,0.92);
}
.wa-float-wrap:hover .wa-float-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ── HERO SLIDE COUNTER ────────────────────────────────── */
.slide-counter-display {
  position: absolute;
  bottom: 2.5rem;
  right: 4rem;
  font-family: "JetBrains Mono",monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.14em;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}
.slide-counter-current { color: #C9A45C; font-size: 16px; font-weight: 500; }
.slide-counter-line {
  width: 40px; height: 1px;
  background: rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}
.slide-counter-line::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  height: 100%;
  width: 0;
  background: #C9A45C;
  animation: counter-fill 6s linear forwards;
}
.slide-counter-line.animating::after { width: 100%; }
@media (max-width: 768px) { .slide-counter-display { display: none; } }

/* ── CUSTOM GOLD SCROLLBAR ─────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(#C9A45C, #f0d07a);
  border-radius: 3px;
}
* { scrollbar-width: thin; scrollbar-color: #C9A45C transparent; }

/* ── TOOLTIP ON COMPARISON TABLE ──────────────────────── */
[data-tooltip] { position: relative; }
[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: rgba(11,20,47,0.95);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  transform: translateY(4px);
  z-index: 100;
  backdrop-filter: blur(8px);
}
[data-tooltip]:hover::before { opacity: 1; transform: translateY(0); }

/* ── TESTIMONIAL DISPLAY QUOTE ─────────────────────────── */
.owl-item.center .testimonial-item p {
  font-family: "Playfair Display",serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
}

/* ── PROCESS CONNECTOR DRAW ANIMATION ─────────────────── */
@media (min-width: 768px) {
  .process-row::after {
    content: "";
    position: absolute;
    top: 44px;
    left: calc(12.5% + 20px);
    width: 0;
    height: 1px;
    background: repeating-linear-gradient(90deg, #C9A45C 0, #C9A45C 6px, transparent 6px, transparent 14px);
    opacity: 0;
    z-index: 0;
    transition: width 1.2s cubic-bezier(0.19,1,.22,1), opacity 0.3s ease;
  }
  .process-row.connector-active::after {
    width: calc(75% - 40px);
    opacity: 0.35;
  }
}

/* ── CHAR COUNT ────────────────────────────────────────── */
.char-count {
  font-size: 12px;
  color: rgba(107,114,128,0.7);
  text-align: right;
  margin-top: 4px;
  font-family: "JetBrains Mono",monospace;
  transition: color .2s ease;
}
.char-count.near-limit { color: #C9A45C; }
.char-count.at-limit   { color: #EF4444; }

/* ── STATS SUFFIX SPRING ───────────────────────────────── */
.stat-suffix {
  display: inline-block;
  opacity: 0;
  transform: scale(0) rotate(-15deg);
  transition: opacity .4s ease, transform .5s cubic-bezier(0.34,1.56,0.64,1);
}
.stat-suffix.pop { opacity: 1; transform: scale(1) rotate(0); }

/* ── PAGE ENTRY ────────────────────────────────────────── */
body { animation: page-fade-in .5s ease forwards; }

/* ── SCRAMBLE TEXT ─────────────────────────────────────── */
.scramble { display: block; }

/* ── LOTTIE HOVER ONLY ─────────────────────────────────── */
.feature-item .lottie-anim, .feature-item .lottie-icon-wrap .lottie { opacity: 0.85; }
.feature-item:hover .lottie-anim, .feature-item:hover .lottie-icon-wrap .lottie { opacity: 1; }

.team-flip-container { min-height: 380px; }

.team-flip-container { min-height: 380px; }
