/* ==========================================================================
   APP TEMPLATE - MOBILE APP LANDING PAGE
   Primary: Electric Blue #3B82F6
   Secondary: Purple #8B5CF6
   Accent: Green #10B981
   ========================================================================== */

/* ==========================================================================
   BASE & TYPOGRAPHY
   ========================================================================== */

:root {
    /* Colors */
    --electric-blue: #3B82F6;
    --deep-blue: #2563EB;
    --purple: #8B5CF6;
    --deep-purple: #7C3AED;
    --green: #10B981;
    --dark-green: #059669;

    /* Typography Scale */
    --text-hero: clamp(3rem, 8vw, 6rem);
    --text-display: clamp(2.5rem, 5vw, 4rem);
    --text-h1: clamp(2rem, 4vw, 3rem);
    --text-h2: clamp(1.5rem, 3vw, 2.25rem);
    --text-h3: clamp(1.25rem, 2vw, 1.5rem);
    --text-body: 1rem;
    --text-small: 0.875rem;
    --text-xs: 0.75rem;

    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Border Radius Scale */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 60px rgba(59, 130, 246, 0.3);
    --shadow-glow-purple: 0 0 60px rgba(139, 92, 246, 0.3);
    --shadow-glow-green: 0 0 60px rgba(16, 185, 129, 0.3);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    color: #1F2937;
    background: #FFFFFF;
    overflow-x: hidden;
}

body.dark {
    color: #F9FAFB;
    background: #0F172A;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: fixed;
    z-index: 100;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    padding: 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background: var(--electric-blue);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

.reveal-blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-blur.active {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Stagger delays for grid items */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ==========================================================================
   HOVER ANIMATIONS
   ========================================================================== */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
}

body.dark .hover-lift:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.25);
}

.hover-zoom {
    overflow: hidden;
}

.hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-zoom:hover img {
    transform: scale(1.05);
}

.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::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 ease;
    z-index: 1;
}

.hover-shine:hover::before {
    left: 100%;
}

/* ==========================================================================
   CONTINUOUS ANIMATIONS
   ========================================================================== */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.animate-float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

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

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes subtle-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-bounce-subtle {
    animation: subtle-bounce 2s ease-in-out infinite;
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ==========================================================================
   PHONE MOCKUP STYLES
   ========================================================================== */

.phone-mockup {
    position: relative;
    width: 300px;
    height: 600px;
    background: linear-gradient(145deg, #1F2937, #111827);
    border-radius: 36px;
    padding: 12px;
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        0 30px 60px -30px rgba(59, 130, 246, 0.3);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 20px;
    background: #000;
    border-radius: 0 0 20px 20px;
    z-index: 2;
}

.phone-mockup::after {
    content: '';
    position: absolute;
    top: 26px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 6px;
    background: #1F2937;
    border-radius: 3px;
    z-index: 3;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    border-radius: 28px;
    overflow: hidden;
    position: relative;
}

body.dark .phone-screen {
    background: #0F172A;
}

/* ==========================================================================
   GRADIENT BACKGROUNDS
   ========================================================================== */

.bg-gradient-blue {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.bg-gradient-green {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.bg-gradient-mesh {
    background:
        radial-gradient(at 40% 20%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(16, 185, 129, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 80%, rgba(59, 130, 246, 0.15) 0px, transparent 50%);
}

body.dark .bg-gradient-mesh {
    background:
        radial-gradient(at 40% 20%, rgba(59, 130, 246, 0.25) 0px, transparent 50%),
        radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.25) 0px, transparent 50%),
        radial-gradient(at 0% 50%, rgba(16, 185, 129, 0.25) 0px, transparent 50%),
        radial-gradient(at 80% 80%, rgba(59, 130, 246, 0.25) 0px, transparent 50%);
}

.text-gradient {
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #10B981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   DECORATIVE ELEMENTS
   ========================================================================== */

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
}

.blob-blue {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
}

.blob-purple {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
}

.blob-green {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
}

.grid-pattern {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

body.dark .grid-pattern {
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
}

.glow {
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.3);
}

.glow-purple {
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.3);
}

.glow-green {
    box-shadow: 0 0 60px rgba(16, 185, 129, 0.3);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: transparent;
    color: #3B82F6;
    border: 2px solid #3B82F6;
}

body.dark .btn-secondary {
    color: #60A5FA;
    border-color: #60A5FA;
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-dark {
    background: #1F2937;
    color: white;
}

body.dark .btn-dark {
    background: white;
    color: #1F2937;
}

.btn-dark:hover {
    background: #111827;
}

body.dark .btn-dark:hover {
    background: #F3F4F6;
}

/* App Store Buttons */
.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #000;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

body.dark .app-store-btn {
    background: white;
    color: #000;
}

.app-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.app-store-btn svg {
    width: 24px;
    height: 24px;
}

.app-store-btn .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.app-store-btn .btn-text-small {
    font-size: 0.625rem;
    opacity: 0.8;
}

.app-store-btn .btn-text-large {
    font-size: 1.125rem;
    font-weight: 600;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.dark .card {
    background: #1E293B;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.card-border {
    border: 1px solid #E5E7EB;
}

body.dark .card-border {
    border-color: #334155;
}

.feature-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2.5rem;
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

body.dark .feature-card {
    background: #1E293B;
    border-color: #334155;
}

.feature-card:hover {
    border-color: #3B82F6;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}

body.dark .feature-card:hover {
    border-color: #60A5FA;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

body.dark .navbar {
    background: rgba(15, 23, 42, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.dark .navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
}

body.dark footer {
    background: #0F172A;
    border-top-color: #1E293B;
}

/* ==========================================================================
   REDUCED MOTION (REQUIRED)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-blur {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

/* ==========================================================================
   RESPONSIVE UTILITIES
   ========================================================================== */

@media (max-width: 768px) {
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
}

/* ==========================================================================
   PRICING CARDS
   ========================================================================== */

.pricing-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    border: 1px solid #E5E7EB;
    transition: all var(--transition-slow);
    position: relative;
}

body.dark .pricing-card {
    background: #1E293B;
    border-color: #334155;
}

.pricing-card.featured {
    border-color: var(--electric-blue);
    border-width: 2px;
}

.pricing-card.featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--electric-blue), var(--purple));
    color: white;
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-lg);
    background: white;
    color: #1F2937;
    font-size: var(--text-body);
    transition: all var(--transition-base);
}

body.dark .form-input {
    background: #1E293B;
    border-color: #334155;
    color: #F9FAFB;
}

.form-input:focus {
    outline: none;
    border-color: var(--electric-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

body.dark .form-label {
    color: #D1D5DB;
}

/* ==========================================================================
   TEAM CARDS
   ========================================================================== */

.team-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-2xl);
    border: 1px solid #E5E7EB;
    transition: all var(--transition-slow);
}

body.dark .team-card {
    background: #1E293B;
    border-color: #334155;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid rgba(59, 130, 246, 0.2);
}

/* ==========================================================================
   BLOG CARDS
   ========================================================================== */

.blog-card {
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    border: 1px solid #E5E7EB;
    transition: all var(--transition-slow);
}

body.dark .blog-card {
    background: #1E293B;
    border-color: #334155;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
}

/* ==========================================================================
   TESTIMONIAL CARDS
   ========================================================================== */

.testimonial-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    border: 1px solid #E5E7EB;
    transition: all var(--transition-slow);
}

body.dark .testimonial-card {
    background: #1E293B;
    border-color: #334155;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.testimonial-quote {
    font-size: var(--text-h3);
    font-style: italic;
    color: #374151;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

body.dark .testimonial-quote {
    color: #D1D5DB;
}

/* ==========================================================================
   SELECTION STYLES
   ========================================================================== */

::selection {
    background: rgba(59, 130, 246, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: inherit;
}

/* ==========================================================================
   SCROLLBAR STYLES
   ========================================================================== */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

body.dark ::-webkit-scrollbar-track {
    background: #1E293B;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 5px;
}

body.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

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

body.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748B;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .navbar,
    .mobile-menu,
    .blob,
    footer {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .reveal-blur {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

section {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

.animate-float,
.animate-gradient,
.phone-mockup {
    will-change: transform;
}

/* ==========================================================================
   FOCUS STATES
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--electric-blue);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--electric-blue);
    outline-offset: 2px;
}
