# Demo: demo-marketing-1

> **Estado:** ✅ Production-ready (2026-04-29)
> **Producto:** [corporative](../products/corporative.md)
> **3er demo certificado** después de demo-law-firm-2 y demo-construction.

---

## 1. Identidad

| Campo | Valor |
|-------|-------|
| **Slug del demo** | `demo-marketing-1` |
| **Slug base** | `marketing-1` |
| **Source Porto** | https://www.okler.net/previews/porto/13.0.0/demo-marketing-1.html |
| **Producto que lo usa** | `corporative` (3 shop slugs: corporative, corporate-website, corporate-brand) |
| **Patrón welcome** | A — config-heavy (78 keys editables: 38 welcome + 26 about + 14 contact) |
| **Skin asociado** | `skin-marketing-1.css` |
| **Brand defaults** | primary `#0E5430` (verde forest del badge del logo), secondary `#9BD89F` (verde menta del wordmark), tertiary `#E8F5EA`, quaternary `#062817`, fonts Lexend + Open Sans |

---

## 2. Las 7 piezas

| # | Pieza | Archivo | Líneas |
|---|-------|---------|--------|
| 1 | Header | `resources/views/layout/front/headers/demo-marketing-1.blade.php` | ~70 |
| 2 | Footer | `resources/views/layout/front/footers/demo-marketing-1.blade.php` | ~80 |
| 3 | Page-header | `resources/views/layout/front/partials/page-header-marketing-1.blade.php` | ~50 |
| 4 | Welcome | `.../demos/demo-marketing-1/welcome.blade.php` | ~580 |
| 5 | About | `.../demos/demo-marketing-1/about.blade.php` | ~330 |
| 6 | Contact | `.../demos/demo-marketing-1/contact.blade.php` | ~200 |
| 7 | Demo CSS | `public/template/css/demos/demo-marketing-1.css` | ~860 |

Skin: `public/template/css/skins/skin-marketing-1.css`
Imágenes: `public/cd-project/img/demos/marketing-1/` (concept, generic, svg, icons)

---

## 3. Estructura del welcome (8 secciones)

1. **Hero** — Badge + título HTML con highlights `<mark>`/`<strong>`, 2 features pills, descripción, CTA "Conocé más"
2. **Marquee superior** — texto animado horizontal (Estrategia • Identidad • Diseño...)
3. **KPIs counters dark** — Badge + 3 KPIs con animación counter-up (value/suffix/label/description)
4. **CTA Empowering** — Heading HTML con highlight word + descripción + botón
5. **Services GSAP scroll-linked** — 3 categorías con imagen sticky + textarea de items por servicio (8 items default × 3 = 24)
6. **Projects** — Badge + heading HTML + grid 2x2 de `$featuredProjects` del módulo
7. **Testimonials carousel** — Stars badge + heading HTML + 3 testimonios estáticos (texto/autor/empresa) o `$references` del módulo si existen
8. **Marquee inferior** — segundo texto animado horizontal

38 keys editables: hero (5), marquees (2), kpi badge + 3×4 (13), services badge + 3×2 (7), projects (2), testimonials stars + heading + 3×3 (11), CTA final (2).

---

## 4. Estructura del about (8 secciones)

1. **Page header** con breadcrumb (page_title, breadcrumb_home, breadcrumb_current)
2. **Intro hero** — main_title + main_subtitle + image_intro_pill (badge sobre imagen) + image_intro_icon (SVG decorativo) + intro_link (CTA)
3. **Imagen Parallax** — full-width con scroll parallax
4. **Counters dark** — Badge + 4 KPIs counters (value/suffix/label/description opcional)
5. **Gradient section** — Badge + Heading + descripción sobre fondo gradiente
6. **Sticky Cultura/Valores** — 2 imágenes sticky a la izquierda + 2 columnas de paragraphs a la derecha (cultura_paragraphs[] + values_paragraphs[])
7. **Testimonials** — Stars label + heading HTML + 3 testimonios

26 keys editables: page header (3), intro (5), parallax (1), counters_badge + counters[] (2), gradient (3), cultura (4: title + watermark + 2 paragraphs + image), valores (4: title + watermark + 2 paragraphs + image), testimonials (4).

---

## 5. Estructura del contact (3 secciones)

1. **Hero header** — page_badge ("Hablemos") + page_heading + page_subtitle (descripción)
2. **Office 1** — phone, email, address + city + map_url + lat/long + office_image_1
3. **Office 2 (opcional)** — secondary_* (si está vacío, no se renderiza)

14 keys editables: page header (3), Office 1 (8), Office 2 (6 opcionales).

---

## 6. Customizaciones específicas

- **Service items dinámicos**: el blade welcome incluye un helper PHP `$normalizeItems` que tolera tanto array (desde JSON seed) como string newline-separated (desde textarea admin) → ambos formatos funcionan transparentemente.
- **Counters tolerantes**: `@if(!empty($counter['description']))` envuelve la descripción para no romper si el counter no la tiene (caso del about con 4 counters sin description).
- **Culture/Values paragraphs as arrays**: defaults en el blade en español + helper PHP que convierte string a array si el cliente edita desde el admin form como textarea.
- **Hero title con HTML**: usa `{!! ... !!}` para permitir `<strong>` y `<mark>` dentro del título principal del home.
- **Marquees twin**: dos textos animados (uno arriba, uno abajo) para reforzar palabras clave del posicionamiento.
- **GSAP scroll-linked services**: cada uno de los 3 bloques de servicios tiene una imagen sticky que cambia al hacer scroll → 3 imágenes (`generic-1.png`, `generic-2.png`, `generic-3.png`) que rotan con el scroll.

---

## 7. Bugs específicos arreglados (2026-04-29)

| Archivo | Bug | Fix |
|---------|-----|-----|
| `welcome.blade.php` L218 (services GSAP fallback) | `@foreach(config('site.welcome.service_X_items'))` rompía con warning si llegaba como string newline-separated | Helper `$normalizeItems` tolerante a string o array + defaults en español |
| `welcome.blade.php` L347 | `__('Learn More')` hardcoded en botón de cada servicio | `__('Conocé más')` |
| `welcome.blade.php` L499-501 (testimonials defaults) | "John Doe", "Robert Doe", "Monica Doe" + `'company' => 'Porto Theme'` | Reemplazados por "Cliente Satisfecho" + `config('site.name')` (fase 0 transversal) |
| `welcome.blade.php` service titles | Defaults en inglés (Strategy/Marketing/Design) | Defaults en español: Estrategia/Identidad/Comunicación |
| `about.blade.php` L169 | `Undefined array key "description"` cuando counters no tenían description → HTTP 500 | Wrap en `@if(!empty($counter['description']))` + `?? ''` en label |
| `about.blade.php` culture_paragraphs | Default array literal en inglés ("At our core, culture is the heart...") | Helper tolerante string/array + defaults en español |
| `about.blade.php` values_paragraphs | Default array literal en inglés con HTML `<strong>Integrity:</strong>...` | Helper tolerante string/array + defaults en español |
| `contact.blade.php` L33-36 | `__("Let's Go")` + `__('Ready to elevate your brand?')` + `__("We're excited...learn more about our services")` (inglés hardcoded) | Leído de `site.contact.page_badge` / `page_heading` / `page_subtitle` con fallback en español |
| `template/css/demos/demo-marketing-1.css` ×31 hex | Hex hardcoded de paleta tierra/oliva (`#e8e5df` ×19, `#f8f8f6` ×3, `#f0ede8` ×3, `#e0dbd3`, `#f3f2ee`, `#f7f7FF`, `#8a7d5a` ×2) → no respondían a brand_kit | Reemplazados por `var(--tertiary)` (36 ocurrencias) y `var(--primary)` (25 ocurrencias) |
| `admin/welcome/demo-marketing-1.blade.php` | 19 inputs (5 obsoletos `about_*`, faltaban kpi×3, service×3 items, marquee_text_2, cta_label, testimonials array) | Reescrito con 38 inputs en 7 secciones, alineado 1:1 con el blade |
| `admin/about/demo-marketing-1.blade.php` | 9 inputs (faltaban page_title, breadcrumb×2, intro details, parallax, counters[], paragraphs×2, image_culture/values, testimonials×3) | Reescrito con 26 inputs en 8 secciones |
| `admin/contact/demo-marketing-1.blade.php` | No existía — gap crítico | Creado con 14 inputs (page header + Office 1 + Office 2 opcional) |
| `seeds/projects-corporative.json` | Estructura `categories`/`category` (singular) → projects=0 en BD | Reescrito con `project_categories`/`project_tags`/`projects` con `categories: []` array |
| `seeds/gallery-corporative.json` | Estructura `categories`/`image` → gallery=0 en BD | Reescrito con `gallery_categories`/`gallery_tags`/`galleries` con `category` (singular) e `img` |
| `seeds/config-corporative.json` | Solo 35 keys + en inglés + placeholders `[tu@email.com]`, `[TU CIUDAD]` | Reescrito con 78 keys en español |

---

## 8. Auditoría — 30 items

| Bloque | Items | Estado |
|--------|-------|--------|
| 1. Anatomía y registros (5) | 5/5 | ✅ |
| 2. Header / Footer / Page-header (6) | 6/6 | ✅ |
| 3. Welcome / About / Contact (6) | 6/6 | ✅ (cero placeholders, español 100%, sin John Doe ni Lorem) |
| 4. CSS (demo + skin) (5) | 5/5 | ✅ (94 hex → 31 reemplazados por var(--*); 59 restantes son neutros utilitarios) |
| 5. Integración con módulos (4) | 4/4 | ✅ (services 4 + projects 7 + gallery 6 + faqs 10 renderizan) |
| 6. QA visual (4) | 4/4 | ✅ (smoke 7/7 URLs HTTP 200) |
| **TOTAL** | **30/30** | ✅ |

**Veredicto**: ✅ Production-ready

---

## 9. Pendientes / Out of scope

- **String "View More Questions" en JS** de cd-base/faqs/frontend/index.blade.php L1072 — código muerto en este demo (rama `isRestaurant` no se ejecuta). Se preserva porque restaurant-bar lo usa.
- Migración Tipo A → Tipo B (data-driven) queda pendiente para release futura, prerequisite del template selector.
- Service items as textarea — funciona pero no es paradigma "ideal CRUD". Trade-off intencional para mantener UI admin simple.
- Counters de about hardcoded a 4 elementos — admin expone los 4 slots; cambiar cantidad requiere editar el blade.
- 59 hex neutros restantes en el demo CSS (#fff, #555, #777, #ddd, #ccc, #212529, #000) — son utilitarios universales que no necesitan responder al brand_kit.

---

## 10. Referencias

- Producto: [`../products/corporative.md`](../products/corporative.md)
- Demos referencia ya pulidos: [`demo-law-firm-2.md`](demo-law-firm-2.md), [`demo-construction.md`](demo-construction.md)
- Demo overrides pattern: [`DEMO-OVERRIDES-PATTERN.md`](DEMO-OVERRIDES-PATTERN.md)
- Demo checklist: [`DEMO-CHECKLIST.md`](DEMO-CHECKLIST.md)
- Estándar técnico: [`../product-readiness/estandar-demo.md`](../product-readiness/estandar-demo.md)
