/* Custom styles for Glonado Landing Page */

:root {
  --primary: #5E6AD2;
  --secondary: #FF9766;
  --dark: #18181b;
  --gray: #71717a;
  --light-gray: #e4e4e7;
  --surface: #fafafa;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom button styles */
.btn-primary {
  background-color: var(--primary);
  color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary::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-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  background-color: #4f5bc4;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(94, 106, 210, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  border: 1px solid var(--light-gray);
  color: var(--dark);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: rgba(94, 106, 210, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* Mobile menu animation */
.mobile-menu {
  transition: all 0.3s ease-in-out;
}

.mobile-menu.hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.mobile-menu.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover effects */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card-hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 12px 28px rgba(94, 106, 210, 0.15);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.card-hover:hover::after {
  opacity: 1;
}

/* Feature icon styles */
.feature-icon {
  background: linear-gradient(135deg, var(--primary) 0%, #4f5bc4 100%);
}

/* Pricing card highlight */
.pricing-card-featured {
  border: 2px solid var(--primary);
  box-shadow: 0 8px 24px rgba(94, 106, 210, 0.2);
}

/* Form focus styles */
input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(94, 106, 210, 0.1);
}

/* Loading animation for form submission */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #4f5bc4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero section background */
.hero-bg {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface) 100%);
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 {
  transition-delay: 0.1s;
}

.fade-in-delay-2 {
  transition-delay: 0.2s;
}

.fade-in-delay-3 {
  transition-delay: 0.3s;
}

.fade-in-delay-4 {
  transition-delay: 0.4s;
}

.fade-in-delay-5 {
  transition-delay: 0.5s;
}

.fade-in-delay-6 {
  transition-delay: 0.6s;
}

/* Feature icon pulse animation */
.feature-icon {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(94, 106, 210, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(94, 106, 210, 0.2);
  }
}

/* Hero image animation - simple floating with glow */
.hero-image-container {
  animation: float 6s ease-in-out infinite;
}

.hero-image-container > div {
  position: relative;
  transition: transform 0.3s ease;
}

.hero-image-container > div::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: radial-gradient(circle at 50% 50%, rgba(94, 106, 210, 0.2), transparent 70%);
  border-radius: 2rem;
  opacity: 0.5;
  z-index: -1;
  filter: blur(30px);
  animation: pulse-glow-hero 4s ease-in-out infinite;
}

.hero-image-container:hover > div {
  transform: scale(1.02);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}

@keyframes pulse-glow-hero {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* Hero text animations */
.hero-title {
  display: inline;
}

.hero-title-text {
  /* Will be animated by typewriter effect */
  opacity: 0;
}

.hero-description {
  /* Will fade in after title types */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-description.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-cta {
  animation: fadeInUp 1.2s ease-out 0.4s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient text animation */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #4f5bc4 50%, var(--secondary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* Typing effect for hero text */
.typing-effect {
  overflow: hidden;
  border-right: 3px solid var(--primary);
  white-space: nowrap;
  animation: typing 2s steps(30) 0.5s forwards, blink 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
    border-right: none;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* Pricing page animations */
.pricing-title {
  animation: fadeInUp 0.8s ease-out;
}

.pricing-description {
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* Contact page animations */
.contact-title {
  animation: fadeInUp 0.8s ease-out;
}

.contact-description {
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* Connector marquee */
.connector-marquee {
  overflow: hidden;
  position: relative;
  background: linear-gradient(to bottom, #f9fafb, #ffffff);
  padding: 3rem 0;
}

.connector-marquee-container {
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.connector-track {
  display: flex;
  gap: 3rem;
  animation: scroll 40s linear infinite;
}

.connector-logo {
  flex-shrink: 0;
  width: 120px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.connector-logo:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.connector-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.connector-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Connector grid */
.connector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.5rem;
}

.connector-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
  min-height: 140px;
}

.connector-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(94, 106, 210, 0.15);
  transform: translateY(-4px);
}

.connector-card img {
  max-width: 80px;
  max-height: 60px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.connector-card .connector-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

/* Compact connector grid (homepage) */
.connector-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.connector-grid-sm .connector-card {
  padding: 1rem;
  min-height: 100px;
}

.connector-grid-sm .connector-card img {
  max-width: 52px;
  max-height: 40px;
  margin-bottom: 0.5rem;
}

.connector-grid-sm .connector-card .connector-name {
  font-size: 0.75rem;
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(94, 106, 210, 0.3);
  z-index: 1000;
}

.back-to-top:hover {
  background-color: #4f5bc4;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(94, 106, 210, 0.4);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Responsive video embed (16:9) */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #0f0f0f;
  border-radius: 0.75rem 0.75rem 0 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1c1f3a 0%, #12152b 100%);
  color: rgba(255,255,255,0.9);
  text-align: center;
  gap: 0.75rem;
  padding: 2rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.video-placeholder:hover {
  background: linear-gradient(135deg, #23274a 0%, #191d36 100%);
}

.video-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.video-placeholder:hover .video-play-btn {
  background: var(--primary);
  transform: scale(1.1);
  border-color: var(--primary);
}

.video-card {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

/* Responsive utilities */
@media (max-width: 768px) {
  .mobile-menu-button {
    display: block;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}
