/* Custom Fonts and Base Styles */
:root {
    --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-poppins: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-inter);
    background: white;
    color: #111827;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-inter {
    font-family: var(--font-inter);
}

.font-poppins {
    font-family: var(--font-poppins);
}

/* Animated Blobs */
@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.animate-shimmer {
    animation: shimmer 3s infinite;
}

/* Smooth Transitions */
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient Text */
.bg-clip-text {
    background-clip: text;
    -webkit-background-clip: text;
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Hero Section Enhancements */
section:first-of-type {
    perspective: 1000px;
}

section:first-of-type > div:last-child {
    perspective-origin: center;
}

/* Card Hover Effects */
.group {
    position: relative;
    overflow: hidden;
}

.group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.group:hover::before {
    animation: shimmer 0.6s ease-in-out;
}

/* Smooth Scale Transform */
button:active:not(:disabled) {
    transform: scale(0.98);
}

/* Text Selection Color */
::selection {
    background: #3b82f6;
    color: white;
}

::-moz-selection {
    background: #3b82f6;
    color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Form Elements */
input[type="email"],
textarea {
    transition: all 0.3s ease;
}

input[type="email"]:focus,
textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
        line-height: 1.1;
    }

    h2 {
        font-size: 1.875rem;
    }

    p {
        font-size: 0.95rem;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Slide In Animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(1px)) {
    .backdrop-blur-md {
        backdrop-filter: blur(12px);
    }
}

@supports not (backdrop-filter: blur(1px)) {
    .backdrop-blur-md {
        background-color: rgba(255, 255, 255, 0.8);
    }
}

/* Print Styles */
@media print {
    button,
    nav {
        display: none;
    }

    body {
        background: white;
    }
}

/* Dark Mode Support (Optional - can be enabled later) */
@media (prefers-color-scheme: dark) {
    /* Variables can be added here for dark mode */
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Scrollspy for sticky nav */
nav {
    will-change: transform, opacity;
}

/* Icon Sizing */
svg {
    flex-shrink: 0;
}

/* Link States */
a:visited {
    color: inherit;
}

a:active {
    opacity: 0.7;
}

/* Text Utilities */
.text-primary {
    color: #3b82f6;
}

.text-secondary {
    color: #6b7280;
}

.bg-primary {
    background-color: #3b82f6;
}

.bg-primary-light {
    background-color: #eff6ff;
}

/* Spacing Utilities */
.gap-safe {
    gap: max(1rem, env(safe-area-inset-right));
}

/* Component Enhancements */
.card {
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
    background: white;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

/* Button Variants */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.btn-primary:hover {
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #111827;
    border: 2px solid #d1d5db;
    cursor: pointer;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.btn-secondary:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Container Queries Support */
@supports (container-type: inline-size) {
    .container {
        container-type: inline-size;
    }
}

/* Grid Enhancements */
.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* Flex Center */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay Pattern */
.overlay-gradient {
    position: relative;
}

.overlay-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(59, 130, 246, 0.05) 100%);
    pointer-events: none;
}
