/* === P79 logo: shattered 2079 + glitching PROJECT ===
 * Used by logo.js, which builds .p79logo inside the hero title and adds
 * class "sh" to the title. Without JS the plain text title from style.css shows.
 * Phases (classes on .p79logo): ph-fire -> ph-holo -> ph-red, then "settled".
 */

/* The text title stays for screen readers and search, but hides from view */
.hero h1.title.sh { transform: none; line-height: 1; }
.title.sh .o, .title.sh .n { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; animation: none; }

/* === Layout === */
.p79logo { position: relative; display: block; width: min(92vw, 660px); }
.p79logo svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* PROJECT: spans from the left of the 2 to the right of the 0 (width set in logo.js) */
.pl-proj { position: relative; box-sizing: border-box; z-index: 2; opacity: 0; }
.pl-proj svg { height: auto; }
.pl-proj .pp-w { fill: #f2f2f5; }
.pl-proj .pp-c { fill: var(--cyan); opacity: 0; }
.pl-proj .pp-r { fill: var(--red); opacity: 0; }
/* the 2079 box; its viewBox has a margin, pulled back up under PROJECT */
.pl-stage { position: relative; aspect-ratio: 3515 / 2305; margin-top: -5.5%; }
.pl-solid, .pl-shards, .pl-shard, .pl-ghost, .pl-hud { position: absolute; inset: 0; }
.pl-shards { perspective: 1100px; }
.pl-shard { will-change: transform, opacity; backface-visibility: visible; }

/* === Colour phases: each shard holds 3 looks, only one shows === */
.pl-shard .lf, .pl-shard .lh, .pl-shard .lr { opacity: 0; transition: opacity .1s steps(2, end); }
.ph-fire .pl-shard .lf, .ph-holo .pl-shard .lh, .ph-red .pl-shard .lr { opacity: 1; }
/* the bright crack edges, only inside the letters */
.pl-shard .edge { fill: none; stroke-width: 16; stroke: #fff1c2; }
.ph-holo .pl-shard .edge { stroke: #eaffff; stroke-width: 12; }
.ph-red .pl-shard .edge { stroke: transparent; }
/* glow around the whole word per phase */
.ph-fire .pl-stage { filter: drop-shadow(0 0 6px #ff8a2a) drop-shadow(0 0 22px rgba(255,60,20,.8)); }
.ph-holo .pl-stage { filter: drop-shadow(0 0 6px rgba(45,226,230,.9)) drop-shadow(0 0 20px rgba(45,226,230,.45)); }
.ph-red .pl-stage { filter: drop-shadow(0 0 22px rgba(255,42,61,.55)); }

/* === Clean logo: red letters with a cyan rim offset behind them === */
.pl-solid { opacity: 0; }
.pl-solid .rim { fill: var(--cyan); transform: translate(-26px, 30px); }
.settled .pl-solid { opacity: 1; }
.settled .pl-shards { visibility: hidden; }

/* === Glitch ghosts (moved by logo.js during each burst) === */
.pl-ghost { opacity: 0; mix-blend-mode: screen; pointer-events: none; }
.g-r use { fill: #ff2a3d; }
.g-c use { fill: #2de2e6; }

/* === HUD frame: shows during the hologram step, flickering on === */
.pl-hud { opacity: 0; pointer-events: none; }
.ph-holo .pl-hud { animation: p79-hud .9s steps(1, end) both; }
.pl-hud i { position: absolute; width: 7%; height: 11%; border: 0 solid rgba(45,226,230,.8); }
.pl-hud .tl { left: 2%; top: 4%; border-width: 2px 0 0 2px; }
.pl-hud .tr { right: 2%; top: 4%; border-width: 2px 2px 0 0; }
.pl-hud .bl { left: 2%; bottom: 4%; border-width: 0 0 2px 2px; }
.pl-hud .br { right: 2%; bottom: 4%; border-width: 0 2px 2px 0; }
.pl-hud .bar { position: absolute; top: 34%; width: 1.2%; height: 32%; background: linear-gradient(var(--red), rgba(255,42,61,.2)); }
.pl-hud .bar.l { left: 0; }
.pl-hud .bar.r { right: 0; }
.pl-hud span { position: absolute; font: 500 10px/1 "JetBrains Mono", monospace; letter-spacing: .2em; color: rgba(45,226,230,.85); }
.pl-hud .t1 { right: 10%; top: 4%; }
.pl-hud .t2 { left: 10%; top: 14%; font-size: 12px; }
.pl-hud .t3 { right: 10%; bottom: 5%; }
@keyframes p79-hud { 0% { opacity: 0; } 10% { opacity: 1; } 18% { opacity: .2; } 26%, 85% { opacity: 1; } 92% { opacity: .3; } 100% { opacity: 0; } }

/* === PROJECT glitches in: hard jumps, torn slices, red/cyan split, then settles === */
.pl-proj.in { animation: p79-pl-in .9s both; }
.pl-proj.in .pp-c { animation: p79-pl-c .9s both; }
.pl-proj.in .pp-r { animation: p79-pl-r .9s both; }
@keyframes p79-pl-in {
  0%   { opacity: 0; }
  8%   { opacity: 1; transform: translateX(-8%); clip-path: inset(0 0 55% 0); animation-timing-function: steps(1, end); }
  16%  { opacity: .15; transform: translateX(3%); clip-path: inset(0); animation-timing-function: steps(1, end); }
  24%  { opacity: 1; transform: translateX(5%); clip-path: inset(45% 0 0 0); animation-timing-function: steps(1, end); }
  32%  { opacity: 0; animation-timing-function: steps(1, end); }
  42%  { opacity: 1; transform: translateX(-2%); clip-path: inset(20% 0 25% 0); animation-timing-function: steps(1, end); }
  54%  { opacity: 1; transform: none; clip-path: inset(0); animation-timing-function: steps(1, end); }
  62%  { opacity: .4; animation-timing-function: steps(1, end); }
  70%, 100% { opacity: 1; transform: none; clip-path: inset(0); }
}
/* the cyan and red copies split apart, then snap back on top of the white */
@keyframes p79-pl-c { 0%, 60% { opacity: .9; transform: translate(-160px, 40px); animation-timing-function: steps(1, end); } 30% { transform: translate(220px, -30px); } 70%, 100% { opacity: 0; transform: none; } }
@keyframes p79-pl-r { 0%, 60% { opacity: .9; transform: translate(170px, -40px); animation-timing-function: steps(1, end); } 30% { transform: translate(-200px, 30px); } 70%, 100% { opacity: 0; transform: none; } }
