/* ============================================================
   Vitovision – Website  (Version 3)
   Erstellt: 2026-06-09 1553 CLCODE
   Aenderungen ggue. V2:
     - Neue Seite Datenschutzerklaerung (datenschutz.html)
     - Navigation um "Datenschutz" erweitert (rechts neben Impressum)
     - Schrift "Jost" LOKAL eingebettet (kein Google-Zugriff, DSGVO)
     - Hauptseite/Kopf: Navi-Schrift ~30% kleiner, Logo+Navi hoeher
   Statisches Layout (HTML/CSS/JS), lokal im Browser lauffaehig.
   ============================================================ */

/* ---- Schrift lokal eingebettet (DSGVO-konform) ----
   "Jost" (SIL OFL 1.1) wird vom EIGENEN Server geladen – es wird
   KEINE Verbindung zu Google Fonts aufgebaut. Zuerst wird die lokal
   installierte "Century Gothic" verwendet; ist sie nicht vorhanden,
   greift das hier eingebettete "Jost". */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jost-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jost-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jost-500.woff2') format('woff2');
}

:root {
  --farbe-text:   #4a4a4a;
  --farbe-text-2: #6a6a6a;
  --farbe-akzent: #ec6707;   /* Orange aus dem VITO-Logo */
  --farbe-weiss:  #ffffff;
  --rand:         clamp(24px, 4vw, 48px);
  --takt:         4s;        /* Bildwechsel-Takt (muss zu TAKT_MS in script.js passen) */
  --font: 'Century Gothic', 'Jost', 'Futura',
          'Trebuchet MS', 'Segoe UI', sans-serif;
}

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

html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--farbe-text);
  background: var(--farbe-weiss);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   HINTERGRUND-SLIDESHOW (nur Hauptseite)
   ------------------------------------------------------------
   - background-size: contain  -> ganzes Bild, Hoehe an den
     Bildschirm angepasst (kein Zoom, kein Beschnitt). Die weissen
     Bildraender verschmelzen mit dem weissen Seitenhintergrund.
   - Animationsdauer = 2x Takt  -> es ueberlappen sich immer zwei
     Bilder, dadurch ein durchgehender, fliessender Crossfade.
   - timing-function: linear    -> konstante Bewegung, kein Stillstand.
   ============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--farbe-weiss);
}

.slide {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  will-change: transform, opacity;
  transform: translateX(-7%);
}

/* Bild gleitet kontinuierlich von LINKS nach RECHTS und blendet
   dabei sanft ein und wieder aus (Dreieck: 0 -> 1 -> 0). */
@keyframes slidePass {
  0%   { opacity: 0; transform: translateX(-7%); }
  50%  { opacity: 1; }
  100% { opacity: 0; transform: translateX( 7%); }
}

/* Dauer = doppelter Takt, linear -> nahtloser Dauer-Crossfade. */
.slide.run {
  animation: slidePass calc(var(--takt) * 2) linear forwards;
}

/* ============================================================
   KOPFZEILE (Logo + Navigation)
   ============================================================ */
.kopf {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  /* Logo + Navigation weiter nach oben: kleineres Oben-Polster */
  padding: clamp(14px, 1.8vw, 22px) var(--rand) var(--rand);
  pointer-events: none;          /* nur Logo/Links klickbar */
}

.kopf a { pointer-events: auto; }

.logo {
  display: inline-block;
  line-height: 0;
}

.logo img {
  height: clamp(52px, 8vw, 88px);
  width: auto;
  display: block;
}

.nav {
  display: flex;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: baseline;
  padding-top: 6px;
}

.nav a {
  /* ~30% kleiner als V2 (war clamp(1.15rem, 2.2vw, 1.9rem)) */
  font-size: clamp(0.8rem, 1.55vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--farbe-text);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  transition: color .25s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--farbe-akzent);
}

/* ============================================================
   INHALTSSEITEN (Kontakt / Impressum) – heller Hintergrund
   ============================================================ */
.inhalt-seite {
  background: var(--farbe-weiss);
}

.inhalt {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(120px, 18vh, 220px) var(--rand) 80px;
}

/* Kontakt-Block */
.kontaktblock {
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 3vh, 2.1rem);
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  color: var(--farbe-text);
  line-height: 1.4;
}

.kontaktblock .name {
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
}

.kontaktblock a {
  color: var(--farbe-text);
  text-decoration: none;
  transition: color .25s ease;
}

.kontaktblock a:hover {
  color: var(--farbe-akzent);
}

/* ============================================================
   IMPRESSUM – linksbuendiger, lesbarer Fliesstext
   ============================================================ */
.impressum {
  max-width: 760px;
  width: 100%;
  text-align: left;
  margin: 0 auto;
  color: var(--farbe-text);
  line-height: 1.65;
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
}

.impressum h1 {
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.6rem;
  letter-spacing: 0.01em;
}

.impressum h2 {
  font-weight: 500;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--farbe-text);
  margin: 1.7rem 0 0.4rem;
}

.impressum p { margin-bottom: 0.4rem; }

.impressum a {
  color: var(--farbe-akzent);
  text-decoration: none;
}
.impressum a:hover { text-decoration: underline; }

.impressum .akzent { color: var(--farbe-akzent); }

/* ============================================================
   RESPONSIV
   ============================================================ */
@media (max-width: 560px) {
  .kopf {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .nav { padding-top: 0; }
  .impressum { text-align: left; }
}

/* Bewegungsreduktion: kein Drift, nur sanftes Ein-/Ausblenden */
@media (prefers-reduced-motion: reduce) {
  .slide { transform: none; }
  @keyframes slidePass {
    0%   { opacity: 0; transform: none; }
    50%  { opacity: 1; transform: none; }
    100% { opacity: 0; transform: none; }
  }
}
