/* Global Styles */
body { background-color: #0a1628; color: #ffffff; overflow-x: hidden; }
.glass { background: rgba(255,255,255,0.03); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); }
.glass-strong { background: rgba(16,73,96,0.4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.15); }
.gradient-text { background: linear-gradient(135deg, #fff 0%, #0066FF 50%, #00A86B 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mesh-gradient { background-color: #0a1628; background-image: radial-gradient(at 0% 0%, rgba(0,102,255,0.15) 0px, transparent 50%), radial-gradient(at 100% 0%, rgba(255,140,66,0.1) 0px, transparent 50%), radial-gradient(at 100% 100%, rgba(0,168,107,0.1) 0px, transparent 50%), radial-gradient(at 0% 100%, rgba(16,73,96,0.3) 0px, transparent 50%); }

/* Typography
   Headings balance their lines so a longer headline cannot strand one or two
   words ("It.") alone on the last line; body copy avoids single-word orphans.
   Both degrade to normal wrapping in browsers that do not support them. */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* Interactions */
.card-hover { transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), box-shadow 0.4s cubic-bezier(0.4,0,0.2,1); }
.card-hover:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -15px rgba(0,102,255,0.3); }
.nav-link { position: relative; }
.nav-link::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -4px; left: 0; background: #0066FF; transition: width 0.3s ease; }
.nav-link:hover::after { width: 100%; }
.nav-link.active::after { width: 100%; }
.reveal { opacity: 0; transform: translateY(30px); }

/* Buttons */
.btn-primary {
    position: relative;
    background-color: #0052cc;
    background-image:
        linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.22) 50%, transparent 100%),
        linear-gradient(135deg, #0066FF 0%, #0052cc 100%);
    background-repeat: no-repeat;
    background-size: 65% 100%, 100% 100%;
    background-position: -200% 0, 0 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-position 0.5s ease;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0,102,255,0.5);
    background-position: 300% 0, 0 0;
}

/* Effects */
.noise { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9998; opacity: 0.03; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"); }

/* Index Specific */
.input-field { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); transition: all 0.3s ease; }
.input-field:focus { background: rgba(255,255,255,0.1); border-color: #0066FF; outline: none; box-shadow: 0 0 0 3px rgba(0,102,255,0.2); }
.floating-shape { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4; animation: float 10s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-20px)} }

/* Features Specific */
.feature-detail { border-left: 3px solid #0066FF; padding-left: 1.5rem; margin-bottom: 1.5rem; }
.feature-detail.accent { border-left-color: #FF8C42; }
.feature-detail.success { border-left-color: #00A86B; }
.feature-detail.purple { border-left-color: #a855f7; }
.feature-detail.bright { border-left-color: #0066FF; }

/* How It Works Specific */
.workflow-card { border-left: 3px solid transparent; transition: all 0.3s; }
.workflow-card:hover { border-left-color: #0066FF; background: rgba(255,255,255,0.03); }
.step-card { position: relative; }
.step-number { position: absolute; left: -1.5rem; top: 0; width: 3rem; height: 3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.25rem; }
@media (max-width: 768px) { .step-number { position: static; margin-bottom: 1rem; } }

/* Builders Specific */
.comparison-row:nth-child(even) { background: rgba(255,255,255,0.02); }
.comparison-row { transition: background 0.2s; }
.comparison-row:hover { background: rgba(255,255,255,0.05); }

/* Animated Background Orbs */
@keyframes float-orb {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(30px, -30px, 0); }
  50% { transform: translate3d(-20px, 20px, 0); }
  75% { transform: translate3d(20px, 30px, 0); }
}

.animated-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float-orb 20s ease-in-out infinite;
  pointer-events: none;
  will-change: transform;
}

.orb-blue {
  width: 500px;
  height: 500px;
  background: #0066FF;
  animation-delay: 0s;
}

.orb-orange {
  width: 400px;
  height: 400px;
  background: #FF8C42;
  animation-delay: -7s;
}

.orb-green {
  width: 350px;
  height: 350px;
  background: #00A86B;
  animation-delay: -14s;
}

/* Glowing pulse effect for CTAs */
@keyframes glow-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.btn-glow { position: relative; }

.btn-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 40px rgba(0, 102, 255, 0.8), 0 0 60px rgba(0, 102, 255, 0.4);
  animation: glow-pulse 2s ease-in-out infinite;
  will-change: opacity;
}

/* Shimmer effect for featured elements */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* A gradient sweep clipped to glyphs cannot be composited - it repaints the
   text every frame - so this runs three passes on load and then rests. The
   gradient tiles every 200%, so the resting position below renders identically
   to the final keyframe and the stop is seamless.
   For a permanent shimmer, change the iteration count back to `infinite`. */
.shimmer-text {
  background: linear-gradient(90deg, #fff 0%, #0066FF 50%, #fff 100%);
  background-size: 200% auto;
  background-position: -200% 0;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear 3;
}

/* Floating cards animation */
@keyframes card-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1deg); }
}

.animate-float {
  animation: card-float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: card-float 6s ease-in-out infinite;
  animation-delay: -3s;
}

/* Gradient border animation */
@keyframes rotate-gradient {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.gradient-border {
  position: relative;
  background: #0a1628;
  border-radius: 1rem;
  overflow: hidden;
}

/* Keep real content above the spinning gradient. */
.gradient-border > * { position: relative; z-index: 1; }

.gradient-border::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  aspect-ratio: 1;
  background: conic-gradient(from 0deg, #0066FF, #FF8C42, #00A86B, #0066FF);
  animation: rotate-gradient 4s linear infinite;
  will-change: transform;
  pointer-events: none;
}

/* Scroll indicator animation */
@keyframes bounce-arrow {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* Stats counter glow */
.stat-glow {
  text-shadow: 0 0 30px rgba(0, 102, 255, 0.5), 0 0 60px rgba(0, 102, 255, 0.3);
}

/* Feature icon pulse */
@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.icon-pulse:hover {
  animation: icon-pulse 0.5s ease-in-out;
}

/* Custom Cursor */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
  transition: opacity 0.2s ease;
}

.custom-cursor__ring {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #0066FF;
  background: rgba(0, 102, 255, 0.1);
  transform: scale(0.5);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.custom-cursor.hovering .custom-cursor__ring {
  transform: scale(1);
  background: rgba(0, 168, 107, 0.2);
  border-color: #00A86B;
}

@media (max-width: 768px) {
  .custom-cursor { display: none; }
}

/* Replaces the old startup loop that added .cursor-pointer to every control. */
a, button, input, textarea, select { cursor: pointer; }

/* Set by the IntersectionObserver in cursor.js on scrolled-away decoration. */
.anim-paused,
.anim-paused::before,
.anim-paused::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .animated-orb,
  .btn-glow::after,
  .shimmer-text,
  .gradient-border::before,
  .animate-float,
  .animate-float-delayed,
  .animate-ping,
  .animate-pulse { animation: none !important; }
  .custom-cursor { display: none !important; }
  .card-hover,
  .btn-primary { transition: none !important; }
}
