/* Matrix-Anleihen: der Startbildschirm und zwei kleine Details im Dashboard
   (Cursor im Namen, "//" vor den Überschriften). Bewusst in Schwarz-Weiß wie
   das übrige Terminal; Grün/Rot bleiben für Plus/Minus reserviert. */

:root {
  --matrix: #ffffff;
  --matrix-soft: rgba(255, 255, 255, 0.4);
}

/* ---------- Details im Dashboard ---------- */

.brand {
  padding: 4px 6px;
  margin-left: -6px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  -webkit-app-region: no-drag;
}

.brand:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.cursor {
  color: var(--matrix);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.panel-head h2::before {
  content: "// ";
  color: var(--matrix-soft);
}

/* ---------- Startbildschirm ---------- */

.boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  align-items: center;
  background: var(--bg-base);
  transition: opacity 0.4s var(--ease);
}

.boot[hidden] {
  display: none;
}

.boot.is-leaving {
  opacity: 0;
  pointer-events: none;
}

/* Fenster lässt sich auch hier oben verschieben */
.boot-drag {
  position: absolute;
  inset: 0 0 auto;
  height: var(--titlebar-h);
  -webkit-app-region: drag;
}

.boot-rain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.32;
}

.boot-inner {
  position: relative;
  width: min(640px, calc(100vw - 48px));
  margin: 0 auto;
  font-family: var(--font-num);
  isolation: isolate;
  transition: opacity 0.35s var(--ease);
}

.boot-inner::before {
  content: "";
  position: absolute;
  inset: -80px -120px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.6) 60%, transparent);
}

.boot-kicker {
  margin: 0 0 18px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.boot-title {
  margin: 0;
  min-height: 1.1em;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-shadow: 0 0 26px rgba(255, 255, 255, 0.28);
}

.boot-sub {
  margin: 10px 0 0;
  min-height: 1.3em;
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--text-secondary);
}

.boot-log {
  display: grid;
  gap: 4px;
  min-height: 72px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
}

.boot-log li {
  display: flex;
  gap: 10px;
  white-space: nowrap;
  animation: boot-in 0.25s var(--ease) both;
}

.boot-log .k {
  width: 92px;
  color: var(--text-muted);
}

.boot-log .v {
  color: var(--text-primary);
}

.boot-log .is-up {
  color: var(--success);
}

.boot-log .is-down {
  color: var(--danger);
}

@keyframes boot-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px 14px 16px;
  font-family: var(--font-num);
  text-align: left;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  opacity: 0;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), opacity 0.4s var(--ease);
}

.pill-btn.is-ready {
  opacity: 1;
}

.pill-btn:hover,
.pill-btn:focus-visible {
  outline: none;
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}

.pill {
  width: 46px;
  height: 18px;
  flex: none;
  background: linear-gradient(180deg, #ff8a8a 0%, #e11d48 55%, #9f1239 100%);
  border-radius: 99px;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.pill-text {
  display: grid;
  gap: 2px;
}

.pill-text strong {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: #fca5a5;
}

.pill-text small {
  font-size: 12px;
  color: var(--text-secondary);
}

.boot-quote {
  margin: 34px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- Foto (wie die Neo-Figur der Vorlage) ---------- */

.boot-figure {
  position: absolute;
  left: 3vw;
  bottom: 0;
  width: min(900px, calc(100vw - 640px - 7vw - 3vw - 40px), calc(74vh * 900 / 756));
  aspect-ratio: 900 / 756;
  opacity: 0;
  transform: translateX(-48px);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s var(--ease);
  pointer-events: none;
  /* Aufzugwand und Bildkanten laufen weich ins Schwarz aus: ein Oval um
     die beiden Personen, unten zusätzlich ein Verlauf zur Fensterkante. */
  -webkit-mask-image:
    radial-gradient(ellipse 50% 54% at 50% 56%, #000 52%, transparent 100%),
    linear-gradient(to bottom, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(ellipse 50% 54% at 50% 56%, #000 52%, transparent 100%),
    linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-composite: intersect;
}

.boot-figure.is-in {
  opacity: 1;
  transform: none;
}

.boot-figure img,
.boot-figure canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.boot-figure img {
  opacity: 0;
  filter: contrast(1.05) brightness(0.92);
  transition: opacity 0.9s var(--ease);
}

.boot-figure.is-solid img {
  opacity: 1;
}

.boot-figure canvas {
  transition: opacity 0.9s var(--ease);
}

.boot-figure.is-solid canvas {
  opacity: 0;
}

/* Mit Foto steht der Text rechts daneben */
.has-figure .boot-inner {
  margin: 0 7vw 0 auto;
}

@media (max-width: 1180px) {
  .boot-figure {
    display: none;
  }

  .has-figure .boot-inner {
    margin: 0 auto;
  }
}

.boot.is-jacking .boot-inner,
.boot.is-jacking .boot-figure {
  opacity: 0;
}

/* ---------- Übergang nach der roten Pille ---------- */

.boot-jack {
  position: absolute;
  inset: 0;
  display: grid;
  font-family: var(--font-num);
  pointer-events: none;
}

.boot-jack[hidden] {
  display: none;
}

.jack-title {
  align-self: center;
  justify-self: center;
  margin: 0;
  font-size: clamp(22px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: #ffffff;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}

.jack-sub {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-align: center;
  text-shadow: none;
}

.jack-log {
  align-self: start;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 64px 0 0 40px;
  list-style: none;
  font-size: 14px;
  color: var(--text-secondary);
}

.jack-log li:nth-last-child(-n + 2) {
  color: var(--text-primary);
  letter-spacing: 0.06em;
}

.boot.is-dark .boot-rain {
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .cursor {
    animation: none;
  }

  .boot,
  .boot-log li,
  .pill-btn,
  .boot-figure,
  .boot-figure img,
  .boot-figure canvas {
    transition: none;
    animation: none;
  }
}
