/* Boot intro: one capital letter is written on a dark screen with a broad-edge
   brush, then a single soft light passes over it before the overlay fades into
   the page. The letter is hand-drawn vector geometry (no font): each stroke is
   a filled outline uncovered by a pen line running along its own centerline,
   so thick and thin parts appear exactly as the brush lays them down.
   Pure CSS timeline, so a failed script can never trap the page: the overlay
   hides itself when its last keyframe ends. html.intro is set by a tiny inline
   script in <head> (once per session, never under prefers-reduced-motion).
   Colors come from the page's own theme tokens (--bg, --accent-bright,
   --accent-glow), so the intro matches the hero's name in dark and light. */

.boot { display: none; }

html.intro {
  --intro: 2.85s;                    /* page entrance waits for the overlay */
  --boot-exit: 2.6s;                 /* the moment it lets go */
}

html.intro .boot {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  overflow: hidden;
  cursor: default;
  animation: boot-out 0.5s ease var(--boot-exit) both;
}
/* skipped: the half-written letter holds still while the overlay fades fast */
html.intro-skip .boot * { animation-play-state: paused; }
html.intro.intro-skip .boot { animation: boot-skip 0.28s ease-out both; }

.boot-mark {
  display: block;
  width: auto;
  height: min(250px, 36vh);
  overflow: visible;
  /* the same soft glow the hero name carries */
  filter: drop-shadow(0 0 18px var(--accent-glow));
}

.bm-ink { fill: var(--accent-bright); }

/* each brush stroke is uncovered by a wide pen line drawn along its centerline */
.bm-pen {
  fill: none;
  stroke: #fff;
  stroke-width: var(--w, 30);
  stroke-linecap: butt;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  animation: bm-write var(--t, 0.4s) var(--e, ease) var(--d, 0s) both;
}

/* once written, one soft band of light crosses the ink */
.bm-sweep {
  opacity: 0;
  animation: bm-sweep 0.8s cubic-bezier(0.4, 0, 0.3, 1) 1.75s both;
}

@keyframes bm-write {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}
@keyframes bm-sweep {
  from { transform: translateX(0); opacity: 0.9; }
  to   { transform: translateX(var(--sx, 300px)); opacity: 0.9; }
}
@keyframes boot-out {
  from { opacity: 1; visibility: visible; }
  to   { opacity: 0; visibility: hidden; }
}
@keyframes boot-skip {
  from { opacity: 1; visibility: visible; }
  to   { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html.intro .boot { display: none; }
}
