# Frontend 1 handoff

## Shared UI components (ready)

All in `resources/views/components/ui/`. Props exactly as in the outline, section 6.5. Extra attributes (`data-track`, `data-reveal`, `aria-*`) pass through to the root element.

| Component | Notes |
|---|---|
| `<x-ui.section id class width="boxed|full">` | `boxed` wraps the slot in `.section__inner` (max-width 1140px, Elementor boxed width). |
| `<x-ui.heading title subtitle tag align class>` | `title` and `subtitle` are output unescaped (trusted content-file HTML, so `<br>` / `<span>` work). Renders `.heading > .heading__title + .heading__subtitle` (title first, subtitle as `h3` after it, like The Plus). Optional `subtitleTag` (default `h3`). |
| `<x-ui.button href label variant target class>` | `.btn.btn--primary|outline|light`. `target="_blank"` adds `rel="noopener"`. |
| `<x-ui.info-box title text icon href linkLabel number>` | Optional extra props: `tag` (title element, default `div` because The Plus `service-title` is not a heading; pass `h3` only where the original had a heading) and `iconAlt` (default "" since the original icons have empty alt). `text` is unescaped HTML. |
| `<x-ui.check-list :items="[...]">` | Items are strings, or rows with a `text` key. |
| `<x-ui.video src poster>` | Inline player: thumbnail button starts the MP4 in place, carries `data-track="video_play"`. Optional `posterAlt`, `playIcon` (image), `playIconAlt`, `title`. Like The Plus self-hosted player, the <video> also carries `poster`. For a popup (Lity) video use any link with `data-video-popup` pointing at the MP4. |
| `<x-ui.form-embed src minHeight title>` | No inline style (CSP): min-height comes from `data-min-height`, applied by site.js. |

Scroll animations: `data-reveal="fade-up|fade-left|fade-right|fade-in|zoom-in"` (also `slide-down`, `slide-right`, `expand-in` for The Plus velocity animations; fade-left = Elementor fadeInLeft, enters from the left) and optional `data-reveal-delay="200"` (ms). Content is visible without JS (the hidden state is only applied when `html.js` is set and reduced motion is off).

Design tokens are CSS custom properties on `:root` in `resources/css/site/tokens.css` (`--color-primary`, `--color-dark`, `--font-poppins`, `--font-rubik`, `--font-roboto`, ...; all self-hosted families have a `--font-*` token). Frontend 2 may use them.

## Requests to other roles

(see below; appended as work progresses)

- **All roles / PM**: idealers.app sends `frame-ancestors 'self' https://idealers.net`, so the three form iframes only load when the site is served from https://idealers.net. On localhost or a staging host they show the browser's "blocked" placeholder. Not a bug in the rebuild; staging QA of the forms needs the real domain (or idealers.app adding the staging host).
- **Backend 2**: layout passes `:title` / `:robots` to `<x-seo.head>` from the optional sections `seo_title` / `seo_robots` (used by the 404/419 views, robots `noindex, follow`). 500/503 use `resources/views/errors/minimal.blade.php`, which needs no DB/session and outputs its own `noindex` title.
- **Backend 2 / analytics**: `data-track` values used: `demo_request_click`, `talk_to_sales_click`, `phone_click`, `dealership_login`, `video_play`. Consent stored as `{"analytics":true|false,"ts":...}` in `localStorage.idealers_consent`; "I Agree" = true, the close (X, title "No") button = false.
- **Backend 1**: `_global.php` now also has `errors.*` fields (error page wording) and `header.menu_toggle_label`. Content files use `page_url()` inside the arrays (evaluated when the file is loaded). The legal pages store each section as `legal.sections` (title + richtext body); the bodies contain inline `style="color:..."` spans copied from the original, which the admin sanitiser will strip on save (colours then fall back to the CSS default).
- **Frontend 2**: `<x-site.icon name="...">` (inline Font Awesome 5 SVGs) is available if useful; names are in `resources/views/components/site/icon.blade.php`.

## Known deviations from the original (deliberate)

- Header is not sticky: the original header scrolls away (no sticky setting on it), so the rebuild matches that.
- At 768-1024px the original's desktop menu wraps into a broken column; the rebuild keeps it on one line with smaller type. The hamburger menu still starts at 760px like the original.
- Top bar social links get accessible names ("iDealers on Facebook" ...); the original had none.
