/* Button styles */
.button-override {
  opacity: 1;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 5;
  font-weight: 600;
}

.primary-cta {
  background-image: linear-gradient(to right, #1e40af, #0369a1);
  box-shadow: 0 10px 15px -3px rgba(3, 105, 161, 0.4), 0 4px 6px -4px rgba(3, 105, 161, 0.3);
  color: white;
}

.primary-cta:hover {
  background-image: linear-gradient(to right, #1e3a8a, #0284c7);
  box-shadow: 0 15px 20px -3px rgba(3, 105, 161, 0.5), 0 4px 6px -4px rgba(3, 105, 161, 0.4);
  transform: translateY(-2px);
}

.secondary-cta {
  border: 2px solid #cbd5e1;
  background-color: white;
  color: #1e40af;
  box-shadow: 0 4px 6px -1px rgba(3, 105, 161, 0.2), 0 2px 4px -2px rgba(3, 105, 161, 0.2);
}

.secondary-cta:hover {
  border-color: #60a5fa;
  background-color: #eff6ff;
  color: #1a56db;
  box-shadow: 0 10px 15px -3px rgba(3, 105, 161, 0.3), 0 4px 6px -4px rgba(3, 105, 161, 0.2);
  transform: translateY(-2px);
}

.button-container {
  position: relative;
  z-index: 10;
  opacity: 1;
}

body {
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

.gradient-text {
  background: linear-gradient(90deg, #0369a1, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-gradient-page {
  background-image: linear-gradient(to bottom, #f0f9ff, #e0f2fe, #bae6fd, #fff);
}

/* Extend background when overscrolling */
html {
  overscroll-behavior: none;
  height: 100%;
  background-color: #0f172a; /* slate-900 for overscroll area */
}

/* Background pattern */
.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.3;
  background-image: 
    radial-gradient(#0284c7 1px, transparent 1px),
    radial-gradient(#0369a1 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

/* Unified animation system */
.scroll-reveal, .fade-in-up, .fade-in-left, .fade-in-right, .scale-in {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67), transform 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
  will-change: opacity, transform;
}

.scroll-reveal {
  transform: translateY(30px);
}

.fade-in-up {
  transform: translateY(30px);
}

.fade-in-left {
  transform: translateX(-30px);
}

.fade-in-right {
  transform: translateX(30px);
}

.scale-in {
  transform: scale(0.9);
}

/* Unified active/revealed state */
.revealed, .active {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* Base section divider styles applied directly to the variants */
.section-divider-top, .section-divider-bottom {
  height: 6rem;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

.section-divider-top {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='white' opacity='.25'%3E%3C/path%3E%3Cpath d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' fill='white' opacity='.5'%3E%3C/path%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='white'%3E%3C/path%3E%3C/svg%3E");
}

.section-divider-bottom {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z' fill='%23f0f9ff' opacity='.25'%3E%3C/path%3E%3Cpath d='M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z' fill='%23f0f9ff' opacity='.5'%3E%3C/path%3E%3Cpath d='M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z' fill='%23f0f9ff'%3E%3C/path%3E%3C/svg%3E");
}

/* Blob animations */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
  opacity: 0.3;
  animation: blobAnimation 20s infinite alternate ease-in-out;
}

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

/* Optimized parallax effects */
.parallax, .parallax-slow {
  transform: translateZ(0);
  will-change: transform;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.parallax {
  transition: transform 0.1s linear;
}

.parallax-slow {
  transition: transform 0.2s linear;
}

/* Animated gradient background */
.animated-gradient {
  background: linear-gradient(-45deg, #0284c7, #0369a1, #0ea5e9, #075985);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

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

/* 3D Card effect */
.card-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d:hover .card-3d-content {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-3d-content {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-3d-shadow {
  display: none;
}

/* Enhanced hover effect with cleaner shadow */
.card-3d:hover .card-3d-content {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1), 0 8px 10px -6px rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
}

/* Navigation styling */
.nav-glass {
  background: rgba(255, 255, 255, 0.8); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -moz-backdrop-filter: blur(12px);
  -o-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-link {
  position: relative;
}

.nav-link:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: linear-gradient(90deg, #0369a1, #0284c7);
  transition: width 0.3s ease;
}

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

/* Section transitions */
section {
  transition: background-color 0.5s ease, transform 0.5s ease, opacity 0.5s ease;
}

/* Magic scroll interactions */
.magic-content {
  will-change: transform, opacity;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Tailwind extensions and custom utilities */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fadeInLeft {
  0% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  0% { opacity: 0; transform: translateX(20px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* Default animation classes */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

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

.animate-pulse-slow {
  animation: pulse 4s ease-in-out infinite;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.5s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.5s ease-out;
}
