@import "tailwindcss";
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

@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: #F95F62;
  --primary-foreground: oklch(1 0 0);
  --secondary: #F95F62;
  --secondary-foreground: #ffffff;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --destructive: #d4183d;
  --destructive-foreground: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --input: transparent;
  --input-background: #f3f3f5;
  --switch-background: #cbced4;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.625rem;
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: #030213;
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: #F95F62;
  --primary-foreground: oklch(1 0 0);
  --secondary: #F95F62;
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

@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);
  --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);
  --color-sidebar: var(--sidebar);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-ring: var(--sidebar-ring);
}

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

  body {
    @apply bg-background text-foreground;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  }

  /* All text uses Poppins font */
  h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  }

  /* Utility class for explicit font usage */
  .font-poppins {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }

  /* Enhanced Typography Utilities for Dynamic Combinations */
  .heading-dynamic {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  }

  /* Typography combination classes - Using Poppins weights */
  .text-medium-semibold .medium {
    font-weight: 500;
  }
  
  .text-medium-semibold .semibold {
    font-weight: 600;
  }

  /* Gradient text utility for emphasis */
  .text-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  /* Enhanced emphasis utilities */
  .text-emphasis {
    font-style: italic;
    position: relative;
  }

  .text-emphasis::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0.6;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
  }

  .text-emphasis:hover::after {
    transform: scaleX(1);
  }
}

/**
 * Base typography. This is not applied to elements which have an ancestor with a Tailwind text class.
 */
@layer base {
  :where(:not(:has([class*=" text-"]), :not(:has([class^="text-"])))) {
    h1 {
      font-size: var(--text-2xl);
      font-weight: 500; /* Poppins Medium */
      line-height: 1.4;
    }

    h2 {
      font-size: var(--text-xl);
      font-weight: 500; /* Poppins Medium */
      line-height: 1.4;
    }

    h3 {
      font-size: var(--text-lg);
      font-weight: 600; /* Poppins SemiBold */
      line-height: 1.4;
    }

    h4 {
      font-size: var(--text-base);
      font-weight: 600; /* Poppins SemiBold */
      line-height: 1.4;
    }

    p {
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.6;
    }

    label {
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal); /* Lighter for better hierarchy */
      line-height: 1.5;
    }

    button {
      font-size: var(--text-base);
      font-weight: 500; /* font-medium for subtle emphasis */
      line-height: 1.5;
    }

    input {
      font-size: var(--text-base);
      font-weight: var(--font-weight-normal);
      line-height: 1.5;
    }
  }
}

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

/* Professional Animation Easing Variables */
:root {
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-out-quint: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
}

/* Enhanced Global Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.4s var(--ease-out-quart) forwards;
}

.animate-slide-up {
  animation: slideUp 0.5s var(--ease-out-expo) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.35s var(--ease-out-quint) forwards;
}

.animate-bounce-in {
  animation: bounceIn 0.4s var(--ease-out-expo) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from { 
    opacity: 0; 
    transform: scale(0.95);
  }
  to { 
    opacity: 1; 
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% { 
    opacity: 0; 
    transform: scale(0.9) translateY(20px);
  }
  60% { 
    opacity: 1; 
    transform: scale(1.02) translateY(-3px);
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0);
  }
}

/* Enhanced Interactive Elements */
.interactive-card {
  transition: all 0.2s var(--ease-out-cubic);
  transform-origin: center;
  cursor: pointer;
}

.interactive-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 
    0 10px 25px -5px rgba(0, 0, 0, 0.1),
    0 0 0 1px rgba(249, 95, 98, 0.1);
}

.interactive-button {
  transition: all 0.2s var(--ease-out-quart);
  position: relative;
  overflow: hidden;
}

.interactive-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.4s var(--ease-out-cubic);
}

.interactive-button:hover::before {
  left: 100%;
}

.interactive-button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 
    0 0 20px rgba(249, 95, 98, 0.3),
    0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.interactive-icon {
  transition: all 0.2s var(--ease-out-expo);
  transform-origin: center;
}

.interactive-icon:hover {
  transform: scale(1.15) rotate(5deg);
  color: var(--primary);
  filter: drop-shadow(0 0 8px rgba(249, 95, 98, 0.3));
}

/* Micro-interaction Classes */
.micro-bounce {
  animation: microBounce 0.3s var(--ease-out-expo);
}

@keyframes microBounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.micro-shake {
  animation: microShake 0.4s var(--ease-out-cubic);
}

@keyframes microShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.micro-glow {
  transition: all 0.2s var(--ease-out-cubic);
}

.micro-glow:hover {
  filter: drop-shadow(0 0 12px rgba(249, 95, 98, 0.4));
}

/* Enhanced Card Hover Effects */
.card-hover-lift {
  transition: all 0.3s var(--ease-out-quart);
  transform-origin: center;
}

.card-hover-lift:hover {
  transform: translateY(-8px) rotateX(2deg);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(249, 95, 98, 0.08);
}

.card-hover-tilt {
  transition: all 0.3s var(--ease-out-cubic);
  transform-style: preserve-3d;
}

.card-hover-tilt:hover {
  transform: perspective(1000px) rotateX(3deg) rotateY(-2deg) translateY(-5px);
}

/* Text Animation Effects */
.text-shimmer {
  background: linear-gradient(90deg, 
    var(--foreground) 0%, 
    var(--primary) 50%, 
    var(--foreground) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.text-gradient-shift {
  background: linear-gradient(45deg, var(--primary), var(--secondary), var(--primary));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.animate-gradient-shift {
  animation: gradientShift 4s ease-in-out infinite;
}

/* Button State Animations */
.button-loading {
  position: relative;
  pointer-events: none;
}

.button-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Stagger Animation Delays */
.stagger-delay-1 { animation-delay: 0.1s; }
.stagger-delay-2 { animation-delay: 0.2s; }
.stagger-delay-3 { animation-delay: 0.3s; }
.stagger-delay-4 { animation-delay: 0.4s; }
.stagger-delay-5 { animation-delay: 0.5s; }

/* Enhanced Scroll Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s var(--ease-out-quart);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.4s var(--ease-out-expo);
}

.scroll-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Navigation Scroll Effects */
.navbar-scroll {
  transition: all 0.3s var(--ease-out-cubic);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.navbar-scroll.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Custom animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

.animate-delay-1000 {
  animation-delay: 1s;
}

/* Hide scrollbar for carousel */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Wave animations for Magic Experience carousel */
@keyframes moveLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

@keyframes moveRight {
  0% { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

@keyframes wave {
  0% { transform: translateX(-100%) scaleX(0); }
  50% { transform: translateX(0%) scaleX(1); }
  100% { transform: translateX(100%) scaleX(0); }
}

@keyframes glow {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.7;
  }
}

.animate-moveLeft {
  animation: moveLeft 30s linear infinite;
}

.hover\:pause:hover {
  animation-play-state: paused;
}

.animate-moveRight {
  animation: moveRight 30s linear infinite;
}

.animate-wave {
  animation: wave 2s ease-in-out infinite;
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

/* Horizontal Scrolling Carousel Animation */
@keyframes scrollHorizontal {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.horizontal-scroll-track {
  will-change: transform;
}

/* Pause animation on hover for better UX */
.horizontal-scroll-track:hover {
  animation-play-state: paused;
}

/* Performance Optimizations */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

.will-change-transform {
  will-change: transform;
}

.will-change-auto {
  will-change: auto;
}

/* Mobile Optimizations for Horizontal Carousel */
@media (max-width: 768px) {
  .interactive-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }
  
  .interactive-button:hover {
    transform: scale(1.01);
  }
  
  .card-hover-lift:hover {
    transform: translateY(-4px);
  }

  /* Smaller cards and faster animation on mobile */
  .horizontal-scroll-track {
    gap: 1.5rem !important;
    animation: scrollHorizontal 60s linear infinite !important;
  }
  
  .horizontal-scroll-track > div {
    width: 16rem !important;
    height: 18rem !important;
  }
}

/* Tablet optimizations */
@media (max-width: 1024px) and (min-width: 769px) {
  .horizontal-scroll-track {
    gap: 1.75rem !important;
    animation: scrollHorizontal 70s linear infinite !important;
  }
  
  .horizontal-scroll-track > div {
    width: 17rem !important;
    height: 19rem !important;
  }
}

/* Flip Card 3D Animation Styles */
.flip-card-container {
  perspective: 1000px;
}

.flip-card-inner {
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
}

.flip-card-face {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .interactive-card,
  .interactive-button,
  .card-hover-lift,
  .card-hover-tilt,
  .horizontal-scroll-track,
  .flip-card-inner {
    transition: none !important;
    animation: none !important;
  }
}

/* Focus States for Accessibility */
.focus-ring {
  transition: all 0.2s var(--ease-out-cubic);
}

.focus-ring:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(249, 95, 98, 0.1);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .interactive-card:hover {
    outline: 2px solid currentColor;
  }
  
  .interactive-button {
    border: 2px solid currentColor;
  }
}

/* Radial gradient utility */
.bg-gradient-radial {
  background: radial-gradient(circle at center, var(--tw-gradient-stops));
}

/* Vertical scrolling animations for hero section */
@keyframes scrollUp {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}

@keyframes scrollDown {
  0% {
    transform: translateY(-50%);
  }
  100% {
    transform: translateY(0);
  }
}

.animate-scrollUp {
  animation: scrollUp 20s linear infinite;
  will-change: transform;
}

.animate-scrollDown {
  animation: scrollDown 20s linear infinite;
  will-change: transform;
}

/* Pause animations on hover for better UX */
.animate-scrollUp:hover,
.animate-scrollDown:hover {
  animation-play-state: paused;
}

/* QR Code Grid Utilities */
.grid-cols-21 {
  grid-template-columns: repeat(21, minmax(0, 1fr));
}

.grid-cols-17 {
  grid-template-columns: repeat(17, minmax(0, 1fr));
}

.grid-cols-23 {
  grid-template-columns: repeat(23, minmax(0, 1fr));
}

.grid-cols-25 {
  grid-template-columns: repeat(25, minmax(0, 1fr));
}

.grid-cols-27 {
  grid-template-columns: repeat(27, minmax(0, 1fr));
}

/* Large Size Utilities for QR Code */
.w-120 {
  width: 30rem; /* 480px */
}

.h-120 {
  height: 30rem; /* 480px */
}

/* Continuous Shine Animation for Download Buttons */
@keyframes shine {
  0% {
    transform: translateX(-100%) skewX(-12deg);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%) skewX(-12deg);
    opacity: 0;
  }
}

.animate-shine {
  animation: shine 3s ease-in-out infinite;
  animation-delay: 1s;
}

/* Snake Border Animation for FAQ Cards */
@keyframes spin-slow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

/* FAQ Card Snake Border Effect */
.faq-card {
  position: relative;
  border: 2px solid transparent;
  background: white;
  transition: all 0.3s ease;
}

.faq-card:hover {
  background: linear-gradient(white, white) padding-box,
              conic-gradient(from var(--angle, 0deg), transparent 60%, #F95F62 75%, #F95F62 90%, transparent 100%) border-box;
  animation: snakeBorder 3s linear infinite;
}

@keyframes snakeBorder {
  0% {
    --angle: 0deg;
  }
  100% {
    --angle: 360deg;
  }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}