/**
 * SinAI Inc - Glassmorphism & Liquid Effects
 * Brand Identity: Modern glass-like UI elements with liquid animations
 */

/* Enhanced Glassmorphism Utility Classes */
.glass-card {
  background: var(--glass-bg-dark);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border-dark);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

[data-theme="light"] .glass-card {
  background: linear-gradient(135deg,
    rgba(248, 250, 252, 0.95) 0%,
    rgba(241, 245, 249, 0.9) 100%);
  border: 2px solid rgba(99, 102, 241, 0.25);
  box-shadow: 
    0 8px 32px rgba(99, 102, 241, 0.2),
    0 4px 16px rgba(139, 92, 246, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.glass-panel {
  background: rgba(45, 55, 72, 0.8);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 20px;
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  background: rgba(45, 55, 72, 0.9);
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 12px 48px 0 rgba(102, 126, 234, 0.4);
}

[data-theme="light"] .glass-panel {
  background: linear-gradient(135deg,
    rgba(224, 231, 255, 0.9) 0%,
    rgba(221, 214, 254, 0.85) 50%,
    rgba(224, 242, 254, 0.9) 100%);
  border: 2px solid rgba(99, 102, 241, 0.35);
  box-shadow: 
    0 10px 40px rgba(99, 102, 241, 0.25),
    0 4px 20px rgba(139, 92, 246, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .glass-panel:hover {
  background: linear-gradient(135deg,
    rgba(199, 210, 254, 0.95) 0%,
    rgba(196, 181, 253, 0.9) 50%,
    rgba(186, 230, 253, 0.95) 100%);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 
    0 12px 50px rgba(99, 102, 241, 0.35),
    0 6px 24px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Liquid Card Effects */
.liquid-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.liquid-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.15) 0%, transparent 70%);
  animation: liquidMove 20s ease-in-out infinite;
  pointer-events: none;
}

.liquid-card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.15) 0%, transparent 70%);
  animation: liquidMove 25s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes liquidMove {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(10%, 10%) scale(1.1);
  }
  66% {
    transform: translate(-10%, 5%) scale(0.9);
  }
}

/* Hero Product Cards with Glassmorphism */
.hero-product-card {
  position: relative;
  border-radius: 16px;
  background: rgba(45, 55, 72, 0.3);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(167, 139, 250, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.hero-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-product-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: rgba(45, 55, 72, 0.5);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.hero-product-card:hover::before {
  opacity: 1;
}

.hero-product-new {
  border-color: rgba(25, 135, 84, 0.4);
  background: rgba(25, 135, 84, 0.1);
}

.hero-product-new:hover {
  border-color: rgba(25, 135, 84, 0.6);
  box-shadow: 0 20px 40px rgba(25, 135, 84, 0.3);
}

[data-theme="light"] .hero-product-card {
  background: linear-gradient(135deg,
    rgba(224, 231, 255, 0.85) 0%,
    rgba(221, 214, 254, 0.8) 50%,
    rgba(224, 242, 254, 0.85) 100%);
  border: 2px solid rgba(99, 102, 241, 0.3);
  box-shadow:
    0 8px 32px rgba(99, 102, 241, 0.2),
    0 4px 16px rgba(139, 92, 246, 0.12);
}

[data-theme="light"] .hero-product-card:hover {
  background: linear-gradient(135deg,
    rgba(199, 210, 254, 0.95) 0%,
    rgba(196, 181, 253, 0.9) 50%,
    rgba(186, 230, 253, 0.95) 100%);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 
    0 20px 48px rgba(99, 102, 241, 0.3),
    0 8px 24px rgba(139, 92, 246, 0.2);
}

/* Frosted Glass Effect for Cards */
.card-frosted {
  background: rgba(45, 55, 72, 0.7) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(167, 139, 250, 0.15) !important;
}

[data-theme="light"] .card-frosted {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(102, 126, 234, 0.15) !important;
}

/* Animated Gradient Borders */
.gradient-border {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  padding: 2px;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, #667eea, #764ba2, #f472b6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: gradientRotate 3s linear infinite;
}

@keyframes gradientRotate {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(360deg);
  }
}

/* Glow Effects */
.glow-primary {
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.5),
              0 0 40px rgba(102, 126, 234, 0.3),
              0 0 60px rgba(102, 126, 234, 0.1);
}

.glow-success {
  box-shadow: 0 0 20px rgba(25, 135, 84, 0.5),
              0 0 40px rgba(25, 135, 84, 0.3),
              0 0 60px rgba(25, 135, 84, 0.1);
}

/* Shimmer Effect */
.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Blob Animations for Background */
@keyframes blobFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.blob-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.3;
  animation: blobFloat 20s ease-in-out infinite;
}

.blob-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(118, 75, 162, 0.4) 0%, transparent 70%);
  top: 50%;
  right: 10%;
  animation-delay: 5s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.4) 0%, transparent 70%);
  bottom: 10%;
  left: 50%;
  animation-delay: 10s;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .glass-panel {
    border-radius: 16px;
  }
  
  .hero-product-card {
    border-radius: 12px;
  }
  
  .blob {
    display: none; /* Hide blobs on mobile for performance */
  }
}

/* Contact page hero styles */
.contact-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 50%, rgba(20, 184, 166, 0.1) 100%);
  overflow: hidden;
}

[data-theme="dark"] .contact-hero {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 50%, rgba(20, 184, 166, 0.15) 100%);
}

.contact-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
  animation: contactLiquid 30s ease-in-out infinite;
}

.contact-hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.15) 0%, transparent 70%);
  animation: contactLiquid 35s ease-in-out infinite reverse;
}

@keyframes contactLiquid {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(8%, -8%) rotate(120deg);
  }
  66% {
    transform: translate(-8%, 8%) rotate(240deg);
  }
}

.hero-gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #14b8a6 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.animate-gradient {
  animation: gradientFlow 8s ease infinite;
}

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

/* ==========================================================================
   About Page Hero
   ========================================================================== */

.about-hero {
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.1) 0%, 
    rgba(118, 75, 162, 0.1) 50%,
    rgba(237, 100, 166, 0.1) 100%);
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, transparent 70%);
  animation: aboutLiquid 25s ease-in-out infinite;
  pointer-events: none;
}

.about-hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(237, 100, 166, 0.15) 0%, transparent 70%);
  animation: aboutLiquid 30s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes aboutLiquid {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(5%, -5%) rotate(120deg) scale(1.1);
  }
  66% {
    transform: translate(-5%, 5%) rotate(240deg) scale(0.9);
  }
}

[data-theme="light"] .about-hero {
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.08) 0%, 
    rgba(118, 75, 162, 0.08) 50%,
    rgba(237, 100, 166, 0.08) 100%);
}

/* ==========================================================================
   Products Page Hero
   ========================================================================== */

.products-hero {
  background: linear-gradient(135deg, 
    rgba(118, 75, 162, 0.1) 0%, 
    rgba(102, 126, 234, 0.1) 50%,
    rgba(52, 211, 153, 0.1) 100%);
  position: relative;
  min-height: 350px;
  display: flex;
  align-items: center;
}

.products-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 10%;
  width: 50%;
  height: 160%;
  background: radial-gradient(circle, rgba(118, 75, 162, 0.2) 0%, transparent 70%);
  animation: productsLiquid 28s ease-in-out infinite;
  pointer-events: none;
}

.products-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: 10%;
  width: 50%;
  height: 160%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.15) 0%, transparent 70%);
  animation: productsLiquid 33s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes productsLiquid {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(-8%, 8%) rotate(120deg) scale(1.05);
  }
  66% {
    transform: translate(8%, -8%) rotate(240deg) scale(0.95);
  }
}

[data-theme="light"] .products-hero {
  background: linear-gradient(135deg, 
    rgba(118, 75, 162, 0.08) 0%, 
    rgba(102, 126, 234, 0.08) 50%,
    rgba(52, 211, 153, 0.08) 100%);
}

/* ==========================================================================
   Technology Page Hero
   ========================================================================== */

.technology-hero {
  background: linear-gradient(135deg, 
    rgba(52, 211, 153, 0.1) 0%, 
    rgba(102, 126, 234, 0.1) 50%,
    rgba(167, 139, 250, 0.1) 100%);
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
}

.technology-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 55%;
  height: 180%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.2) 0%, transparent 70%);
  animation: technologyLiquid 26s ease-in-out infinite;
  pointer-events: none;
}

.technology-hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 55%;
  height: 180%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.15) 0%, transparent 70%);
  animation: technologyLiquid 31s ease-in-out infinite reverse;
  pointer-events: none;
}

@keyframes technologyLiquid {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(6%, -6%) rotate(120deg) scale(1.08);
  }
  66% {
    transform: translate(-6%, 6%) rotate(240deg) scale(0.92);
  }
}

[data-theme="light"] .technology-hero {
  background: linear-gradient(135deg, 
    rgba(52, 211, 153, 0.08) 0%, 
    rgba(102, 126, 234, 0.08) 50%,
    rgba(167, 139, 250, 0.08) 100%);
}

/* ==========================================================================
   Blog Hero - Liquid Animation
   ========================================================================== */

.blog-hero {
  position: relative;
  padding: 80px 0;
  background: linear-gradient(135deg, 
    rgba(139, 92, 246, 0.15) 0%, 
    rgba(236, 72, 153, 0.15) 50%,
    rgba(59, 130, 246, 0.15) 100%);
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
}

.blog-hero::before,
.blog-hero::after {
  content: '';
  position: absolute;
  border-radius: 40% 60%;
  filter: blur(80px);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

.blog-hero::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.6) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation: blogLiquidPrimary 27s ease-in-out infinite;
}

.blog-hero::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.5) 0%, transparent 70%);
  bottom: -150px;
  right: -80px;
  animation: blogLiquidSecondary 32s ease-in-out infinite;
}

@keyframes blogLiquidPrimary {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(5%, -5%) rotate(120deg) scale(1.1);
  }
  66% {
    transform: translate(-5%, 5%) rotate(240deg) scale(0.9);
  }
}

@keyframes blogLiquidSecondary {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  33% {
    transform: translate(-6%, 6%) rotate(-120deg) scale(1.08);
  }
  66% {
    transform: translate(6%, -6%) rotate(-240deg) scale(0.92);
  }
}

[data-theme="light"] .blog-hero {
  background: linear-gradient(135deg, 
    rgba(139, 92, 246, 0.08) 0%, 
    rgba(236, 72, 153, 0.08) 50%,
    rgba(59, 130, 246, 0.08) 100%);
}

/* ==========================================================================
   Hero Container Z-Index Utility
   ========================================================================== */

.hero-content-layer {
  position: relative;
  z-index: 2;
}

/* Performance optimization */
@media (prefers-reduced-motion: reduce) {
  .liquid-card::before,
  .liquid-card::after,
  .blob,
  .shimmer::after,
  .gradient-border::before,
  .contact-hero::before,
  .contact-hero::after,
  .about-hero::before,
  .about-hero::after,
  .products-hero::before,
  .products-hero::after,
  .technology-hero::before,
  .technology-hero::after,
  .animate-gradient {
    animation: none;
  }
  
  .hero-product-card,
  .glass-panel {
    transition: none;
  }
}
