<?php
/**
 * Full PPPHP brand lockup — the crystal "PP · </> · PHP" horizontal logo, with a
 * gradual crystal shine sweep + twinkling diamond sparkles (animation lives in
 * public/assets/css/app-theme.css, class-based, and honours prefers-reduced-motion).
 *
 * The complete wordmark (already spells the brand), so it REPLACES the
 * "[monogram] PPPHP" pairing in navbars/headers. For a compact square mark
 * (favicon, in-project navbars, tight spots) use core/views/brand-logo.php.
 *
 * Options (set before include):
 *   $brandLockupHeight int  pixel height (default 26; width scales 330:120)
 *   $brandLockupClass  str  extra CSS class(es) (default "brand-lockup-svg")
 *
 * Gradient/clip ids are unique per render so multiple instances never collide.
 * Colours + the bridge halo are chosen to read on both dark and light chrome.
 */
$__h   = isset($brandLockupHeight) ? (int) $brandLockupHeight : 26;
$__cls = isset($brandLockupClass) ? (string) $brandLockupClass : 'brand-lockup-svg';
$__w   = (int) round($__h * 330 / 120);
$__u   = 'ppk' . bin2hex(random_bytes(3));
$brandLockupHeight = null;
$brandLockupClass  = null;
$__p1 = 'M 90 70 h 100 c 55.23 0 100 44.77 100 100 c 0 55.23 -44.77 100 -100 100 h -50 v 60 c 0 16.57 -13.43 30 -30 30 c -16.57 0 -30 -13.43 -30 -30 V 70 z M 150 120 v 100 h 40 c 27.61 0 50 -22.39 50 -50 c 0 -27.61 -22.39 -50 -50 -50 h -40 z';
$__p2 = 'M 170 140 h 100 c 55.23 0 100 44.77 100 100 c 0 55.23 -44.77 100 -100 100 h -50 v 60 c 0 16.57 -13.43 30 -30 30 c -16.57 0 -30 -13.43 -30 -30 V 140 z M 230 190 v 100 h 40 c 27.61 0 50 -22.39 50 -50 c 0 -27.61 -22.39 -50 -50 -50 h -40 z';
?>
<svg class="pp-brand <?= htmlspecialchars($__cls) ?>" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 330 120" width="<?= $__w ?>" height="<?= $__h ?>" role="img" aria-label="PPPHP">
  <defs>
    <linearGradient id="<?= $__u ?>b" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#7dd3fc"/><stop offset=".42" stop-color="#4f7cf7"/><stop offset="1" stop-color="#4338ca"/></linearGradient>
    <linearGradient id="<?= $__u ?>p" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#e9d5ff"/><stop offset=".5" stop-color="#a855f7"/><stop offset="1" stop-color="#6d28d9"/></linearGradient>
    <linearGradient id="<?= $__u ?>s" x1="0" y1="0" x2=".7" y2="1"><stop offset="0" stop-color="#fff" stop-opacity=".6"/><stop offset=".38" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient>
    <linearGradient id="<?= $__u ?>f" x1="0" y1="0" x2="1" y2="1"><stop offset=".49" stop-color="#fff" stop-opacity="0"/><stop offset=".52" stop-color="#fff" stop-opacity=".55"/><stop offset=".56" stop-color="#fff" stop-opacity="0"/><stop offset=".72" stop-color="#fff" stop-opacity="0"/><stop offset=".74" stop-color="#fff" stop-opacity=".26"/><stop offset=".77" stop-color="#fff" stop-opacity="0"/></linearGradient>
    <linearGradient id="<?= $__u ?>t" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#67e8f9"/><stop offset=".5" stop-color="#22d3ee"/><stop offset="1" stop-color="#0ea5e9"/></linearGradient>
    <linearGradient id="<?= $__u ?>r" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#b8c2d0"/><stop offset="1" stop-color="#7c8aa0"/></linearGradient>
    <linearGradient id="<?= $__u ?>g" x1="0" y1="0" x2="1" y2="0"><stop offset="0" stop-color="#fff" stop-opacity="0"/><stop offset=".40" stop-color="#fff" stop-opacity="0"/><stop offset=".47" stop-color="#eaf6ff" stop-opacity=".95"/><stop offset=".52" stop-color="#fff" stop-opacity=".95"/><stop offset=".59" stop-color="#fff" stop-opacity="0"/><stop offset=".70" stop-color="#fff" stop-opacity="0"/><stop offset=".76" stop-color="#fff" stop-opacity=".5"/><stop offset=".82" stop-color="#fff" stop-opacity="0"/><stop offset="1" stop-color="#fff" stop-opacity="0"/></linearGradient>
    <mask id="<?= $__u ?>m" maskUnits="userSpaceOnUse" x="0" y="0" width="330" height="120">
      <g transform="translate(-4,-6) scale(0.26)">
        <path d="<?= $__p1 ?>" fill="#fff" fill-rule="evenodd"/>
        <path d="<?= $__p2 ?>" fill="#fff" fill-rule="evenodd"/>
      </g>
      <g stroke="#fff" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" fill="none">
        <path d="M 100 34 L 90 54 L 100 74"/><path d="M 112 26 L 98 82" stroke-width="5"/><path d="M 110 34 L 120 54 L 110 74"/>
      </g>
      <text x="128" y="90" font-family="'Inter', system-ui, -apple-system, sans-serif" font-weight="900" font-size="74" letter-spacing="-0.04em" fill="#fff">PHP</text>
    </mask>
  </defs>
  <g transform="translate(-4,-6) scale(0.26)">
    <path d="<?= $__p1 ?>" fill="url(#<?= $__u ?>b)" fill-rule="evenodd"/>
    <path d="<?= $__p1 ?>" fill="url(#<?= $__u ?>f)" fill-rule="evenodd"/>
    <path d="<?= $__p1 ?>" fill="url(#<?= $__u ?>s)" fill-rule="evenodd"/>
    <path d="<?= $__p2 ?>" fill="url(#<?= $__u ?>p)" fill-rule="evenodd"/>
    <path d="<?= $__p2 ?>" fill="url(#<?= $__u ?>f)" fill-rule="evenodd"/>
    <path d="<?= $__p2 ?>" fill="url(#<?= $__u ?>s)" fill-rule="evenodd"/>
    <path d="<?= $__p2 ?>" fill="none" stroke="#fff" stroke-opacity=".42" stroke-width="2.5" fill-rule="evenodd"/>
    <g class="pp-spark"><path fill="#fff" d="M150 98 L158 120 L150 142 L142 120 Z"/><circle fill="#fff" opacity=".9" cx="150" cy="120" r="6"/>
      <animate attributeName="opacity" values="0.72; 1; 0.72" dur="3.4s" repeatCount="indefinite"/></g>
    <g class="pp-spark pp-spark--b"><path fill="#fff" d="M230 168 L238 190 L230 212 L222 190 Z"/><circle fill="#fff" opacity=".9" cx="230" cy="190" r="6"/>
      <animate attributeName="opacity" values="0.72; 1; 0.72" dur="3.4s" begin="1.2s" repeatCount="indefinite"/></g>
  </g>
  <g class="pp-bridge" stroke="url(#<?= $__u ?>r)" stroke-width="6" stroke-linecap="round" stroke-linejoin="round" fill="none" style="filter: drop-shadow(0 0 1.2px rgba(2,6,23,.6));">
    <path d="M 100 34 L 90 54 L 100 74"/>
    <path d="M 112 26 L 98 82" stroke-width="5" stroke="#22d3ee"/>
    <path d="M 110 34 L 120 54 L 110 74"/>
  </g>
  <text x="128" y="90" font-family="'Inter', system-ui, -apple-system, sans-serif" font-weight="900" font-size="74" fill="url(#<?= $__u ?>t)" letter-spacing="-0.04em">PHP</text>
  <g mask="url(#<?= $__u ?>m)">
    <polygon class="pp-shine" points="0,-10 66,-10 34,130 -32,130" fill="url(#<?= $__u ?>g)" opacity="0">
      <animateTransform attributeName="transform" type="translate" values="-96 0; 360 0; 360 0" keyTimes="0; 0.42; 1" dur="4.8s" repeatCount="indefinite"/>
      <animate attributeName="opacity" values="0; 0.95; 0.95; 0; 0" keyTimes="0; 0.06; 0.36; 0.42; 1" dur="4.8s" repeatCount="indefinite"/>
    </polygon>
  </g>
</svg>
