/* =========================================================================
   Aspient — elegant, colorful design layer + vivid 3D hero scene.
   Plain CSS, loaded after tailwind.css. Motion respects prefers-reduced-motion.
   ========================================================================= */

:root {
  --grad-brand: linear-gradient(100deg,
    rgb(var(--c-violet)) 0%,
    rgb(var(--c-indigo)) 22%,
    rgb(var(--brand-500)) 48%,
    rgb(var(--c-sky)) 74%,
    rgb(var(--accent-400)) 100%);
  --grad-brand-soft: linear-gradient(120deg,
    rgb(var(--c-violet) / .14), rgb(var(--brand-500) / .12), rgb(var(--accent-500) / .14));
}

/* ---------- Headlines & gradient text ---------- */
.hero-headline { letter-spacing: -0.025em; font-weight: 800; text-wrap: balance; }
.text-gradient {
  background-image: var(--grad-brand);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: hueShift 9s ease-in-out infinite alternate;
}
@keyframes hueShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* ---------- Buttons ---------- */
.btn-primary {
  background-image: linear-gradient(135deg, rgb(var(--c-indigo)) 0%, rgb(var(--brand-500)) 45%, rgb(var(--accent-500)) 110%);
  background-size: 160% auto;
  box-shadow: 0 1px 0 0 rgba(255,255,255,.3) inset,
              0 10px 26px -8px rgb(var(--c-indigo) / .55),
              0 6px 18px -10px rgb(var(--accent-500) / .6);
  transition: background-position .5s ease, box-shadow .3s, transform .3s;
}
.btn-primary:hover {
  background-position: right center;
  box-shadow: 0 14px 34px -8px rgb(var(--c-violet) / .6), 0 8px 22px -8px rgb(var(--accent-500) / .65);
}
.btn-secondary { backdrop-filter: blur(6px); }
.btn-secondary:hover { border-color: rgb(var(--c-indigo) / .45); color: rgb(var(--c-indigo)); }

/* ---------- Cards ---------- */
.card-hover { transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s; }
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -22px rgb(var(--c-violet) / .45),
              0 0 0 1px rgb(var(--brand-500) / .28),
              0 0 52px -16px rgb(var(--accent-500) / .65);
  border-color: rgb(var(--brand-500) / .5);
}

/* ---------- Icon tiles (colorful, with cycling hue accents) ---------- */
.icon-tile {
  background-image: linear-gradient(150deg, rgb(var(--c-violet)) 0%, rgb(var(--brand-500)) 50%, rgb(var(--accent-500)) 120%);
  box-shadow: 0 10px 26px -8px rgb(var(--c-indigo) / .6),
              inset 0 1px 0 rgba(255,255,255,.5),
              inset 0 -8px 14px -6px rgba(0,0,0,.35);
}
/* Subtle hue variety so grids of tiles feel colorful, not uniform */
.grid > *:nth-child(3n+2) .icon-tile { background-image: linear-gradient(150deg, rgb(var(--c-indigo)), rgb(var(--c-sky)) 55%, rgb(var(--accent-400)) 120%); }
.grid > *:nth-child(3n+3) .icon-tile { background-image: linear-gradient(150deg, rgb(var(--c-teal)), rgb(var(--accent-500)) 55%, rgb(var(--c-sky)) 120%); }
.grid > *:nth-child(4n+4) .icon-tile { background-image: linear-gradient(150deg, rgb(var(--c-pink)), rgb(var(--c-violet)) 60%, rgb(var(--brand-500)) 120%); }

/* ---------- Chips ---------- */
.chip {
  border-color: rgb(var(--brand-500) / .25);
  background: linear-gradient(180deg, rgb(var(--c-bg) / .9), rgb(var(--brand-50) / .6));
}
.chip:hover { border-color: rgb(var(--c-violet) / .4); }

/* ---------- Services dropdown panel (bg-white/98 didn't compile → was see-through) ---------- */
#services-submenu {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 50px -12px rgb(var(--c-indigo) / .25), 0 0 0 1px rgb(var(--brand-500) / .08);
}
.dark #services-submenu {
  background-color: rgba(15, 23, 42, 0.98);
  border-color: rgba(148, 163, 184, 0.22);
}
/* Caret pointing up to the Services nav item */
#services-submenu::before {
  content: ""; position: absolute; top: -7px; left: 30px;
  width: 14px; height: 14px; background-color: inherit;
  border-left: 1px solid rgb(var(--brand-500) / .12);
  border-top: 1px solid rgb(var(--brand-500) / .12);
  border-radius: 4px 0 0 0; transform: rotate(45deg);
}
.dark #services-submenu::before { border-color: rgba(148, 163, 184, .22); }
/* Polished items + clear gradient hover highlight */
#services-submenu .dropdown-link {
  position: relative; font-weight: 500; border-radius: 0.75rem;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
#services-submenu .dropdown-link::before {
  content: ""; position: absolute; left: 6px; top: 50%; height: 0; width: 3px;
  border-radius: 3px; background: var(--grad-brand);
  transform: translateY(-50%); transition: height .18s ease;
}
#services-submenu .dropdown-link:hover,
#services-submenu .dropdown-link.nav-link-active,
#services-submenu .dropdown-link.glassy-active {
  background-image: linear-gradient(90deg, rgb(var(--brand-500) / .12), rgb(var(--c-violet) / .10));
  color: rgb(var(--c-indigo)); transform: translateX(5px);
}
#services-submenu .dropdown-link:hover::before,
#services-submenu .dropdown-link.nav-link-active::before { height: 60%; }
#services-submenu .dropdown-link:hover i { color: rgb(var(--c-violet)); }
.dark #services-submenu .dropdown-link:hover,
.dark #services-submenu .dropdown-link.nav-link-active {
  background-image: linear-gradient(90deg, rgb(var(--brand-400) / .18), rgb(var(--c-violet) / .14));
  color: rgb(var(--brand-300));
}

/* ---------- Colorful section ambiance ---------- */
.aurora { position: relative; isolation: isolate; }
.aurora::before {
  content: ""; position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(40% 52% at 10% 6%, rgb(var(--c-violet) / .32), transparent 62%),
    radial-gradient(42% 52% at 90% 0%, rgb(var(--accent-500) / .34), transparent 62%),
    radial-gradient(48% 58% at 72% 100%, rgb(var(--c-sky) / .30), transparent 64%),
    radial-gradient(42% 52% at 0% 92%, rgb(var(--c-pink) / .24), transparent 62%),
    radial-gradient(36% 46% at 50% 40%, rgb(var(--c-indigo) / .16), transparent 60%);
}

/* =========================================================================
   3D HERO SCENE — vivid, colorful, elegant
   ========================================================================= */
.scene-3d {
  position: relative; width: 100%; min-height: 480px;
  perspective: 1300px; transform-style: preserve-3d; --mx: 0; --my: 0;
}
@media (max-width: 1023px) { .scene-3d { min-height: 400px; } }
@media (max-width: 767px)  { .scene-3d { min-height: 340px; } }

.scene-3d .scene-glow {
  position: absolute; inset: 4%;
  background:
    radial-gradient(42% 46% at 30% 26%, rgb(var(--c-violet) / .92), transparent 70%),
    radial-gradient(44% 50% at 76% 30%, rgb(var(--brand-500) / .9), transparent 72%),
    radial-gradient(46% 52% at 60% 82%, rgb(var(--accent-500) / .92), transparent 72%),
    radial-gradient(36% 44% at 88% 78%, rgb(var(--c-pink) / .72), transparent 70%);
  filter: blur(40px) saturate(1.25); border-radius: 50%; z-index: 0;
  animation: glowPulse 7s ease-in-out infinite alternate;
}
@keyframes glowPulse { from { opacity: .8; transform: scale(.98); } to { opacity: 1; transform: scale(1.04); } }

.scene-3d .stage {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(calc(var(--my) * -6deg + var(--sy, 0) * 8deg)) rotateY(calc(var(--mx) * 8deg)) translateY(calc(var(--sy, 0) * -42px));
  transition: transform .25s ease-out;
}

/* Orbiting AI core */
.scene-3d .core-wrap {
  position: absolute; top: 50%; left: 50%; width: 140px; height: 140px;
  margin: -70px 0 0 -70px; transform-style: preserve-3d; z-index: 5;
}
.scene-3d .core {
  position: absolute; inset: 0; border-radius: 30px; display: grid; place-items: center;
  color: #fff; font-size: 2.8rem;
  background: linear-gradient(150deg, #a855f7 0%, #4f46e5 38%, #2563ff 68%, #06c8eb 130%);
  box-shadow: 0 26px 64px -16px rgb(var(--c-violet) / .8),
              0 18px 50px -18px rgb(var(--accent-500) / .8),
              inset 0 2px 0 rgba(255,255,255,.55), inset 0 -10px 22px -8px rgba(0,0,0,.4);
  animation: coreFloat 6s ease-in-out infinite;
}
.scene-3d .core::after {
  content: ""; position: absolute; inset: -2px; border-radius: 32px; padding: 2px;
  background: linear-gradient(140deg, rgba(255,255,255,.85), transparent 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.scene-3d .orbit { position: absolute; top: 50%; left: 50%; border-radius: 50%; transform-style: preserve-3d; }
.scene-3d .orbit-1 { width: 250px; height: 250px; margin: -125px 0 0 -125px; transform: rotateX(74deg); border: 1.5px dashed rgb(var(--c-violet) / .45); animation: spin 14s linear infinite; }
.scene-3d .orbit-2 { width: 340px; height: 340px; margin: -170px 0 0 -170px; transform: rotateX(74deg) rotateZ(60deg); border: 1.5px dashed rgb(var(--accent-500) / .45); animation: spin2 22s linear infinite; }
.scene-3d .orbit .node {
  position: absolute; top: -8px; left: 50%; margin-left: -8px; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #06c8eb 55%, #4f46e5);
  box-shadow: 0 0 18px 3px rgb(var(--accent-500) / .9);
}
.scene-3d .orbit-2 .node { background: radial-gradient(circle at 35% 30%, #fff, #ec4899 55%, #7c3aed); box-shadow: 0 0 18px 3px rgb(var(--c-pink) / .85); }

/* Floating glass cards — tinted, with colored icon chips */
.scene-3d .fcard {
  position: absolute; border-radius: 16px; padding: 13px 15px;
  background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 24px 50px -22px rgb(var(--c-indigo) / .5), inset 0 1px 0 rgba(255,255,255,.95);
  z-index: 6; animation: cardFloat 7s ease-in-out infinite;
}
.scene-3d .fcard .fc-row { display: flex; align-items: center; gap: 10px; }
.scene-3d .fcard .fc-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 1.02rem; box-shadow: 0 6px 16px -6px rgba(0,0,0,.4); }
.scene-3d .fc-1 .fc-ic { background: linear-gradient(145deg, #4f46e5, #2563ff); }
.scene-3d .fc-2 .fc-ic { background: linear-gradient(145deg, #0ea5e9, #06c8eb); }
.scene-3d .fc-3 .fc-ic { background: linear-gradient(145deg, #a855f7, #7c3aed); }
.scene-3d .fc-4 .fc-ic { background: linear-gradient(145deg, #14b8a6, #06c8eb); }
.scene-3d .fcard .fc-t { font: 700 .82rem/1.1 'Inter', sans-serif; color: #0f172a; }
.scene-3d .fcard .fc-s { font: 500 .7rem/1.2 'Inter', sans-serif; color: #64748b; margin-top: 2px; }

.scene-3d .fc-1 { top: 6%;  left: 0%;  transform: translateZ(75px) translate(calc(var(--mx)*18px), calc(var(--my)*14px)); animation-delay: -1s; }
.scene-3d .fc-2 { top: 2%;  right: 0%; transform: translateZ(45px) translate(calc(var(--mx)*-14px), calc(var(--my)*10px)); animation-delay: -3.5s; }
.scene-3d .fc-3 { bottom: 8%; left: 6%; transform: translateZ(60px) translate(calc(var(--mx)*12px), calc(var(--my)*-16px)); animation-delay: -2s; }
.scene-3d .fc-4 { bottom: 12%; right: 2%; transform: translateZ(90px) translate(calc(var(--mx)*-20px), calc(var(--my)*-12px)); animation-delay: -4.5s; }

/* Geometric accents (colorful) */
.scene-3d .shape { position: absolute; z-index: 4; animation: cardFloat 9s ease-in-out infinite; }
.scene-3d .shape.s-ring { width: 58px; height: 58px; border-radius: 50%; border: 7px solid rgb(var(--c-pink) / .55); top: 22%; right: 12%; }
.scene-3d .shape.s-tri { top: 68%; right: 20%; width: 0; height: 0; border-left: 21px solid transparent; border-right: 21px solid transparent; border-bottom: 36px solid rgb(var(--c-violet) / .6); animation-delay: -3s; }
.scene-3d .shape.s-dot { width: 20px; height: 20px; border-radius: 50%; background: rgb(var(--accent-500) / .85); top: 84%; left: 38%; box-shadow: 0 0 20px 4px rgb(var(--accent-500) / .7); }

/* Dark theme glass */
.dark .scene-3d .fcard { background: rgba(15,23,42,.72); border-color: rgba(148,163,184,.28); }
.dark .scene-3d .fcard .fc-t { color: #e8eefc; }
.dark .scene-3d .fcard .fc-s { color: #94a3b8; }

@keyframes coreFloat { 0%,100% { transform: translateY(0) rotateY(0); } 50% { transform: translateY(-13px) rotateY(14deg); } }
@keyframes cardFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -15px; } }
@keyframes spin  { from { transform: rotateX(74deg) rotateZ(0); }  to { transform: rotateX(74deg) rotateZ(360deg); } }
@keyframes spin2 { from { transform: rotateX(74deg) rotateZ(60deg); } to { transform: rotateX(74deg) rotateZ(-300deg); } }

/* =========================================================================
   Scroll experience — Lenis smooth scroll + scroll-reveal + colorful CTA band
   ========================================================================= */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* Cookie consent banner hidden state */
.cc-hide { display: none !important; }

/* Reveal-on-scroll. Hidden state ONLY when JS adds .has-reveal, so no-JS is safe. */
.reveal { transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.has-reveal .reveal { opacity: 0; transform: translateY(46px) scale(.98); }
.has-reveal .reveal.in { opacity: 1; transform: none; }

/* Colorful animated CTA band — vivid aurora MESH (replaces the flat blue gradient) */
.cta-band {
  background-color: #2348e6;
  background-image:
    radial-gradient(at 16% 20%, #8b5cf6 0px, transparent 48%),
    radial-gradient(at 84% 14%, #06c8eb 0px, transparent 46%),
    radial-gradient(at 78% 88%, #4f46e5 0px, transparent 52%),
    radial-gradient(at 22% 82%, #0ea5e9 0px, transparent 48%),
    radial-gradient(at 55% 50%, #2563ff 0px, transparent 60%);
  background-size: 170% 170%;
  animation: ctaShift 16s ease-in-out infinite;
}
@keyframes ctaShift { 0%, 100% { background-position: 0% 0%; } 50% { background-position: 100% 100%; } }

@media (prefers-reduced-motion: reduce) {
  .scene-3d .core, .scene-3d .orbit, .scene-3d .fcard, .scene-3d .shape, .scene-3d .scene-glow, .text-gradient, .cta-band { animation: none !important; }
  .scene-3d .stage { transition: none; }
  .has-reveal .reveal { opacity: 1 !important; transform: none !important; }
}
