# Homepage Rewrite + Build Repairs — 2026-06-08

## What changed
**New premium homepage:** `site/src/pages/index.astro` fully rewritten in your real brand
(Instrument Serif + Plus Jakarta Sans, indigo/mint on warm canvas). Sections: hero with inline
niche input + browser-framed live preview, partner logo strip, 3-step build pipeline, four
distinct template art directions, six-feature grid with icons, serif pull-quote proof band,
3-tier pricing (Pro elevated), full-width indigo CTA band. Scroll-reveal + float animations,
mobile sticky-safe. Original saved at `_repair-backups/index.astro.orig.bak`.

## Build-breaking corruption found & fixed
Your repo had several files truncated mid-token (a bad sync/copy). These broke `astro build`
for everyone — not just the new homepage. Repaired:

| File | Was | Fix |
|------|-----|-----|
| `src/styles/global.css` | cut off inside `.blueprint-grid` (unclosed block) | completed the rule + closed `@layer` |
| `src/components/TemplateCard.astro` | cut at `<p class="` | completed tagline + bestFor + closing tags |
| `src/pages/templates.astro` | cut at `</BaseLayo` | closed `</BaseLayout>` |
| `src/pages/how-it-works.astro` | trailing stray `<` | closed `</BaseLayout>` |
| `src/pages/pricing.astro` | Stripe checkout script cut at `alert(data.de` | completed try/catch/finally + closed script |

Corrupt originals saved as `*.corrupt.bak` in `_repair-backups/`.

> NOTE: `src/pages/app/index.astro`, `app/new.astro`, `app/site.astro` contain embedded null
> bytes. They currently still build, but you should re-save them from a clean source when you can.

## Verified
Full `astro build` now passes — **22 pages built**, including the new homepage. Verified by an
isolated Linux build (fresh `npm install`) and a Playwright render of the compiled output
(`facebook-promo/preview/REAL-built-homepage.png`).

## Deploy
The VPS deploy builds remotely, so just run from `work/aiaffiliate-platform`:

    python deploy/deploy_vps.py

It tars `site/` (incl. the repaired files + staged `public/media`), uploads to
`/var/www/aiaffiliate`, runs `npm install` + `astro build` on the VPS, and reloads Caddy.
(A local `npm run build` is optional — only needed if you want to preview before deploying.)
