/* ==========================================================================
   Leadly Marketing-Site — gemeinsames Seitengeruest
   Wird von landing.html, tools.html und ueber-uns.html geladen und enthaelt
   alles, was auf allen drei Seiten identisch ist: Farben, Grundtypografie,
   Kopfzeile, Navigation, Buttons und Fusszeile. Seitenspezifisches steht in
   sw-landing.css, sw-tools.css und sw-ueber-uns.css.

   Die Seiten sind bewusst statische Dateien in /public (wie impressum.html
   und datenschutz.html) und keine Next-Routen: sie brauchen weder Session
   noch Datenbank, und "/" wird von der Middleware auf landing.html
   gerewritet.
   ========================================================================== */

/* ==========================================================================
   Farben und Grundwerte
   Nur die Werte, die mehrfach und mit gleicher Bedeutung auftauchen, stehen
   als Variable. Einmalige Abstufungen einzelner Abschnitte bleiben dort als
   Literal stehen — ein Token, das genau einmal benutzt wird, erklaert nichts.
   ========================================================================== */

:root {
  --ink: #101828;         /* Seitengrund, dunkel */
  --paper: #ffffff;
  --accent: #0056fb;      /* Primaeraktion (Buttons), Leadly-Blau */
  --accent-hover: #0047d1;
  --accent-soft: #6e9bff; /* Leadly-Blau, aufgehellt fuer dunklen Grund */
  --line: #293140;        /* Trennlinien auf dunklem Grund */
  --nav-text: #c9d3d9;
}

/* ==========================================================================
   Grundlagen
   ========================================================================== */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
  /* Container-Kontext fuer alle @container-Abfragen der Seite. Die Abfragen
     messen damit die Seitenbreite und funktionieren auch, wenn eine Seite
     spaeter einmal eingebettet dargestellt wird. */
  container-type: inline-size;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

/* Sprungziele nicht direkt unter der Oberkante des Fensters absetzen. */
section[id] {
  scroll-margin-top: 24px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #78bde6;
  outline-offset: 5px;
}

/* <em> wird auf der Seite durchgehend als Hervorhebung im Fliesstext und in
   Ueberschriften benutzt, nicht als Kursivsatz. */
em {
  font-style: normal;
  font-weight: 700;
}

/* ==========================================================================
   Typografie
   ========================================================================== */

h1 {
  font-size: clamp(58px, 8.6cqw, 128px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.065em;
}

h1 span {
  display: block;
}

h1 em {
  color: var(--accent-soft);
}

/* Kleine Ueberzeile ueber einer Ueberschrift ("01 / Bestandspflege"). */
.kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.6;
  color: #aab9d0;
  margin-bottom: 24px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Buttons
   .btn ist die Grundform (heller Rahmen auf dunklem Grund), .btn-primary die
   gefuellte Hauptaktion. min-height haelt die Trefferflaeche auf Mobilgeraeten
   bei 44px.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 44px;
  padding: 12px 19px;
  border: 1px solid #677386;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover {
  background: #203e54;
}

.btn-arrow {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s;
}

a:hover .btn-arrow,
button:hover .btn-arrow {
  transform: translate(3px, -3px);
}

.btn-primary {
  padding: 15px 23px;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  font-size: 15px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   Kopfzeile und Navigation
   Ab 900px Breite uebernimmt das Klappmenue; darueber stehen die Links in
   einer Reihe. Der Entwurf hatte dafuer acht einander widersprechende
   Haltepunkte — hier ist es genau einer.
   ========================================================================== */

.site-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 24px 6%;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Leadly-Wortmarke (weisse Variante fuer den dunklen Seitengrund). */
.site-logo-img {
  display: block;
  height: 30px;
  width: auto;
}

.site-nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
  font-size: 15px;
}

.site-nav-links > a {
  color: var(--nav-text);
  padding: 12px 0;
  border-bottom: 2px solid transparent;
}

.site-nav-links > a:hover,
.site-nav-links > a[aria-current] {
  color: var(--paper);
  border-bottom-color: var(--accent-soft);
}

/* Login fuehrt in die App und ist deshalb als Schaltflaeche ausgezeichnet,
   nicht als Navigationspunkt. */
.site-nav-links .site-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 22px;
  border: 1px solid #8496b0;
  border-bottom-color: #8496b0;
  border-radius: 4px;
  color: var(--paper);
  font-weight: 600;
}

/* Klappmenue: <details> statt Button plus Zustand im JavaScript — auf- und
   zugeklappt funktioniert damit auch ohne JavaScript. */
.site-nav-mobile {
  display: none;
  margin-left: auto;
}

.site-nav-mobile summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  font-size: 14px;
}

.site-nav-mobile summary::-webkit-details-marker {
  display: none;
}

.site-nav-mobile summary::after {
  content: '+';
  font-size: 20px;
}

.site-nav-mobile[open] summary::after {
  content: '−';
}

.site-nav-mobile nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  gap: 2px;
  padding: 15px 6% 20px;
  background: #18253f;
  border-bottom: 1px solid #3b5072;
}

.site-nav-mobile nav a {
  display: block;
  padding: 11px 0;
  font-size: 14px;
  color: #ccdee9;
}

.site-nav-mobile nav .site-nav-login {
  border-top: 1px solid #405471;
  margin-top: 6px;
  padding-top: 16px;
}

/* ==========================================================================
   Fusszeile
   ========================================================================== */

.site-footer {
  padding: 0 7% 28px;
  background: var(--ink);
}

.site-footer-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 25px;
  padding: 28px 0;
  border-top: 1px solid #536f804d;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: #c4d3dc;
}

.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  color: #9bb0bf;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Schmalere Fenster
   ========================================================================== */

@container (max-width: 900px) {
  .site-nav-links {
    display: none;
  }

  .site-nav-mobile {
    display: block;
  }
}

@container (max-width: 620px) {
  .site-nav {
    padding: 18px 6%;
  }
}

@container (max-width: 540px) {
  .site-nav {
    padding: 19px 22px;
    gap: 12px;
  }

  .site-logo {
    gap: 8px;
  }

  .site-logo-img {
    height: 26px;
  }

  h1 {
    font-size: clamp(44px, 12cqw, 64px);
    line-height: 1.04;
    letter-spacing: -0.06em;
  }

  .btn-primary {
    padding: 14px 19px;
    font-size: 14px;
  }
}

@container (max-width: 480px) {
  .kicker {
    font-size: 12px;
    letter-spacing: 0.06em;
  }
}

@container (max-width: 420px) {
  .site-footer {
    padding: 0 24px 25px;
  }
}

/* ==========================================================================
   Bewegung reduzieren
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
