/* Custom CSS for Modern Web Template */

/* Custom font */
.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Custom animations and transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation styles */
.navbar {
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Button styles */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.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-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    color: white;
    border-color: transparent;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, #EBF8FF 0%, #F7FAFC 50%, #FAF5FF 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%239fa6b2" fill-opacity="0.05"><circle cx="30" cy="30" r="1"/></g></svg>');
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* Feature cards */
.feature-card {
    position: relative;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    background: linear-gradient(145deg, transparent, rgba(59, 130, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

/* Testimonial cards */
.testimonial-card {
    position: relative;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    background: linear-gradient(145deg, transparent, rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover::before {
    opacity: 1;
}

/* Pricing cards */
.pricing-card {
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animation classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-subtle {
    animation: pulse 2s ease-in-out infinite;
}

/* Mobile menu */
.mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.active {
    max-height: 300px;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1.125rem;
    }
    
    .feature-card,
    .testimonial-card,
    .pricing-card {
        margin-bottom: 1rem;
    }
}

/* Loading animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Intersection Observer animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #2563EB, #7C3AED);
}

/* Focus styles for accessibility */
.btn-primary:focus,
.btn-secondary:focus,
.nav-link:focus {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* Print styles */
@media print {
    .navbar,
    .hero-section,
    footer {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
}

/* ===== Animated Background Orbs ===== */
#contact {
  position: relative;
  overflow: hidden;
}
#contact::before,
#contact::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: floatOrbs 18s ease-in-out infinite alternate;
}
#contact::before {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, var(--brand-1, #3b82f6) 0%, transparent 70%);
}
#contact::after {
  width: 450px;
  height: 450px;
  bottom: -120px;
  right: -120px;
  background: radial-gradient(circle, var(--brand-2, #8b5cf6) 0%, transparent 70%);
  animation-delay: 4s;
}
@keyframes floatOrbs {
  from { transform: translateY(0) scale(1); opacity: 0.35; }
  to { transform: translateY(-40px) scale(1.05); opacity: 0.55; }
}

/* Slightly lift the form for better contrast */
#contact form {
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(99,102,241,0.25);
}
.dark #contact form {
  background: rgba(15, 23, 42, 0.75);
}

/* Smooth fade-in for text */
#contact h2, #contact p, #contact form {
  animation: fadeInUp 1s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile and motion preferences */
@media (max-width: 640px) {
  #contact::before, #contact::after { width: 260px; height: 260px; filter: blur(80px); opacity: 0.25; }
  #contact::after { bottom: -100px; right: -100px; }
}
@media (prefers-reduced-motion: reduce) {
  #contact::before, #contact::after { animation: none; }
  #contact h2, #contact p, #contact form { animation: none; }
}

/* Map brand tokens to existing gradient tokens for safety */
:root { --brand-1: var(--gradient-from, #3B82F6); --brand-2: var(--gradient-to, #8B5CF6); }

/* ===== Contact Section Enhancements ===== */
#contact {
  background: linear-gradient(180deg, #f9fafb 0%, #eef2ff 100%);
  position: relative;
}
.dark #contact {
  background: radial-gradient(circle at top, rgba(59,130,246,.15), transparent 40%),
              linear-gradient(180deg, #0b1020 0%, #111827 100%);
}
#contact form {
  backdrop-filter: blur(14px);
  background: rgba(255,255,255,0.6);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
.dark #contact form {
  background: rgba(17,24,39,0.6);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}
#contact input, #contact textarea {
  transition: border .25s ease, box-shadow .25s ease, background .25s ease;
  color: #111827; /* readable in light */
  caret-color: var(--brand-1, #3B82F6);
}
#contact input:focus, #contact textarea:focus {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(59,130,246,.25);
  background: rgba(255,255,255,0.9);
}
.dark #contact input, .dark #contact textarea { color: #E5E7EB; }
#contact input::placeholder, #contact textarea::placeholder { color: #94A3B8; }
.dark #contact input::placeholder, .dark #contact textarea::placeholder { color: #9CA3AF; }
.dark #contact input:focus, .dark #contact textarea:focus {
  background: rgba(15,23,42,0.9);
  box-shadow: 0 0 0 3px rgba(139,92,246,.35);
}
#contact button.btn-primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 10px 25px rgba(99,102,241,.35);
}
#contact button.btn-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* --- Premium Tokens & Motion (appended) --- */
/* Semantic tokens (used by optional themes) */
:root {
  --bg-surface: #ffffff;
  --bg-section: #f9fafb;
  --bg-hero: #f5f7ff;
  --bg-footer: #0b1220;
  --text-body: #111827;
  --text-muted: #6b7280;
  --nav: #ffffff;
  --divider: rgba(17,24,39,0.1);
  --accent: #3B82F6;
  --gradient-from: #3B82F6;
  --gradient-to: #8B5CF6;
}

/* Gradient helpers */
.gradient-bg {
  background-image: linear-gradient(90deg, var(--gradient-from), var(--gradient-to));
  color: #fff;
}
.gradient-text {
  background-image: linear-gradient(90deg, var(--gradient-from), var(--gradient-to));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Ripple effect */
.ripple { position: absolute; border-radius: 50%; pointer-events: none; inset: 0; margin: auto; width: 5px; height: 5px; background: rgba(255,255,255,0.5); animation: ripple 0.6s ease-out; }
@keyframes ripple { from { transform: scale(1); opacity: 0.7; } to { transform: scale(40); opacity: 0; } }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(16px); transition: all 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }
.fade-in { opacity: 0; transform: translateY(24px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* Subtle float */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.animate-float { animation: floaty 3s ease-in-out infinite; }
