/* ─────────────────────────────────────────────────────────
   boot.css — terminal boot sequence overlay.
   Linked on index.html only.
   ───────────────────────────────────────────────────────── */

.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, 'SF Mono', Menlo, 'Cascadia Mono', Consolas, monospace;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 48px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 300ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}
.boot-overlay.in  { opacity: 1; }
.boot-overlay.out { opacity: 0; transition: opacity 400ms cubic-bezier(0.22, 1, 0.36, 1); }

/* Grid texture layer — continuity with the live site at 30% */
.boot-overlay .boot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
}

/* Very subtle scanline — barely perceptible */
.boot-overlay .boot-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    color-mix(in srgb, var(--text) 2%, transparent),
    color-mix(in srgb, var(--text) 2%, transparent) 1px,
    transparent 1px,
    transparent 3px
  );
}

.boot-overlay .boot-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.boot-overlay .boot-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 55%, transparent);
}
.boot-overlay .boot-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: bootDotPulse 1.2s ease-in-out infinite;
}
@keyframes bootDotPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.boot-overlay .boot-skip {
  font-family: inherit;
  background: none;
  border: none;
  padding: 6px 2px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 40%, transparent);
  cursor: pointer;
  transition: color 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.boot-overlay .boot-skip:hover  { color: var(--text); }
.boot-overlay .boot-skip:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--text) 40%, transparent);
  outline-offset: 4px;
}

.boot-overlay .boot-main {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.boot-overlay .boot-lines {
  max-width: 680px;
  width: 100%;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
}
.boot-overlay .boot-line {
  white-space: pre;
  overflow: hidden;
  text-overflow: clip;
}

.boot-overlay .boot-accent { color: var(--accent); }

.boot-overlay .boot-cursor {
  display: inline-block;
  margin-left: 1px;
  animation: bootCursorBlink 1s step-start infinite;
}
@keyframes bootCursorBlink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.boot-overlay .boot-footer {
  position: relative;
  z-index: 2;
}
.boot-overlay .boot-counter {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 50%, transparent);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.boot-overlay .boot-progress {
  height: 1px;
  width: 100%;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  overflow: hidden;
}
.boot-overlay .boot-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--boot-duration, 4000ms) linear;
  will-change: transform;
}
.boot-overlay .boot-progress-fill.run {
  transform: scaleX(1);
}

@media (max-width: 700px) {
  .boot-overlay       { padding: 24px; }
  .boot-overlay .boot-lines { font-size: 12px; line-height: 1.7; }
  .boot-overlay .boot-grid  { background-size: 32px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .boot-overlay .boot-dot,
  .boot-overlay .boot-cursor,
  .boot-overlay .boot-progress-fill { animation: none; transition: none; }
}
