/* Custom CSS for H-Ryule website */

/* Root variables for consistent theming */
:root {
  --primary: #322b4d;
  --primary-foreground: #f8fafc;
  --secondary: #f1f5f9;
  --secondary-foreground: #334155;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #e2e8f0;
  --accent-foreground: #334155;
  --destructive: #ef4444;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #322b4d;
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --popover: #ffffff;
  --popover-foreground: #0f172a;
  --radius: 0.5rem;
}

/* Dark mode variables */
.dark {
  --background: #0f172a;
  --foreground: #f8fafc;
  --card: #1e293b;
  --card-foreground: #f8fafc;
  --popover: #1e293b;
  --popover-foreground: #f8fafc;
  --primary: #f8fafc;
  --primary-foreground: #0f172a;
  --secondary: #334155;
  --secondary-foreground: #f8fafc;
  --muted: #334155;
  --muted-foreground: #94a3b8;
  --accent: #334155;
  --accent-foreground: #f8fafc;
  --destructive: #ef4444;
  --border: #334155;
  --input: #334155;
  --ring: #f8fafc;
}

/* Base styles */
* {
  border-color: var(--border);
}

body {
  background-color: var(--background);
  color: var(--foreground);
}

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

@keyframes scaleIn {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(20px);
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
  transform: scaleX(0);
}

/* Infinite carousel styles */
.carousel-mask {
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: carousel-scroll 40s linear infinite;
}

.carousel-track:hover {
  animation-play-state: paused;
}

@keyframes carousel-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Custom components */
.hero-gradient {
  background: linear-gradient(135deg, var(--background) 0%, var(--background) 50%, var(--primary) 5%);
}

.card-hover {
  transition: all 0.3s ease;
}

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

/* Button styles */
.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--primary);
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

/* Form styles */
.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(50, 43, 77, 0.1);
}

.form-textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--background);
  color: var(--foreground);
  transition: border-color 0.2s ease;
  resize: vertical;
  min-height: 120px;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(50, 43, 77, 0.1);
}

/* Card styles */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Navigation styles */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.2s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Glass Navbar Styles */
.glass-navbar {
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Expanded state (at top of page) */
.glass-navbar-expanded {
  height: 80px;
  padding: 0 2.5rem;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.1);
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Compact state (after scrolling) */
.glass-navbar-compact {
  height: 64px;
  padding: 0 1.5rem 0 1.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.glass-navbar-compact:hover {
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(255, 255, 255, 0.3);
}

/* Container states */
#navbar-container {
  padding-top: 0;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar-container.navbar-scrolled {
  padding-top: 0.75rem;
}

#navbar-inner {
  max-width: 100%;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar-inner.navbar-scrolled {
  max-width: 580px;
  width: 580px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

/* Navbar nav spacing adjustments */
.navbar-nav {
  flex: 1;
  margin: 0 1.5rem;
  transition: margin 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav a,
.navbar-nav button {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Compact state - shrink everything */
.glass-navbar-compact {
  gap: 0.5rem;
}

.glass-navbar-compact .navbar-nav {
  margin: 0 0.25rem;
}

.glass-navbar-compact .navbar-nav ul {
  gap: 0;
}

.glass-navbar-compact .navbar-nav a,
.glass-navbar-compact .navbar-nav button {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
  font-size: 0.75rem;
}

/* Logo text transition */
.logo-text {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateX(0);
  max-width: 120px;
}

/* Hide logo text in compact mode */
.glass-navbar-compact .logo-text {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  margin: 0;
  transform: translateX(-10px);
}

/* Logo shrink in compact mode */
.navbar-logo {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-navbar-compact .navbar-logo {
  width: 32px;
  height: 32px;
}

/* CTA button transition */
.navbar-cta {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shrink CTA button in compact mode */
.glass-navbar-compact .navbar-cta {
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  font-size: 0.75rem;
  height: 2.25rem;
  border-radius: 9999px;
}

/* Mobile menu positioning */
.mobile-menu-position {
  top: 96px;
}

.mobile-menu-position.navbar-scrolled {
  top: 82px;
}

/* Services dropdown hover effects */
.group:hover #desktop-services-menu {
  opacity: 1;
  visibility: visible;
}

.group:hover #desktop-services-toggle i {
  transform: rotate(180deg);
}

/* Services dropdown menu styling */
#desktop-services-menu {
  z-index: 40;
  pointer-events: none;
}

#desktop-services-menu:not(.opacity-0) {
  pointer-events: auto;
}

#desktop-services-menu a {
  position: relative;
  z-index: 50;
}

/* Modal styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--card);
  border-radius: var(--radius);
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

/* Utility classes */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary));
}

.border-gradient {
  border: 1px solid transparent;
  background: linear-gradient(var(--background), var(--background)) padding-box,
              linear-gradient(135deg, var(--primary), var(--primary)) border-box;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Focus styles for accessibility */
.focus-visible:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
}

/* ==========================================
   HERO SECTION - SaaS Style
   ========================================== */

/* Animated Gradient Orbs */
.hero-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: heroOrbFloat 20s ease-in-out infinite;
}

.hero-gradient-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.hero-gradient-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
  top: 50%;
  right: -150px;
  animation-delay: -5s;
}

.hero-gradient-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.25) 0%, transparent 70%);
  bottom: -100px;
  left: 30%;
  animation-delay: -10s;
}

.hero-gradient-orb-4 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.35) 0%, transparent 70%);
  top: 30%;
  left: 50%;
  animation-delay: -15s;
}

@keyframes heroOrbFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(30px, -30px) scale(1.05);
  }
  50% {
    transform: translate(-20px, 20px) scale(0.95);
  }
  75% {
    transform: translate(-30px, -20px) scale(1.02);
  }
}

/* Grid Pattern */
.hero-grid-pattern {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black 40%, transparent 100%);
}

/* Floating Particles */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(168, 85, 247, 0.6);
  border-radius: 50%;
  left: var(--x);
  top: var(--y);
  animation: heroParticleFloat 8s ease-in-out infinite;
  animation-delay: var(--delay);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

@keyframes heroParticleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-40px) translateX(20px);
    opacity: 1;
  }
}

/* Floating Elements */
.hero-float-element {
  animation: heroElementFloat 6s ease-in-out infinite;
}

@keyframes heroElementFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(2deg);
  }
}

/* Badge */
.hero-badge-wrapper {
  animation: heroFadeInUp 0.8s ease-out forwards;
  animation-delay: 0.2s;
  opacity: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 9999px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hero-badge:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.15);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #a855f7;
  border-radius: 50%;
  animation: heroPulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}

@keyframes heroPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }
}

/* Title Animations */
.hero-title-line {
  animation: heroFadeInUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

@keyframes heroFadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient Text */
.hero-gradient-text {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 35%, #c084fc 65%, #9333ea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: heroGradientShift 5s ease-in-out infinite;
}

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

/* Subtitle */
.hero-subtitle {
  animation: heroFadeInUp 0.8s ease-out forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.hero-highlight {
  position: relative;
  color: #a855f7;
  font-weight: 500;
}

.hero-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #a855f7, #ec4899);
  transform: scaleX(0);
  transform-origin: left;
  animation: heroUnderline 0.6s ease-out forwards;
  animation-delay: 1.2s;
}

@keyframes heroUnderline {
  to {
    transform: scaleX(1);
  }
}

/* CTA Buttons */
.hero-cta-group {
  animation: heroFadeInUp 0.8s ease-out forwards;
  animation-delay: 0.7s;
  opacity: 0;
}

.hero-cta-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.3);
}

.hero-cta-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(168, 85, 247, 0.5);
}

.hero-cta-primary:hover::before {
  opacity: 1;
}

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: #374151;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.hero-cta-secondary:hover {
  color: #7c3aed;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(168, 85, 247, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(168, 85, 247, 0.15);
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  animation: heroFadeInUp 0.8s ease-out forwards;
  animation-delay: 0.9s;
  opacity: 0;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.hero-stat-suffix {
  color: #a855f7;
}

.hero-stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-stat-divider {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(168, 85, 247, 0.3), transparent);
}

@media (max-width: 640px) {
  .hero-stat-divider {
    display: none;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .hero-stat-value {
    font-size: 2rem;
  }
}

/* Scroll Indicator */
.hero-scroll-indicator {
  animation: heroFadeInUp 0.8s ease-out forwards, heroBounce 2s ease-in-out infinite;
  animation-delay: 1.2s, 2s;
  opacity: 0;
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(168, 85, 247, 0.5), transparent);
  animation: heroScrollLine 2s ease-in-out infinite;
}

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

@keyframes heroScrollLine {
  0% {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
    transform: scaleY(1);
    transform-origin: bottom;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-gradient-orb-1 {
    width: 300px;
    height: 300px;
  }
  
  .hero-gradient-orb-2 {
    width: 250px;
    height: 250px;
  }
  
  .hero-gradient-orb-3 {
    width: 200px;
    height: 200px;
  }
  
  .hero-gradient-orb-4 {
    width: 180px;
    height: 180px;
  }
}
