feat: recreate public frontend with Heritage Editorial identity (#5)

* feat: recreate public frontend with Heritage Editorial identity

Replace placeholder visual system with EB Garamond/olive tokens, brand assets, editorial home narrative, São Paulo settings, real testimonials, and regenerated visual baselines.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: archive recreate-public-frontend and sync Heritage Editorial specs

Merge delta requirements into main OpenSpec capabilities and move the completed change into the dated archive.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-01 23:39:00 -03:00
committed by GitHub
parent 637be0664a
commit cf1589c916
75 changed files with 2078 additions and 364 deletions

View File

@@ -0,0 +1,31 @@
## ADDED Requirements
### Requirement: Brand logo assets are available to the public layout
The system SHALL provide optimized Amare brand logo assets derived from the official faceted-heart lockup for use in the public header, footer and institutional pages. Assets MUST preserve the original geometry, include an accessible text alternative, and provide variants suitable for light and dark tonal fields. When `site_settings.logo_path` is present, the uploaded logo MUST be used; otherwise the versioned static brand asset MUST be used.
#### Scenario: Header renders brand mark with alt text
- **WHEN** any public page is rendered
- **THEN** the brand mark image or equivalent MUST expose accessible alternative text identifying Amare Assessoria
#### Scenario: Dark portfolio field uses a legible logo variant
- **WHEN** the brand mark is rendered on an olive-deep or otherwise dark public surface
- **THEN** the chosen logo variant MUST remain legible against that background
#### Scenario: Uploaded logo overrides static fallback
- **GIVEN** an admin has saved `logo_path` and `logo_alt` in site settings
- **WHEN** the public layout renders the brand mark
- **THEN** the uploaded logo MUST be used instead of the static fallback
### Requirement: Editorial image treatment remains self-hosted and deterministic
Public photography SHALL continue to use validated self-hosted uploads and responsive variants. Decorative saturation/contrast treatment for editorial mood MUST be applied via CSS on self-hosted images and MUST NOT introduce external image CDN dependencies that break deterministic visual tests.
#### Scenario: Public pages do not depend on external stock hosts
- **WHEN** the visual or browser suite loads covered public routes
- **THEN** content images MUST resolve from the application media disk or static fixtures
- **AND** MUST NOT require network access to third-party stock hosts

View File

@@ -0,0 +1,53 @@
## MODIFIED Requirements
### Requirement: Design tokens are centralized for the public site
The system SHALL define design tokens in a single source consumed by the public site layout and components. Tokens MUST implement the Heritage Editorial system from `DESIGN.md`: typography family EB Garamond (self-hosted), font scale (display/headline/title/body/label), spacing on an 8px rhythm, border radius `0` for interactive and content surfaces, container max width `1120px`, paper/olive/sage/ink color roles, transition duration/easing, and MUST NOT rely on card shadows as a hierarchy mechanism for regular content.
#### Scenario: Public layout uses shared Heritage Editorial tokens
- **WHEN** a public page is rendered
- **THEN** visual properties MUST be derived from the centralized token definitions rather than arbitrary inline values
- **AND** the primary typeface MUST be EB Garamond (or the declared serif fallback stack)
- **AND** public content surfaces MUST use `0` border radius from tokens
#### Scenario: Palette commits paper and olive regions
- **WHEN** the public site is rendered
- **THEN** background regions MUST use paper ivory / paper deep / olive deep tokens rather than pure white card stacks on a white page
- **AND** primary interactive emphasis MUST use olive heritage (`#556B2F`) / olive deep (`#3E5219`) tokens
### Requirement: Public site respects reduced motion preference
The system SHALL honor `prefers-reduced-motion` by disabling or minimizing non-essential animations and transitions on the public site, including image hover scales and menu transitions.
#### Scenario: User prefers reduced motion
- **WHEN** a visitor has `prefers-reduced-motion: reduce` enabled
- **THEN** the public site MUST NOT play non-essential motion effects
### Requirement: Public site meets baseline accessibility contrast
The system SHALL use Heritage Editorial color combinations that meet WCAG AA contrast requirements for text and interactive elements. Long-form text MUST use ink on paper; sage MUST NOT replace reading color when contrast would fall below AA.
#### Scenario: Primary text is readable
- **WHEN** primary body text is rendered on its background color
- **THEN** the contrast ratio MUST meet WCAG AA minimums
#### Scenario: Olive on paper interactive text is readable
- **WHEN** primary buttons or links use olive tokens on paper backgrounds (or paper text on olive)
- **THEN** the contrast ratio MUST meet WCAG AA minimums
## ADDED Requirements
### Requirement: Elevation comes from tonal fields not card shadows
The public site SHALL express hierarchy through tonal paper fields, 1px botanical rules, and editorial overlap. Regular content components MUST NOT use short grey SaaS card shadows.
#### Scenario: Content cards omit drop shadows
- **WHEN** home services, testimonials, or portfolio items are rendered
- **THEN** they MUST NOT depend on `--amare-shadow-*` card elevation for hierarchy
- **AND** separation MUST come from borders, tonal backgrounds, or whitespace

View File

@@ -0,0 +1,107 @@
## MODIFIED Requirements
### Requirement: Home renders the editorial structure from CMS content
The home page SHALL render, in order: header/navigation, hero, manifesto, featured services summary, featured portfolio selection, working method (four steps), testimonials, Amare positioning/profile, final contact CTA, and footer with contact, social links and legal links (WEB-01). Hero copy, brand name, manifesto, method and principles MUST come from `site_settings` (with editorial defaults when optional fields are empty); services, cases and testimonials MUST come from published records. The home MUST follow the Heritage Editorial composition (asymmetric spreads on desktop, linear sequence on mobile) rather than rounded card grids.
#### Scenario: Published content is displayed in configured order
- **GIVEN** published services, cases and testimonials exist
- **WHEN** a visitor loads the home
- **THEN** the published content MUST be displayed following the `sort_order` and featured flags
- **AND** the hero MUST show the values stored in `site_settings`
- **AND** the manifesto, method and positioning sections MUST be present
#### Scenario: CTA leads to the contact placeholder page
- **WHEN** a visitor activates the primary or final CTA on the home
- **THEN** the visitor MUST be taken to the `contact` route
- **AND** no lead record MUST be created
#### Scenario: Empty catalog sections are omitted
- **GIVEN** no published services, cases or testimonials
- **WHEN** a visitor loads the home
- **THEN** the response MUST be 200
- **AND** the services, portfolio and testimonials sections MUST be omitted instead of rendering empty containers
- **AND** hero, manifesto, method, positioning and final CTA MUST still render
#### Scenario: Home has no console errors
- **WHEN** the home is loaded in a real browser at desktop and mobile viewports
- **THEN** the browser console MUST contain no JavaScript errors
### Requirement: Listing and detail pages exist for catalog content
The system SHALL render a services listing (WEB-02) and a portfolio listing plus case detail (WEB-03) using the Heritage Editorial visual language. The case detail MUST present summary, event type, optional city/venue/date, challenge, solution, optional result, cover image and the ordered gallery.
#### Scenario: Services listing shows published services
- **WHEN** a visitor loads `/servicos`
- **THEN** every published service MUST be listed with title and summary in `sort_order`
- **AND** the listing MUST use the public editorial layout (not an unrelated visual system)
#### Scenario: Gallery respects stored order
- **GIVEN** a published case with multiple gallery images
- **WHEN** a visitor loads the case detail
- **THEN** the images MUST be rendered ordered by `sort_order`
#### Scenario: Listings paginate open-ended growth
- **WHEN** the number of published cases exceeds the page size
- **THEN** `/portfolio` MUST paginate instead of rendering all records
### Requirement: Institutional and error pages have brand identity
The system SHALL provide the Sobre and Política de privacidade pages and branded error pages (WEB-07) using the Heritage Editorial public layout, including the brand mark when available. The 404 page MUST use the public layout, and the 500 page MUST NOT expose stack traces or internal details when `APP_DEBUG` is false.
#### Scenario: Unknown URL renders branded 404
- **WHEN** a visitor requests a non-existent public URL
- **THEN** the response status MUST be 404
- **AND** the page MUST use the public layout and offer navigation back to the home
#### Scenario: Server error hides internals in production
- **GIVEN** `APP_DEBUG` is false
- **WHEN** an unhandled exception occurs on a public route
- **THEN** the response MUST be a generic branded error page
- **AND** MUST NOT contain a stack trace, file path, or environment variable
### Requirement: Contact page presents contact data as briefing placeholder
The `contact` route SHALL render the contact page using `site_settings` (e-mail, phone, city, social links) so the home CTA has a valid destination before the briefing form exists. The page MUST NOT create leads and MUST NOT submit a functional briefing form in this change.
#### Scenario: Contact page shows configured contact data
- **WHEN** a visitor loads `/contato`
- **THEN** the e-mail and phone stored in `site_settings` MUST be displayed
- **AND** no lead record MUST be created
## ADDED Requirements
### Requirement: Public header exposes brand mark and responsive navigation
The public layout SHALL render the Amare brand mark (faceted-heart logo lockup or configured logo), primary route navigation, and a contact CTA. On narrow viewports the navigation MUST be operable via a disclosure control with accessible name and `aria-expanded` state.
#### Scenario: Desktop header shows navigation and CTA
- **WHEN** a visitor loads any public page at a desktop viewport
- **THEN** the header MUST include brand mark, links to home/services/portfolio/about/contact, and a contact CTA
#### Scenario: Mobile menu toggles accessibly
- **WHEN** a visitor activates the menu button on a narrow viewport
- **THEN** the primary navigation MUST become available
- **AND** the control MUST expose an updated `aria-expanded` value
- **AND** activating a navigation link MUST close the menu
### Requirement: Demonstrative photography is labeled until authorized assets exist
When public pages render illustrative/demo photography that is not an authorized Amare asset, the system SHALL mark that imagery as demonstrative in visible copy or accessible labeling so visitors are not misled.
#### Scenario: Portfolio demo imagery is disclosed
- **WHEN** the home or portfolio renders placeholder photography
- **THEN** a visible note or equivalent disclosure MUST indicate the imagery is illustrative pending authorized assets

View File

@@ -0,0 +1,53 @@
## MODIFIED Requirements
### Requirement: Site settings singleton is manageable by admin only
The system SHALL persist site-wide settings in a `site_settings` table as a typed singleton (SPEC WEB-06, §8.2). Fields MUST include brand name, optional logo path and logo alt text, hero copy (eyebrow, title, subtitle, primary CTA label, optional secondary CTA label, optional hero note), manifesto copy (title, lead, body), method steps (structured typed data for four editorial steps), principles (structured typed list), about summary, contact email/phone/city, social links (jsonb), default meta title/description, default OG image path and alt text, and optional analytics fields disabled by default.
#### Scenario: Admin updates site settings
- **WHEN** an admin saves the site settings form in Filament
- **THEN** the singleton record is updated
- **AND** labels and validation messages are in pt-BR
#### Scenario: Assistant cannot access site settings
- **WHEN** an assistant navigates to site settings in Filament
- **THEN** access MUST be denied with HTTP 403
#### Scenario: Default OG image requires alt text
- **WHEN** an admin uploads a default OG image without alt text
- **THEN** validation MUST fail with a pt-BR error message
- **AND** alt text MUST remain optional when no default OG image is present
#### Scenario: Logo upload requires alt text
- **WHEN** an admin uploads a brand logo without alt text
- **THEN** validation MUST fail with a pt-BR error message
- **AND** alt text MUST remain optional when no logo is uploaded
#### Scenario: Singleton avoids generic key-value store
- **WHEN** site settings are stored
- **THEN** the system MUST use typed columns on `site_settings`
- **AND** MUST NOT introduce a generic key/value configuration table
#### Scenario: Editorial defaults remain available when optional fields are empty
- **GIVEN** manifesto, method steps or principles fields are empty
- **WHEN** the home is rendered
- **THEN** the page MUST still render those sections using safe editorial defaults
- **AND** MUST NOT error
## ADDED Requirements
### Requirement: Public geography defaults to São Paulo
Demo and visual seed content for site settings SHALL present the Amare operating city as São Paulo (capital), matching `PRODUCT.md`, instead of unrelated cities.
#### Scenario: Seeded settings use São Paulo
- **WHEN** content seeders populate `site_settings`
- **THEN** the city field MUST be São Paulo (or equivalent capital wording)
- **AND** MUST NOT present Fortaleza as the operating city

View File

@@ -0,0 +1,47 @@
## MODIFIED Requirements
### Requirement: Testimonials are managed with publication control
The system SHALL allow admins to manage testimonials (SPEC WEB-04) with quote text (including multi-paragraph content), author name, optional context (event type and/or date), optional photo with alt text, sort order, featured flag, and `published_at`. Public rendering MUST preserve paragraph breaks from the stored quote. Testimonials sourced from real clients MUST NOT be published to production without authorization; development seeds MAY include the authorized-pending real quotes marked for review.
#### Scenario: Unpublished testimonial is excluded
- **WHEN** a testimonial has `published_at` null
- **THEN** the `published()` scope MUST exclude it
#### Scenario: Published testimonial is queryable
- **WHEN** an admin sets `published_at` with required quote and author name
- **THEN** the testimonial MUST be included in the `published()` scope
#### Scenario: Assistant cannot manage testimonials
- **WHEN** an assistant attempts to access the testimonials Resource
- **THEN** access MUST be denied with HTTP 403
#### Scenario: Featured testimonials are filterable
- **WHEN** content is queried with featured filter
- **THEN** records with `is_featured` true MUST be retrievable independently of sort order
#### Scenario: Multi-paragraph quotes render as paragraphs
- **GIVEN** a published testimonial whose quote contains blank-line separated paragraphs
- **WHEN** the home testimonials section is rendered
- **THEN** each paragraph MUST appear as distinct block text rather than a single collapsed line
## ADDED Requirements
### Requirement: Real wedding testimonials are seeded from authorized source copy
Content and visual seeders SHALL replace fictional testimonials with the five real wedding testimonials from `depoimentos.md`, preserving author couple names, quote wording, and date/context. Until final publication authorization is confirmed, production deployments MUST keep those records unpublished or gated by explicit admin publish action.
#### Scenario: Seed loads the five real couples
- **WHEN** the content seeder runs
- **THEN** testimonials for Jeniffer e Maick, Quesia e Jhonata, Milena e Weslley, Raquel e Pedro, and Victoria e Pedro MUST exist with their source quotes and marriage context/dates
#### Scenario: Fictional demo quotes are removed
- **WHEN** the content seeder completes
- **THEN** previously invented placeholder testimonial authors MUST NOT remain as the published demo set

View File

@@ -0,0 +1,56 @@
## MODIFIED Requirements
### Requirement: Public screens have desktop and mobile visual baselines
The system SHALL keep versioned screenshot baselines for the public screens available in this phase (SPEC §13.5): Home, Serviços, Portfólio and Detalhe do portfólio, at 1440×1000 desktop and 390×844 mobile, under the Heritage Editorial identity. A rendering change that alters those screens MUST fail the browser suite until the diff is reviewed and baselines are explicitly updated.
#### Scenario: Unintended visual change fails the suite
- **GIVEN** approved baselines exist
- **WHEN** a code change alters the rendering of a covered screen
- **THEN** the visual assertion MUST fail and report the diff
#### Scenario: Both viewports are covered
- **WHEN** the visual suite runs
- **THEN** each covered screen MUST be asserted at 1440×1000 and 390×844
#### Scenario: Heritage Editorial identity is captured
- **WHEN** approved baselines for the home are reviewed after this change
- **THEN** they MUST reflect EB Garamond typography, olive/paper palette and sharp-edged editorial layout rather than the previous gold/rounded placeholder look
### Requirement: Visual runs are deterministic
Visual runs SHALL be deterministic per SPEC §13.5: fixed Chromium and Linux image, fixed viewport, timezone `America/Fortaleza`, locale `pt-BR`, self-hosted fonts installed/bundled for the suite, frozen clock, deterministic seed (including real testimonial subset and São Paulo settings), animations and transitions disabled, and no dependency on external network.
#### Scenario: Repeated run without code change produces no diff
- **WHEN** the visual suite runs twice against the same commit and seed
- **THEN** both runs MUST pass with no pixel diff
#### Scenario: Time-dependent content does not cause drift
- **GIVEN** the clock is frozen and the seed is deterministic
- **WHEN** the suite runs on a different calendar day
- **THEN** rendered dates MUST remain identical to the baseline
#### Scenario: Motion is disabled during capture
- **WHEN** a screenshot is captured
- **THEN** CSS animations and transitions MUST be disabled
### Requirement: Baseline updates are explicit and reviewed
Baselines SHALL only be updated through the explicit `composer visual:update` command, and the resulting diff MUST be reviewed by a human before merge. Baselines MUST NOT be regenerated automatically to make CI pass.
#### Scenario: CI does not regenerate baselines
- **WHEN** the `browser` CI job runs
- **THEN** it MUST run in assertion mode
- **AND** MUST NOT write new baselines
#### Scenario: Developer updates baselines intentionally
- **WHEN** a developer runs `composer visual:update`
- **THEN** the updated baseline files MUST be written to the versioned baseline directory for review

View File

@@ -0,0 +1,79 @@
## MODIFIED Requirements
### Requirement: Public routes have no critical or serious accessibility issues
The system SHALL run automated accessibility checks on the public routes covered by the browser suite (SPEC §6.5, §13.8) after the Heritage Editorial redesign. A critical or serious issue MUST fail the suite.
#### Scenario: Critical issue blocks the suite
- **WHEN** the automated accessibility check reports a critical or serious issue on a covered route
- **THEN** the browser suite MUST fail and report the offending rule and selector
#### Scenario: Covered routes are checked
- **WHEN** the accessibility suite runs
- **THEN** the home, services listing, portfolio listing and case detail MUST each be checked
### Requirement: Public pages use accessible semantic structure
Public pages SHALL provide semantic landmarks, exactly one `h1` per page, a coherent heading order, alt text on every content image and brand mark, and visible focus on interactive elements (SPEC §6.5).
#### Scenario: Single h1 per page
- **WHEN** any public page is rendered
- **THEN** exactly one `h1` element MUST be present
#### Scenario: Landmarks are present
- **WHEN** any public page is rendered
- **THEN** `header`, `main`, `nav` and `footer` landmarks MUST be present
#### Scenario: Content images expose alt text
- **WHEN** a page renders a cover or gallery image
- **THEN** the `alt` attribute MUST contain the stored alt text
#### Scenario: Brand mark exposes accessible name
- **WHEN** the public header brand mark is rendered
- **THEN** it MUST expose an accessible name identifying Amare Assessoria
### Requirement: Public pages are fully keyboard operable
Visitors SHALL be able to reach and activate every interactive element with the keyboard, including the mobile navigation disclosure when visible, with a visible focus indicator and a skip link to the main content.
#### Scenario: Keyboard reaches the primary CTA
- **WHEN** a visitor navigates the home with the Tab key
- **THEN** the primary CTA MUST receive focus with a visible indicator
- **AND** activating it with the keyboard MUST navigate to the contact route
#### Scenario: Skip link bypasses navigation
- **WHEN** a visitor focuses the first element of a public page
- **THEN** a skip link to the main content MUST be available
#### Scenario: Mobile menu is keyboard operable
- **WHEN** the mobile menu button is focused and activated with the keyboard
- **THEN** the navigation links MUST become reachable by subsequent Tab stops
- **AND** the button MUST expose the correct `aria-expanded` state
### Requirement: Reduced motion preference is honored
The system SHALL suppress non-essential animation and transition when the user agent reports `prefers-reduced-motion: reduce`, including editorial hover scales and menu transitions introduced by the redesign.
#### Scenario: Reduced motion disables transitions
- **GIVEN** the browser reports `prefers-reduced-motion: reduce`
- **WHEN** a public page is loaded
- **THEN** decorative transitions and animations MUST NOT run
### Requirement: Public pages emit no console errors
Covered public routes SHALL load without JavaScript console errors in a real browser (SPEC §13.8, §19), including pages that load the mobile navigation script.
#### Scenario: Console stays clean on covered routes
- **WHEN** a covered public route is loaded in the browser suite
- **THEN** the console MUST contain no error-level messages