/* ============================================================
   Vanni — custom styles (complements Tailwind utility classes)
   Modern header, mega-menu, animated cards, gradient accents
   ============================================================ */

:root {
  --brand-grad: linear-gradient(120deg, #1d4ed8 0%, #3b82f6 35%, #06b6d4 70%, #14b8a6 100%);
  --navy: #0a2540;
  --brand: #1d4ed8;
  --teal: #14b8a6;
  --mint: #5eead4;
}

* { -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }
::selection { background: #1d4ed8; color: #fff; }

/* Background utilities */
.bg-ribbon { background-image: var(--brand-grad); }
.bg-mesh {
  background:
    radial-gradient(at 0% 0%, rgba(20, 184, 166, 0.45) 0%, transparent 50%),
    radial-gradient(at 90% 10%, rgba(6, 182, 212, 0.55) 0%, transparent 50%),
    radial-gradient(at 50% 100%, rgba(29, 78, 216, 0.55) 0%, transparent 55%),
    linear-gradient(135deg, #0a2540 0%, #1d4ed8 100%);
}
.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Gradient text */
.gradient-text {
  background: var(--brand-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============================================================
   HEADER — consistent solid white across all scroll states
   ============================================================ */
#site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  transition: box-shadow .35s ease;
}
#site-header.scrolled {
  box-shadow: 0 10px 30px -15px rgba(15,23,42,.18);
}

/* ============================================================
   MEGA MENU — desktop
   ============================================================ */
.group\/mega:hover .mega-arrow { transform: rotate(180deg); }

/* ============================================================
   CARDS — premium hover lift with gradient ring
   ============================================================ */
.card-hover {
  position: relative;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease, border-color .4s ease;
  isolation: isolate;
}
.card-hover::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--brand-grad);
  -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 .4s ease;
  z-index: 1;
  pointer-events: none;
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -25px rgba(15,23,42,.25);
}
.card-hover:hover::before {
  opacity: 1;
}
/* Card lift + icon colour shift */
.card-hover .icon-tile {
  transition: transform .4s cubic-bezier(.2,.8,.2,1), background .4s ease, color .4s ease;
}
.card-hover:hover .icon-tile {
  transform: scale(1.08) rotate(-4deg);
  background: var(--brand-grad);
  color: #fff;
}

/* Premium service card — top accent line on hover */
.service-card-accent {
  position: relative;
  overflow: hidden;
}
.service-card-accent::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.service-card-accent:hover::after {
  transform: scaleX(1);
}

/* ============================================================
   ICON TILE
   ============================================================ */
.icon-tile {
  background: linear-gradient(135deg, rgba(29,78,216,.10), rgba(20,184,166,.10));
  color: #1d4ed8;
}
.icon-tile svg { width: 26px; height: 26px; }

/* ============================================================
   BUTTONS — gradient with shimmer sweep
   ============================================================ */
.btn-primary {
  position: relative;
  background-image: var(--brand-grad);
  background-size: 200% 100%;
  color: #fff;
  box-shadow: 0 20px 50px -20px rgba(29,78,216,.55);
  transition: background-position .6s ease, transform .3s ease, box-shadow .3s ease;
  overflow: hidden;
}
.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 25px 60px -20px rgba(29,78,216,.7);
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   MARQUEE for logo strip
   ============================================================ */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

/* ============================================================
   FLOATING HERO CARDS
   ============================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.float-card { animation: float 6s ease-in-out infinite; }
.float-card.delay-1 { animation-delay: 1.2s; }
.float-card.delay-2 { animation-delay: 2.4s; }

/* ============================================================
   DECORATIVE BLOB
   ============================================================ */
.ribbon-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  pointer-events: none;
}

/* ============================================================
   PROCESS TIMELINE connector
   ============================================================ */
.timeline-connector::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(50% + 24px);
  right: calc(-50% + 24px);
  height: 2px;
  background: linear-gradient(90deg, rgba(29,78,216,.4), rgba(20,184,166,.4));
}
.timeline-connector:last-child::before { display: none; }

/* ============================================================
   MOBILE MENU animation
   ============================================================ */
#mobile-menu:not(.hidden) {
  animation: slideDown .3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .3s ease; }
.faq-item[open] summary { color: #1d4ed8; }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #1d4ed8, #06b6d4); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #0a2540, #14b8a6); }

/* ============================================================
   GLOW PULSE — for live indicators
   ============================================================ */
.glow-pulse {
  animation: glowpulse 2.5s ease-in-out infinite;
}
@keyframes glowpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6); }
  70%      { box-shadow: 0 0 0 12px rgba(94, 234, 212, 0); }
}

/* ============================================================
   GRADIENT TEXT SHIMMER
   ============================================================ */
.shimmer-text {
  background: linear-gradient(90deg, #1d4ed8 0%, #06b6d4 30%, #14b8a6 50%, #06b6d4 70%, #1d4ed8 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}

/* ============================================================
   HERO — animated mesh background, drifting orbs, particles
   ============================================================ */

/* Slowly drifting gradient orbs in hero */
@keyframes drift1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(40px, -30px) scale(1.1); }
  66%      { transform: translate(-30px, 20px) scale(0.95); }
}
@keyframes drift2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-50px, 40px) scale(1.15); }
}
@keyframes drift3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, 30px) scale(0.9); }
}
.orb-1 { animation: drift1 18s ease-in-out infinite; }
.orb-2 { animation: drift2 22s ease-in-out infinite; }
.orb-3 { animation: drift3 16s ease-in-out infinite; }

/* Animated mesh gradient that slowly shifts hue/position */
@keyframes meshShift {
  0%   { background-position: 0% 0%, 90% 10%, 50% 100%, 0% 0%; }
  50%  { background-position: 10% 5%, 80% 15%, 60% 95%, 5% 5%; }
  100% { background-position: 0% 0%, 90% 10%, 50% 100%, 0% 0%; }
}
.bg-mesh-animated {
  background:
    radial-gradient(at 0% 0%, rgba(20, 184, 166, 0.45) 0%, transparent 50%),
    radial-gradient(at 90% 10%, rgba(6, 182, 212, 0.55) 0%, transparent 50%),
    radial-gradient(at 50% 100%, rgba(29, 78, 216, 0.55) 0%, transparent 55%),
    linear-gradient(135deg, #0a2540 0%, #1d4ed8 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: meshShift 20s ease-in-out infinite;
}

/* Animated grid that slowly pans */
@keyframes gridPan {
  0%   { background-position: 0 0; }
  100% { background-position: 56px 56px; }
}
.bg-grid-animated {
  background-image:
    linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: gridPan 8s linear infinite;
}

/* Floating particle dots */
@keyframes particleFloat {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-120px) translateX(20px); opacity: 0; }
}
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(94, 234, 212, 0.6);
  pointer-events: none;
  animation: particleFloat 8s linear infinite;
}
.particle.p-2 { background: rgba(6, 182, 212, 0.5); width: 3px; height: 3px; }
.particle.p-3 { background: rgba(255, 255, 255, 0.4); width: 2px; height: 2px; }

/* ============================================================
   MORPHING HEADLINE — cycles through value props
   ============================================================ */
.morph-line {
  display: inline-block;
  position: relative;
  min-height: 1.1em;
  vertical-align: bottom;
}
.morph-word {
  display: inline-block;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(20px) rotateX(-30deg);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.morph-word.is-active {
  opacity: 1;
  transform: translateY(0) rotateX(0);
  position: relative;
}

/* ============================================================
   ANIMATED PROGRESS BARS — fill on scroll into view
   ============================================================ */
.progress-bar {
  position: relative;
  overflow: hidden;
}
.progress-bar .progress-fill {
  width: 0;
  transition: width 1.6s cubic-bezier(.2,.8,.2,1);
}
.progress-bar.is-animated .progress-fill {
  width: var(--progress, 0%);
}
/* shimmer sweep over progress fill */
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* ============================================================
   CARD TILT — subtle 3D tilt on hover
   ============================================================ */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.tilt-card .tilt-layer {
  transform: translateZ(40px);
  transition: transform .3s ease;
}

/* ============================================================
   MAGNETIC BUTTON — subtly attracted to cursor
   ============================================================ */
.magnetic {
  transition: transform .25s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}

/* ============================================================
   RIPPLE — on click of buttons
   ============================================================ */
.ripple-container { position: relative; overflow: hidden; }
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: scale(0);
  animation: rippleAnim 0.7s ease-out;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ============================================================
   FLOATING TAGS in hero
   ============================================================ */
@keyframes tagFloat {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50%      { transform: translateY(-10px) rotate(var(--rot, 0deg)); }
}
.float-tag {
  animation: tagFloat 5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* ============================================================
   ANIMATED UNDERLINE on nav (draws in from left)
   ============================================================ */
.nav-underline {
  position: relative;
}
.nav-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.nav-underline:hover::after,
.nav-underline.is-active::after {
  transform: scaleX(1);
}

/* ============================================================
   GRADIENT BORDER ROTATION on hero CTA
   ============================================================ */
@keyframes borderRotate {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ============================================================
   SUBTITLE PULSE — gentle breathing on the live badge
   ============================================================ */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.05); opacity: 0.9; }
}
.breathe { animation: breathe 3s ease-in-out infinite; }

/* ============================================================
   WAVE BOTTOM of hero — subtle drift
   ============================================================ */
@keyframes waveDrift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-15px); }
}
.hero-wave { animation: waveDrift 12s ease-in-out infinite; }

/* ============================================================
   STAT NUMBER — slide up reveal
   ============================================================ */
@keyframes numSlideUp {
  0%   { opacity: 0; transform: translateY(15px); }
  100% { opacity: 1; transform: translateY(0); }
}
.num-reveal { animation: numSlideUp .8s cubic-bezier(.2,.8,.2,1) forwards; }

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .particle, .orb-1, .orb-2, .orb-3 { display: none; }
  .bg-mesh-animated, .bg-grid-animated { animation: none; }
}
