/* DEADLINE — the motion layer.
   Three things live here: the boot sequence that plays while the registry is
   read, the scroll choreography for the argument, and the small touches that
   keep the firelit room feeling lit. Loaded after site/pages/ward/swarm css
   so it always speaks last. */

/* ── boot ────────────────────────────────────────────────────── */
/* The page hides behind the boot screen until it exists, so the first thing
   a visitor sees is never a half-painted argument. */
html.fx-pre body { visibility: hidden; }
html.fx-lock { overflow: hidden; }

.fx-boot {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px; cursor: pointer; text-align: center; padding: 24px;
  background:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(90% 60% at 50% 112%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 60%),
    var(--bg);
  transition: transform .65s cubic-bezier(.76, 0, .24, 1);
  will-change: transform;
}
/* The deadline line the curtain lifts along. */
.fx-boot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--accent);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 65%, transparent);
}
.fx-boot.is-out { transform: translateY(-101%); }

.fx-boot-mark { width: 88px; height: 88px; animation: fx-mark 1.5s ease-out backwards; }
@keyframes fx-mark {
  from { opacity: 0; transform: scale(.86); filter: drop-shadow(0 0 0 transparent); }
  60%   { opacity: 1; }
  to    { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 20px color-mix(in srgb, var(--accent) 45%, transparent)); }
}

.fx-boot-name {
  margin: 0; font: 600 24px/1 var(--serif); color: var(--ink);
  letter-spacing: .34em; text-indent: .34em; /* keep it optically centred */
  animation: fx-name .9s ease .18s backwards;
}
@keyframes fx-name { from { opacity: 0; letter-spacing: .5em; text-indent: .5em; } to { opacity: 1; } }

.fx-boot-lines { display: grid; gap: 7px; justify-items: center; min-height: 76px; align-content: start; }
.fx-boot-line {
  margin: 0; font: 12px/1.5 var(--mono); color: var(--ink-2);
  opacity: 0; transform: translateY(4px);
  transition: opacity .35s ease, transform .35s ease;
}
.fx-boot-line.is-on { opacity: 1; transform: none; }
.fx-boot-line.is-ok { color: var(--stable); font-weight: 600; }

.fx-boot-bar { width: min(224px, 60vw); height: 2px; border-radius: 1px; background: var(--line-2); overflow: hidden; }
.fx-boot-fill {
  display: block; height: 100%; width: 0%; border-radius: 1px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent), var(--gold));
  animation: fx-fill 2.3s linear forwards;
}
@keyframes fx-fill { from { width: 0%; } to { width: 100%; } }

.fx-boot-hint {
  margin: 0; font: 10px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-3); opacity: 0; transition: opacity .5s ease .9s;
}
.fx-boot-hint.is-on { opacity: 1; }

/* ── scroll choreography ─────────────────────────────────────── */
.rv {
  opacity: 0; transform: translateY(18px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.rv.rv-in { opacity: 1; transform: none; }
.bar.rv { transform: translateY(-10px); }

/* ── small touches ───────────────────────────────────────────── */
/* The h1 breathes like the fire it sits in front of. */
h1 { animation: fx-h1 6s ease-in-out infinite; }
@keyframes fx-h1 {
  0%, 100% { text-shadow: 0 0 0 transparent; }
  50%      { text-shadow: 0 0 28px color-mix(in srgb, var(--accent) 16%, transparent); }
}

.card, .merge, .role { transition: transform .25s ease, border-color .25s ease, background-color .25s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.merge:hover { border-color: var(--line-2); }
.role:hover { background: var(--bg-3); }

.limits li { transition: border-color .25s ease; }
.limits li:hover { border-color: var(--line-2); }

/* The stage strip numbers settle in one by one when they land. */
.sv b, .stat b { font-variant-numeric: tabular-nums; }
