/* Desktop video cropping fix */
@media (min-width: 1024px) {
  /* Ensure landscape demo videos are contained and not cropped */
  video {
    object-fit: contain !important;
  }
  /* Tighten the container to avoid cutting sides */
  .relative.rounded-3xl.overflow-hidden.shadow-2xl video {
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
  }
}
@import 'tailwindcss/base';
@import 'tailwindcss/components';
@import 'tailwindcss/utilities';

/* Design Tokens */
:root {
  --brand-primary: #2563EB;
  --brand-accent: #10B981;
  --gray-900: #111827;
  --gray-600: #4B5563;
  --gray-100: #F3F4F6;
  font-family: 'Inter', sans-serif;
}

/* Advanced 3D Animations & Scroll Effects */
.scroll-container {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* 3D Floating Elements */
.floating-3d {
  transform-style: preserve-3d;
  animation: float3d 6s ease-in-out infinite;
}

@keyframes float3d {
  0%, 100% { 
    transform: translateY(0px);
  }
  50% { 
    transform: translateY(-10px);
  }
}

/* Scroll-triggered transforms */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* 3D Card Hover Effects */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  perspective: 1000px;
}

.card-3d:hover {
  transform: rotateY(5deg) rotateX(5deg) translateZ(20px);
}

/* Interactive Gradient Backgrounds */
.gradient-interactive {
  background: linear-gradient(45deg, var(--brand-primary), var(--brand-accent));
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

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

/* Morphing Shapes */
.morphing-blob {
  border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  animation: morph 8s ease-in-out infinite;
  background: linear-gradient(45deg, rgba(37, 99, 235, 0.1), rgba(16, 185, 129, 0.1));
}

@keyframes morph {
  0% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

/* Parallax Scroll Effects */
.parallax-slow { transform: translateZ(0); }
.parallax-medium { transform: translateZ(0); }
.parallax-fast { transform: translateZ(0); }

/* 3D Platform Logos */
.platform-logo-3d {
  transform-style: preserve-3d;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.platform-logo-3d:hover {
  transform: translateY(-10px) rotateY(10deg) scale(1.1);
  filter: drop-shadow(0 20px 40px rgba(37, 99, 235, 0.3));
}

/* Scroll Progress Indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  z-index: 1000;
  transition: width 0.1s ease-out;
}

/* Advanced Button Effects */
.btn-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.btn-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-3d:hover::before {
  left: 100%;
}

.btn-3d:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
}

/* Micro-interactions */
.micro-bounce {
  animation: microBounce 2s ease-in-out infinite;
}

@keyframes microBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Text Reveal Effects */
.text-reveal {
  overflow: hidden;
  position: relative;
}

.text-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.text-reveal.revealed::after {
  transform: translateX(100%);
}

/* Glassmorphism Effects */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Custom Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Accessibility & Performance */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.focus-ring:focus {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}

img {
  content-visibility: auto;
}

/* Typography improvements */
.font-heading {
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}

/* Button components */
.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), #1d4ed8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, var(--brand-primary));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-primary);
  padding: 12px 24px;
  border: 2px solid var(--brand-primary);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--brand-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Card components */
.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* Platform logos */
.platform-logo {
  width: 40px;
  height: 40px;
  fill: var(--gray-600);
  transition: all 0.3s ease;
}

.platform-logo:hover {
  fill: var(--brand-primary);
  transform: scale(1.1);
}

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

/* Mobile menu improvements */
.mobile-menu-enter {
  opacity: 0;
  transform: translateY(-10px);
}

.mobile-menu-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

/* Testimonial carousel */
.testimonial-card {
  position: relative;
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 24px;
  font-size: 60px;
  color: var(--brand-primary);
  font-family: serif;
  line-height: 1;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* Advanced Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* 3D Scene Container */
.scene-3d {
  perspective: 1000px;
  transform-style: preserve-3d;
}

/* Interactive Background Elements */
.bg-interactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
              rgba(37, 99, 235, 0.1) 0%, 
              transparent 50%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Video Section 3D Effects */
.video-container-3d {
  transform-style: preserve-3d;
  position: relative;
}

.video-container-3d::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: linear-gradient(45deg, 
              rgba(37, 99, 235, 0.1), 
              rgba(16, 185, 129, 0.1));
  border-radius: 20px;
  z-index: -1;
  transform: translateZ(-10px);
}

/* Loading Animation */
.loading-shimmer {
  background: linear-gradient(90deg, 
              transparent 0%, 
              rgba(255, 255, 255, 0.4) 50%, 
              transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

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

/* ===== MOBILE FIXES ===== */

/* Mobile Hero Section Fixes */
@media (max-width: 768px) {
  /* Fix floating badge size and positioning */
  .floating-3d .glass-card {
    padding: 12px 16px !important;
    font-size: 14px !important;
    margin-bottom: 24px !important;
  }
  
  .floating-3d .glass-card .micro-bounce {
    font-size: 16px !important;
    margin-right: 8px !important;
  }

  /* Fix main headline sizing */
  .font-heading.text-6xl {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
    margin-bottom: 24px !important;
  }

  /* Fix subheading */
  .stagger-parent p {
    font-size: 16px !important;
    line-height: 1.5 !important;
    margin-bottom: 32px !important;
  }

  /* Fix CTA buttons layout */
  .scroll-reveal.flex.flex-col.sm\\:flex-row {
    flex-direction: column !important;
    gap: 16px !important;
    margin-bottom: 32px !important;
  }

  .btn-primary, .btn-secondary {
    width: 100% !important;
    text-align: center !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
  }

  /* Fix trust indicators */
  .floating-3d .glass-card.inline-flex {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 16px !important;
  }

  .floating-3d .glass-card .flex.items-center.space-x-6 {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .floating-3d .glass-card .flex.items-center.space-x-6 > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Optimize floating platform icons for mobile */
  .absolute.inset-0.pointer-events-none .floating-3d {
    animation: float3d 8s ease-in-out infinite !important;
    opacity: 0.6 !important;
    transform: scale(0.8) !important;
  }

  /* Fix video container spacing */
  .relative.max-w-md.mx-auto {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Fix mobile demo video aspect ratio - NO CROPPING */
  .relative.max-w-md.mx-auto .relative.rounded-3xl.overflow-hidden.shadow-2xl video {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background: transparent !important;
  }

  /* Remove extra spacing above and below videos */
  .relative.rounded-3xl.overflow-hidden.shadow-2xl {
    margin: 0 !important;
    padding: 0 !important;
  }

  .relative.rounded-3xl.overflow-hidden.shadow-2xl::before,
  .relative.rounded-3xl.overflow-hidden.shadow-2xl::after {
    display: none !important;
  }
}

/* Mobile Platform Grid Fixes */
@media (max-width: 768px) {
  /* Fix platform grid layout */
  .grid.grid-cols-4.md\\:grid-cols-8 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin-top: 32px !important;
    padding: 0 16px !important;
  }

  /* Fix platform logo cards */
  .platform-logo-3d .card-3d {
    padding: 16px !important;
    margin: 0 !important;
  }

  .platform-logo-3d .w-12.h-12 {
    width: 32px !important;
    height: 32px !important;
  }

  .platform-logo-3d .w-8.h-8 {
    width: 20px !important;
    height: 20px !important;
  }

  .platform-logo-3d .text-xs {
    font-size: 10px !important;
  }

  /* Fix platform logo positioning and overlapping */
  .platform-logo-3d {
    transform: none !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
  }

  /* Disable 3D hover effects on mobile */
  .platform-logo-3d:hover {
    transform: none !important;
    filter: none !important;
  }

  /* Fix stats banner spacing */
  .mt-20.scroll-reveal {
    margin-top: 48px !important;
  }

  /* Fix stats grid */
  .grid.grid-cols-1.md\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .glass-card.bg-white\\/60 {
    padding: 24px 16px !important;
  }

  /* Fix large gap before footer */
  .py-32.bg-gray-50 {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  /* Fix section spacing */
  .py-24.bg-white {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }
}

/* Mobile Scroll Reveal Optimization */
@media (max-width: 768px) {
  /* Faster scroll reveals on mobile */
  .scroll-reveal {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  /* Reduce transform distance */
  .scroll-reveal {
    transform: translateY(20px) !important;
  }

  /* Optimize intersection observer threshold for mobile */
  .scroll-reveal.revealed {
    transform: translateY(0) !important;
  }

  /* Fix text reveal performance */
  .text-reveal::after {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

/* Mobile Video Fixes */
@media (max-width: 768px) {
  /* Fix multi-platform video section */
  .mt-24.scroll-reveal .max-w-4xl {
    max-width: 100% !important;
    padding: 0 16px !important;
  }

  .mt-24.scroll-reveal .relative.rounded-3xl.overflow-hidden.shadow-2xl {
    border-radius: 16px !important;
    margin: 0 !important;
  }

  .mt-24.scroll-reveal .relative.rounded-3xl.overflow-hidden.shadow-2xl video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
    object-fit: contain !important;
  }

  /* Fix mobile demo video section */
  .grid.lg\\:grid-cols-2 {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Ensure proper video loading on mobile */
  video {
    will-change: auto !important;
    transform: translateZ(0) !important;
  }
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  /* Keep some background elements but simplified */
  .floating-3d {
    animation: float3d 8s ease-in-out infinite !important;
  }

  .morphing-blob {
    animation: morph 12s ease-in-out infinite !important;
    opacity: 0.05 !important;
  }

  .gradient-interactive {
    animation: gradientShift 10s ease infinite !important;
  }

  /* Simplify 3D effects */
  .card-3d {
    transform: none !important;
    transition: box-shadow 0.3s ease !important;
  }

  .card-3d:hover {
    transform: none !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
  }

  /* Optimize scroll performance */
  .parallax-slow,
  .parallax-medium,
  .parallax-fast {
    transform: none !important;
  }
}

/* Mobile Typography Fixes */
@media (max-width: 768px) {
  /* Fix heading sizes */
  .text-3xl.md\\:text-4xl {
    font-size: 1.875rem !important;
    line-height: 1.2 !important;
  }

  .text-2xl.md\\:text-3xl {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  /* Fix paragraph spacing */
  .text-xl.text-gray-600 {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  .text-lg.text-gray-600 {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}

/* Additional Mobile Fixes for Specific Issues */
@media (max-width: 768px) {
  /* Fix "See Pricing" button interference with floating emoji */
  .btn-secondary {
    position: relative !important;
    z-index: 10 !important;
    margin-top: 8px !important;
  }

  /* Ensure floating elements don't interfere with buttons */
  .floating-3d {
    z-index: 1 !important;
  }

  /* Fix video container extra space issue */
  .relative.max-w-md.mx-auto .absolute.inset-0 {
    display: none !important;
  }

  /* Remove gradient background from video containers on mobile */
  .video-container-3d::before {
    display: none !important;
  }

  /* Fix platform icons overlapping text */
  .platform-logo-3d .mt-3.text-center {
    margin-top: 8px !important;
    position: relative !important;
    z-index: 2 !important;
  }

  /* Ensure platform cards don't overlap */
  .platform-logo-3d .card-3d {
    position: relative !important;
    z-index: 1 !important;
    margin-bottom: 8px !important;
  }

  /* Fix large gap between stats and footer */
  .py-32.bg-gray-50.relative.overflow-hidden.parallax-slow {
    padding-bottom: 32px !important;
  }

  /* Optimize scroll reveal timing for mobile */
  .scroll-reveal {
    transition-delay: 0s !important;
  }

  /* Fix hero section spacing */
  .relative.min-h-screen {
    min-height: 100vh !important;
    padding-top: 80px !important;
    padding-bottom: 40px !important;
  }

  /* Fix trust indicators layout */
  .floating-3d .glass-card .flex.items-center.space-x-6 .flex.items-center {
    margin-bottom: 8px !important;
  }

  /* Ensure videos don't have extra container space */
  .relative.rounded-3xl.overflow-hidden.shadow-2xl {
    background: transparent !important;
  }

  /* Fix second video (multi-platform) not working */
  .mt-24.scroll-reveal video {
    background: #f3f4f6 !important;
    border-radius: 16px !important;
  }

  /* Optimize mobile video loading - moved to HTML attributes */

  /* Fix mobile menu z-index */
  #mobile-menu {
    z-index: 100 !important;
  }

  /* Reduce motion for better mobile performance */
  .micro-bounce {
    animation: none !important;
  }

  /* Fix button text alignment */
  .btn-primary span,
  .btn-secondary span {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* Mobile-specific video optimizations */
@media (max-width: 768px) {
  /* Ensure proper video aspect ratios */
  video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 16px !important;
  }

  /* Fix mobile demo video - portrait */
  video[src*="repostly-phone.mp4"] {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background: transparent !important;
    border-radius: 1rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
  }

  /* Fix multi-platform video - landscape */
  video[src*="multi-platofrm_video.mp4"] {
    aspect-ratio: 16/9 !important;
    max-height: 300px !important;
    width: 100% !important;
    object-fit: contain !important;
    background: transparent !important;
  }

  /* Improve video loading performance */
  video {
    will-change: auto !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
  }

  /* Fix video containers */
  .relative.rounded-3xl.overflow-hidden.shadow-2xl {
    border-radius: 16px !important;
    overflow: hidden !important;
  }
}

/* Fix for mobile scroll performance */
@media (max-width: 768px) {
  /* Disable transform-heavy animations */
  .morphing-blob,
  .gradient-interactive,
  .parallax-slow,
  .parallax-medium,
  .parallax-fast {
    transform: none !important;
    animation: none !important;
  }

  /* Simplify glass effects */
  .glass-card {
    backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
  }

  /* Optimize scroll container */
  .scroll-container {
    -webkit-overflow-scrolling: touch !important;
  }
}