/* Apple-esque Customizations */
:root {
    --apple-gray: #f5f5f7;
    --apple-blue: #0071e3;
    --apple-text: #1d1d1f;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #fff;
    color: var(--apple-text);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Smooth Fade Transitions for SPA Routing */
.page-section {
    display: none;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    animation: fadeIn 0.8s ease-out forwards;
}
.page-section.active {
    display: block;
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glassmorphism Navbar */
.glass-nav {
    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);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #fff; }
::-webkit-scrollbar-thumb { background: #d1d1d6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a1a1a6; }

/* Hide scrollbar for horizontal scroll sections */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Typography Utilities */
.hero-text { letter-spacing: -0.02em; line-height: 1.05; }
.sub-hero { letter-spacing: -0.01em; line-height: 1.4; }

/* AI Gradient Animation */
.ai-gradient-text {
    background: linear-gradient(to right, #2563eb, #9333ea, #db2777);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientMove 3s linear infinite;
}
@keyframes gradientMove {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.ai-card {
    background: linear-gradient(145deg, #ffffff, #f3f4f6);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Dashboard Screen Mockup Container */
.browser-mockup {
    border-radius: 12px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.15);
    background: #fff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
}
.browser-header {
    background: #f3f4f6;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Enhanced Float Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(1deg); }
}
.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Particle Background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    border-radius: 50%;
    opacity: 0;
    animation: particle-rise 12s infinite ease-out;
}
@keyframes particle-rise {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

/* Slide animations */
.slide-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}
.slide-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}
.slide-in-left.active, .slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Scale animation */
.scale-in {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.45s ease-out, transform 0.45s ease-out;
}
.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

/* Glow effect */
.glow-btn {
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
}
.glow-btn:hover {
    box-shadow: 0 0 50px rgba(37, 99, 235, 0.6);
    transform: scale(1.05);
}

/* Module card hover effects */
.module-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.module-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.module-card:hover .module-icon {
    transform: scale(1.15) rotate(5deg);
}
.module-icon {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Gradient border animation */
.gradient-border {
    position: relative;
    background: white;
}
.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 300% 100%;
    animation: gradient-slide 4s linear infinite;
}
@keyframes gradient-slide {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Stagger animation delays */
.stagger-1 { animation-delay: 0.1s; transition-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; transition-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; transition-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; transition-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; transition-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; transition-delay: 0.6s; }

/* Apple-inspired minimalism */
.apple-hero {
    background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%);
}

/* Meter.com-inspired parallax scroll */
.parallax-section {
    transform: translateY(var(--parallax-y, 0));
    transition: transform 0.1s linear;
}

/* Smooth reveal on scroll - enhanced */
.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Scale reveal */
.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Blur reveal */
.reveal-blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-blur.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Dashboard frame - Apple style */
.dashboard-frame {
    background: #000;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.3), 0 30px 60px -30px rgba(0, 0, 0, 0.3);
}
.dashboard-screen {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16/10;
}
.dashboard-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 14px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* Sticky text reveal */
.sticky-text {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
}

/* Apple-style large text */
.apple-headline {
    font-size: clamp(40px, 8vw, 96px);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.apple-subhead {
    font-size: clamp(19px, 2.5vw, 28px);
    font-weight: 400;
    letter-spacing: 0.004em;
    line-height: 1.4;
}

/* Smooth hover lift */
.hover-lift {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.page-section {
    display: none;
}
.page-section.active {
    display: block;
}
