/* ==========================================================
   Farben & Grundwerte – hier zentral anpassen
   ========================================================== */
:root {
  /* Corporate Identity */
  --ci-blue: #17325C;
  --ci-grey: #B0B1B1;

  --color-primary: var(--ci-blue);   /* Buttons, Links, Akzente */
  --color-primary-dark: #0e2140;     /* Hover-Zustand (etwas dunkler) */
  --color-text: #1c2026;
  --color-muted: #5c5e5e;            /* dunklere Abstufung von CI-Grau, gut lesbar */
  --color-bg: #ffffff;
  --color-bg-alt: #f3f4f4;           /* sehr helle Abstufung von CI-Grau */
  --color-border: #d6d7d7;           /* helle Abstufung von CI-Grau */
  --radius: 12px;
  --max-width: 1080px;
  /* Systemschriften: keine externen Fonts nötig (DSGVO-freundlich) */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ========== Basis ========== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

/* Seite nicht scrollen, während ein Overlay offen ist */
body:has(.modal:target) { overflow: hidden; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; }

a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dark); }

:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ========== Kopfzeile ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  padding: .5rem 0;
}

/* Logo-Größe: groß beim Aufruf, klein nach dem Scrollen */
:root {
  --logo-large: 96px;   /* Höhe beim Seitenaufruf */
  --logo-small: 44px;   /* Höhe nach dem Scrollen */
}

.logo-img {
  display: block;
  height: var(--logo-small);   /* Fallback für ältere Browser */
  width: auto;
}

/* Schrumpf-Effekt per CSS-Scroll-Animation (ohne JavaScript).
   Browser ohne Unterstützung zeigen einfach das kleine Logo. */
@supports (animation-timeline: scroll()) {
  .logo-img {
    height: var(--logo-large);
    animation: logo-shrink linear both;
    animation-timeline: scroll(root);
    animation-range: 0 220px;   /* nach 220px Scrollen ist das Logo klein */
  }
  .site-header {
    animation: header-shadow linear both;
    animation-timeline: scroll(root);
    animation-range: 0 220px;
  }
}

@keyframes logo-shrink {
  to { height: var(--logo-small); }
}
@keyframes header-shadow {
  to { box-shadow: 0 4px 20px rgba(23, 50, 92, .1); }
}

.main-nav { display: flex; gap: 1.25rem; }
.main-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
}
.main-nav a:hover { color: var(--color-primary); }

/* ========== Hero ========== */
.hero {
  padding: clamp(4rem, 10vw, 7rem) 0;
  background: linear-gradient(160deg, var(--color-bg-alt) 0%, #ffffff 70%);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-primary);
}
.lead {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  color: var(--color-muted);
  max-width: 40em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-secondary {
  border: 2px solid var(--ci-grey);
  color: var(--color-text);
}
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ========== Sektionen ========== */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-alt { background: var(--color-bg-alt); }
.section-intro { color: var(--color-muted); max-width: 42em; margin-bottom: 2rem; }

/* ========== Angebot: Karten ========== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card {
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
}
.card p { margin: 0; color: var(--color-muted); }

/* ========== Fernwartung ========== */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.download {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: #fff;
  border: 2px solid var(--ci-grey);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color .2s, transform .2s;
}
.download:hover { border-color: var(--color-primary); transform: translateY(-2px); color: var(--color-text); }
.download-os { font-size: 1.35rem; font-weight: 700; }
.download-name { color: var(--color-muted); }
.download-hint { margin-top: .6rem; font-weight: 600; color: var(--color-primary); }
.download-hint::after { content: " ↓"; }

.steps {
  padding-left: 1.25rem;
  margin: 0 0 1.25rem;
}
.steps li { margin-bottom: .4rem; }

.note { font-size: .9rem; color: var(--color-muted); }

/* ========== Kontakt ========== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.contact-item address { font-style: normal; }
.contact-item a { text-decoration: none; font-weight: 500; }
.contact-item a:hover { color: var(--color-primary-dark); text-decoration: none; }
.contact-item h3 { color: var(--color-muted); font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }

/* ========== Fußzeile ========== */
.site-footer {
  background: var(--ci-blue);
  color: var(--ci-grey);
  padding: 1.75rem 0;
  font-size: .95rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-inner p { margin: 0; }
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }

/* ==========================================================
   Overlays (Impressum / Datenschutz) – reines CSS über :target
   ========================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal:target { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 50, 92, .6);
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  padding: 2.25rem 1.75rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  animation: modal-in .2s ease-out;
}
.modal-box h3 { margin-top: 1.5rem; }

.modal-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 1;
  text-decoration: none;
  color: var(--color-muted);
}
.modal-close:hover { background: var(--color-bg-alt); color: var(--color-text); }

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ========== Mobil ========== */
@media (max-width: 560px) {
  :root { --logo-large: 64px; --logo-small: 30px; }
  .header-inner { gap: .25rem 1rem; padding: .25rem 1.25rem; }
  .main-nav { gap: .75rem; font-size: .85rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .modal-box { animation: none; }
  .download { transition: none; }
  .logo-img, .site-header { animation: none; }
  .logo-img { height: var(--logo-small); }
}

/* Hervorgehobener Abschnitt in der Datenschutzerklärung (z. B. Widerspruchsrecht) */
.hervorgehoben {
  margin: 1.5rem 0;
  padding: .25rem 1.25rem .5rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.hervorgehoben h3 { color: var(--color-primary); }
