/*
 * Insights Solutions — global styles.
 * Layout and utilities come from Tailwind CSS (loaded in each page's <head>);
 * this file holds the brand tokens and custom classes from the original frontend/src/index.css.
 */

:root {
  --color-primary-violet: #4B087A;
  --color-deep-violet: #2D054A;
  --color-violet-hover: #5E1591;
  --color-violet-subtle: #F5EEFB;
  --color-violet-border: #E3CDF6;
  --color-text-primary: #111827;
  --color-text-secondary: #4B5563;
  --color-text-muted: #9CA3AF;
  --color-chrome-border: #E5E7EB;
  --color-surface-soft: #F7F7F9;
  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
}

*, ::before, ::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: #F7F7F9;
  color: #111827;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }

::selection { background-color: #F5EEFB; color: #4B087A; }

*:focus-visible { outline: 2px solid #4B087A; outline-offset: 2px; }

/* Lucide icons render as inline SVG; keep them from shrinking inside flex rows */
svg.lucide { flex-shrink: 0; }

/* Subtle white-to-pale-violet gradient surfaces */
.surface-card {
  background: linear-gradient(145deg, #FFFFFF 0%, #FBF8FF 62%, #F4ECFA 100%);
  border-color: #E8DDF2;
}
.surface-card-hover { transition: all 200ms ease-out; }
.surface-card-hover:hover {
  border-color: #D9C4EA;
  box-shadow: 0 4px 14px -2px rgba(75, 8, 122, 0.06), 0 2px 6px -2px rgba(75, 8, 122, 0.04);
}

/* Navbar backgrounds (default + scrolled) */
.nav-bar {
  background: linear-gradient(90deg, #FFFFFF 0%, #FBF8FF 55%, #F5EDFB 100%);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}
.nav-bar.is-scrolled {
  background: linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(251,248,255,0.97) 55%, rgba(245,237,251,0.96) 100%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: #E5E7EB;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Scroll-reveal (replaces Framer Motion's whileInView) */
[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease-out-expo), transform 0.45s var(--ease-out-expo);
  transition-delay: var(--d, 0s);
}
[data-animate].in-view { opacity: 1; transform: none; }

/* Load-in animations for hero content (replaces Framer Motion's initial/animate) */
@keyframes rise-in { from { opacity: 0; transform: translateY(var(--rise, 16px)); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes scale-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }
.anim-rise { animation: rise-in 0.5s var(--ease-out-expo) both; animation-delay: var(--d, 0s); }
.anim-fade { animation: fade-in 0.5s ease-out both; animation-delay: var(--d, 0s); }
.anim-scale { animation: scale-in 0.55s var(--ease-out-expo) both; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate] { opacity: 1; transform: none; }
}
