/* ===== Farbschema =====
   #25274D  Hintergrund (Navy)
   #464866  Linien, Raster
   #AAABB8  Nebentext
   #2E9CCA  Akzent (Hellblau)
   #29648A  Akzent dunkel (Hover)
*/
:root {
  --bg: #25274D;
  --line: #464866;
  --text: #FFFFFF;
  --text-muted: #AAABB8;
  --accent: #2E9CCA;
  --accent-dark: #29648A;
  --dots: #34365C;          /* Raster: zwischen Hintergrund und Linienfarbe */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dots) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding-top: 48px;        /* Abstand oben/unten, falls der Bildschirm niedrig ist */
  padding-bottom: 48px;
}

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

/* Text oben, Terminal darunter */
.wrap {
  flex-direction: column;
  align-items: stretch;
  gap: 48px;
  max-width: 1100px;
}

.intro {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.status {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}

/* Pulsierender Punkt */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

h1 {
  margin: 0;
  font-size: clamp(44px, 8vw, 104px);
  line-height: .95;
  letter-spacing: -0.045em;
}

.lead {
  margin: 0;
  max-width: 520px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-muted);
}


.cursor {
  display: inline-block;
  width: 10px;
  height: 20px;
  margin-left: 4px;
  vertical-align: -3px;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

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

.links {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;          /* bricht auf schmalen Bildschirmen um */
  gap: 16px 24px;
}

.links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid var(--accent-dark);
  padding-bottom: 4px;
  transition: color .2s, border-color .2s;
}

.links a:hover,
.links a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

/* ===== Terminal ===== */
.terminal {
  width: 100%;
  min-width: 0;
  background: #1E2042;            /* etwas dunkler als der Hintergrund */
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

/* Fensterknöpfe (macOS-Farben) */
.win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.win-btn svg {
  width: 9px;
  height: 9px;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.win-btn--close { background: #FF5F57; stroke: #8C1A11; }
.win-btn--min   { background: #FEBC2E; stroke: #985712; }
.win-btn--max   { background: #28C840; stroke: #0B650D; }
.win-btn--max .fill { fill: #0B650D; stroke: none; }

.terminal__title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
}

.terminal__body {
  min-height: 330px;              /* Platz reservieren, damit nichts springt */
  padding: 28px 32px 32px;
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.9;
  overflow-x: auto;
}

.terminal__body p { margin: 0; }

.t-prompt  { color: var(--accent); }
.t-dim     { color: var(--text-muted); }
.t-out     { color: var(--text-muted); }
.t-percent { color: var(--text); }

/* Fortschrittsbalken: füllt die ganze verfügbare Breite */
.t-progress {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bar {
  flex: 1;                        /* nimmt den ganzen Restplatz */
  height: 16px;
  padding: 2px;
  border: 1px solid var(--accent-dark);
  border-radius: 3px;
}

.bar__fill {
  display: block;
  width: 100%;                    /* ohne JavaScript: voll */
  height: 100%;
  transition: width .2s ease;
  /* Blöcke wie in einem echten Terminal */
  background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 13px);
}

.js .bar__fill { width: 0; }      /* mit JavaScript: startet leer */

.t-percent {
  min-width: 4.5ch;               /* Breite fix, damit nichts zuckt */
  text-align: right;
}

/* Zeilen nur verstecken, wenn JavaScript läuft – ohne JS bleibt alles sichtbar */
.js .t-line      { display: none; }
.js .t-line.show { display: block; }
.js .t-progress.show { display: flex; }

/* ===== Handy ===== */
/* Tablet: Terminal etwas kompakter */
@media (max-width: 760px) {
  .terminal__body { font-size: 14px; padding: 22px; }
}

@media (max-width: 480px) {
  .lead { font-size: 17px; }
  .terminal__body { font-size: 12.5px; padding: 16px; min-height: 260px; }
  .wrap { gap: 20px; }
  h1 { overflow-wrap: anywhere; }   /* sehr lange Namen brechen statt überzulaufen */
}

.footer {
  padding: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

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