@php /* | "Origen" storytelling: full-bleed cantera/nature photos that stack on | scroll (same sticky mechanism as the journey section). It reinforces that | the stone is 100% natural — extracted from the quarry — and not the | synthetic laja sold in local markets. Content is admin-managed through | the `origin_panels` setting; the list below is the fallback used before | seeding. */ $settings = app(\App\Services\SettingsService::class); $panels = $settings->get('origin_panels', [ [ 'image' => 'images/seed/hero-cantera.jpg', 'alt' => 'Cantera de piedra laja natural en Perú', 'eyebrow' => 'Nuestro origen', 'title' => 'Piedra natural, no fabricada', 'copy' => 'Extraemos piedra laja de cantera peruana: conserva su veta, su tono y su textura. No es la laja sintética que se ofrece en los mercados locales.', ], [ 'image' => 'images/real/hero/2.jpg', 'alt' => 'Frente de cantera de piedra laja', 'eyebrow' => 'La cantera', 'title' => 'Nace en la montaña', 'copy' => 'Cada bloque se extrae siguiendo la veta natural. Su origen define su dureza, su color y su comportamiento en obra.', ], [ 'image' => 'images/real/hero/4.jpg', 'alt' => 'Piedra natural seleccionada en cantera', 'eyebrow' => 'Tu obra', 'title' => 'Directo de la cantera', 'copy' => 'Sin intermediarios: piedra 100% natural, seleccionada pieza por pieza y despachada con trazabilidad a todo el Perú.', ], ]); /* | Hero-style stacked display: split the panel title on its first comma (or, | failing that, its first space) so the trailing clause can overlap the | first line the way the hero headline does. Titles without a natural break | fall back to a single line. */ $headingParts = function (string $title): array { $separator = str_contains($title, ',') ? ',' : ' '; if (! str_contains($title, $separator)) { return [$title, null]; } [$first, $rest] = explode($separator, $title, 2); $first = trim($first).($separator === ',' ? ',' : ''); $rest = trim($rest); return $rest === '' ? [$first, null] : [$first, $rest]; }; /* | Alternating plate side: the stacked origin panels interleave the text | plate LEFT / RIGHT / LEFT — the client asked for "izquierda derecha | izquierda", so the "La cantera" panel (index 1) lands on the right. | Driven by panel index so the order is explicit and trivial to change. */ $plateSides = ['left', 'right', 'left']; @endphp
    @foreach ($panels as $index => $panel)
  1. {{-- Overscanned layer so the parallax drift never exposes the edges. --}}
    {{-- Dark veil + dark plate: the client explicitly asked for a DARK effect here — a cream wash dulls the photo. Light text on the dark plate keeps AA contrast while the image stays rich. --}}
    @php $plateSide = $plateSides[$index % count($plateSides)] ?? 'left'; @endphp

    {{ $panel['eyebrow'] ?? null }}

    @php [$headingFirst, $headingSecond] = $headingParts((string) ($panel['title'] ?? '')); @endphp

    {{ $headingFirst }} @if ($headingSecond) {{ $headingSecond }} @endif

    {{ $panel['copy'] ?? null }}

  2. @endforeach {{-- Optional closing panel: the section that follows joins the same stack so the origin panels visibly recede underneath it instead of simply scrolling away. Rendered only when the slot has content. --}} @php $tailHtml = isset($tail) ? (string) $tail : ''; @endphp @if (trim(strip_tags($tailHtml)) !== '')
  3. {!! $tailHtml !!}
  4. @endif