/* =============================================================================
   Startseite scheffczyk.app
   Umsetzung von Design-System.md, Abschnitt 11. Farbwerte ausschliesslich als
   Token - ohne sie waere die Hell/Dunkel-Umschaltung nicht nachruestbar.
   ========================================================================== */

/* ---- Schriften, lokal ausgeliefert -------------------------------------- */
/* Kein Google-Fonts-CDN: der Abruf wuerde die IP des Besuchers an einen
   Dritten uebertragen. Siehe Design-System 11.4. */
@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* ---- Token: hell -------------------------------------------------------- */
:root {
  --bg:           #FFFFFF;
  --text:         #1C1C1C;   /* 17.04:1 auf --bg */
  --text-muted:   #6F6F6F;   /*  5.02:1 auf --bg */
  --accent:       #880000;   /* 10.26:1 auf --bg */
  --logo:         #1C1C1C;
  --logo-akzent:  #95141B;
  --border:       #E5E5E5;
  --surface-alt:  #F5F5F5;

  --radius: 8px;
  --schrift-titel: 'Montserrat', system-ui, sans-serif;
  --schrift-text:  'Inter', system-ui, sans-serif;
}

/* ---- Token: dunkel ------------------------------------------------------ */
/* Das Brand-Rot #880000 erreicht auf dunklem Grund nur 1,80:1 und ist dort
   unbrauchbar. Der Dunkelmodus entsteht deshalb nicht durch Umdrehen der
   Farben, sondern hat eigene, gemessene Werte. Siehe Design-System 11.2. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg:          #141414;
    --text:        #FFFFFF;   /* 18.42:1 auf --bg */
    --text-muted:  #9A9A9A;   /*  6.55:1 auf --bg */
    --accent:      #E0362F;   /*  4.16:1 auf --bg - Signal, nicht Fliesstext */
    --logo:        #FFFFFF;   /* Logo auf dunkel vollstaendig weiss, DS 2 */
    --logo-akzent: #FFFFFF;
    --border:      #333333;
    --surface-alt: #1C1C1C;
  }
}
:root[data-theme='dark'] {
  --bg:          #141414;
  --text:        #FFFFFF;
  --text-muted:  #9A9A9A;
  --accent:      #E0362F;
  --logo:        #FFFFFF;
  --logo-akzent: #FFFFFF;
  --border:      #333333;
  --surface-alt: #1C1C1C;
}

/* ---- Grundlagen --------------------------------------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

/* ---- Buehne ------------------------------------------------------------- */
.buehne {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 32px;
  padding: 48px 32px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

.logo svg { width: 96px; height: auto; display: block; }

/* Die 29 Pfade ohne fill-Attribut tragen die Wortmarke, die beiden mit
   #95141B den roten Akzent. Getrennt einfaerbbar - deshalb ist das SVG
   eingebettet und nicht als <img> geladen. Ein filter:invert() wuerde aus
   dem Rot ein Tuerkis machen. */
.logo svg path:not([fill]) { fill: var(--logo); }
.logo svg path[fill]       { fill: var(--logo-akzent); }

.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-family: var(--schrift-titel);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1.12;
  letter-spacing: -.01em;
}

/* ---- Fusszeile ---------------------------------------------------------- */
/* Uebernimmt den Footer-Akzent aus Folie 1 der Praesentationsvorlage:
   kurzes rotes Rechteck, daneben die Zeile in Sekundaerfarbe. */
footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px 48px;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
}

footer .akzent {
  width: 28px;
  height: 3px;
  background: var(--accent);
  flex: none;
}

footer p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Umschalter --------------------------------------------------------- */
.schalter {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;              /* Mindestklickflaeche laut DS 11.7 */
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}

.schalter:hover { color: var(--text); border-color: var(--text-muted); }

.schalter svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* Gezeigt wird das Ziel, nicht der Ist-Zustand: Im Hellmodus der Mond
   ("macht dunkel"), im Dunkelmodus die Sonne. Ein Umschalter mit einem
   einzigen Knopf ist so ohne Beschriftung verstaendlich. */
.i-sonne { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .i-mond  { display: none; }
  :root:not([data-theme='light']) .i-sonne { display: inline; }
}
:root[data-theme='dark']  .i-mond  { display: none; }
:root[data-theme='dark']  .i-sonne { display: inline; }
:root[data-theme='light'] .i-mond  { display: inline; }
:root[data-theme='light'] .i-sonne { display: none; }

/* ---- Barrierefreiheit --------------------------------------------------- */
/* Wird nie entfernt: ohne sichtbaren Fokus ist die Seite per Tastatur
   unbedienbar. Siehe DS 11.7. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- Schmale Bildschirme ------------------------------------------------ */
@media (max-width: 480px) {
  .buehne { padding: 40px 24px; gap: 24px; }
  footer  { padding: 0 24px 32px; }
  .logo svg { width: 72px; }
}
