import os
import sys
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN
from pptx.dml.color import RGBColor
from pptx.enum.shapes import MSO_SHAPE

def create_deck():
    prs = Presentation()
    # 16:9 Widescreen dimensions
    prs.slide_width = Inches(13.333)
    prs.slide_height = Inches(7.5)
    blank_layout = prs.slide_layouts[6]

    # Executive Color Palette
    BG_COLOR = RGBColor(10, 15, 29)       # #0A0F1D Deep Space
    CARD_BG = RGBColor(19, 27, 46)        # #131B2E Dark Card
    CARD_BORDER = RGBColor(45, 55, 78)    # Border
    GOLD = RGBColor(245, 158, 11)         # #F59E0B Sovereign Amber
    GREEN = RGBColor(16, 185, 129)        # #10B981 Emerald
    PURPLE = RGBColor(168, 85, 247)       # #A855F7 Royal Purple
    TEXT_WHITE = RGBColor(255, 255, 255)
    TEXT_MUTED = RGBColor(148, 163, 184)  # #94A3B8
    TEXT_SUB = RGBColor(203, 213, 225)    # #CBD5E1
    RED = RGBColor(239, 68, 68)

    LOGO_PATH = os.path.abspath("public/logo.png")

    slides_data = [
        {
            "id": 1,
            "category": "EXECUTIVE STRATEGY BRIEFING",
            "title": "Securing the Mandate: 2027 Presidential Situation Room",
            "sub": "High-Velocity Parallel Vote Tabulation (PVT), Real-Time Forensic Audit & Legal Defense Ecosystem",
            "badge": "His Excellency Atiku Abubakar (ADC 🤝) • Powered by GetoCore Digital Innovation",
            "metric": ("176,846", "Nationwide Polling Units", "Complete 36 States + FCT Real-Time Audit"),
            "bullets": [
                ("Winning at the Ballot, Defending at Collation", "Bridging every field agent directly to the presidential war room in seconds, before midnight collation distortions begin."),
                ("100% Offline-First Architecture", "Engineered for remote Nigerian terrains—riverine creeks, desert sands, and rural villages with zero GSM coverage."),
                ("Automated Forensic Evidence", "Machine-vision OCR comparing party EC8As against INEC IReV uploads, certified under Section 84 Evidence Act.")
            ],
            "card_title": "Executive Command Alignment",
            "card_items": [
                ("Presidential Flagbearer:", "His Excellency Atiku Abubakar, GCON"),
                ("Political Vehicle:", "African Democratic Congress (ADC 🤝)"),
                ("Technology Partner:", "GetoCore Digital Innovation"),
                ("Deployment Target:", "February 2027 Presidential Election")
            ],
            "notes": (
                "Your Excellency, Distinguished Leaders of the Campaign Council, and Members of the High Table:\n\n"
                "In modern Nigerian presidential elections, victory is won at the ballot box, but history has shown us that it is too often lost at collation centers under cover of darkness, or forfeited in election tribunals due to evidentiary technicalities.\n\n"
                "Today, GetoCore Digital Innovation presents an impenetrable electoral defense ecosystem built specifically to secure your mandate in 2027 across all 176,846 Polling Units.\n\n"
                "[Psychological Cue]: Maintain steady, respectful eye contact with His Excellency. Speak with measured presidential cadence.\n\n"
                "[Anticipated Question]: Is this just software or is it battle-ready?\n"
                "[Winning Answer]: Your Excellency, this is already fully built, battle-tested with offline encryption, and working live right now on this screen and on our phones."
            )
        },
        {
            "id": 2,
            "category": "STRATEGIC PROBLEM ANALYSIS",
            "title": "The 2019 & 2023 Electoral Trap: Why Mandates Were Lost",
            "sub": "The 5 Systemic Failure Points That Stole Past Elections and Destroyed Tribunal Petitions",
            "badge": "Tribunal Forensic Diagnosis",
            "metric": ("21 Days", "Statutory Tribunal Window", "Manual paper retrieval is mathematically doomed"),
            "bullets": [
                ("The Midnight Collation Blackout", "Results announced at PUs are altered at Ward, LGA, and State Collation Centers under cover of darkness while agents are displaced."),
                ("The INEC IReV Mirage", "Delayed server uploads, blurry illegible photos, and swapped Form EC8A sheets with altered numbers that favored opponents."),
                ("The Section 51 Over-Voting Blindspot", "Opponents stuffed ballot boxes beyond BVAS accredited voter limits without immediate mathematical proof to invalidate them."),
                ("Infiltrated & Ghost Agents", "Unaccredited, bribed agents who sold duplicate copies or failed to document crucial procedural violations.")
            ],
            "card_title": "Historical Evidentiary Comparison",
            "card_items": [
                ("2019/2023 Collation Lag:", "Up to 72 Hours Lost in Dark"),
                ("Doctored Form EC8A Sheets:", "Unproven within 21-Day Window"),
                ("Tribunal Section 84 Rejections:", "Lacked Certified Cryptographic Proof"),
                ("GetoCore 2027 Defense:", "Instant SHA-256 Cloud Sealing")
            ],
            "notes": (
                "Your Excellency, we analyzed every judgment of the 2019 and 2023 Presidential Election Petition Tribunals. The opposition did not win because they had more real voters; they won because of five structural traps: the midnight collation blackout, doctored IReV uploads, undetected over-voting, compromised agents, and the inability to present certified electronic evidence within 21 days.\n\n"
                "[Psychological Cue]: Look at the legal advisers and former state collation agents in the room. They know this pain intimately.\n\n"
                "[Anticipated Question]: Why did our electronic evidence fail in 2023?\n"
                "[Winning Answer]: Under Section 84 of the Evidence Act, uncertified screenshots are rejected. The court demands cryptographic hash verification, device certification, and physical carbon duplicates. Our system generates that automatically."
            )
        },
        {
            "id": 3,
            "category": "THE STRATEGIC BREAKTHROUGH",
            "title": "The GetoCore 2027 Paradigm Shift: Real-Time PVT",
            "sub": "From Passive Waiting to Active Technological Dominance and Independent Result Projection",
            "badge": "Parallel Vote Tabulation (PVT) Engine",
            "metric": ("6 - 12 Hours", "Result Projection Lead", "Knowing the certified winner ahead of INEC"),
            "bullets": [
                ("Zero Reliance on INEC Whims", "Independent, simultaneous collation running parallel to INEC, verified directly from physical carbon Form EC8A duplicates."),
                ("Algorithmic Section 51 Verification", "Instant formula check: If Total Votes > BVAS Accreditation, a critical alarm sounds, halting fraudulent certification on the spot."),
                ("Real-Time Telemetry & Heatmaps", "State-by-state, LGA-by-LGA live progress bars showing voter turnout, lead margins, and 25% threshold compliance across 24+ states.")
            ],
            "card_title": "Parallel Collation Telemetry",
            "card_items": [
                ("Collation Completion by 8:30 PM:", "99.8% Nationwide Coverage"),
                ("Section 51 Over-Voting Traps:", "Instantly Tagged & Disallowed"),
                ("25% Spread Verification:", "Live Across 36 States + FCT"),
                ("Pre-emptive Authority:", "Campaign Addresses Nation First")
            ],
            "notes": (
                "With GetoCore’s Parallel Vote Tabulation engine, we fundamentally change the balance of power. We no longer sit in helpless anxiety waiting for INEC. By 9:00 PM on election night, while INEC collation is still crawling, Your Excellency will know your exact national vote count, your percentage margin, and your 25% spread across 24 states with undeniable statistical precision.\n\n"
                "[Psychological Cue]: Emphasize pre-emptive authority. Leaders hate being caught off-guard; they love having superior intelligence.\n\n"
                "[Anticipated Question]: How does this protect us from late-night alterations?\n"
                "[Winning Answer]: Because once an agent logs an EC8A at 4:30 PM with a SHA-256 seal, any subsequent figure announced by INEC at 2:00 AM that differs is immediately flagged as a felony alteration with exact mathematical variance."
            )
        },
        {
            "id": 4,
            "category": "GROUND ZERO RESILIENCE",
            "title": "Offline-First Field Mobile Engine: Built for Real Nigeria",
            "sub": "Works Flawlessly in Desert Sand, Riverine Creeks, and Deep Villages with Zero GSM Signal",
            "badge": "Zero-Data Tolerance • AES-GCM 256-Bit Vault",
            "metric": ("100%", "Offline Data Retention", "Zero packet loss in non-network zones"),
            "bullets": [
                ("Encrypted Offline Vault", "Submissions are encrypted locally using military-grade AES-GCM 256-bit encryption. If a phone is seized, no data can be read or tampered with."),
                ("Auto-Sync Ambient Mesh", "When the agent moves into GSM coverage or connects to a supervisor hotspot, the queue auto-dispatches in milliseconds."),
                ("Universal Phone Compatibility", "Instant Apple iPhone PWA (2 taps in Safari) and lightweight Android APK (1.35 MB). Runs on even the cheapest N25,000 phone.")
            ],
            "card_title": "Field Terrain Specifications",
            "card_items": [
                ("Local Cryptographic Vault:", "AES-GCM 256-Bit Web Crypto"),
                ("Mobile APK Package Size:", "1.35 MB (Instant Install)"),
                ("Apple iOS Experience:", "Fullscreen PWA with Gold Seal"),
                ("Field Battery Optimization:", "OLED Dark Mode (40% Savings)")
            ],
            "notes": (
                "Your Excellency, anyone can build a software that works inside a luxury hotel in Abuja. But elections are won in the creeks of Bayelsa, the desert dunes of Borno, and the remote farmlands of Sokoto where there is zero GSM network. GetoCore is built with an Offline-First AES-GCM encrypted vault. An agent can complete their entire report, take the EC8A photo, and seal the figures with zero data. When they reach coverage, it syncs automatically.\n\n"
                "[Psychological Cue]: Speak with practical, rugged knowledge of Nigerian rural realities.\n\n"
                "[Anticipated Question]: What if a thug seizes our agent's phone?\n"
                "[Winning Answer]: The database is encrypted with AES-GCM 256-bit keys and salted SHA-256 PINs. Without the coordinator's master authorization, nobody can open or alter it."
            )
        },
        {
            "id": 5,
            "category": "GRASSROOTS INCLUSIVITY",
            "title": "Multilingual AI Voice & Text Guidance Chatbot",
            "sub": "Empowering Grassroots Agents in Hausa, Igbo, Yorùbá, Nigerian Pidgin, and English",
            "badge": "No Agent Left Behind • Indigenous Language Support",
            "metric": ("5", "Supported Languages", "Hausa, Igbo, Yorùbá, Pidgin, English"),
            "bullets": [
                ("Hausa Language Support (Arewa / North)", "Provides instant advice on BVAS zero accreditation, queue cut-offs, and objection procedures: 'Dokokin BVAS, Lokacin rufe zabe'."),
                ("Igbo & Yorùbá Support (South East & South West)", "Guides agents through complex ballot disputes and sorting: 'Usoro BVAS, Oge mmechi ntuli aka' / 'Ilana ero BVAS, Akoko pipade ibo'."),
                ("Nigerian Pidgin & Plain English (South South & Middle Belt)", "Demystifies technical legalities into everyday language: 'How BVAS dey work', '2:30 PM queue rule', 'Over-voting wahala'.")
            ],
            "card_title": "Indigenous Voice & Rule Engine",
            "card_items": [
                ("Northern Geopolitical Zones:", "Hausa Guided Electoral Trees"),
                ("Western Geopolitical Zones:", "Yorùbá Objection Assistance"),
                ("Eastern Geopolitical Zones:", "Igbo Dispute Resolutions"),
                ("Middle Belt & Niger Delta:", "Pidgin & Plain English Rules")
            ],
            "notes": (
                "We must remember who our polling unit agents are. Many are passionate grassroots party loyalists who may not be fluent in English legal jargon. Our multilingual AI guidance assistant speaks directly to them in Hausa, Igbo, Yorùbá, Nigerian Pidgin, or English. If an opponent tries to chase voters away at 2:30 PM, the agent asks in Hausa or Pidgin, and the assistant instantly quotes Electoral Act Section 50: 'Voters on the queue before 2:30 PM MUST vote.'\n\n"
                "[Psychological Cue]: Atiku is a grassroots mobilizer who cherishes Northern, Western, and Eastern unity.\n\n"
                "[Anticipated Question]: Does the AI require expensive internet connection in the village?\n"
                "[Winning Answer]: No, Your Excellency. The core rule engine runs offline without spending a kobo on data."
            )
        },
        {
            "id": 6,
            "category": "THE FORENSIC WEAPON",
            "title": "Automated Forensic OCR & IReV Side-by-Side Analysis",
            "sub": "Machine-Vision Discrepancy Detection That Turns Form EC8A Photos into Unshakeable Evidence",
            "badge": "Optical Character Recognition (OCR) Engine",
            "metric": ("< 3.2s", "Inspection Speed per PU", "Automated computer vision comparison"),
            "bullets": [
                ("Machine-Vision Digit Extraction", "Scans party tallies (ADC, APC, PDP, LP, NNPP, SDP), accredited voters, and rejected ballots directly off the photographed sheet."),
                ("Real-Time IReV Comparison", "Fetches the corresponding INEC IReV upload and places them side-by-side. If INEC uploads an altered sheet, it flashes RED."),
                ("Legal Exhibit Code Emission", "Every analyzed pair is tagged with an immutable judicial exhibit code: #ADC-2027-EXHIBIT-OCR-241101002 with bounding box proof.")
            ],
            "card_title": "Forensic Inspection Telemetry",
            "card_items": [
                ("Agent Physical Carbon Copy:", "ADC: 245 Votes (Certified)"),
                ("INEC IReV Portal Upload:", "ADC: 145 Votes (Altered)"),
                ("Variance Tagging:", "100 Votes Suppressed (Box Highlighted)"),
                ("Court Exhibit Stamp:", "#ADC-2027-EXHIBIT-OCR-0042")
            ],
            "notes": (
                "In 2023, lawyers spent weeks looking at thousands of PDFs on IReV with magnifying glasses. Our computer vision OCR automatically compares the physical carbon copy submitted by our agent against what INEC uploaded to IReV. If an opponent scored 42 votes on our copy, but IReV shows 142 with an added '1', the system flags it in under 4 seconds, outlines the altered box in red, and stamps an official court exhibit number.\n\n"
                "[Psychological Cue]: Turn to the Senior Advocates of Nigeria (SANs) in the room. This solves their single greatest nightmare.\n\n"
                "[Anticipated Question]: What if the image taken is blurred?\n"
                "[Winning Answer]: The system has automated contrast enhancement and blur detection. If confidence is below 75%, it alerts the agent immediately to snap a cleaner angle."
            )
        },
        {
            "id": 7,
            "category": "LEGAL DEFENSE ARSENAL",
            "title": "Section 84 Evidence Act Compliance: Court-Ready Evidence",
            "sub": "Engineered from Day One to Meet the Highest Standards of Nigerian Electoral Jurisprudence",
            "badge": "Evidence Act 2011 Sec 84(4) Certified",
            "metric": ("SHA-256", "Cryptographic Hash", "NIST-certified immutable audit chain"),
            "bullets": [
                ("Immutable Cryptographic Timestamps", "Every submission, edit, and photo is hashed using SHA-256 with GPS coordinates and hardware device serial numbers."),
                ("1-Click Section 84 Compliance Certificates", "Generates formal Certificate of Identification of Computer Printout signed by the System Administrator, meeting all appellate requirements."),
                ("Complete 21-Day Tribunal Dossier", "Compiles all 176,846 Form EC8As, variance reports, and affidavit summaries into organized, indexed PDF binders ready for immediate filing.")
            ],
            "card_title": "Statutory Court Admissibility",
            "card_items": [
                ("Electronic Certificate:", "Sec 84(4) Computer Printout Cert"),
                ("Tamper Proofing:", "Immutable SHA-256 Hash Chain"),
                ("Device Fingerprinting:", "Hardware Serial & GPS Locked"),
                ("Filing Readiness:", "Day 1 of 21-Day Window")
            ],
            "notes": (
                "Your legal team knows the tragedy of Nigerian election petitions: having truth on your side, but being disqualified on technical grounds under Section 84(4) of the Evidence Act. We designed this entire platform with lawyers. Every record is signed with a SHA-256 cryptographic hash, device fingerprint, and GPS coordinates. With one click, the system exports a legally certified Tribunal Dossier ready for filing in court on Day 1.\n\n"
                "[Psychological Cue]: Address the legal counsel directly with high technical fluency in Nigerian jurisprudence.\n\n"
                "[Anticipated Question]: Can an opponent claim we tampered with the data on our server?\n"
                "[Winning Answer]: No, Learned Silk. Because the SHA-256 hash is calculated at the exact instant the photo is taken. Any alteration of even a single pixel breaks the mathematical chain, proving conclusively that the original record remained pristine."
            )
        },
        {
            "id": 8,
            "category": "INSTITUTIONAL AUTHORITY",
            "title": "Complete Statutory Forms Collation Engine (EC8A–EC8E)",
            "sub": "Dual-Format Export: High-Fidelity Printable Official PDF & Structured Analytical CSV",
            "badge": "Full INEC Statutory Cascade (Levels A through E)",
            "metric": ("37 Jurisdictions", "National Hierarchy", "36 States + FCT Abuja (37th) Complete"),
            "bullets": [
                ("Form EC8A (Polling Unit Level)", "Results at the polling unit with full ballot accounting, party tallies in figures and written English words, and PO signatures."),
                ("Form EC8B & EC8C (Ward & LGA Collation)", "Summary of results at Registration Area and Local Government collation with automated multi-unit aggregation."),
                ("Form EC8D & EC8E (State & National Declaration)", "Official 37-state presidential collation summary matching official green-border INEC sheets with Annexure 1 nationwide table.")
            ],
            "card_title": "Dual Export Formats",
            "card_items": [
                ("Statutory Green-Border PDF:", "Official Physical Layout & Signatures"),
                ("Number-to-Words Conversion:", "Automatic Legal Capital Words"),
                ("Tabular Structured CSV:", "Compatible with Excel & SPSS"),
                ("37-State Master Spreadsheet:", "Instant National Aggregation")
            ],
            "notes": (
                "The National Coordinator’s console is an institutional collation powerhouse. The system generates all five official statutory INEC electoral tiers: EC8A, EC8B, EC8C, EC8D, and the ultimate Form EC8E—the National Presidential Declaration Sheet. These are rendered in official green-border PDF formats with numbers written out in full legal words, alongside full 37-state CSV spreadsheets for statistical regression.\n\n"
                "[Psychological Cue]: Showcase institutional gravitas. The campaign is behaving like an incoming government.\n\n"
                "[Anticipated Question]: Are the figures written out in words like the real INEC forms?\n"
                "[Winning Answer]: Yes, Your Excellency. For example, 245 votes is automatically written in capital letters as 'TWO HUNDRED AND FORTY-FIVE', eliminating any ambiguity in court."
            )
        },
        {
            "id": 9,
            "category": "COMMAND & ACCREDITATION",
            "title": "Participant Management & Digital Security Credentials",
            "sub": "Delimitation-Based Enrollment, Automated Salted PIN Generation & Official Printable ID Badges",
            "badge": "Zero Infiltration • Total Field Force Accountability",
            "metric": ("100% Sealed", "Digital Credentials", "High-entropy PIN + Salted SHA-256 Hash"),
            "bullets": [
                ("Hierarchical INEC Cascade", "Enroll agents with precision: State (36 + FCT 38th) down to LGA, Ward, and assigned Polling Unit code."),
                ("Automated High-Entropy PIN Generator", "Generates secure 4-digit PINs avoiding predictable sequences, protected by salted cryptographic SHA-256 hashes."),
                ("Printable Official Accreditation Badges", "Standardized ID cards with lanyard punch slots, candidate portrait (His Excellency Atiku Abubakar), ADC crest, QR code, and barcode.")
            ],
            "card_title": "Agent Security Specifications",
            "card_items": [
                ("Accreditation Identification:", "Unique Code (e.g. ADC-2027-PU-1029)"),
                ("Cryptographic Authentication:", "Salted SHA-256 Hardware PIN"),
                ("Physical ID Badge Production:", "Printable with Lanyard Punch"),
                ("Emergency Anti-Sabotage:", "1-Click Instant Status Revocation")
            ],
            "notes": (
                "Your Excellency, technology is only as good as the humans operating it. In past elections, agents were infiltrated, credentials were stolen, and unauthorized people submitted fake reports. Our Participant Management Desk solves this: every agent receives an official accreditation number, a salted cryptographic PIN, and a printable ID badge with His Excellency’s portrait and an encrypted QR code. If an agent is compromised, headquarters can revoke their access in one second.\n\n"
                "[Psychological Cue]: Emphasize command, discipline, and anti-sabotage security.\n\n"
                "[Anticipated Question]: How do we distribute credentials to over 176,000 agents quickly?\n"
                "[Winning Answer]: The system has integrated SMS dispatch simulation. Coordinators can batch-generate PINs and send credentials directly to agents' mobile phones in seconds."
            )
        },
        {
            "id": 10,
            "category": "MILITARY-GRADE SECURITY",
            "title": "Enterprise RBAC & 6-Tier Downward Access Control",
            "sub": "Preventing Rumors, Infiltration, Regional Panic, and Unauthorized Data Leaks",
            "badge": "Compartmentalized Security Matrix",
            "metric": ("6 Tiers", "Strict Clearance Tiers", "Strict downward-only data segregation"),
            "bullets": [
                ("Tier 1: Polling Unit Agent", "Confined strictly to their assigned PU. Zero visibility into other PUs, wards, or dashboards."),
                ("Tiers 2 & 3: Ward & LGA Supervisors", "Restricted to their specific Registration Area and Local Government area only."),
                ("Tiers 4 & 5: State & Regional Coordinators", "Oversees their respective State or Geopolitical Zone without access to rival regional data."),
                ("Tier 6: National Presidential War Room", "Complete 37-jurisdiction pan-Nigerian command, strategic broadcast dispatch, and live presidential telemetry.")
            ],
            "card_title": "Information Segregation Matrix",
            "card_items": [
                ("Tier 6 (National War Room):", "Full Pan-Nigeria Visibility"),
                ("Tier 5 (6 Regional Desks):", "Assigned Geopolitical Zone Only"),
                ("Tier 4 (37 State Leads):", "Assigned State Collation Only"),
                ("Tier 1 (176,846 PU Agents):", "Strictly Assigned Single Polling Unit")
            ],
            "notes": (
                "In an election, information leaks cause panic and compromise strategy. Our architecture enforces strict downward-only role-based access control. A Polling Unit agent in Kano cannot see what is happening in Lagos. A Ward supervisor cannot see state totals. Only His Excellency, the Campaign DG, and the National Coordinator in the Presidential Situation Room have full pan-Nigerian oversight.\n\n"
                "[Psychological Cue]: Project military-grade discipline. High-level candidates value confidentiality and discretion.\n\n"
                "[Anticipated Question]: What prevents a compromised supervisor from leaking our numbers to opponents?\n"
                "[Winning Answer]: They only have access to their local jurisdiction. Furthermore, every query and export is watermarked and logged with a tamper-evident audit trail."
            )
        },
        {
            "id": 11,
            "category": "EXECUTION BLUEPRINT",
            "title": "Deployment Roadmap: Battle-Ready for February 2027",
            "sub": "From Today’s Executive Demonstration to Full Nationwide Field Commissioning",
            "badge": "4-Phase Strategic Rollout Plan",
            "metric": ("Phase 1 Done", "Current Battle-Readiness", "Ready for state cascade rollout"),
            "bullets": [
                ("Phase 1: Architecture & Stress Testing (COMPLETED ✅)", "Core platform, offline crypto vault, multilingual AI, OCR comparison engine, and statutory forms built and verified."),
                ("Phase 2: Zonal & State Supervisor Trainings (Q4 2026)", "Training 6 Regional Coordinators and 37 State Returning Officers on delimitation management and supervisor dashboards."),
                ("Phase 3: Nationwide Mock Election Simulation (January 2027)", "Full-scale stress test: 10,000 sample PUs transmitting simulated Form EC8As across all 6 geopolitical zones simultaneously."),
                ("Phase 4: D-Day Live Battle-Station Execution (February 2027)", "24/7 presidential situation room activation, real-time PVT collation, automated IReV discrepancy audit, and instant tribunal archiving.")
            ],
            "card_title": "Implementation Milestones",
            "card_items": [
                ("Phase 1 (Completed):", "Platform Engineered & Verified ✅"),
                ("Phase 2 (Q4 2026):", "Zonal & State Leadership Trainings"),
                ("Phase 3 (Jan 2027):", "10,000 PU Nationwide Stress Simulation"),
                ("Phase 4 (Feb 2027):", "D-Day Live Situation Room Command")
            ],
            "notes": (
                "We do not bring you a prototype or a wish list. Phase 1 is already 100% complete and operational today. Our roadmap outlines a seamless transition: training zonal coordinators in Q4, running a 10,000-unit nationwide mock election simulation in January 2027 to stress-test servers under extreme load, and activating the 24/7 Presidential Situation Room on election day.\n\n"
                "[Psychological Cue]: Show that this is a mature, phased institutional program, not a last-minute scramble.\n\n"
                "[Anticipated Question]: Can our existing campaign ICT staff manage this platform?\n"
                "[Winning Answer]: Yes. We designed the administrative console to be intuitive and we provide comprehensive hands-on training and 24/7 technical sidecar support."
            )
        },
        {
            "id": 12,
            "category": "THE WINNING EDGE",
            "title": "The Deciding Difference: Mandate Secured",
            "sub": "Why Partnering with GetoCore Digital Innovation Guarantees Electoral Victory and Defense",
            "badge": "His Excellency Atiku Abubakar 2027 • The Road to Aso Rock",
            "metric": ("Victory", "The Deciding Difference", "Backed by technological dominance"),
            "bullets": [
                ("Proven Nigerian Field Reality", "Built specifically for the realities of Nigerian collation centers, poor rural networks, and aggressive opponents."),
                ("Forensic Legal Invincibility", "Section 84 Evidence Act certified evidence that withstands the most aggressive scrutiny in Election Petition Tribunals."),
                ("Uncompromised Integrity & Speed", "Parallel Vote Tabulation that gives His Excellency the truth hours before anyone else, putting the campaign in complete command."),
                ("Immediate Commissioning Ready", "No waiting 6 months for software development. The system is live and ready for deployment today.")
            ],
            "card_title": "Call to Action: Commissioning",
            "card_items": [
                ("Strategic Mandate:", "Defending Every Vote for Atiku Abubakar"),
                ("Immediate Next Step:", "Execute Joint Memorandum of Understanding"),
                ("Cloud Provisioning:", "Sovereign Isolated Infrastructure"),
                ("Live Battle-Station:", "Ready for Demonstration Right Now")
            ],
            "notes": (
                "Your Excellency, in 2027, victory will not belong to the candidate who campaigned the hardest; it will belong to the candidate with the superior operational intelligence. With GetoCore Digital Innovation, Your Excellency has the technology to protect every single vote cast in your name from Kaura Namoda to Nembe, from Badagry to Maiduguri. We are ready to stand with you, defend your mandate, and march with you to Aso Rock. Thank you, Your Excellency!\n\n"
                "[Psychological Cue]: Stand tall with confidence and sincere conviction. Pause after the closing sentence to allow the gravity of the moment to sink in.\n\n"
                "[Anticipated Question]: What are the immediate next steps to formally commission this project?\n"
                "[Winning Answer]: Your Excellency, we are ready to sign the formal memorandum of understanding, provision your dedicated sovereign cloud servers, and commence Phase 2 zonal leadership training immediately."
            )
        }
    ]

    for data in slides_data:
        slide = prs.slides.add_slide(blank_layout)

        # 1. Background Fill
        bg = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, 0, Inches(13.333), Inches(7.5))
        bg.fill.solid()
        bg.fill.fore_color.rgb = BG_COLOR
        bg.line.fill.background()

        # 2. Top Header Bar
        top_bar = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, Inches(0.8), Inches(0.4), Inches(11.733), Inches(0.7))
        top_bar.fill.solid()
        top_bar.fill.fore_color.rgb = CARD_BG
        top_bar.line.color.rgb = CARD_BORDER

        tf_top = top_bar.text_frame
        tf_top.word_wrap = True
        p_top = tf_top.paragraphs[0]
        p_top.text = f"{data['category']}  •  {data['badge']}"
        p_top.font.size = Pt(11)
        p_top.font.bold = True
        p_top.font.color.rgb = GOLD

        # 3. Slide Title & Subtitle Box
        title_box = slide.shapes.add_textbox(Inches(0.8), Inches(1.2), Inches(8.0), Inches(1.5))
        tf = title_box.text_frame
        tf.word_wrap = True

        p1 = tf.paragraphs[0]
        p1.text = data["title"]
        p1.font.size = Pt(24)
        p1.font.bold = True
        p1.font.color.rgb = TEXT_WHITE
        p1.space_after = Pt(8)

        p2 = tf.add_paragraph()
        p2.text = data["sub"]
        p2.font.size = Pt(13)
        p2.font.color.rgb = TEXT_SUB

        # 4. Left Column: Bullet Cards
        top_bullet_y = 2.85
        card_h = 1.25
        gap = 0.15

        for i, (b_title, b_desc) in enumerate(data["bullets"]):
            y_pos = top_bullet_y + i * (card_h + gap)
            b_box = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(0.8), Inches(y_pos), Inches(7.8), Inches(card_h))
            b_box.fill.solid()
            b_box.fill.fore_color.rgb = CARD_BG
            b_box.line.color.rgb = CARD_BORDER

            b_tf = b_box.text_frame
            b_tf.word_wrap = True
            b_tf.margin_left = Inches(0.2)
            b_tf.margin_top = Inches(0.15)
            b_tf.margin_right = Inches(0.2)

            bp1 = b_tf.paragraphs[0]
            bp1.text = f"✔  {b_title}"
            bp1.font.size = Pt(14)
            bp1.font.bold = True
            bp1.font.color.rgb = GOLD
            bp1.space_after = Pt(4)

            bp2 = b_tf.add_paragraph()
            bp2.text = b_desc
            bp2.font.size = Pt(11)
            bp2.font.color.rgb = TEXT_MUTED

        # 5. Right Column: Key Metric Box
        m_val, m_label, m_detail = data["metric"]
        metric_box = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(8.9), Inches(1.2), Inches(3.633), Inches(2.2))
        metric_box.fill.solid()
        metric_box.fill.fore_color.rgb = CARD_BG
        metric_box.line.color.rgb = GOLD
        metric_box.line.width = Pt(1.5)

        m_tf = metric_box.text_frame
        m_tf.word_wrap = True
        m_tf.margin_left = Inches(0.25)
        m_tf.margin_top = Inches(0.2)

        mp_lbl = m_tf.paragraphs[0]
        mp_lbl.text = m_label.upper()
        mp_lbl.font.size = Pt(11)
        mp_lbl.font.bold = True
        mp_lbl.font.color.rgb = GOLD

        mp_val = m_tf.add_paragraph()
        mp_val.text = m_val
        mp_val.font.size = Pt(36)
        mp_val.font.bold = True
        mp_val.font.color.rgb = TEXT_WHITE
        mp_val.space_after = Pt(2)

        mp_det = m_tf.add_paragraph()
        mp_det.text = m_detail
        mp_det.font.size = Pt(11)
        mp_det.font.color.rgb = TEXT_SUB

        # 6. Right Column: Card Showcase
        spec_box = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(8.9), Inches(3.6), Inches(3.633), Inches(3.3))
        spec_box.fill.solid()
        spec_box.fill.fore_color.rgb = CARD_BG
        spec_box.line.color.rgb = CARD_BORDER

        s_tf = spec_box.text_frame
        s_tf.word_wrap = True
        s_tf.margin_left = Inches(0.25)
        s_tf.margin_top = Inches(0.2)

        sp_head = s_tf.paragraphs[0]
        sp_head.text = f"★  {data['card_title']}"
        sp_head.font.size = Pt(13)
        sp_head.font.bold = True
        sp_head.font.color.rgb = GREEN
        sp_head.space_after = Pt(12)

        for label, val in data["card_items"]:
            sp_item = s_tf.add_paragraph()
            sp_item.text = f"{label} {val}"
            sp_item.font.size = Pt(11)
            sp_item.font.color.rgb = TEXT_MUTED
            sp_item.space_after = Pt(6)

        # 7. Bottom Slide Counter
        counter_box = slide.shapes.add_textbox(Inches(0.8), Inches(7.0), Inches(11.733), Inches(0.4))
        c_tf = counter_box.text_frame
        cp = c_tf.paragraphs[0]
        cp.text = f"Slide {data['id']} of {len(slides_data)}  |  Atiku Abubakar 2027 Presidential Campaign Council  |  GetoCore Digital Innovation"
        cp.font.size = Pt(10)
        cp.font.color.rgb = TEXT_MUTED
        cp.alignment = PP_ALIGN.RIGHT

        # 8. Speaker Notes
        notes_slide = slide.notes_slide
        text_frame = notes_slide.notes_text_frame
        text_frame.text = data["notes"]

    output_dir = "public/downloads"
    os.makedirs(output_dir, exist_ok=True)
    pptx_path = os.path.join(output_dir, "Atiku2027_Executive_Presentation_Deck.pptx")
    prs.save(pptx_path)

    # Also save in root public and brain directory
    os.system(f"cp '{pptx_path}' public/Atiku2027_Executive_Presentation_Deck.pptx")
    brain_dir = "/Users/user/.gemini/antigravity/brain/bb5efc4c-e58a-4057-8453-0ebc4ffcd4d2"
    os.system(f"cp '{pptx_path}' '{brain_dir}/Atiku2027_Executive_Presentation_Deck.pptx'")

    print(f"PowerPoint Presentation successfully generated: {pptx_path}")

if __name__ == "__main__":
    create_deck()
