/* Tech Startup Template - Custom Code Demo */
/* Built with HTML5, CSS3, Tailwind CSS */
/* Theme: Purple/Pink/Black - Dark Mode, Futuristic, Advanced CSS */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    color: #ffffff;
    background-color: #0f172a;
    overflow-x: hidden;
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom Tailwind Config */
.font-space-grotesk {
    font-family: 'Space Grotesk', sans-serif;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* Navigation */
nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Hero Section */
#home {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

/* Gradient Animations */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Floating Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-3deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
    animation-delay: 2s;
}

/* Features Section */
#features {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* Feature Cards */
.feature-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.25);
}

/* Solutions Section */
#solutions {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #581c87 100%);
}

/* About Section */
#about {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
}

/* Footer */
footer {
    background: #0f172a;
    border-top: 1px solid #1e293b;
}

/* Custom Animations */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
    }
}

.glow-effect {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* 3D Transform Effects */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d {
    transform: rotateX(5deg) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: rotateX(0deg) rotateY(0deg) translateY(-10px);
}

/* Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Neon Glow Effects */
.neon-purple {
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5),
                 0 0 20px rgba(139, 92, 246, 0.3),
                 0 0 30px rgba(139, 92, 246, 0.2);
}

.neon-pink {
    text-shadow: 0 0 10px rgba(236, 72, 153, 0.5),
                 0 0 20px rgba(236, 72, 153, 0.3),
                 0 0 30px rgba(236, 72, 153, 0.2);
}

/* Interactive Elements */
.interactive-element {
    position: relative;
    overflow: hidden;
}

.interactive-element::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.interactive-element:hover::before {
    left: 100%;
}

/* Performance Badge */
.performance-badge {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll-triggered Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-left {
    opacity: 0;
    animation: slideInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    opacity: 0;
    animation: slideInRight 0.8s ease-out forwards;
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Button Hover Effects */
.btn-gradient {
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
    transition: left 0.3s ease;
}

.btn-gradient:hover::before {
    left: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    nav .nav-menu {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .floating-elements {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .solution-card {
        padding: 1.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    body {
        background: #000;
        color: #fff;
    }

    .feature-card,
    .solution-card {
        border: 2px solid #7c3aed;
    }

    .btn-gradient {
        background: #fff;
        color: #000;
        border: 2px solid #fff;
    }
}

/* Focus States */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .performance-badge,
    nav,
    .cta-section {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        background: white !important;
        color: black !important;
    }

    .feature-card,
    .solution-card {
        border: 1px solid #000;
        background: white !important;
        color: black !important;
    }
}

/* Dark Mode (Already Dark) */
@media (prefers-color-scheme: light) {
    /* This template is designed for dark mode */
    body {
        background: #0f172a;
        color: #ffffff;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
}

/* Page Load Animation */
body {
    opacity: 0;
    animation: pageLoad 0.8s ease-out forwards;
}

@keyframes pageLoad {
    to {
        opacity: 1;
    }
}

/* Performance Monitoring */
.performance-monitor {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 1000;
    display: none;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.performance-monitor.show {
    display: block;
}

/* Advanced CSS Demo */
.advanced-css-demo {
    position: relative;
}

/* Clip Path Animations */
.clip-path-demo {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transition: clip-path 0.6s ease;
}

.clip-path-demo:hover {
    clip-path: polygon(10% 0, 90% 0, 100% 100%, 0% 100%);
}

/* CSS Grid Advanced Layouts */
.advanced-grid {
    display: grid;
    grid-template-areas:
        "header header header"
        "sidebar main main"
        "footer footer footer";
    gap: 1rem;
}

/* Custom Properties for Theme */
:root {
    --primary-gradient: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
    --secondary-gradient: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%);
    --glow-color: rgba(139, 92, 246, 0.5);
}

/* Advanced Hover Effects */
.advanced-hover {
    position: relative;
    overflow: hidden;
}

.advanced-hover::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.advanced-hover:hover::after {
    width: 300px;
    height: 300px;
}

/* Futuristic Loading States */
.loading-futuristic {
    position: relative;
    overflow: hidden;
}

.loading-futuristic::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--primary-gradient), transparent);
    animation: loading-shimmer 2s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Particle Effects (CSS Only) */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--glow-color);
    border-radius: 50%;
    animation: particle-float 10s infinite linear;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 6s; }
.particle:nth-child(8) { left: 80%; animation-delay: 7s; }
.particle:nth-child(9) { left: 90%; animation-delay: 8s; }

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}