/* ── Boot gate & engine vignette ──────────────────────── */

.bpcard {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 9998; pointer-events: none;
  width: min(420px, 86vw); padding: 28px 24px 22px; text-align: center;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 12px 48px rgba(0, 0, 0, .65);
  backdrop-filter: blur(3px);

  & svg { width: 200px; height: 118px; display: block; margin: 0 auto 14px; }

  & .bp-blob {
    fill: var(--acc); fill-opacity: .28;
    stroke: var(--acc); stroke-width: 1.5;
    animation: bp-breathe 2.4s ease-in-out infinite;
  }

  & .bp-ants {
    fill: none; stroke: var(--ink); stroke-opacity: .7;
    stroke-width: 1; stroke-dasharray: 6 5;
    animation: bp-ants .8s linear infinite;
  }

  & .bp-scan {
    stroke: var(--acc); stroke-width: 1.5; stroke-opacity: .85;
    animation: bp-scan 2.8s linear infinite;
  }

  & .bp-title { font-size: 13px; letter-spacing: .28em; margin-bottom: 4px; }
  & .bp-eta { font-size: 26px; letter-spacing: .06em; min-height: 32px; color: var(--acc); }
  & .bp-note { font-size: 11px; letter-spacing: .05em; opacity: .55; margin-top: 6px; }

  & .bp-start {
    display: block; margin: 10px auto 4px; background: none; cursor: pointer;
    border: 1px solid var(--acc); border-radius: 3px;
    color: var(--acc); padding: 10px 22px;
    font: inherit; font-size: 13px; letter-spacing: .18em;
    &:hover { background: rgba(88, 192, 138, .08); }
  }

  &.ready {
    border-color: var(--acc);
    & .bp-title { color: var(--acc); }
    & .bp-blob { animation: none; fill-opacity: .45; }
    & .bp-ants { animation: none; stroke: var(--acc); stroke-dasharray: none; }
    & .bp-scan { display: none; }
  }

  &.asleep {
    & .bp-ants { animation: none; stroke-opacity: .3; }
    & .bp-scan { display: none; }
    & .bp-blob { animation: bp-breathe 6s ease-in-out infinite; fill-opacity: .14; }
    & .bp-title { opacity: .6; }
    & .bp-eta { font-size: 15px; letter-spacing: .18em; text-transform: uppercase; }
  }
}

/* ── boot gate ── */

#bootGate {
  position: fixed; inset: 0; z-index: 9997;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(6px);
  opacity: 1; transition: opacity .6s ease;

  &.out { opacity: 0; pointer-events: none; }
  &.start { cursor: default; }
  &.resume { cursor: pointer; }

  &.hot {
    outline: 1px dashed var(--acc); outline-offset: -10px;
    & .bpcard .bp-ants { stroke: var(--acc); }
    & .bpcard { transform: translate(-50%, -50%) scale(1.05); transition: transform .15s ease; }
    & .bp-ants { animation-duration: .25s; }
    & .bp-blob { fill-opacity: .5; animation: none; }
    & .bp-title { color: var(--acc); }
  }

  & .bpcard {
    background: none; border: none; box-shadow: none; backdrop-filter: none;
    pointer-events: auto;
  }

  & .bp-hatch {
    display: block; margin: 18px auto 0; background: none;
    border: 1px solid var(--line); border-radius: 3px;
    color: var(--ink); opacity: .7; cursor: pointer;
    padding: 6px 14px; font: inherit; font-size: 11px; letter-spacing: .08em;
    &:hover { opacity: 1; border-color: var(--acc); }
  }
}

/* ── extraction card ── */

#extractCard {
  z-index: 9999;
  & .bp-scan { animation-duration: 1.1s; }
  & .bp-ants { animation-duration: .4s; }
}

/* ── animations ── */

@keyframes bp-breathe { 50% { fill-opacity: .1; } }
@keyframes bp-ants { to { stroke-dashoffset: -11; } }
@keyframes bp-scan {
  0% { transform: translateY(12px); opacity: 0; }
  8% { opacity: .85; }
  92% { opacity: .85; }
  100% { transform: translateY(118px); opacity: 0; }
}
