def get_landing_page_prompt(synthesis: dict, language: str = "ar", user_preferences: dict = None) -> list:
    lang_instruction = "Respond entirely in Arabic." if language == "ar" else "Respond entirely in English."

    # Extract relevant data from synthesis
    project_name = synthesis.get("project_description", "")[:200]
    exec_summary = synthesis.get("executive_summary", "")[:500]
    usp = synthesis.get("usp", "")

    # Business Model Canvas insights
    bmc = synthesis.get("business_model_canvas", {})
    value_props = bmc.get("value_propositions", []) if isinstance(bmc, dict) else []

    # Target audience
    target_audience = synthesis.get("target_audience", [])

    # Marketing strategy
    marketing = synthesis.get("marketing_strategy", {})
    positioning = marketing.get("positioning", "") if isinstance(marketing, dict) else ""

    # User preferences
    purpose = user_preferences.get("purpose", "lead_generation") if user_preferences else "lead_generation"
    tone = user_preferences.get("tone", "professional") if user_preferences else "professional"
    cta_focus = user_preferences.get("cta_focus", "get_started") if user_preferences else "get_started"
    design_style = user_preferences.get("design_style", "modern") if user_preferences else "modern"

    return [
        {
            "role": "system",
            "content": (
                "You are an expert conversion copywriter and landing page specialist. "
                "Create compelling, high-converting landing page content based on a business feasibility report. "
                f"{lang_instruction}\n\n"
                "Return your response as valid JSON with this structure:\n"
                "{\n"
                "  'hero_section': {\n"
                "    'headline': string (compelling, under 15 words),\n"
                "    'subheadline': string (supporting message, under 30 words),\n"
                "    'primary_cta': string (action-oriented, under 5 words),\n"
                "    'secondary_cta': string (optional, under 5 words),\n"
                "    'hero_description': string (context for image selection)\n"
                "  },\n"
                "  'value_proposition_section': {\n"
                "    'section_title': string,\n"
                "    'benefits': [\n"
                "      {\n"
                "        'title': string (under 8 words),\n"
                "        'description': string (1-2 sentences),\n"
                "        'icon': string (emoji or icon name)\n"
                "      }\n"
                "    ]\n"
                "  },\n"
                "  'about_section': {\n"
                "    'title': string,\n"
                "    'content': string (2-3 paragraphs, compelling story),\n"
                "    'key_highlights': [string] (bullet points)\n"
                "  },\n"
                "  'features_section': {\n"
                "    'title': string,\n"
                "    'features': [\n"
                "      {\n"
                "        'title': string,\n"
                "        'description': string,\n"
                "        'image_prompt': string (for AI image generation)\n"
                "      }\n"
                "    ]\n"
                "  },\n"
                "  'social_proof_section': {\n"
                "    'title': string,\n"
                "    'testimonials': [\n"
                "      {\n"
                "        'quote': string,\n"
                "        'author': string,\n"
                "        'role': string\n"
                "      }\n"
                "    ],\n"
                "    'trust_badges': [string] (achievements, numbers)\n"
                "  },\n"
                "  'cta_section': {\n"
                "    'title': string (final call-to-action),\n"
                "    'description': string,\n"
                "    'button_text': string,\n"
                "    'contact_info': {\n"
                "      'email': string,\n"
                "      'phone': string,\n"
                "      'address': string\n"
                "    }\n"
                "  },\n"
                "  'seo_metadata': {\n"
                "    'meta_title': string (50-60 characters),\n"
                "    'meta_description': string (150-160 characters),\n"
                "    'keywords': [string] (5-8 relevant keywords)\n"
                "  },\n"
                "  'design_suggestions': {\n"
                "    'color_palette': {\n"
                "      'primary': string (hex code),\n"
                "      'secondary': string (hex code),\n"
                "      'accent': string (hex code)\n"
                "    },\n"
                "    'layout_recommendation': string,\n"
                "    'image_style': string\n"
                "  }\n"
                "}\n\n"
                "CRITICAL REQUIREMENTS:\n"
                "- Write compelling, conversion-focused copy\n"
                "- Use psychological triggers (urgency, scarcity, social proof)\n"
                "- Focus on benefits, not features\n"
                "- Include clear calls-to-action\n"
                "- Optimize for SEO with relevant keywords\n"
                "- Ensure mobile-first readability\n"
                "- Use the business's unique value proposition prominently\n"
                f"- Tone: {tone}\n"
                f"- Primary Goal: {purpose}\n"
                f"- CTA Focus: {cta_focus}\n"
                f"- Design Style: {design_style}"
            ),
        },
        {
            "role": "user",
            "content": (
                f"Create a high-converting landing page for this business:\n\n"
                f"## Business Overview\n"
                f"Name: {project_name}\n"
                f"Description: {exec_summary}\n\n"
                f"## Unique Value Proposition\n"
                f"{usp}\n"
                f"Value Propositions: {', '.join(str(v) for v in value_props[:3])}\n\n"
                f"## Target Audience\n"
                f"{', '.join(a.get('persona_name', '') for a in target_audience[:3] if isinstance(a, dict))}\n\n"
                f"## Market Positioning\n"
                f"{positioning}\n\n"
                "Create landing page content that:\n"
                "1. Grabs attention immediately with the hero section\n"
                "2. Clearly communicates value proposition\n"
                "3. Builds trust with social proof\n"
                "4. Drives action with compelling CTAs\n"
                "5. Is optimized for conversions and SEO"
            ),
        },
    ]