{
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "bpsc/case-study-section",
  "version": "1.0.0",
  "title": "Case Study Section",
  "category": "bPlugins",
  "description": "A client case-study section with logo, stats, challenge/solution/outcome narrative, quote, and CTA.",
  "keywords": [
    "case study",
    "client results",
    "social proof",
    "testimonial",
    "stats",
    "B2B",
    "section"
  ],
  "textdomain": "section-collection",
  "attributes": {
    "themeStyle": {
      "type": "object",
      "default": {
        "theme": "style-1"
      }
    },
    "content": {
      "type": "object",
      "default": {
        "badgeText": "Case Study",
        "title": "How We Helped Acme Corp Grow 3× in 6 Months",
        "subtitle": "A complete redesign and growth strategy that transformed their pipeline."
      }
    },
    "elements": {
      "type": "object",
      "default": {
        "isBadge": true,
        "isTitle": true,
        "isSubtitle": true,
        "isHeroImage": true,
        "isStats": true,
        "isNarrative": true,
        "isPullQuote": true,
        "isCta": true,
        "isSecondaryCta": true
      }
    },
    "clientInfo": {
      "type": "object",
      "default": {
        "name": "Acme Corporation",
        "industry": "SaaS · Series B",
        "logo": {
          "url": "",
          "alt": "",
          "id": 0
        }
      }
    },
    "heroImage": {
      "type": "object",
      "default": {
        "url": "",
        "alt": "",
        "id": 0
      }
    },
    "stats": {
      "type": "array",
      "default": [
        {
          "id": "stat-1",
          "value": "3×",
          "label": "Revenue Growth",
          "caption": "in 6 months"
        },
        {
          "id": "stat-2",
          "value": "68%",
          "label": "Faster Onboarding",
          "caption": "time-to-value"
        },
        {
          "id": "stat-3",
          "value": "2.1M",
          "label": "New Users",
          "caption": "acquired"
        }
      ]
    },
    "narrativeBlocks": {
      "type": "array",
      "default": [
        {
          "id": "narr-1",
          "heading": "The Challenge",
          "body": "Visitors were dropping off before completing signup. The onboarding flow was complex and the value proposition unclear.",
          "icon": "warning"
        },
        {
          "id": "narr-2",
          "heading": "The Solution",
          "body": "We redesigned the onboarding flow from 7 steps to 3, applied progressive disclosure, and rewrote the hero copy to focus on outcomes.",
          "icon": "check"
        },
        {
          "id": "narr-3",
          "heading": "The Outcome",
          "body": "Within 6 months revenue tripled, onboarding time dropped by 68%, and the product crossed 2 million active users.",
          "icon": "star"
        }
      ]
    },
    "pullQuote": {
      "type": "object",
      "default": {
        "text": "Working with this team was a game-changer for our business. The results speak for themselves.",
        "authorName": "Jane Doe",
        "authorRole": "CEO, Acme Corp",
        "avatar": {
          "url": "",
          "alt": "",
          "id": 0
        }
      }
    },
    "cta": {
      "type": "object",
      "default": {
        "primaryText": "Read Full Case Study",
        "primaryUrl": "#",
        "primaryNewTab": false,
        "secondaryText": "See All Results",
        "secondaryUrl": "#",
        "secondaryNewTab": false
      }
    },
    "titleStyle": {
      "type": "object",
      "default": {
        "color": "#111827",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 700,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 40,
            "tablet": 32,
            "mobile": 26
          },
          "lineHeight": "1.2"
        }
      }
    },
    "subtitleStyle": {
      "type": "object",
      "default": {
        "color": "#6b7280",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 400,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 18,
            "tablet": 16,
            "mobile": 15
          },
          "lineHeight": "1.65"
        }
      }
    },
    "badgeStyle": {
      "type": "object",
      "default": {
        "backgroundColor": "#ede9fe",
        "textColor": "#6366f1",
        "borderRadius": {
          "top": "20px",
          "right": "20px",
          "bottom": "20px",
          "left": "20px"
        },
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 600,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 13,
            "tablet": 13,
            "mobile": 13
          }
        }
      }
    },
    "statValueStyle": {
      "type": "object",
      "default": {
        "color": "#6366f1",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 800,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 48,
            "tablet": 38,
            "mobile": 32
          },
          "lineHeight": "1"
        }
      }
    },
    "statLabelStyle": {
      "type": "object",
      "default": {
        "color": "#374151",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 600,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 15,
            "tablet": 14,
            "mobile": 13
          },
          "lineHeight": "1.4"
        }
      }
    },
    "narrativeHeadingStyle": {
      "type": "object",
      "default": {
        "color": "#111827",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 700,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 22,
            "tablet": 20,
            "mobile": 18
          },
          "lineHeight": "1.3"
        }
      }
    },
    "narrativeBodyStyle": {
      "type": "object",
      "default": {
        "color": "#4b5563",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 400,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 16,
            "tablet": 15,
            "mobile": 14
          },
          "lineHeight": "1.7"
        }
      }
    },
    "quoteStyle": {
      "type": "object",
      "default": {
        "textColor": "#111827",
        "accentColor": "#6366f1",
        "authorColor": "#6b7280",
        "bgColor": "#f9fafb",
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 500,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 20,
            "tablet": 18,
            "mobile": 16
          },
          "lineHeight": "1.65"
        }
      }
    },
    "ctaStyle": {
      "type": "object",
      "default": {
        "backgroundColor": "#6366f1",
        "textColor": "#ffffff",
        "hoverBackgroundColor": "#4f46e5",
        "hoverTextColor": "#ffffff",
        "secondaryColor": "#6366f1",
        "secondaryHoverColor": "#4f46e5",
        "borderRadius": {
          "top": "8px",
          "right": "8px",
          "bottom": "8px",
          "left": "8px"
        },
        "padding": {
          "desktop": {
            "top": "14px",
            "right": "32px",
            "bottom": "14px",
            "left": "32px"
          },
          "tablet": {
            "top": "12px",
            "right": "24px",
            "bottom": "12px",
            "left": "24px"
          },
          "mobile": {
            "top": "12px",
            "right": "20px",
            "bottom": "12px",
            "left": "20px"
          }
        },
        "typo": {
          "fontCategory": "sans-serif",
          "fontFamily": "Default",
          "fontWeight": 600,
          "isUploadFont": true,
          "fontSize": {
            "desktop": 15,
            "tablet": 15,
            "mobile": 14
          }
        }
      }
    },
    "wrapper": {
      "type": "object",
      "default": {
        "bg": {
          "type": "solid",
          "color": "#ffffff",
          "gradient": "linear-gradient(135deg, #f0f4ff 0%, #faf5ff 100%)",
          "overlayColor": "rgba(0,0,0,0)",
          "image": {
            "url": ""
          },
          "position": "center center",
          "repeat": "no-repeat",
          "size": "cover"
        },
        "padding": {
          "desktop": {
            "top": "80px",
            "right": "24px",
            "bottom": "80px",
            "left": "24px"
          },
          "tablet": {
            "top": "60px",
            "right": "20px",
            "bottom": "60px",
            "left": "20px"
          },
          "mobile": {
            "top": "48px",
            "right": "16px",
            "bottom": "48px",
            "left": "16px"
          }
        }
      }
    },
    "layout": {
      "type": "object",
      "default": {
        "contentAlign": "center",
        "maxWidth": "1100px"
      }
    },
    "align": {
      "type": "string",
      "default": "full"
    }
  },
  "supports": {
    "align": [
      "wide",
      "full"
    ],
    "html": false
  },
  "example": {
    "attributes": {}
  },
  "editorScript": "file:../index.js",
  "style": "file:./view.css",
  "render": "file:./render.php",
  "viewScript": "file:./view.js"
}