<?php

use Illuminate\Support\Facades\Route;

Route::get('/', function () {
    $servicesData = [
        [
            'id' => 'video',
            'title' => 'Cinematic Production',
            'description' => 'From 4K corporate features to viral marketing spots, we handle end-to-end video creation with a focus on visual storytelling and high fidelity.',
            'icon' => 'Film',
        ],
        [
            'id' => 'design',
            'title' => 'Brand Identity & Design',
            'description' => 'Crafting compelling visual languages, including logo design, detailed style guides, print collateral, and digital asset creation.',
            'icon' => 'PenTool',
        ],
        [
            'id' => 'web',
            'title' => 'Modern Web Development',
            'description' => 'Building high-performance, SEO-optimized, and fully responsive web experiences using contemporary frameworks like React and Angular.',
            'icon' => 'Code',
        ],
        [
            'id' => 'photo',
            'title' => 'Advanced Photography',
            'description' => 'High-resolution professional photography, including corporate headshots, product imaging, and licensed aerial drone services.',
            'icon' => 'Camera',
        ],
    ];

    $portfolioData = [
        ['title' => 'The Launchpad - Case Study', 'type' => 'Web Development', 'tag' => 'UI/UX Design', 'color' => 'bg-blue-700/70', 'imagePlaceholder' => 'Web+Project'],
        ['title' => 'Aurora Campaign', 'type' => 'Video Production', 'tag' => '4K Commercial', 'color' => 'bg-orange-700/70', 'imagePlaceholder' => 'Video+Project'],
        ['title' => 'Realty Rebrand', 'type' => 'Graphic Design', 'tag' => 'Identity Guide', 'color' => 'bg-blue-900/70', 'imagePlaceholder' => 'Design+Project'],
        ['title' => 'Urban Rhythms', 'type' => 'Video Production', 'tag' => 'Documentary', 'color' => 'bg-orange-900/70', 'imagePlaceholder' => 'City+Video'],
        ['title' => 'E-commerce Redesign', 'type' => 'Web Development', 'tag' => 'React/UI', 'color' => 'bg-blue-500/70', 'imagePlaceholder' => 'Ecom+Project'],
    ];

    $animationFeatures = [
        ['title' => 'Motion Graphics', 'description' => 'Dynamic 2D and 3D animations for explainer videos, titles, and social media campaigns.', 'icon' => 'Film'],
        ['title' => '3D Modeling & Rendering', 'description' => 'Photo-realistic product visualizations, architectural walkthroughs, and complex scene creation.', 'icon' => 'PenTool'],
        ['title' => 'Visual Effects (VFX)', 'description' => 'Seamless integration of computer-generated imagery (CGI) into live-action footage.', 'icon' => 'Code'],
    ];

    $academyFeatures = [
        ['title' => 'E-learning Courses', 'description' => 'Self-paced, deep-dive modules on design software, web frameworks, and production techniques.', 'icon' => 'BookOpen'],
        ['title' => 'Workshops & Webinars', 'description' => 'Live, interactive sessions led by industry experts for hands-on skill development.', 'icon' => 'Zap'],
        ['title' => 'Corporate Training', 'description' => 'Customized programs designed to upskill your in-house teams on current digital best practices.', 'icon' => 'Briefcase'],
    ];

    $navItems = [
        ['id' => 'hero', 'label' => 'Top', 'icon' => 'ArrowUp'],
        ['id' => 'services', 'label' => 'Services', 'icon' => 'Grid'],
        ['id' => 'animations', 'label' => 'Animation', 'icon' => 'Zap'],
        ['id' => 'academy', 'label' => 'Academy', 'icon' => 'BookOpen'],
        ['id' => 'portfolio', 'label' => 'Work', 'icon' => 'Briefcase'],
        ['id' => 'contact', 'label' => 'Contact', 'icon' => 'Mail'],
    ];

    $filterOptions = ['All', 'Video Production', 'Graphic Design', 'Web Development'];

    $activeFilter = 'All';
    $isSubmitted = false;

    // Determine theme based on request or default to dark
    $isDark = !request()->has('theme') || request('theme') !== 'light';

    // Theme classes
    $themeClasses = $isDark ? [
        'sectionBg' => 'bg-gray-900',
        'sectionBgAlt' => 'bg-gray-950',
        'cardBg' => 'bg-gray-900',
        'cardBorder' => 'border-gray-800',
        'inputBg' => 'bg-gray-800',
        'inputBorder' => 'border-gray-700',
        'textNormal' => 'text-white',
        'textSecondary' => 'text-gray-400',
        'navBg' => 'bg-gray-900/70',
        'divider' => 'border-gray-800',
        'footerDivider' => 'border-blue-900/50',
        'isLight' => false,
    ] : [
        'sectionBg' => 'bg-gray-100',
        'sectionBgAlt' => 'bg-white',
        'cardBg' => 'bg-white',
        'cardBorder' => 'border-gray-300',
        'inputBg' => 'bg-white',
        'inputBorder' => 'border-gray-300',
        'textNormal' => 'text-gray-900',
        'textSecondary' => 'text-gray-600',
        'navBg' => 'bg-white/80',
        'divider' => 'border-gray-300',
        'footerDivider' => 'border-gray-300',
        'isLight' => true,
    ];

    return view('welcome', compact(
        'servicesData',
        'portfolioData',
        'animationFeatures',
        'academyFeatures',
        'navItems',
        'filterOptions',
        'isDark',
        'themeClasses',
        'activeFilter',
        'isSubmitted'
    ));
})->name('home');

// Photography Module Routes
Route::prefix('photography')->group(function () {
    Route::get('/', [\App\Http\Controllers\PhotographyController::class, 'index'])->name('photography.home');
    Route::get('/portfolio', [\App\Http\Controllers\PhotographyController::class, 'portfolio'])->name('photography.portfolio');
    Route::get('/services', [\App\Http\Controllers\PhotographyController::class, 'services'])->name('photography.services');
    Route::get('/booking', [\App\Http\Controllers\PhotographyController::class, 'booking'])->name('photography.booking');
});

// Design Module Routes
Route::prefix('design')->group(function () {
    Route::get('/', [\App\Http\Controllers\DesignController::class, 'index'])->name('design.home');
    Route::get('/portfolio', [\App\Http\Controllers\DesignController::class, 'portfolio'])->name('design.portfolio');
    Route::get('/pricing', [\App\Http\Controllers\DesignController::class, 'pricing'])->name('design.pricing');
    Route::get('/process', [\App\Http\Controllers\DesignController::class, 'process'])->name('design.process');
});

// Podcast Module Routes
Route::prefix('podcast')->group(function () {
    Route::get('/', [\App\Http\Controllers\PodcastController::class, 'index'])->name('podcast.home');
});

// Branding Module Routes
Route::prefix('branding')->group(function () {
    Route::get('/', [\App\Http\Controllers\BrandingController::class, 'index'])->name('branding.home');
});

// Livestream Module Routes
Route::prefix('livestream')->group(function () {
    Route::get('/', [\App\Http\Controllers\LivestreamController::class, 'index'])->name('livestream.home');
});

