/* The opening (7 Nov 2026): "Glass". js/intro.js builds it once per visit.
   Shards of the logo fly together and lock, the cracks seal, a glint runs across and the name comes
   into focus; then the shards burst out towards you and the console is underneath.
   Entrances ease out (the shards spring), exits ease in. */

.gi {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 2vmin; cursor: pointer;
  background:
    radial-gradient(60vmax 44vmax at 10% 92%, rgba(201, 162, 78, .26), transparent 70%),
    radial-gradient(56vmax 40vmax at 92% 6%, rgba(58, 80, 144, .34), transparent 70%),
    #070d22;
}
.gi__lockup { width: min(680px, 86vw); overflow: visible; }
.gi__tag {
  margin: 0; font: 600 12px/1 Unbounded, sans-serif; letter-spacing: .5em; text-transform: uppercase; color: #C9A24E;
  padding-left: .5em; animation: gi-focus .6s var(--ease-out) 1.2s both;
}

.gi__shard { transform-box: view-box; transform-origin: var(--ox) var(--oy); animation: gi-gather .95s var(--spring) var(--d) both; }
.gi__cracks { fill: none; stroke: #070d22; stroke-width: 1.1; stroke-linejoin: round; animation: gi-fade .5s var(--ease-out) .95s forwards; }
.gi__whole { opacity: 0; animation: gi-in .3s var(--ease-out) 1.15s forwards; }
.gi__glint { animation: gi-glint .75s var(--ease-io) 1.05s both; }
.gi__ltr { transform-box: fill-box; animation: gi-focus .7s var(--ease-out) calc(.75s + var(--i) * 45ms) both; }

.gi.is-out { animation: gi-fade .45s var(--ease-in) .15s forwards; }
.gi.is-out .gi__shard { animation: gi-burst .55s var(--ease-in) both; }
.gi.is-out .gi__whole { animation: none; opacity: 0; }
.gi.is-out .gi__ltr, .gi.is-out .gi__tag { animation: gi-fade .3s var(--ease-in) both; }

@keyframes gi-gather {
  from { transform: translate(var(--tx), var(--ty)) rotate(var(--r)) scale(.6); opacity: 0; }
  35% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
@keyframes gi-burst { to { transform: translate(var(--bx), var(--by)) rotate(var(--r)) scale(1.5); opacity: 0; } }
@keyframes gi-glint { from { transform: translateX(0); } to { transform: translateX(380px); } }   /* across the 208-wide mark */
@keyframes gi-focus { from { opacity: 0; filter: blur(5px); transform: translateY(14%); } to { opacity: 1; filter: none; transform: none; } }
@keyframes gi-fade { to { opacity: 0; } }
@keyframes gi-in { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .gi *, .gi.is-out * { animation: none !important; }
  .gi__cracks { display: none; }
  .gi__whole { opacity: 1; }
  .gi.is-out { animation: gi-fade .3s var(--ease-in) forwards; }
}
