/* =================================================================
   Leitstelle Elsterhausen – öffentliche Startseite
   Idee: Nachtschicht in der Leitstelle. Ein Element ist laut –
   die Einsatzdepesche, die sich beim Laden einmal ausdruckt.
   Alles andere bleibt ruhig.
   Schriften liegen auf dem eigenen Server (kein Google Fonts).
   ================================================================= */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); }

:root {
    --night:   #17212b;   /* Nachtschicht – Hintergrund */
    --desk:    #1f2b37;   /* Leitstellenpult – Flächen */
    --desk-2:  #28374a;
    --line:    #33455a;
    --text:    #e8edf2;
    --muted:   #9aa8b7;
    --red:     #c1272d;   /* Feuerrot (angelehnt an RAL 3000) */
    --red-2:   #dd3a3f;
    --blue:    #3d8bf2;   /* Blaulicht */
    --paper:   #f2f0e9;   /* Thermopapier – nur für die Depesche */
    --ink:     #23201c;
    --fms-1:   #9ad18b;
    --fms-2:   #3cb371;
    --fms-3:   #f0c419;
    --fms-4:   #f08a24;

    --display: "Barlow Condensed", "Arial Narrow", sans-serif;
    --body:    "Barlow", system-ui, sans-serif;
    --mono:    ui-monospace, "Cascadia Mono", "Consolas", "Liberation Mono", monospace;
    --wrap:    1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--night);
    color: var(--text);
    font: 400 17px/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.hidden { display: none !important; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0; letter-spacing: .005em; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 22px; font-weight: 600; }
p { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 6px;
    background: var(--red);
    color: #fff;
    font: 600 16px/1.2 var(--body);
    text-decoration: none;
    border: 2px solid var(--red);
    transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--red-2); border-color: var(--red-2); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.big { padding: 14px 24px; font-size: 18px; }
.btn.light { background: #fff; border-color: #fff; color: var(--red); }
.btn.light:hover { background: var(--paper); border-color: var(--paper); }

/* ---------- Navigation ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 14px 24px;
    background: var(--night);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark { width: 40px; height: 40px; flex-shrink: 0; }
.logo-mark .beam { stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; fill: none; opacity: .85; }
.logo-mark .dome { fill: var(--blue); }
.logo-mark .glint { stroke: #bcd8ff; stroke-width: 2; stroke-linecap: round; fill: none; }
.logo-mark .base { fill: var(--red); }
.logo-mark .foot { fill: #8d1c20; }
.logo-text { font: 600 21px/1 var(--display); color: var(--muted); }
.logo-text b { color: var(--text); font-weight: 700; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; }

/* ---------- Kopfbereich ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: 56px;
    align-items: center;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 56px 24px 72px;
}
.hero h1 { font-size: clamp(42px, 5.6vw, 72px); line-height: .98; text-wrap: balance; }
.lede { margin-top: 24px; max-width: 34em; color: #c9d3dd; font-size: 19px; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.welcome { width: 100%; color: var(--muted); font-size: 15px; }
.welcome b { color: var(--text); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 26px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--fms-2); }

/* ---------- Einsatzdepesche ---------- */
.depesche-wrap { position: relative; margin: 0; padding-top: 18px; justify-self: center; width: min(100%, 440px); filter: drop-shadow(0 22px 26px rgba(0,0,0,.45)); }
.printer {
    position: absolute;
    inset: 0 -14px auto;
    height: 22px;
    border-radius: 6px 6px 3px 3px;
    background: linear-gradient(#3a4a5c, #26323f);
    box-shadow: 0 4px 10px rgba(0,0,0,.4);
    z-index: 2;
}
.printer span { position: absolute; left: 18px; right: 18px; bottom: 5px; height: 3px; border-radius: 2px; background: #0d1319; }
.depesche {
    position: relative;
    margin: 0 4px;
    padding: 22px 22px 26px;
    background: var(--paper);
    color: var(--ink);
    font: 500 13.5px/1.55 var(--mono);
    transform: rotate(-1.4deg);
    transform-origin: top center;
}
/* Abriss-Kante unten (eigenes Element, damit die Druck-Animation sie nicht abschneidet) */
.depesche::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0h12L6 8z' fill='%23f2f0e9'/%3E%3C/svg%3E") 0 0 / 12px 8px repeat-x;
}
.dp-line { display: flex; justify-content: space-between; gap: 14px; }
.dp-line .k { flex: 0 0 auto; min-width: 104px; color: #6b655c; }
.dp-line > span:last-child { text-align: right; }
.dp-head { font-weight: 700; }
.dp-rule { height: 0; border-top: 1.5px dashed #a59f93; margin: 10px 0; }
.dp-big { font-weight: 700; font-size: 16px; margin: 4px 0; }
.dp-big > span:last-child { background: var(--ink); color: var(--paper); padding: 0 6px; }
.dp-unit > span:first-child { padding-left: 12px; }
.dp-foot { justify-content: center; font-size: 11.5px; letter-spacing: .08em; color: #6b655c; }

/* Die eine Animation: Depesche kommt Zeile für Zeile aus dem Drucker */
@media (prefers-reduced-motion: no-preference) {
    .js .depesche { animation: feed 2.2s steps(18, end) .35s both; }
    .js .depesche .dp-big > span:last-child { animation: flash 1.1s ease-out 2.6s 2; }
}
@keyframes feed {
    from { clip-path: inset(0 0 100% 0); }
    to   { clip-path: inset(-4px -4px -14px -4px); }
}
@keyframes flash { 50% { background: var(--red); } }

/* ---------- Lage / Statustafel ---------- */
.lage {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 24px;
}
.lage-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; color: var(--muted); }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--fms-2); box-shadow: 0 0 8px rgba(60,179,113,.7); }
.board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    background: var(--desk);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.board li { display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: var(--muted); font-size: 15px; line-height: 1.25; }
.board li + li { border-left: 1px solid var(--line); }
.board b { font: 700 30px/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.fms { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; font: 700 15px/1 var(--display); color: #111; flex-shrink: 0; }
.fms.s1 { background: var(--fms-1); }
.fms.s2 { background: var(--fms-2); }
.fms.s3 { background: var(--fms-3); }
.fms.s4 { background: var(--fms-4); }

/* ---------- Inhaltsblöcke ---------- */
.block { max-width: var(--wrap); margin: 0 auto; padding: 96px 24px 0; scroll-margin-top: 70px; }
.block > h2 { max-width: 18em; }
.sub { margin-top: 10px; color: var(--muted); }

.features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 40px;
    margin-top: 40px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { color: #c2ccd6; font-size: 16px; max-width: 32em; }
.feature.lead {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 48px;
    align-items: baseline;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--line);
}
.feature.lead h3 { font-size: 34px; }
.feature.lead p { font-size: 18px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 64px; }
.steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid var(--red);
    font: 700 24px/1 var(--display);
    color: var(--red-2);
}
.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 23px;
    left: 58px;
    right: -20px;
    border-top: 2px dashed var(--line);
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: #c2ccd6; font-size: 16px; }

.table-wrap { overflow-x: auto; margin-top: 24px; }
.ranking { width: 100%; border-collapse: collapse; font-size: 16px; }
.ranking th { text-align: left; font-weight: 600; color: var(--muted); font-size: 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ranking td { padding: 14px; border-bottom: 1px solid var(--line); }
.ranking .num { text-align: right; font-variant-numeric: tabular-nums; }
.ranking td:first-child { font: 700 22px/1 var(--display); color: var(--muted); width: 70px; }
.ranking tr:first-child td:first-child { color: var(--fms-3); }
.ranking .tag { display: inline-block; margin-right: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(240,196,25,.14); color: var(--fms-3); font: 700 14px/1.4 var(--display); letter-spacing: .04em; }
.ranking .open { color: var(--fms-2); }
.ranking .empty { color: var(--muted); padding: 22px 14px; }

.faq details { max-width: 46em; border-bottom: 1px solid var(--line); }
.faq details:first-of-type { margin-top: 28px; border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 0; font: 600 21px/1.2 var(--display); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red-2); font-size: 26px; line-height: .8; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 20px; color: #c2ccd6; max-width: 40em; }
.faq a { color: var(--red-2); }

/* Abschluss: Warnmarkierung wie an Einsatzfahrzeugen – nur hier */
.final {
    margin-top: 110px;
    background: var(--red);
    background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.0) 0 26px, rgba(255,255,255,.12) 26px 52px);
}
.final-inner {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 64px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.final h2 { color: #fff; font-size: clamp(36px, 5vw, 56px); }

/* ---------- Fußzeile ---------- */
.site-footer {
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 32px 24px 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px 32px;
    color: var(--muted);
    font-size: 14px;
}
.notice b { color: var(--text); }
.notice a, .foot-links a { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 980px) {
    .nav-links { display: none; }
    .nav-cta { margin-left: auto; }
    .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; }
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .feature.lead { grid-template-columns: 1fr; gap: 10px; }
    .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .board li:nth-child(3) { border-left: 0; }
    .board li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
    body { font-size: 16px; }
    .nav { gap: 12px; padding: 12px 16px; }
    .logo-text { font-size: 18px; }
    .nav-cta .ghost { display: none; }
    .nav-cta .btn { white-space: nowrap; padding: 10px 14px; font-size: 15px; }
    .hero, .lage, .block, .final-inner, .site-footer { padding-left: 16px; padding-right: 16px; }
    .features, .steps { grid-template-columns: 1fr; }
    .steps li:not(:last-child)::after { display: none; }
    .depesche { font-size: 12px; padding: 18px 16px 22px; }
    .dp-line .k { min-width: 86px; }
    .block { padding-top: 72px; }
    .board li { padding: 14px; }
    .board b { font-size: 26px; }
}
