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

:root {
  --font-size: 14px;
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: #0f172a;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.95 0.0058 264.53);
  --secondary-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #e2e8f0;
  --accent-foreground: #0f172a;
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --input: transparent;
  --input-background: #f8fafc;
  --switch-background: #cbd5e1;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: oklch(0.708 0 0);
  
  /* Benki Finance Brand Colors */
  --benki-teal: #14b8a6;
  --benki-deep-blue: #1e40af;
  --benki-light-blue: #3b82f6;
  --benki-soft-gray: #f8fafc;
  --benki-dark-gray: #475569;
  
  /* Legacy Afribenki colors for compatibility */
  --afribenki-teal: var(--benki-teal);
  --afribenki-deep-blue: var(--benki-deep-blue);
  --afribenki-light-blue: var(--benki-light-blue);
  --afribenki-soft-gray: var(--benki-soft-gray);
  --afribenki-dark-gray: var(--benki-dark-gray);
  
  --chart-1: var(--benki-teal);
  --chart-2: var(--benki-deep-blue);
  --chart-3: var(--benki-light-blue);
  --chart-4: #10b981;
  --chart-5: #6366f1;
  --radius: 0.5rem;
}

.dark {
  --background: #0f172a;
  --foreground: oklch(0.985 0 0);
  --card: #1e293b;
  --card-foreground: oklch(0.985 0 0);
  --popover: #1e293b;
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: #0f172a;
  --secondary: #334155;
  --secondary-foreground: oklch(0.985 0 0);
  --muted: #334155;
  --muted-foreground: #94a3b8;
  --accent: #334155;
  --accent-foreground: oklch(0.985 0 0);
  --destructive: #ef4444;
  --destructive-foreground: #ffffff;
  --border: #334155;
  --input: #334155;
  --ring: #64748b;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  
  /* Dark mode adjustments for Benki brand colors */
  --benki-teal: #5eead4;
  --benki-deep-blue: #60a5fa;
  --benki-light-blue: #93c5fd;
  --benki-soft-gray: #1e293b;
  --benki-dark-gray: #94a3b8;
  
  /* Legacy compatibility */
  --afribenki-teal: var(--benki-teal);
  --afribenki-deep-blue: var(--benki-deep-blue);
  --afribenki-light-blue: var(--benki-light-blue);
  --afribenki-soft-gray: var(--benki-soft-gray);
  --afribenki-dark-gray: var(--benki-dark-gray);
  
  --chart-1: var(--benki-teal);
  --chart-2: var(--benki-deep-blue);
  --chart-3: var(--benki-light-blue);
  --chart-4: #34d399;
  --chart-5: #a78bfa;
}

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-card: var(--card);
  --color-card-foreground: var(--card-foreground);
  --color-popover: var(--popover);
  --color-popover-foreground: var(--popover-foreground);
  --color-primary: var(--primary);
  --color-primary-foreground: var(--primary-foreground);
  --color-secondary: var(--secondary);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-muted: var(--muted);
  --color-muted-foreground: var(--muted-foreground);
  --color-accent: var(--accent);
  --color-accent-foreground: var(--accent-foreground);
  --color-destructive: var(--destructive);
  --color-destructive-foreground: var(--destructive-foreground);
  --color-border: var(--border);
  --color-input: var(--input);
  --color-input-background: var(--input-background);
  --color-switch-background: var(--switch-background);
  --color-ring: var(--ring);
  
  /* Benki Finance brand color utilities */
  --color-benki-teal: var(--benki-teal);
  --color-benki-deep-blue: var(--benki-deep-blue);
  --color-benki-light-blue: var(--benki-light-blue);
  --color-benki-soft-gray: var(--benki-soft-gray);
  --color-benki-dark-gray: var(--benki-dark-gray);
  
  /* Legacy compatibility */
  --color-afribenki-teal: var(--benki-teal);
  --color-afribenki-deep-blue: var(--benki-deep-blue);
  --color-afribenki-light-blue: var(--benki-light-blue);
  --color-afribenki-soft-gray: var(--benki-soft-gray);
  --color-afribenki-dark-gray: var(--benki-dark-gray);
  
  --color-chart-1: var(--chart-1);
  --color-chart-2: var(--chart-2);
  --color-chart-3: var(--chart-3);
  --color-chart-4: var(--chart-4);
  --color-chart-5: var(--chart-5);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  html {
    scroll-behavior: smooth;
  }

  /* Remove default button styles */
  button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
  }

  /* Image optimization */
  img {
    max-width: 100%;
    height: auto;
  }
}

/**
 * Base typography for Benki Finance landing page
 */
@layer base {
  h1 {
    font-size: 2.5rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.2;
    margin: 0 0 1rem 0;
  }

  h2 {
    font-size: 2rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.3;
    margin: 0 0 0.75rem 0;
  }

  h3 {
    font-size: 1.5rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
  }

  h4 {
    font-size: 1.25rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
  }

  h5 {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
  }

  h6 {
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
  }

  p {
    font-size: 1rem;
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    margin: 0 0 1rem 0;
  }

  a {
    color: var(--benki-deep-blue);
    text-decoration: none;
    transition: color 0.2s ease;
  }

  a:hover {
    color: var(--benki-teal);
  }

  ul, ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
  }

  li {
    margin-bottom: 0.25rem;
  }
}

html {
  font-size: var(--font-size);
}

/* Custom utilities for Benki Finance brand colors */
@layer utilities {
  /* Primary Benki brand utilities */
  .bg-benki-teal { background-color: var(--benki-teal); }
  .bg-benki-deep-blue { background-color: var(--benki-deep-blue); }
  .bg-benki-light-blue { background-color: var(--benki-light-blue); }
  .bg-benki-soft-gray { background-color: var(--benki-soft-gray); }
  .bg-benki-dark-gray { background-color: var(--benki-dark-gray); }
  
  .text-benki-teal { color: var(--benki-teal); }
  .text-benki-deep-blue { color: var(--benki-deep-blue); }
  .text-benki-light-blue { color: var(--benki-light-blue); }
  .text-benki-dark-gray { color: var(--benki-dark-gray); }
  
  .border-benki-teal { border-color: var(--benki-teal); }
  .border-benki-deep-blue { border-color: var(--benki-deep-blue); }

  /* Legacy compatibility utilities */
  .bg-afribenki-teal { background-color: var(--benki-teal); }
  .bg-afribenki-deep-blue { background-color: var(--benki-deep-blue); }
  .bg-afribenki-light-blue { background-color: var(--benki-light-blue); }
  .bg-afribenki-soft-gray { background-color: var(--benki-soft-gray); }
  .bg-afribenki-dark-gray { background-color: var(--benki-dark-gray); }
  
  .text-afribenki-teal { color: var(--benki-teal); }
  .text-afribenki-deep-blue { color: var(--benki-deep-blue); }
  .text-afribenki-light-blue { color: var(--benki-light-blue); }
  .text-afribenki-dark-gray { color: var(--benki-dark-gray); }
  
  .border-afribenki-teal { border-color: var(--benki-teal); }
  .border-afribenki-deep-blue { border-color: var(--benki-deep-blue); }

  /* Background patterns and gradients */
  .bg-gradient-benki {
    background: linear-gradient(135deg, var(--benki-teal) 0%, var(--benki-deep-blue) 100%);
  }

  .bg-gradient-benki-light {
    background: linear-gradient(135deg, var(--benki-light-blue) 0%, var(--benki-teal) 100%);
  }

  /* Legacy gradient compatibility */
  .bg-gradient-afribenki {
    background: linear-gradient(135deg, var(--benki-teal) 0%, var(--benki-deep-blue) 100%);
  }

  .bg-gradient-afribenki-light {
    background: linear-gradient(135deg, var(--benki-light-blue) 0%, var(--benki-teal) 100%);
  }

  /* Animation utilities */
  .animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  }

  .animate-bounce {
    animation: bounce 1s infinite;
  }

  .animate-spin {
    animation: spin 1s linear infinite;
  }

  /* Chat animation specific utilities */
  .animate-chat-message {
    animation: chatMessageSlideIn 0.5s ease-out forwards;
  }

  .animate-typing {
    animation: typing 1.5s infinite;
  }

  /* Floating button animations */
  .animate-float {
    animation: float 3s ease-in-out infinite;
  }

  .animate-in {
    animation-fill-mode: both;
  }

  .slide-in-from-bottom-2 {
    animation: slideInFromBottom 0.2s ease-out;
  }

  /* Transition utilities */
  .transition-all {
    transition: all 0.3s ease;
  }

  .transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  }

  .transition-transform {
    transition: transform 0.2s ease;
  }

  .transition-opacity {
    transition: opacity 0.2s ease;
  }

  /* Transform utilities */
  .scale-105 {
    transform: scale(1.05);
  }

  .scale-110 {
    transform: scale(1.1);
  }

  .hover\:scale-105:hover {
    transform: scale(1.05);
  }

  .hover\:scale-110:hover {
    transform: scale(1.1);
  }

  /* Shadow utilities */
  .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }

  .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }

  .shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

  .shadow-3xl {
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
  }

  .hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  }

  .hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  }

  .hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

  .hover\:shadow-3xl:hover {
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
  }
}

/* Keyframe animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(-25%);
    animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
  }
  50% {
    transform: translateY(0);
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  }
}

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

/* Chat Animation Keyframes */
@keyframes chatMessageSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes typing {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0.5;
  }
}

/* Floating Button Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes slideInFromBottom {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Platform Selector Animation */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Responsive design helpers */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.125rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  /* Disable chat animation for users who prefer reduced motion */
  .animate-chat-message {
    animation: none;
  }
  
  .animate-float {
    animation: none;
  }
}

/* Focus improvements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--benki-teal);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    color: black !important;
    background: white !important;
  }
}

/* Benki Finance specific styles */
.benki-gradient-text {
  background: linear-gradient(135deg, var(--benki-teal) 0%, var(--benki-deep-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Trust indicators styling */
.trust-badge {
  background: linear-gradient(135deg, #10b981 0%, var(--benki-teal) 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Early access modal enhancements */
.early-access-modal {
  backdrop-filter: blur(8px);
  background-color: rgba(0, 0, 0, 0.5);
}

/* WhatsApp chat styling */
.whatsapp-preview {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

/* Animated chat demo specific styles */
.chat-demo-container {
  position: relative;
  overflow: hidden;
}

.chat-message-animated {
  animation: chatMessageSlideIn 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
}

.chat-message-animated.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Floating chat selector styles */
.floating-chat-selector {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
}

.platform-options {
  animation: popIn 0.2s ease-out forwards;
}

.floating-main-button {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.floating-main-button:hover {
  transform: scale(1.1);
}

.floating-main-button.active {
  transform: rotate(45deg);
}

/* Pulse effect for floating button */
.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
  opacity: 0.25;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.25;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* Regulatory compliance styling */
.regulatory-badge {
  background: linear-gradient(135deg, var(--benki-deep-blue) 0%, #4f46e5 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

/* Performance metrics styling */
.performance-metric {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
}

.performance-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* FAQ styling enhancements */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--benki-teal);
}

/* Chat bubble styling improvements */
.chat-bubble {
  position: relative;
  max-width: 85%;
  padding: 0.75rem;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  word-wrap: break-word;
}

.chat-bubble.user {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}

.chat-bubble.ai {
  background: white;
  color: #1f2937;
  border-bottom-left-radius: 0.25rem;
  border: 1px solid #e5e7eb;
}

/* Portfolio breakdown styling */
.portfolio-breakdown {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
}

.portfolio-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.portfolio-return {
  color: #059669;
  font-weight: 600;
}

/* Enhanced button styles */
.btn-gradient-primary {
  background: linear-gradient(135deg, var(--benki-teal), var(--benki-deep-blue));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-gradient-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  opacity: 0.9;
}

/* Loading states */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Smooth transitions for all interactive elements */
button, 
a, 
.card, 
.chat-message-animated {
  transition: all 0.2s ease;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .chat-bubble.ai {
    border: 2px solid #374151;
  }
  
  .chat-bubble.user {
    border: 2px solid #065f46;
  }
}

/*
  Tailwind token compatibility shim for CDN usage
  This maps token-style utility classes (e.g., bg-background, text-foreground)
  to your CSS variables so the page renders correctly without a Tailwind build.
*/
[class*="bg-background"] { background-color: var(--background) !important; }
[class*="text-foreground"] { color: var(--foreground) !important; }
[class*="bg-card"] { background-color: var(--card) !important; }
[class*="text-card-foreground"] { color: var(--card-foreground) !important; }
[class*="bg-popover"] { background-color: var(--popover) !important; }
[class*="text-popover-foreground"] { color: var(--popover-foreground) !important; }
[class*="text-muted-foreground"] { color: var(--muted-foreground) !important; }
[class*="bg-muted"] { background-color: var(--muted) !important; }
[class*="text-primary"] { color: var(--primary) !important; }
[class*="bg-primary"] { background-color: var(--primary) !important; }
[class*="text-secondary"] { color: var(--secondary-foreground) !important; }
[class*="bg-secondary"] { background-color: var(--secondary) !important; }
[class*="text-accent"] { color: var(--accent-foreground) !important; }
[class*="bg-accent"] { background-color: var(--accent) !important; }
[class*="border-border"] { border-color: var(--border) !important; }
[class*="bg-input-background"] { background-color: var(--input-background) !important; }