@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --font-sans: var(--font-inter);
  --font-display: var(--font-manrope);
  --font-mono: var(--font-geist-mono);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-secondary: var(--secondary);
  --color-primary-foreground: var(--primary-foreground);
  --color-primary: var(--primary);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);

  /* Alaminn brand palettes */
  --color-blue-50: #F3F8FF;
  --color-blue-100: #E5F1FF;
  --color-blue-200: #B7D9FF;
  --color-blue-300: #75B5FF;
  --color-blue-400: #3B91F5;
  --color-blue-500: #1677E8;
  --color-blue-600: #0B63CE;
  --color-blue-700: #0A4A9E;
  --color-blue-800: #0A3268;
  --color-blue-900: #082044;
  --color-blue-950: #06162F;

  --color-orange-50: #FFF7F1;
  --color-orange-100: #FFE9D9;
  --color-orange-200: #FFD2B2;
  --color-orange-300: #FFB27E;
  --color-orange-400: #FF914D;
  --color-orange-500: #FF751F;
  --color-orange-600: #F26113;
  --color-orange-700: #D84A06;
  --color-orange-800: #A53800;
  --color-orange-900: #702500;
  --color-orange-950: #481700;

  --color-ink-50: #F8FAFC;
  --color-ink-100: #F2F4F7;
  --color-ink-200: #E4E7EC;
  --color-ink-300: #D0D5DD;
  --color-ink-400: #98A2B3;
  --color-ink-500: #667085;
  --color-ink-600: #475467;
  --color-ink-700: #344054;
  --color-ink-800: #1D2939;
  --color-ink-900: #101828;
  --color-ink-950: #07111F;

  --color-success: #12825C;
  --color-success-soft: #EAF8F2;
  --color-warning: #D98A0A;
  --color-warning-soft: #FFF7E3;
  --color-danger: #C93636;
  --color-danger-soft: #FFF0F0;
  --color-info: #1769D2;
  --color-info-soft: #EBF4FF;
}

:root {
  --radius: 0.75rem;
  --background: #FFFFFF;
  --foreground: #101828;
  --card: #FFFFFF;
  --card-foreground: #101828;
  --popover: #FFFFFF;
  --popover-foreground: #101828;
  /* Primary = orange (action / momentum) */
  --primary: #F26113;
  --primary-foreground: #FFFFFF;
  /* Secondary = deep blue (trust / structure) */
  --secondary: #E5F1FF;
  --secondary-foreground: #082044;
  --muted: #F2F4F7;
  --muted-foreground: #475467;
  --accent: #FFF7F1;
  --accent-foreground: #A53800;
  --destructive: #C93636;
  --border: rgba(16, 24, 40, 0.08);
  --input: rgba(16, 24, 40, 0.10);
  --ring: #0B63CE;
  --chart-1: #1677E8;
  --chart-2: #F26113;
  --chart-3: #12825C;
  --chart-4: #D98A0A;
  --chart-5: #75B5FF;
  --sidebar: #06162F;
  --sidebar-foreground: #E5F1FF;
  --sidebar-primary: #FF751F;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent: #082044;
  --sidebar-accent-foreground: #E5F1FF;
  --sidebar-border: rgba(229, 241, 255, 0.10);
  --sidebar-ring: #1677E8;

  /* Signature gradients */
  --grad-intelligence: linear-gradient(135deg, #06162F 0%, #0B63CE 55%, #1677E8 100%);
  --grad-momentum: linear-gradient(135deg, #D84A06 0%, #FF751F 55%, #FFB27E 100%);
  --grad-connected: linear-gradient(120deg, #0B63CE 0%, #1677E8 48%, #F26113 100%);
  --grad-ambient: radial-gradient(circle at 15% 20%, rgba(22,119,232,.12), transparent 34%), radial-gradient(circle at 85% 18%, rgba(255,117,31,.13), transparent 30%), linear-gradient(180deg, #FFFFFF 0%, #F6FAFF 100%);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 4px 12px rgba(16, 24, 40, .06);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, .09);
  --shadow-lg: 0 24px 70px rgba(6, 22, 47, .14);
  --shadow-blue: 0 18px 60px rgba(11, 99, 206, .18);
  --shadow-orange: 0 18px 48px rgba(242, 97, 19, .18);

  /* Motion */
  --motion-fast: 120ms;
  --motion-standard: 220ms;
  --motion-emphasis: 420ms;
  --motion-story: 700ms;
  --ease-standard: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.16, 1, .3, 1);
  --ease-exit: cubic-bezier(.7, 0, .84, 0);
}

.dark {
  --background: #06162F;
  --foreground: #F3F8FF;
  --card: #082044;
  --card-foreground: #F3F8FF;
  --popover: #082044;
  --popover-foreground: #F3F8FF;
  --primary: #FF751F;
  --primary-foreground: #06162F;
  --secondary: #0A3268;
  --secondary-foreground: #E5F1FF;
  --muted: #0A3268;
  --muted-foreground: #98A2B3;
  --accent: #481700;
  --accent-foreground: #FFB27E;
  --destructive: #C93636;
  --border: rgba(229, 241, 255, 0.10);
  --input: rgba(229, 241, 255, 0.12);
  --ring: #3B91F5;
  --sidebar: #030d1f;
  --sidebar-foreground: #E5F1FF;
  --sidebar-primary: #FF751F;
  --sidebar-accent: #082044;
  --sidebar-border: rgba(229, 241, 255, 0.08);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    /* position:relative required so framer-motion's useScroll() (which
       inspects document.documentElement by default) does not emit the
       "container has a non-static position" warning. */
    position: relative;
  }
  body {
    @apply bg-background text-foreground;
    font-feature-settings: "cv11", "ss01", "ss03";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  ::selection {
    background: rgba(242, 97, 19, 0.22);
    color: #06162F;
  }
}

@layer utilities {
  .font-display { font-family: var(--font-manrope), "Inter", system-ui, sans-serif; }
  .font-body { font-family: var(--font-inter), system-ui, sans-serif; }
  .font-serif { font-family: var(--font-dm-serif), Georgia, "Times New Roman", serif; }

  .text-balance { text-wrap: balance; }
  .text-pretty { text-wrap: pretty; }

  .tabular { font-variant-numeric: tabular-nums; }

  .grad-intelligence { background-image: var(--grad-intelligence); }
  .grad-momentum { background-image: var(--grad-momentum); }
  .grad-connected { background-image: var(--grad-connected); }
  .grad-ambient { background-image: var(--grad-ambient); }

  .shadow-card { box-shadow: var(--shadow-md); }
  .shadow-soft { box-shadow: var(--shadow-sm); }
  .shadow-blue { box-shadow: var(--shadow-blue); }
  .shadow-orange { box-shadow: var(--shadow-orange); }

  .glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
  }
  .glass-dark {
    background: rgba(6, 22, 47, 0.66);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
  }

  .text-grad-intelligence {
    background: var(--grad-intelligence);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  .text-grad-momentum {
    background: var(--grad-momentum);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
  .text-grad-connected {
    background: var(--grad-connected);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    font-size: 0.72rem;
  }

  /* Momentum marker */
  .momentum-marker::before {
    content: "";
    display: inline-block;
    width: 0.55em;
    height: 0.55em;
    margin-right: 0.5em;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    vertical-align: middle;
  }

  /* Custom scrollbar */
  .scroll-area {
    scrollbar-width: thin;
    scrollbar-color: rgba(11, 99, 206, 0.35) transparent;
  }
  .scroll-area::-webkit-scrollbar { width: 8px; height: 8px; }
  .scroll-area::-webkit-scrollbar-track { background: transparent; }
  .scroll-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(11,99,206,0.4), rgba(242,97,19,0.4));
    border-radius: 999px;
  }

  @keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
  }
  .animate-marquee {
    animation: marquee 40s linear infinite;
  }
  @media (max-width: 640px) {
    .animate-marquee {
      animation-duration: 55s;
    }
  }

  /* Signal line animation */
  @keyframes signal-flow {
    0% { stroke-dashoffset: 200; }
    100% { stroke-dashoffset: 0; }
  }
  .signal-line {
    stroke-dasharray: 6 10;
    animation: signal-flow 4s linear infinite;
  }

  @keyframes pulse-node {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.18); }
  }
  .node-active { animation: pulse-node 2.4s ease-in-out infinite; }

  @keyframes orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }

  @keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
  }
  .shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    background-size: 200% 100%;
    animation: shimmer 2.4s linear infinite;
  }

  /* Typing cursor blink */
  @keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }
  .cursor-blink {
    display: inline-block;
    width: 2px;
    height: 0.85em;
    margin-left: 2px;
    background: currentColor;
    vertical-align: text-bottom;
    animation: cursor-blink 1s step-end infinite;
  }

  /* Gentle float / bob animation */
  @keyframes gentle-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
  .animate-bob {
    animation: gentle-bob 3s ease-in-out infinite;
  }

  /* Dot pulse (hover scale pulse for indicators) */
  @keyframes dot-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.7; }
  }
  .animate-dot-pulse {
    animation: dot-pulse 0.6s ease-in-out;
  }

  /* Slow orbital rotation */
  @keyframes orbit-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  .animate-orbit-slow {
    animation: orbit-slow 60s linear infinite;
  }
  .animate-orbit-slow-reverse {
    animation: orbit-slow 80s linear infinite reverse;
  }

  /* Connection line dash flow (center → nodes) */
  @keyframes dash-flow {
    0% { stroke-dashoffset: 40; }
    100% { stroke-dashoffset: 0; }
  }
  .animate-dash-flow {
    stroke-dasharray: 8 12;
    animation: dash-flow 3s linear infinite;
  }

  /* Center node subtle pulse */
  @keyframes center-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.02); }
  }
  .animate-center-pulse {
    animation: center-pulse 4s ease-in-out infinite;
  }

  /* Progress bar fill from left */
  @keyframes progress-fill {
    from { width: 0; }
    to { width: 100%; }
  }
  .animate-progress-fill {
    animation: progress-fill 1.5s ease-out forwards;
  }

  /* Autoplay progress bar for the testimonials carousel.
     Runs over AUTOPLAY_INTERVAL_MS (6s); play-state is toggled
     inline via `animation-play-state` to freeze on hover/pause. */
  @keyframes testimonials-progress {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }

  /* Confetti burst dots for success state */
  @keyframes confetti-dot {
    0% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--cx), var(--cy)) scale(0); opacity: 0; }
  }
  .confetti-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: confetti-dot 0.8s ease-out forwards;
  }

  /* Typewriter reveal */
  @keyframes typewriter {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
  .animate-typewriter {
    animation: typewriter 1.8s steps(40, end) forwards;
    white-space: nowrap;
    overflow: hidden;
  }

  /* Underline slide on hover */
  .hover-underline {
    position: relative;
  }
  .hover-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #0B63CE, #F26113);
    transition: width 0.3s ease;
  }
  .hover-underline:hover::after {
    width: 100%;
  }

  /* Step dot glow */
  @keyframes step-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242, 97, 19, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(242, 97, 19, 0); }
  }
  .animate-step-glow {
    animation: step-glow 2s ease-in-out infinite;
  }

  /* Success checkmark expanding circle */
  @keyframes check-expand {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
  }
  .animate-check-expand {
    animation: check-expand 0.5s ease-out forwards;
  }

  /* Back to top arrow bounce */
  @keyframes arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
  }
  .animate-arrow-bounce {
    animation: arrow-bounce 1.5s ease-in-out infinite;
  }

  /* CTA button shimmer sweep */
  @keyframes cta-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
  }
  .animate-cta-shimmer {
    animation: cta-shimmer 3s ease-in-out infinite;
  }

  /* Glow pulse for active elements */
  @keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242, 97, 19, 0.2); }
    50% { box-shadow: 0 0 20px 4px rgba(242, 97, 19, 0.15); }
  }
  .animate-glow-pulse {
    animation: glow-pulse 2.5s ease-in-out infinite;
  }

  /* Float in from left */
  @keyframes float-in-left {
    from { opacity: 0; transform: translateX(-24px); }
    to { opacity: 1; transform: translateX(0); }
  }
  .animate-float-in-left {
    animation: float-in-left 0.5s ease-out forwards;
  }

  /* Scale-in pop */
  @keyframes scale-pop {
    0% { transform: scale(0.85); opacity: 0; }
    70% { transform: scale(1.04); }
    100% { transform: scale(1); opacity: 1; }
  }
  .animate-scale-pop {
    animation: scale-pop 0.4s ease-out forwards;
  }

  /* Gradient border rotation (for premium cards) */
  @keyframes gradient-rotate {
    0% { --gradient-angle: 0deg; }
    100% { --gradient-angle: 360deg; }
  }
  .animate-gradient-border {
    animation: gradient-rotate 4s linear infinite;
  }

  /* Ripple effect on click */
  @keyframes ripple {
    0% { transform: scale(0); opacity: 0.4; }
    100% { transform: scale(4); opacity: 0; }
  }
  .animate-ripple {
    animation: ripple 0.6s ease-out;
  }

  /* Slide-up reveal */
  @keyframes slide-up-reveal {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .animate-slide-up {
    animation: slide-up-reveal 0.4s ease-out forwards;
  }

  .grid-bg {
    background-image:
      linear-gradient(rgba(11,99,206,0.06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(11,99,206,0.06) 1px, transparent 1px);
    background-size: 44px 44px;
  }

  .mask-fade-b {
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Article body prose styling — for the Insights modal article preview */
.prose-article p {
  color: rgb(51 65 85);
  line-height: 1.7;
}
.prose-article p:first-of-type::first-letter {
  font-weight: 700;
  color: rgb(15 23 42);
  font-size: 1.15em;
}
.prose-article p + p {
  margin-top: 0.75rem;
}

/* Markdown-rendered article body — base + dark mode variants.
   Used by the Insights modal when article bodies are rendered via react-markdown.
   Tailwind handles per-element typography; this layer only adds the small
   flourishes that need pseudo-elements / descendant selectors. */
.prose-article-md > :first-child {
  margin-top: 0;
}
.prose-article-md > :last-child {
  margin-bottom: 0;
}
.prose-article-md h1,
.prose-article-md h2,
.prose-article-md h3 {
  scroll-margin-top: 1.5rem;
  letter-spacing: -0.01em;
}
.prose-article-md h2::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.95rem;
  margin-right: 0.5rem;
  vertical-align: -0.05em;
  border-radius: 2px;
  background: var(--grad-momentum);
}
.prose-article-md h3::before {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-right: 0.45rem;
  vertical-align: 0.15em;
  border-radius: 9999px;
  background: #0B63CE;
}
.prose-article-md code {
  font-feature-settings: "tnum" on, "calt" off;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.prose-article-md a {
  word-break: break-word;
}
.prose-article-md blockquote > :last-child {
  margin-bottom: 0;
}

/* Dark mode variants — marker / accent colours swap to brighter tones so
   the markers stay legible on the dark modal background. */
.dark .prose-article-md h3::before {
  background: #75B5FF;
}
.dark .prose-article-md code {
  border-color: rgba(59, 145, 245, 0.18);
}

/* Dark mode refinements — improve contrast for secondary text */
@media (prefers-color-scheme: dark) {
  .dark .text-ink-500 { color: rgb(148 163 184); }
  .dark .text-ink-400 { color: rgb(148 163 184); }
  .dark .text-blue-300 { color: rgb(147 197 253); }
  .dark .text-blue-200 { color: rgb(191 219 254); }
}

/* Smooth focus ring for keyboard navigation */
*:focus-visible {
  outline: 2px solid rgb(242 97 19);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Custom scrollbar for modal/scrollable areas */
.scroll-area::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.scroll-area::-webkit-scrollbar-track {
  background: transparent;
}
.scroll-area::-webkit-scrollbar-thumb {
  background: rgb(203 213 225);
  border-radius: 3px;
}
.scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgb(148 163 184);
}
.dark .scroll-area::-webkit-scrollbar-thumb {
  background: rgb(71 85 105);
}
.dark .scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgb(100 116 139);
}

/* === Comprehensive Dark Mode Component Overrides === */
.dark .bg-white { background-color: var(--card); }
.dark .bg-blue-50 { background-color: rgba(11, 99, 206, 0.15); }
.dark .bg-blue-50\/40 { background-color: rgba(11, 99, 206, 0.08); }
.dark .bg-blue-50\/50 { background-color: rgba(11, 99, 206, 0.10); }
.dark .bg-blue-50\/60 { background-color: rgba(11, 99, 206, 0.12); }
.dark .bg-ink-50 { background-color: rgba(148, 163, 184, 0.08); }
.dark .bg-ink-50\/60 { background-color: rgba(148, 163, 184, 0.05); }
.dark .bg-ink-50\/30 { background-color: rgba(148, 163, 184, 0.03); }
.dark .bg-orange-50 { background-color: rgba(242, 97, 19, 0.12); }
.dark .bg-orange-50\/50 { background-color: rgba(242, 97, 19, 0.08); }
.dark .bg-orange-50\/60 { background-color: rgba(242, 97, 19, 0.10); }
.dark .bg-emerald-50 { background-color: rgba(18, 130, 92, 0.12); }
.dark .bg-amber-50 { background-color: rgba(217, 138, 10, 0.12); }
.dark .bg-indigo-50 { background-color: rgba(79, 70, 229, 0.12); }
.dark .bg-white\/70 { background-color: rgba(8, 32, 68, 0.70); }
.dark .bg-white\/80 { background-color: rgba(8, 32, 68, 0.80); }
.dark .bg-white\/5 { background-color: rgba(8, 32, 68, 0.05); }
.dark .border-ink-200 { border-color: rgba(229, 241, 255, 0.10); }
.dark .border-ink-100 { border-color: rgba(229, 241, 255, 0.06); }
.dark .border-blue-200 { border-color: rgba(59, 145, 245, 0.20); }
.dark .border-blue-100 { border-color: rgba(59, 145, 245, 0.12); }
.dark .border-blue-900\/10 { border-color: rgba(59, 145, 245, 0.15); }
.dark .border-orange-200 { border-color: rgba(255, 145, 77, 0.20); }
.dark .border-orange-100 { border-color: rgba(255, 145, 77, 0.12); }
.dark .border-orange-300 { border-color: rgba(255, 145, 77, 0.30); }
.dark .border-blue-300 { border-color: rgba(59, 145, 245, 0.30); }
.dark .text-ink-950 { color: #F3F8FF; }
.dark .text-ink-900 { color: #E5F1FF; }
.dark .text-ink-800 { color: #B7D9FF; }
.dark .text-ink-700 { color: #98A2B3; }
.dark .text-ink-600 { color: #98A2B3; }
.dark .text-ink-500 { color: #75B5FF; }
.dark .text-ink-400 { color: #75B5FF; }
.dark .text-blue-700 { color: #75B5FF; }
.dark .text-blue-600 { color: #3B91F5; }
.dark .text-orange-700 { color: #FFB27E; }
.dark .text-orange-600 { color: #FF914D; }
.dark .text-emerald-600 { color: #6EE7B7; }
.dark .text-emerald-700 { color: #6EE7B7; }
.dark .text-amber-700 { color: #FCD34D; }
.dark .text-indigo-700 { color: #A5B4FC; }
.dark .glass { background: rgba(6, 22, 47, 0.66); backdrop-filter: saturate(180%) blur(14px); }
.dark .gradient-border { background: var(--card); }
.dark .gradient-border::before { opacity: 0.3; }
.dark .prose-article p { color: #B7D9FF; }
.dark .prose-article p:first-of-type::first-letter { color: #F3F8FF; }
.dark .ring-ink-200 { --tw-ring-color: rgba(229, 241, 255, 0.10); }
.dark .ring-blue-200 { --tw-ring-color: rgba(59, 145, 245, 0.20); }
.dark .ring-orange-200 { --tw-ring-color: rgba(255, 145, 77, 0.20); }
.dark .ring-emerald-200 { --tw-ring-color: rgba(18, 130, 92, 0.30); }
.dark .ring-amber-200 { --tw-ring-color: rgba(217, 138, 10, 0.30); }
.dark .ring-indigo-200 { --tw-ring-color: rgba(79, 70, 229, 0.30); }
.dark .ring-orange-100 { --tw-ring-color: rgba(255, 145, 77, 0.15); }
.dark .shadow-soft { box-shadow: none; }
.dark .shadow-card { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3); }
.dark .bg-ink-100 { background-color: rgba(148, 163, 184, 0.06); }
.dark .bg-ink-50\/40 { background-color: rgba(148, 163, 184, 0.03); }
.dark .bg-orange-50\/30 { background-color: rgba(242, 97, 19, 0.06); }
.dark .bg-orange-50\/40 { background-color: rgba(242, 97, 19, 0.08); }
.dark .bg-emerald-50\/60 { background-color: rgba(18, 130, 92, 0.10); }
.dark .bg-amber-50\/60 { background-color: rgba(217, 138, 10, 0.10); }
.dark .bg-blue-100 { background-color: rgba(11, 99, 206, 0.18); }
.dark .bg-orange-100 { background-color: rgba(242, 97, 19, 0.15); }
.dark .bg-emerald-100 { background-color: rgba(18, 130, 92, 0.15); }
.dark .bg-amber-100 { background-color: rgba(217, 138, 10, 0.15); }
.dark .bg-indigo-100 { background-color: rgba(79, 70, 229, 0.15); }
.dark .bg-white\/90 { background-color: rgba(8, 32, 68, 0.90); }
.dark .bg-white\/15 { background-color: rgba(8, 32, 68, 0.15); }
.dark .bg-white\/10 { background-color: rgba(8, 32, 68, 0.10); }
.dark .border-emerald-200 { border-color: rgba(18, 130, 92, 0.25); }
.dark .border-amber-200 { border-color: rgba(217, 138, 10, 0.25); }
.dark .border-emerald-100 { border-color: rgba(18, 130, 92, 0.15); }
.dark .border-amber-100 { border-color: rgba(217, 138, 10, 0.15); }
.dark .ring-blue-300 { --tw-ring-color: rgba(59, 145, 245, 0.35); }
.dark .ring-orange-300 { --tw-ring-color: rgba(255, 145, 77, 0.35); }
.dark .ring-ink-100 { --tw-ring-color: rgba(229, 241, 255, 0.08); }
.dark .ring-emerald-100 { --tw-ring-color: rgba(18, 130, 92, 0.18); }
.dark .ring-amber-100 { --tw-ring-color: rgba(217, 138, 10, 0.18); }
.dark .text-ink-300 { color: #D0D5DD; }
.dark .text-ink-200 { color: #E4E7EC; }
.dark .text-ink-100 { color: #F2F4F7; }
.dark .text-emerald-500 { color: #6EE7B7; }
.dark .text-blue-400 { color: #3B91F5; }
.dark .text-blue-500 { color: #3B91F5; }
.dark .text-orange-500 { color: #FF914D; }
.dark .text-orange-400 { color: #FFB27E; }
.dark .ring-orange-100 { --tw-ring-color: rgba(255, 145, 77, 0.15); }

/* Premium button hover sheen */
.btn-sheen {
  position: relative;
  overflow: hidden;
}
.btn-sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.btn-sheen:hover::after {
  transform: translateX(100%);
}

/* Card hover lift effect */
.card-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-lift:hover {
  transform: translateY(-2px);
}

/* Animated gradient border for premium cards */
.gradient-border {
  position: relative;
  background: white;
  border-radius: 1rem;
}
.gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #F26113, #0B63CE);
  -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 0.3s ease;
}
.gradient-border:hover::before {
  opacity: 1;
}

/* Pulse dot for live indicators */
.live-dot {
  position: relative;
}
.live-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: live-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes live-ping {
  0% { transform: scale(1); opacity: 0.8; }
  75%, 100% { transform: scale(2.5); opacity: 0; }
}

/* Section enter animation */
@keyframes section-enter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.section-enter {
  animation: section-enter 0.6s ease-out forwards;
}

/* Glow ring on focus for cards */
.card-focus-ring:focus-visible {
  outline: 2px solid #F26113;
  outline-offset: 4px;
}

/* Text gradient animation */
@keyframes text-gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.text-grad-animate {
  background-size: 200% 200%;
  animation: text-gradient-shift 4s ease infinite;
}

/* Floating geometric shapes for newsletter section */
@keyframes float-geo {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(3deg); }
  50% { transform: translateY(-6px) rotate(-2deg); }
  75% { transform: translateY(-18px) rotate(4deg); }
}

/* === Card Shimmer Sweep Effect === */
@keyframes shimmer-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.card-hover-sweep {
  position: relative;
  overflow: hidden;
}
.card-hover-sweep::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.06) 45%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 55%, transparent 60%);
  transform: translateX(-100%);
  transition: none;
  pointer-events: none;
  border-radius: inherit;
}
.card-hover-sweep:hover::after {
  animation: shimmer-sweep 0.6s ease-out;
}

/* === Hover Glow Utilities === */
.hover-glow-blue { transition: box-shadow 0.3s ease, transform 0.2s ease; }
.hover-glow-blue:hover { box-shadow: 0 0 0 1px rgba(11,99,206,0.12), 0 8px 30px rgba(11,99,206,0.10); }
.hover-glow-orange { transition: box-shadow 0.3s ease, transform 0.2s ease; }
.hover-glow-orange:hover { box-shadow: 0 0 0 1px rgba(242,97,19,0.12), 0 8px 30px rgba(242,97,19,0.10); }
.hover-glow-blue:hover { box-shadow: 0 0 0 1px rgba(11,99,206,0.12), 0 8px 30px rgba(11,99,206,0.10); }

/* Dark mode glow variants */
.dark .hover-glow-blue:hover { box-shadow: 0 0 0 1px rgba(59,145,245,0.18), 0 8px 30px rgba(59,145,245,0.12); }
.dark .hover-glow-orange:hover { box-shadow: 0 0 0 1px rgba(255,145,77,0.18), 0 8px 30px rgba(255,145,77,0.12); }

/* Dark mode shimmer sweep variant — uses blue-tinted shimmer instead of white */
.dark .card-hover-sweep::after {
  background: linear-gradient(105deg, transparent 40%, rgba(59,145,245,0.04) 45%, rgba(59,145,245,0.08) 50%, rgba(59,145,245,0.04) 55%, transparent 60%);
}

/* === Detail Modal Dark Mode === */
.dark .DetailModal-panel { background: #082044; }
.dark .DetailModal-footer { border-color: rgba(229, 241, 255, 0.08); background: rgba(10, 50, 104, 0.30); }
.dark .ModalField-card { border-color: rgba(229, 241, 255, 0.08); background: rgba(8, 32, 68, 0.60); }
.dark .ModalField-value { color: #B7D9FF; }

/* === Arrow hover animation utility === */
.arrow-hover-animate {
  transition: transform 0.2s ease;
}
.group:hover .arrow-hover-animate {
  transform: translate(2px, -2px);
}

/* === Icon scale hover utility === */
.icon-hover-scale {
  transition: transform 0.2s ease;
}
.group:hover .icon-hover-scale {
  transform: scale(1.1);
}

/* === Border color shift on hover (blue→orange) === */
.border-shift-hover {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.border-shift-hover:hover {
  border-color: rgba(255, 145, 77, 0.30);
  box-shadow: 0 0 0 1px rgba(255, 145, 77, 0.08);
}

/* === Card Gradient Bottom Bar Reveal === */
.card-bottom-reveal {
  position: relative;
}
.card-bottom-reveal::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #0B63CE, #F26113);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  border-radius: 0 0 inherit inherit;
}
.card-bottom-reveal:hover::before {
  transform: scaleX(1);
}

/* ============================================================
   HERO POLISH — Premium Depth, Texture & Micro-interactions
   ============================================================ */

/* --- Subtle film-grain noise texture overlay ---
   SVG fractalNoise rendered to a tileable background, layered
   with overlay blend mode for a tactile premium feel. */
.noise-overlay {
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  background-size: 200px 200px;
  mix-blend-mode: overlay;
}
.dark .noise-overlay {
  mix-blend-mode: soft-light;
}

/* --- Layered radial depth gradients for hero ---
   Multiple radial gradients at different positions create a
   sense of layered depth (not flat). */
.hero-depth {
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(242, 97, 19, 0.06), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(11, 99, 206, 0.07), transparent 60%),
    radial-gradient(ellipse 70% 50% at 0% 80%, rgba(242, 97, 19, 0.04), transparent 60%);
}
.dark .hero-depth {
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 117, 31, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(59, 145, 245, 0.10), transparent 60%),
    radial-gradient(ellipse 70% 50% at 0% 80%, rgba(255, 117, 31, 0.05), transparent 60%);
}

/* --- Enhanced grid with perspective/fade effect ---
   Grid fades out at top and bottom, creating a horizon feel. */
.grid-bg-perspective {
  background-image:
    linear-gradient(rgba(11, 99, 206, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 99, 206, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 22%, black 60%, transparent 100%);
}
.dark .grid-bg-perspective {
  background-image:
    linear-gradient(rgba(59, 145, 245, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 145, 245, 0.10) 1px, transparent 1px);
}

/* --- Glassmorphism panel behind headline area ---
   Subtle frosted glass with inner highlight + faint border. */
.glass-panel {
  background: rgba(255, 255, 255, 0.50);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 12px 48px -12px rgba(11, 99, 206, 0.10);
}
.dark .glass-panel {
  background: rgba(8, 32, 68, 0.45);
  border-color: rgba(229, 241, 255, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(229, 241, 255, 0.08),
    0 12px 48px -12px rgba(0, 0, 0, 0.40);
}

/* --- Premium pill badge with gradient border ---
   Border-box trick: gradient stroke + solid fill. */
.premium-pill {
  position: relative;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(135deg, #F26113 0%, #0B63CE 100%) border-box;
  border: 1px solid transparent;
}
.dark .premium-pill {
  background:
    linear-gradient(rgba(8, 32, 68, 0.92), rgba(8, 32, 68, 0.92)) padding-box,
    linear-gradient(135deg, #FF751F 0%, #3B91F5 100%) border-box;
}

/* --- Animated shimmer gradient for "Intelligent" word ---
   Mirrored color stops create a flowing highlight sweep. */
.text-grad-intelligent {
  background: linear-gradient(110deg,
    #D84A06 0%, #FF751F 28%, #FFB27E 48%,
    #FFE9D9 52%, #FFB27E 56%,
    #FF751F 72%, #D84A06 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: text-shimmer-pan 4.5s linear infinite;
}
@keyframes text-shimmer-pan {
  0% { background-position: 0% 50%; }
  100% { background-position: 220% 50%; }
}

/* --- Slow, elegant shimmer sweep for primary CTA --- */
@keyframes cta-shimmer-slow {
  0% { transform: translateX(-130%) skewX(-20deg); }
  55%, 100% { transform: translateX(280%) skewX(-20deg); }
}
.animate-cta-shimmer-slow {
  animation: cta-shimmer-slow 5.5s ease-in-out infinite;
}

/* --- Subtle pulsing glow on idle CTA (premium attention cue) --- */
@keyframes cta-glow-pulse {
  0%, 100% {
    box-shadow:
      0 10px 28px -8px rgba(242, 97, 19, 0.40),
      0 0 0 0 rgba(242, 97, 19, 0);
  }
  50% {
    box-shadow:
      0 16px 42px -8px rgba(242, 97, 19, 0.50),
      0 0 0 5px rgba(242, 97, 19, 0.10);
  }
}
.animate-cta-glow-pulse {
  animation: cta-glow-pulse 3.6s ease-in-out infinite;
}
.dark .animate-cta-glow-pulse {
  animation-name: cta-glow-pulse-dark;
}
@keyframes cta-glow-pulse-dark {
  0%, 100% {
    box-shadow:
      0 10px 28px -8px rgba(255, 117, 31, 0.45),
      0 0 0 0 rgba(255, 117, 31, 0);
  }
  50% {
    box-shadow:
      0 16px 42px -8px rgba(255, 117, 31, 0.55),
      0 0 0 5px rgba(255, 117, 31, 0.12);
  }
}

/* --- Floating geometric shapes (slow, elegant drift) --- */
@keyframes float-geo-1 {
  0%, 100% { transform: translate(0, 0) rotate(12deg); }
  33% { transform: translate(22px, -28px) rotate(22deg); }
  66% { transform: translate(-18px, 16px) rotate(6deg); }
}
@keyframes float-geo-2 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-28px, 22px) rotate(-12deg); }
}
@keyframes float-geo-3 {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  40% { transform: translate(18px, -22px) rotate(8deg); }
  80% { transform: translate(-22px, 12px) rotate(-6deg); }
}
.animate-float-geo-1 { animation: float-geo-1 18s ease-in-out infinite; }
.animate-float-geo-2 { animation: float-geo-2 22s ease-in-out infinite; }
.animate-float-geo-3 { animation: float-geo-3 26s ease-in-out infinite; }

/* --- Scroll indicator bounce --- */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(7px); opacity: 1; }
}
.animate-scroll-bounce {
  animation: scroll-bounce 1.9s ease-in-out infinite;
}

/* --- Soft glow halo behind Operating Constellation --- */
.constellation-halo {
  background: radial-gradient(circle,
    rgba(11, 99, 206, 0.20) 0%,
    rgba(11, 99, 206, 0.07) 35%,
    transparent 65%);
}
.dark .constellation-halo {
  background: radial-gradient(circle,
    rgba(59, 145, 245, 0.24) 0%,
    rgba(59, 145, 245, 0.09) 35%,
    transparent 65%);
}

/* --- Credibility bar gradient top border (blue → orange) --- */
.bar-gradient-top {
  position: relative;
}
.bar-gradient-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #0B63CE 0%, #1677E8 38%, #F26113 100%);
  border-radius: 1rem 1rem 0 0;
  opacity: 0.95;
  z-index: 1;
}

/* --- Verified badge pill for credibility bar --- */
.verified-badge {
  background: linear-gradient(135deg, rgba(18, 130, 92, 0.10), rgba(11, 99, 206, 0.10));
  border: 1px solid rgba(18, 130, 92, 0.28);
}
.dark .verified-badge {
  background: linear-gradient(135deg, rgba(110, 231, 183, 0.12), rgba(59, 145, 245, 0.12));
  border-color: rgba(110, 231, 183, 0.32);
}
