<?php

declare(strict_types=1);

return [
    'brand' => [
        'name' => 'Nova Cards',
        'subtitle' => 'Create beautiful quote cards, mood cards, and visual text art.',
    ],

    'formats' => [
        'square' => ['width' => 1080, 'height' => 1080, 'label' => 'Square'],
        'portrait' => ['width' => 1080, 'height' => 1350, 'label' => 'Portrait'],
        'story' => ['width' => 1080, 'height' => 1920, 'label' => 'Story'],
        'landscape' => ['width' => 1920, 'height' => 1080, 'label' => 'Landscape'],
    ],

    'validation' => [
        'quote_min' => 3,
        'quote_max' => 420,
        'title_min' => 3,
        'title_max' => 120,
        'description_max' => 500,
        'max_tags' => 8,
        'max_decorations' => 6,
        'max_text_blocks' => 8,
        'max_asset_items' => 12,
        'max_background_upload_bytes' => 8 * 1024 * 1024,
        'allowed_background_mimes' => [
            'image/jpeg',
            'image/png',
            'image/webp',
        ],
        'allowed_alignments' => ['left', 'center', 'right'],
        'allowed_layouts' => ['quote_heavy', 'author_emphasis', 'centered', 'minimal'],
        'allowed_overlay_styles' => ['none', 'dark-soft', 'dark-strong', 'light-soft'],
        'allowed_positions' => ['top', 'upper-middle', 'center', 'lower-middle', 'bottom'],
        'allowed_blur_levels' => [0, 4, 8, 12, 20],
        'allowed_opacity_levels' => [20, 35, 50, 65, 80],
        'allowed_padding_presets' => ['tight', 'comfortable', 'airy'],
        'allowed_max_widths' => ['compact', 'balanced', 'wide'],
    ],

    'storage' => [
        'public_disk' => env('NOVA_CARDS_PUBLIC_DISK', 'public'),
        'private_disk' => env('NOVA_CARDS_PRIVATE_DISK', 'local'),
        'public_prefix' => 'cards',
        'background_original_prefix' => 'cards/backgrounds/original',
        'background_processed_prefix' => 'cards/backgrounds/processed',
        'preview_prefix' => 'cards/previews',
    ],

    'render' => [
        'queue'             => env('NOVA_CARDS_QUEUE', 'default'),
        'preview_quality'   => 86,
        'og_quality'        => 88,
        'preview_format'    => 'webp',
        'og_format'         => 'jpg',
        // Directory containing TrueType font files named {preset}.ttf and default.ttf.
        'fonts_dir'         => env('NOVA_CARDS_FONTS_DIR', storage_path('app/fonts')),
    ],

    // Set NOVA_CARDS_PLAYWRIGHT_RENDER=true to use the CSS/Playwright renderer
    // instead of the GD fallback. Requires Node.js + `npx playwright install chromium`.
    'playwright_render' => (bool) env('NOVA_CARDS_PLAYWRIGHT_RENDER', false),

    'seed_demo_cards' => [
        'enabled' => (bool) env('NOVA_CARDS_SEED_DEMO_CARDS', false),
        'user' => [
            'username' => env('NOVA_CARDS_DEMO_USERNAME', 'nova.cards'),
            'name' => env('NOVA_CARDS_DEMO_NAME', 'Nova Cards'),
            'email' => env('NOVA_CARDS_DEMO_EMAIL', 'nova-cards-demo@skinbase.test'),
            'password' => env('NOVA_CARDS_DEMO_PASSWORD', 'password'),
        ],
    ],

    'rate_limits' => [
        'drafts' => ['per_user' => 20, 'per_ip' => 40],
        'autosave' => ['per_user' => 120, 'per_ip' => 240],
        'publish' => ['per_user' => 12, 'per_ip' => 24],
        'background_upload' => ['per_user' => 30, 'per_ip' => 60],
        'render' => ['per_user' => 30, 'per_ip' => 60],
    ],

    'font_presets' => [
        'modern-sans' => [
            'label' => 'Modern Sans',
            'family' => 'Inter, sans-serif',
            'render_family' => 'arial',
            'weight' => '600',
            'recommended_use' => 'Clean motivational cards and bold statements.',
        ],
        'elegant-serif' => [
            'label' => 'Elegant Serif',
            'family' => '"Playfair Display", serif',
            'render_family' => 'georgia',
            'weight' => '700',
            'recommended_use' => 'Classic quotes and romantic layouts.',
        ],
        'bold-poster' => [
            'label' => 'Bold Poster',
            'family' => 'Anton, sans-serif',
            'render_family' => 'arial-black',
            'weight' => '700',
            'recommended_use' => 'High-contrast poster-like statements.',
        ],
        'soft-handwritten' => [
            'label' => 'Soft Handwritten',
            'family' => 'Caveat, cursive',
            'render_family' => 'comic-sans',
            'weight' => '400',
            'recommended_use' => 'Warm, intimate, diary-like cards.',
        ],
        'minimal-editorial' => [
            'label' => 'Minimal Editorial',
            'family' => '"Libre Franklin", sans-serif',
            'render_family' => 'trebuchet',
            'weight' => '600',
            'recommended_use' => 'Minimal editorial compositions.',
        ],
        'dreamy-aesthetic' => [
            'label' => 'Dreamy Aesthetic',
            'family' => '"Cormorant Garamond", serif',
            'render_family' => 'palatino',
            'weight' => '600',
            'recommended_use' => 'Poetry, wallpaper quotes, and soft mood cards.',
        ],
    ],

    'gradient_presets' => [
        'midnight-nova' => ['label' => 'Midnight Nova', 'colors' => ['#0f172a', '#1d4ed8']],
        'soft-pastel' => ['label' => 'Soft Pastel', 'colors' => ['#f9a8d4', '#c4b5fd']],
        'amber-glow' => ['label' => 'Amber Glow', 'colors' => ['#451a03', '#f59e0b']],
        'emerald-bloom' => ['label' => 'Emerald Bloom', 'colors' => ['#052e16', '#34d399']],
        'romantic-dusk' => ['label' => 'Romantic Dusk', 'colors' => ['#4c0519', '#fb7185']],
        'deep-cinema' => ['label' => 'Deep Cinema', 'colors' => ['#020617', '#334155']],
        'dream-glow' => ['label' => 'Dream Glow', 'colors' => ['#312e81', '#ec4899']],
        'nature-calm' => ['label' => 'Nature Calm', 'colors' => ['#064e3b', '#93c5fd']],
    ],

    'decor_presets' => [
        ['key' => 'sparkle-cluster', 'label' => 'Sparkles', 'glyph' => '✦'],
        ['key' => 'soft-heart', 'label' => 'Heart', 'glyph' => '♥'],
        ['key' => 'moon-stars', 'label' => 'Moon', 'glyph' => '☾'],
        ['key' => 'minimal-dot', 'label' => 'Dot', 'glyph' => '•'],
        ['key' => 'asterisk-burst', 'label' => 'Burst', 'glyph' => '✷'],
    ],

    'asset_packs' => [
        [
            'slug' => 'official-celestial',
            'name' => 'Official Celestial Pack',
            'description' => 'Sparkles, moons, and accent glyphs tuned for dreamy Nova Cards compositions.',
            'type' => 'asset',
            'official' => true,
            'active' => true,
            'manifest_json' => [
                'items' => [
                    ['key' => 'nova-sparkle', 'label' => 'Nova Sparkle', 'type' => 'glyph', 'glyph' => '✦'],
                    ['key' => 'nova-moon', 'label' => 'Moon Accent', 'type' => 'glyph', 'glyph' => '☾'],
                    ['key' => 'nova-heart', 'label' => 'Soft Heart', 'type' => 'glyph', 'glyph' => '♥'],
                ],
            ],
        ],
        [
            'slug' => 'official-editorial-frames',
            'name' => 'Editorial Frame Pack',
            'description' => 'Minimal frame treatments and lines for poster-style cards.',
            'type' => 'asset',
            'official' => true,
            'active' => true,
            'manifest_json' => [
                'items' => [
                    ['key' => 'line-top', 'label' => 'Top Line', 'type' => 'frame'],
                    ['key' => 'line-bottom', 'label' => 'Bottom Line', 'type' => 'frame'],
                ],
            ],
        ],
    ],

    'template_packs' => [
        [
            'slug' => 'official-story-pack',
            'name' => 'Official Story Pack',
            'description' => 'Tall layouts optimized for punchy story cards and serial prompts.',
            'type' => 'template',
            'official' => true,
            'active' => true,
            'manifest_json' => [
                'templates' => ['story-vertical', 'dream-glow'],
            ],
        ],
        [
            'slug' => 'official-editorial-pack',
            'name' => 'Official Editorial Pack',
            'description' => 'Minimal serif and poster templates for headline-driven cards.',
            'type' => 'template',
            'official' => true,
            'active' => true,
            'manifest_json' => [
                'templates' => ['classic-typography', 'golden-serif'],
            ],
        ],
    ],

    'background_modes' => [
        ['key' => 'template', 'label' => 'Template Base'],
        ['key' => 'gradient', 'label' => 'Gradient'],
        ['key' => 'solid', 'label' => 'Solid'],
        ['key' => 'upload', 'label' => 'Upload'],
    ],

    'layout_presets' => [
        ['key' => 'quote_heavy', 'label' => 'Quote Heavy'],
        ['key' => 'author_emphasis', 'label' => 'Author Emphasis'],
        ['key' => 'centered', 'label' => 'Centered'],
        ['key' => 'minimal', 'label' => 'Minimal'],
    ],

    'alignment_presets' => [
        ['key' => 'left', 'label' => 'Left'],
        ['key' => 'center', 'label' => 'Center'],
        ['key' => 'right', 'label' => 'Right'],
    ],

    'position_presets' => [
        ['key' => 'top', 'label' => 'Top'],
        ['key' => 'upper-middle', 'label' => 'Upper Middle'],
        ['key' => 'center', 'label' => 'Center'],
        ['key' => 'lower-middle', 'label' => 'Lower Middle'],
        ['key' => 'bottom', 'label' => 'Bottom'],
    ],

    'padding_presets' => [
        ['key' => 'tight', 'label' => 'Tight'],
        ['key' => 'comfortable', 'label' => 'Comfortable'],
        ['key' => 'airy', 'label' => 'Airy'],
    ],

    'max_width_presets' => [
        ['key' => 'compact', 'label' => 'Compact'],
        ['key' => 'balanced', 'label' => 'Balanced'],
        ['key' => 'wide', 'label' => 'Wide'],
    ],

    'line_height_presets' => [
        ['key' => 'tight', 'label' => 'Tight', 'value' => 1.05],
        ['key' => 'balanced', 'label' => 'Balanced', 'value' => 1.2],
        ['key' => 'airy', 'label' => 'Airy', 'value' => 1.38],
    ],

    'shadow_presets' => [
        ['key' => 'none', 'label' => 'None'],
        ['key' => 'soft', 'label' => 'Soft'],
        ['key' => 'strong', 'label' => 'Strong'],
    ],

    'focal_positions' => [
        ['key' => 'center', 'label' => 'Center'],
        ['key' => 'top', 'label' => 'Top'],
        ['key' => 'bottom', 'label' => 'Bottom'],
        ['key' => 'left', 'label' => 'Left'],
        ['key' => 'right', 'label' => 'Right'],
        ['key' => 'top-left', 'label' => 'Top Left'],
        ['key' => 'top-right', 'label' => 'Top Right'],
        ['key' => 'bottom-left', 'label' => 'Bottom Left'],
        ['key' => 'bottom-right', 'label' => 'Bottom Right'],
    ],

    'starter_templates' => [
        'minimal-black-white',
        'neon-nova',
        'soft-pastel',
        'romantic',
        'cinematic-dark',
        'golden-serif',
        'nature-calm',
        'bold-statement',
        'wallpaper-style',
        'story-vertical',
        'dream-glow',
        'classic-typography',
    ],

    // v3 additions

    'quote_mark_presets' => [
        ['key' => 'none', 'label' => 'None'],
        ['key' => 'classic', 'label' => 'Classic "…"'],
        ['key' => 'guillemets', 'label' => 'Guillemets «…»'],
        ['key' => 'large-open', 'label' => 'Large Open "'],
        ['key' => 'minimal-dash', 'label' => 'Dash —'],
        ['key' => 'decorative-star', 'label' => 'Star ✦'],
    ],

    'text_panel_styles' => [
        ['key' => 'none', 'label' => 'None'],
        ['key' => 'frosted', 'label' => 'Frosted Glass'],
        ['key' => 'dark-solid', 'label' => 'Dark Solid'],
        ['key' => 'light-solid', 'label' => 'Light Solid'],
        ['key' => 'outline', 'label' => 'Outline'],
        ['key' => 'editorial-rule', 'label' => 'Editorial Rule'],
    ],

    'frame_presets' => [
        ['key' => 'none', 'label' => 'None'],
        ['key' => 'thin-border', 'label' => 'Thin Border'],
        ['key' => 'double-line', 'label' => 'Double Line'],
        ['key' => 'corner-marks', 'label' => 'Corner Marks'],
        ['key' => 'editorial-top', 'label' => 'Editorial Top Rule'],
        ['key' => 'editorial-both', 'label' => 'Editorial Top & Bottom Rules'],
        ['key' => 'rounded-card', 'label' => 'Rounded Card'],
    ],

    'color_grade_presets' => [
        ['key' => 'none', 'label' => 'None'],
        ['key' => 'warm', 'label' => 'Warm'],
        ['key' => 'cool', 'label' => 'Cool'],
        ['key' => 'cinematic', 'label' => 'Cinematic'],
        ['key' => 'muted', 'label' => 'Muted'],
        ['key' => 'vivid', 'label' => 'Vivid'],
        ['key' => 'noir', 'label' => 'Noir'],
        ['key' => 'golden-hour', 'label' => 'Golden Hour'],
    ],

    'effect_presets' => [
        ['key' => 'none', 'label' => 'None'],
        ['key' => 'grain', 'label' => 'Film Grain'],
        ['key' => 'vignette', 'label' => 'Vignette'],
        ['key' => 'noise', 'label' => 'Noise'],
        ['key' => 'halftone', 'label' => 'Halftone'],
        ['key' => 'glitch', 'label' => 'Glitch'],
        ['key' => 'bokeh', 'label' => 'Bokeh'],
    ],

    'style_families' => [
        ['key' => 'aesthetic', 'label' => 'Aesthetic'],
        ['key' => 'editorial', 'label' => 'Editorial'],
        ['key' => 'cinematic', 'label' => 'Cinematic'],
        ['key' => 'minimal', 'label' => 'Minimal'],
        ['key' => 'bold', 'label' => 'Bold'],
        ['key' => 'romantic', 'label' => 'Romantic'],
        ['key' => 'dark', 'label' => 'Dark'],
        ['key' => 'pastel', 'label' => 'Pastel'],
        ['key' => 'retro', 'label' => 'Retro'],
        ['key' => 'nature', 'label' => 'Nature'],
    ],

    'palette_families' => [
        ['key' => 'monochrome', 'label' => 'Monochrome'],
        ['key' => 'warm-tones', 'label' => 'Warm Tones'],
        ['key' => 'cool-tones', 'label' => 'Cool Tones'],
        ['key' => 'earth-tones', 'label' => 'Earth Tones'],
        ['key' => 'pastels', 'label' => 'Pastels'],
        ['key' => 'neons', 'label' => 'Neons'],
        ['key' => 'jewel-tones', 'label' => 'Jewel Tones'],
    ],

    'mood_families' => [
        ['key' => 'romantic', 'label' => 'Romantic', 'tag_slugs' => ['romantic', 'love', 'tender']],
        ['key' => 'dark-poetry', 'label' => 'Dark Poetry', 'tag_slugs' => ['dark', 'shadow', 'night']],
        ['key' => 'inspirational', 'label' => 'Inspirational', 'tag_slugs' => ['inspire', 'hope', 'believe']],
        ['key' => 'soft-morning', 'label' => 'Soft Morning', 'tag_slugs' => ['calm', 'morning', 'peace']],
        ['key' => 'minimal', 'label' => 'Minimal', 'tag_slugs' => ['minimal', 'quiet', 'still']],
        ['key' => 'motivational', 'label' => 'Motivational', 'tag_slugs' => ['power', 'bold', 'fire']],
        ['key' => 'cyber-mood', 'label' => 'Cyber Mood', 'tag_slugs' => ['cyber', 'neon', 'digital']],
    ],

    'seasonal_hubs' => [
        ['key' => 'spring', 'label' => 'Spring', 'tag_slugs' => ['spring', 'bloom', 'floral']],
        ['key' => 'summer', 'label' => 'Summer', 'tag_slugs' => ['summer', 'sunlight', 'vacation']],
        ['key' => 'autumn', 'label' => 'Autumn', 'tag_slugs' => ['autumn', 'harvest', 'amber']],
        ['key' => 'winter', 'label' => 'Winter', 'tag_slugs' => ['winter', 'snow', 'frost']],
        ['key' => 'holiday', 'label' => 'Holiday', 'tag_slugs' => ['holiday', 'festive', 'celebration']],
    ],

    'export_formats' => [
        'preview' => ['width' => 1080, 'height' => 1080, 'format' => 'webp', 'label' => 'Preview (WebP)'],
        'hires' => ['width' => 2160, 'height' => 2160, 'format' => 'png', 'label' => 'Hi-Res PNG'],
        'square' => ['width' => 1080, 'height' => 1080, 'format' => 'png', 'label' => 'Square PNG'],
        'story' => ['width' => 1080, 'height' => 1920, 'format' => 'png', 'label' => 'Story PNG'],
        'wallpaper' => ['width' => 1920, 'height' => 1080, 'format' => 'png', 'label' => 'Wallpaper PNG'],
        'og' => ['width' => 1200, 'height' => 630, 'format' => 'jpg', 'label' => 'OG Image (JPG)'],
    ],

    'export_ttl_hours' => (int) env('NOVA_CARDS_EXPORT_TTL_HOURS', 48),
];
