/* Apple-inspired theme styles for Version 5 */
/* Focus on smooth interactions and sophisticated visual elements */

/* Apple-inspired custom properties */
:root {
    /* Apple system colors (extended) */
    --apple-blue-light: #5AC8FA;
    --apple-blue-dark: #0A84FF;
    --apple-green-light: #30D158;
    --apple-green-dark: #32D74B;
    --apple-indigo: #5856D6;
    --apple-mint: #00C7BE;
    --apple-cyan: #32ADE6;
    
    /* Apple glassmorphism effects */
    --glass-ultra-thin: rgba(255, 255, 255, 0.05);
    --glass-thin: rgba(255, 255, 255, 0.08);
    --glass-regular: rgba(255, 255, 255, 0.12);
    --glass-thick: rgba(255, 255, 255, 0.18);
    
    /* Apple blur effects */
    --blur-light: blur(10px);
    --blur-medium: blur(20px);
    --blur-heavy: blur(40px);
    
    /* Apple motion curves */
    --ease-in-out-quart: cubic-bezier(0.77, 0, 0.175, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
    --ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Apple spacing ratios */
    --golden-ratio: 1.618;
    --apple-spacing-unit: 8px;
}

/* Enhanced glassmorphism for header */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Smooth header scroll effect */
.header.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

/* Enhanced logo with subtle animation */
.logo {
    transition: transform var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.05);
}

/* Advanced navigation link effects */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.nav-link:hover::before {
    left: 100%;
}

/* Enhanced version navigation */
.version-link {
    position: relative;
    overflow: hidden;
}

.version-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--apple-blue);
    transform: scale(0);
    transition: transform var(--transition-bounce);
    border-radius: inherit;
}

.version-link:hover::before {
    transform: scale(1);
}

.version-link span {
    position: relative;
    z-index: 1;
}

/* Enhanced hero section with Apple-style gradients */
.hero {
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #f093fb 50%, 
        #f5576c 75%, 
        #4facfe 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0.8;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 40%, 
        transparent 70%);
    animation: rotate 20s linear infinite;
}

/* Enhanced floating cards with Apple-style depth */
.floating-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 2px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.floating-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
}

.floating-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Enhanced buttons with Apple-style depth and animation */
.cta-primary {
    background: var(--white);
    color: var(--gray-900);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 1px 4px rgba(0, 0, 0, 0.08);
}

.cta-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s ease;
}

.cta-primary:hover::before {
    left: 100%;
}

.cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 40px rgba(0, 0, 0, 0.15),
        0 4px 20px rgba(0, 0, 0, 0.1);
}

.cta-secondary {
    position: relative;
    overflow: hidden;
}

.cta-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform var(--transition-bounce);
    border-radius: inherit;
}

.cta-secondary:hover::before {
    transform: scale(1);
}

/* Enhanced service cards with Apple-style elevation */
.service-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--apple-blue), 
        var(--apple-purple), 
        var(--apple-pink));
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 8px 32px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Enhanced feature tags with Apple-style pill design */
.feature-tag {
    background: var(--gray-50);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--apple-blue);
    transform: scale(0);
    transition: transform var(--transition-bounce);
    border-radius: inherit;
}

.feature-tag:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.feature-tag:hover::before {
    transform: scale(1);
}

.feature-tag span {
    position: relative;
    z-index: 1;
}

/* Enhanced visual grid with Apple-style spacing */
.visual-item {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.visual-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        var(--apple-blue) 0%, 
        var(--apple-purple) 100%);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.visual-item:hover::before {
    opacity: 0.1;
}

.visual-item:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.1),
        0 6px 24px rgba(0, 0, 0, 0.08);
}

/* Enhanced work cards with Apple-style interaction */
.work-item {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.work-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        var(--apple-green), 
        var(--apple-blue), 
        var(--apple-purple));
    transform: scaleX(0);
    transition: transform var(--transition-smooth);
}

.work-item:hover::before {
    transform: scaleX(1);
}

.work-item:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 24px 72px rgba(0, 0, 0, 0.08),
        0 12px 36px rgba(0, 0, 0, 0.06);
}

/* Enhanced work tags with Apple-style interaction */
.work-tag {
    background: var(--gray-50);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.work-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--apple-green);
    transform: scale(0);
    transition: transform var(--transition-bounce);
    border-radius: inherit;
}

.work-tag:hover {
    color: var(--white);
    transform: translateY(-2px);
}

.work-tag:hover::before {
    transform: scale(1);
}

/* Enhanced testimonial cards with Apple-style depth */
.testimonial-card {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--apple-orange), 
        var(--apple-pink), 
        var(--apple-purple));
}

.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 0, 0, 0.1), 
        transparent);
}

/* Enhanced form elements with Apple-style focus states */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--apple-blue);
    box-shadow: 
        0 0 0 3px rgba(0, 122, 255, 0.1),
        0 2px 8px rgba(0, 122, 255, 0.08);
    transform: translateY(-2px);
}

.form-group input,
.form-group textarea {
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all var(--transition-smooth);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(0, 122, 255, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Enhanced footer with Apple-style subtle gradients */
.footer {
    background: linear-gradient(135deg, 
        var(--gray-900) 0%, 
        var(--gray-800) 100%);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
}

/* Enhanced version badge with Apple-style design */
.version-badge {
    background: linear-gradient(135deg, 
        var(--apple-blue) 0%, 
        var(--apple-purple) 100%);
    box-shadow: 
        0 2px 8px rgba(0, 122, 255, 0.3),
        0 1px 4px rgba(0, 122, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.version-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

/* Advanced animations with Apple-style easing */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float-gentle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(1deg);
    }
    66% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

/* Apply gentle floating animation to cards */
.hero-visual .floating-card {
    animation: float-gentle 8s ease-in-out infinite;
}

.hero-visual .floating-card:nth-child(1) {
    animation-delay: 0s;
}

.hero-visual .floating-card:nth-child(2) {
    animation-delay: 2.67s;
}

.hero-visual .floating-card:nth-child(3) {
    animation-delay: 5.33s;
}

/* Enhanced scroll-triggered animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-expo);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s var(--ease-out-expo);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s var(--ease-out-expo);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s var(--ease-out-back);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Apple-style loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: shimmer 2s infinite;
}

/* Enhanced responsive design with Apple-style breakpoints */
@media (max-width: 1024px) {
    .hero-visual .floating-card {
        animation: float-gentle 6s ease-in-out infinite;
    }
}

@media (max-width: 768px) {
    .hero::after {
        animation: rotate 15s linear infinite;
    }
    
    .hero-visual .floating-card {
        animation: float-gentle 4s ease-in-out infinite;
    }
}

@media (max-width: 480px) {
    .hero::after {
        display: none;
    }
    
    .hero-visual .floating-card {
        animation: none;
    }
}

/* Apple-style reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-visual .floating-card {
        animation: none;
    }
    
    .hero::after {
        animation: none;
    }
}

/* Apple-style dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1C1C1E;
        --gray-50: #2C2C2E;
        --gray-100: #3A3A3C;
        --gray-900: #FFFFFF;
    }
    
    .header {
        background: rgba(28, 28, 30, 0.85);
    }
    
    .service-card,
    .work-item,
    .testimonial-card {
        background: var(--gray-100);
        border-color: rgba(255, 255, 255, 0.1);
    }
}
