# BW Pre-Heading — Specification

**Version:** 0.1.0 | **Last Updated:** 2026-04-24

## Purpose

Provide a reusable Gutenberg block for the Prompt Victoria hero "eyebrow" pattern — a small, uppercase date · venue label with a blinking terminal-prompt SVG — without coupling it to any particular theme. Marketing staff can drop the block into any page, edit the text, and pick from a constrained set of brand-safe colors and alignments.

## Requirements

### Functional
- **R1:** Registers a Gutenberg block named `bw/pre-heading` under the "Design" category.
- **R2:** Text content is inline-editable via RichText. Stored default: empty string. Editor shows `Enter text here` as RichText placeholder (clears on type).
- **R3:** Prompt-icon color is selectable from a dropdown with two brand values: `#f58220` (default, Gold) and `#FFFFFF` (White).
- **R4:** Text color is selectable from a dropdown with the same two brand values.
- **R5:** Alignment is selectable from a dropdown: Left (default), Center, Right.
- **R6:** Markup mirrors the original static hero markup in `home.html` (.pv-hero__eyebrow / .pv-hero__eyebrow-prompt / .pv-hero__eyebrow-text) so existing site CSS applies.
- **R7:** Block ships its own baseline CSS (Space Grotesk 14px / 600 / 0.14em) so it renders correctly on themes that don't already style those classes.
- **R8:** No JavaScript build step — editor code runs directly against `window.wp.*` globals.

### Non-functional
- WordPress 6.0+ with PHP 7.4+
- Follows WordPress security best practices (output escaped, attribute values whitelisted against enum)
- Translatable via `bw-pre-heading` text domain
- Does not interfere with other plugins (no global CSS, no hooks on other blocks' attributes)

## Acceptance Criteria

| Requirement | Acceptance | Status |
|---|---|---|
| R1 | Block appears in inserter under Design category | ☐ |
| R2 | Text edits persist across save/reload | ☐ |
| R3 | Icon stroke color changes to selected value on frontend | ☐ |
| R4 | Text color changes to selected value on frontend | ☐ |
| R5 | Alignment switches block anchor (text-align) on frontend | ☐ |
| R6 | Rendered HTML matches the `home.html` eyebrow markup structure | ☐ |
| R7 | Block renders with correct typography on a fresh WP install without any theme CSS | ☐ |
| R8 | Plugin activates cleanly on a vanilla WP with no build/bundler present | ☐ |
