/*
 * Welcome-Monitor – angelehnt an das Erscheinungsbild von mercedes-benz.com:
 * schwarzer Grund, weiße Serifen-Headline, schlichte Sans-Serif, feine Linien.
 *
 * Die Hausschriften "MB Corpo" sind lizenzpflichtig und nicht enthalten.
 * Liegen die Web-Fonts vor, einfach nach assets/fonts/ kopieren – sonst
 * greifen die Ersatzschriften.
 */
@font-face {
  font-family: "MB Corpo A Title";
  src: local("MB Corpo A Title Cond"), url("../fonts/MBCorpoATitleCond-Regular-Web.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "MB Corpo S Text";
  src: local("MB Corpo S Text"), url("../fonts/MBCorpoSText-Regular-Web.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #9f9f9f;
  --subtle: #767676;
  --line: #333;
  --accent: #0078d6;
  --warn: #facc00;
  --font-title: "MB Corpo A Title", Georgia, "Times New Roman", serif;
  --font-text: "MB Corpo S Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Alle Maße skalieren mit der Bildschirmgröße (rem = 1,45 % der kürzeren Seite). */
html { font-size: 1.45vmin; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

.screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 3.2rem 4.5rem 2.4rem;
  transition: transform 2s ease;
}

/* ---------- Kopf ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}
.logo { height: 4.4rem; width: auto; display: block; }

/* ---------- Bühne ---------- */
.stage {
  flex: 1;
  display: flex;
  min-height: 0;
  padding: 4rem 0 2.4rem;
}

.welcome {
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  padding-right: 4rem;
}
.eyebrow {
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2rem;
}
.headline {
  font-family: var(--font-title);
  font-weight: normal;
  font-size: 7rem;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.lead {
  margin-top: 2.4rem;
  max-width: 30ch;
  font-size: 1.7rem;
  line-height: 1.5;
  color: var(--muted);
}
.clock { margin-top: auto; }
.clock-time {
  font-family: var(--font-title);
  font-size: 8rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.clock-date {
  margin-top: 1rem;
  font-size: 1.6rem;
  color: var(--muted);
}

.board {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-left: 4rem;
  border-left: 1px solid var(--line);
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--fg);
}
.board-title {
  font-weight: normal;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.pager span {
  display: inline-block;
  width: 2.2rem;
  height: 0.25rem;
  margin-left: 0.6rem;
  background: var(--line);
  vertical-align: middle;
  transition: background 0.4s;
}
.pager span.on { background: var(--fg); }

.list-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.list { list-style: none; transition: opacity 0.6s ease; }
.list.fade { opacity: 0; }

.row {
  position: relative;
  display: flex;
  align-items: baseline;
  padding: 1.55rem 0 1.55rem 2rem;
  border-bottom: 1px solid var(--line);
}
.row-time {
  flex: 0 0 11rem;
  font-size: 2.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.row-name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-title);
  font-size: 3.4rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row.is-next .row-time { color: var(--fg); }
.row.is-next::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.2rem;
  bottom: 1.2rem;
  width: 0.35rem;
  background: var(--accent);
}

.empty {
  padding-top: 3rem;
  font-family: var(--font-title);
  font-size: 3.4rem;
  color: var(--muted);
}

/* ---------- Fuß ---------- */
.bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--subtle);
}
.status::before {
  content: "";
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.7rem;
  border-radius: 50%;
  background: var(--subtle);
  vertical-align: middle;
}
.status.offline { color: var(--warn); }
.status.offline::before { background: var(--warn); }

/* ---------- Hochformat ---------- */
@media (orientation: portrait) {
  html { font-size: 1.9vmin; }
  .screen { position: relative; }
  .stage { flex-direction: column; padding-top: 3rem; }
  .welcome { flex: 0 0 auto; padding: 0 0 3rem; }
  .headline { font-size: 5.6rem; }
  .headline br { display: none; }
  .lead { margin-top: 1.6rem; }
  .clock { position: absolute; top: 3.2rem; right: 4.5rem; margin: 0; text-align: right; }
  .clock-time { font-size: 4.2rem; }
  .clock-date { font-size: 1.2rem; margin-top: 0.4rem; }
  .board { padding-left: 0; border-left: 0; }
}
