/* =============================================================================
   dbpg Incendio — Marketing-Site (www.incendio.cloud)
   Statisch, ohne Framework, ohne externe Requests.

   Grundlage ist die dbpg Corporate Identity:
   - Hausschrift  Plus Jakarta Sans, variabel 200–800 (SIL OFL), selbst gehostet
   - Primärfarbe  Violett #9000DA (primary-500), im Dunkelmodus #C084FC
   - Grautöne     Zink-Skala
   - Statusfarben Grün #16A34A, Amber #D97706, Rot #E11D48 — ausschließlich
                  als Zustandsangabe, niemals dekorativ
   - Form         kantig (border-radius: 0), border-2, 200ms ease-out,
                  active scale(0.98), Fokusring auf Primary
   - Raster       16 Spalten, 8-px-Mini-Unit, 32-px-Gutter, max. 1584px (99rem)
   ============================================================================= */

/* ------------------------------------------------------------------ Schrift */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/PlusJakartaSans-Variable.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------------------- Token */

:root {
  color-scheme: light dark;

  /* Grund und Flächen (Zink) */
  --ground:   #FFFFFF;
  --surface:  #FAFAFA;
  --subtle:   #F4F4F5;
  --line:     #E4E4E7;
  --line-strong: #18181B;

  /* Text */
  --fg:       #000000;
  --muted:    #52525B;

  /* Marke */
  --accent:        #9000DA;
  --accent-hover:  #7700B8;
  --accent-active: #5D0096;
  --accent-ink:    #FFFFFF;
  --accent-faint:  #FAF5FF;

  /* Zustände: Flächen (Balken, Punkte) */
  --ok:   #16A34A;
  --warn: #D97706;
  --down: #E11D48;
  --nodata: #E4E4E7;
  /* Zustände: Text. Die gesättigten Flächentöne erreichen als Text auf Weiß
     kein AA (Grün 3,3:1, Amber 3,2:1) — diese Stufen der CI-Skala tun es. */
  --ok-text:   #15803D;
  --warn-text: #B45309;
  --down-text: #E11D48;

  /* Raster */
  --gutter: 32px;
  --shell:  99rem;
  --pad:    24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:   #09090B;
    --surface:  #18181B;
    --subtle:   #27272A;
    --line:     #27272A;
    --line-strong: #FFFFFF;

    --fg:       #FFFFFF;
    --muted:    #A1A1AA;

    /* Primary im Dunkelmodus aufgehellt — wie in der CI festgelegt */
    --accent:        #C084FC;
    --accent-hover:  #D8B4FE;
    --accent-active: #E9D5FF;
    --accent-ink:    #1A0033;
    --accent-faint:  #1A0033;

    --nodata: #3F3F46;
    --ok-text:   #4ADE80;
    --warn-text: #FACC15;
    --down-text: #FB7185;
  }
}

@media (min-width: 672px) { :root { --pad: 32px; } }

/* --------------------------------------------------------------- Grundlagen */

*, *::before, *::after { box-sizing: border-box; border-radius: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--fg);
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; text-align: left; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: var(--accent); color: var(--accent-ink); }

/* Sprungmarke für Tastatur- und Screenreader-Navigation */
.skip {
  position: absolute; left: 8px; top: -100px; z-index: 20;
  padding: 12px 16px; background: var(--accent); color: var(--accent-ink);
  font-size: .875rem; font-weight: 600; text-decoration: none;
  transition: top 200ms ease-out;
}
.skip:focus { top: 8px; color: var(--accent-ink); }

/* ------------------------------------------------------------------ Raster */

.shell {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* 16 Spalten nach CI-Raster: 4 → 8 → 16 */
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
}
@media (min-width: 672px)  { .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (min-width: 1056px) { .grid { grid-template-columns: repeat(16, minmax(0, 1fr)); } }

/* Abschnittsmuster der CI-Seiten: Label links, Inhalt rechts, Haarlinie oben */
.band { border-top: 1px solid var(--line); padding: 48px 0; }
@media (min-width: 1056px) { .band { padding: 96px 0; } }

.band > .grid > .band-label { grid-column: span 4; }
.band > .grid > .band-body  { grid-column: span 4; }
@media (min-width: 672px) {
  .band > .grid > .band-label { grid-column: span 8; }
  .band > .grid > .band-body  { grid-column: span 8; }
}
@media (min-width: 1056px) {
  .band > .grid > .band-label { grid-column: span 4; }
  .band > .grid > .band-body  { grid-column: span 12; }
}

/* ------------------------------------------------------------- Typografie */

/* Das Label-Register: klein, versal, weit — trägt Abschnittsnamen und Metadaten */
.label {
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin: 0;
}
.label--accent { color: var(--accent); }

.display {
  font-size: clamp(2.125rem, 5.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.032em;
  max-width: 20ch;
}
.h2 {
  font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  max-width: 24ch;
}
.h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.h4 { font-size: 1rem; font-weight: 600; line-height: 1.4; letter-spacing: -.005em; }

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 46ch;
}
.body { line-height: 1.6; color: var(--muted); max-width: 62ch; }
.small { font-size: .875rem; line-height: 1.55; color: var(--muted); max-width: 68ch; }
.tnum { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- Signet */

.signet { display: block; flex: none; }
.signet polygon { fill: currentColor; }

/* ------------------------------------------------------------ Kopfleiste */

.masthead { border-bottom: 1px solid var(--line); }
.masthead .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px; padding-top: 12px; padding-bottom: 12px;
  flex-wrap: wrap;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--fg); text-decoration: none;
  font-size: 1rem; font-weight: 700; letter-spacing: -.02em;
  transition: all 200ms ease-out;
}
.wordmark .signet { width: 20px; height: 20px; }
.wordmark span { font-weight: 400; color: var(--muted); }
.wordmark:hover { color: var(--accent); }

.masthead nav { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; }
.navlink {
  font-size: .875rem; font-weight: 500; color: var(--fg); text-decoration: none;
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: all 200ms ease-out;
}
.navlink:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* -------------------------------------------------------------- Schalter */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border: 2px solid transparent;
  font-family: inherit; font-size: .875rem; font-weight: 600; line-height: 1.25;
  text-decoration: none; cursor: pointer;
  transition: all 200ms ease-out;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }

.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn--primary:active { background: var(--accent-active); }

.btn--secondary { border-color: var(--fg); color: var(--fg); background: transparent; }
.btn--secondary:hover { background: var(--fg); color: var(--ground); }

.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* Textlink mit wanderndem Pfeil — der einzige Hover-Effekt mit Bewegung */
.arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .9375rem; text-decoration: none;
  transition: all 200ms ease-out;
}
.arrow:hover { gap: 14px; }
.arrow svg { width: 14px; height: 14px; flex: none; }

/* ============================================================================
   Der Tagesbalken — die Signatur der Seite

   Ein Balken je Tag, 90 Tage: das kleinste Bauteil einer Statuspage. Die
   Geometrie und die Zustandsfarben sind aus der ausgelieferten Statuspage
   übernommen (worker/internal/statuspage/templates/style.css), damit hier
   nichts behauptet wird, was das Produkt nicht so zeigt.
   ========================================================================== */

.strip {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 24px;
}
.strip .head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.strip .name { font-weight: 600; letter-spacing: -.005em; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8125rem; font-weight: 500; white-space: nowrap; color: var(--muted);
}
.pill::before { content: ""; width: 8px; height: 8px; background: var(--nodata); flex: none; }
.pill.ok { color: var(--ok-text); } .pill.ok::before { background: var(--ok); }
.pill.warn { color: var(--warn-text); } .pill.warn::before { background: var(--warn); }
.pill.down { color: var(--down-text); } .pill.down::before { background: var(--down); }

.bars {
  display: flex; gap: 2px; height: 40px; margin: 20px 0 12px;
  /* Der Streifen zeichnet sich einmal von links nach rechts — ein Vorgang,
     kein Effekt. Bei reduzierter Bewegung entfällt er (siehe oben). */
  animation: draw 900ms ease-out both;
}
@keyframes draw {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
.bar { flex: 1 1 0; min-width: 0; background: var(--nodata); }
.bar.ok   { background: var(--ok); }
.bar.warn { background: var(--warn); }
.bar.down { background: var(--down); }

.scale {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; color: var(--muted); font-size: .75rem;
}
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.legend .pill { font-size: .75rem; }

.strip-note { margin-top: 16px; font-size: .8125rem; line-height: 1.5; color: var(--muted); }

/* ----------------------------------------------------------- Aufzählungen */

.cols { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 672px)  { .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 672px)  { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1056px) { .cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.item { border-top: 2px solid var(--line-strong); padding-top: 16px; }
.item .h4 { margin-bottom: 8px; }
.item p { font-size: .9375rem; line-height: 1.55; color: var(--muted); }

/* „Warum" — Definitionsliste mit Haarlinien */
.reasons { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 1056px) { .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); } }
.reason { border-top: 1px solid var(--line); padding: 24px 0; }
.reason:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 1056px) {
  .reason:nth-child(2) { border-top: 0; padding-top: 0; }
}
.reason dt { font-weight: 600; letter-spacing: -.005em; margin-bottom: 6px; }
.reason dd { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--muted); }

/* ============================================================== Zugangsband

   Der einzige dunkle Block der Seite, in beiden Modi gleich: primary-950.
   Er trägt den Aufruf zur Kontaktaufnahme und ist damit das Gewicht, auf das
   die Seite zuläuft. */

.band--deep {
  background: #1A0033;
  border-top: 0;
  --fg: #FFFFFF;
  --muted: #D8B4FE;
  --line: #440074;
  --line-strong: #FFFFFF;
  --ground: #1A0033;
  --accent: #C084FC;
  --accent-hover: #D8B4FE;
  --accent-active: #E9D5FF;
  --accent-ink: #1A0033;
  color: #FFFFFF;
}
.band--deep .h2, .band--deep .h3, .band--deep .h4 { color: #FFFFFF; }

/* ------------------------------------------------------------------- Fuß */

.foot { border-top: 1px solid var(--line); padding: 48px 0; }
.foot .inner {
  display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between;
  font-size: .875rem; color: var(--muted);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--muted); text-decoration: none; transition: all 200ms ease-out; }
.foot a:hover { color: var(--accent); }
.foot .legal { max-width: 40ch; }

/* --------------------------------------------------- Rechtstexte (Prosa) */

.prose { max-width: 68ch; }
.prose h2 {
  font-size: 1.5rem; font-weight: 700; line-height: 1.25; letter-spacing: -.015em;
  margin: 48px 0 16px; padding-top: 24px; border-top: 2px solid var(--line-strong);
}
.prose h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.35; margin: 32px 0 8px; }
.prose p { margin: 0 0 16px; line-height: 1.65; color: var(--muted); }
.prose p strong, .prose li strong { color: var(--fg); font-weight: 600; }
.prose ul { margin: 0 0 16px; padding-left: 0; }
.prose li {
  position: relative; padding-left: 20px; margin-bottom: 8px;
  line-height: 1.6; color: var(--muted);
}
.prose li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 2px; background: var(--accent);
}
.prose address { font-style: normal; line-height: 1.7; color: var(--muted); margin-bottom: 16px; }
.prose dl { margin: 0 0 16px; }
.prose dt { font-weight: 600; margin-top: 12px; }
.prose dd { margin: 0; color: var(--muted); }

/* Prüfvermerk in den Rechtstexten — sichtbar, aber kein Zustandssignal */

.page-head { padding: 48px 0 32px; }
@media (min-width: 1056px) { .page-head { padding: 96px 0 48px; } }

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9em; padding: 2px 6px;
  background: var(--subtle); border: 1px solid var(--line); color: var(--fg);
}

/* Auf schmalen Schirmen wird der Zwischenraum der Tagesbalken auf 1 px
   reduziert — sonst bleibt vom Balken selbst nichts mehr übrig.
   Dieselbe Schwelle wie in der ausgelieferten Statuspage. */
@media (max-width: 560px) {
  .strip { padding: 20px 16px; }
  .bars { gap: 1px; height: 32px; }
}
