/* Patrick Smith · Seitenrahmen
   Skip-Link, Container, Header-Grundlagen (Marke, Sprachwechsel) und Footer.
   Gemeinsam für die Website und die Tools; setzt tokens.css voraus.
   Hauptnavigation und Menü bleiben in site.css. */

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 12px;
  color: var(--white);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  text-decoration: none;
  color: var(--navy);
  min-width: 0;
  margin-right: auto;
}

.brand:hover {
  color: var(--navy);
}

.brand__mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
}

.brand__mark img {
  width: 42px;
  height: 42px;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.brand__name {
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.site-header .brand__name {
  font-size: 1.375rem;
}

@media (max-width: 640px) {
  .site-header .brand__name {
    font-size: 1.25rem;
  }
}

.brand__tagline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
}

.dot {
  color: var(--teal);
  font-weight: 700;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--blue);
}

.language-switch a,
.language-switch__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 32px;
  padding-inline: 6px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.language-switch__current {
  color: var(--navy);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--teal);
}

.language-switch a:hover {
  color: var(--navy);
  text-decoration: underline;
  text-decoration-color: var(--teal);
}

@media (max-width: 520px) {
  .brand__tagline {
    display: none;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 52px 28px;
  background: var(--white);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 32px 40px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__brand .brand__name {
  font-size: 1.1875rem;
}

.footer__brand span {
  font-size: 0.875rem;
  color: var(--blue);
}

.footer__brand .brand__name {
  font-size: 1.1875rem;
  color: var(--navy);
}

.footer__claim {
  margin-top: 8px;
  font-size: 0.8125rem !important;
  font-style: italic;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__col h2 {
  margin-bottom: 8px;
  font-size: 0.9375rem;
  color: var(--blue);
}

.footer__col a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  font-size: 0.9375rem;
  text-decoration: none;
}

.footer__col a:hover {
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.875rem;
  color: var(--blue);
}

.footer__bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer__bottom a {
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

/* Hover ergänzt (Phase 5): Navy und Teal-Unterstreichung wie die übrigen Links. */
.footer__bottom a:hover {
  color: var(--navy);
  text-decoration-color: var(--teal);
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Tools (/tools/…) ----------
   Schlanker Website-Header für die Tools: Marke, Rückweg und Sprachwechsel, keine
   Hauptnavigation. --static bleibt im Seitenfluss, wenn ein Tool selbst an den Anfang
   seiner Karten scrollt und ein klebender Header diese verdecken würde. */

.site-header--static {
  position: static;
}

.site-header--tool .site-header__inner {
  flex-wrap: wrap;
  padding-block: 8px;
}

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 24px;
}

.tool-nav > a:not(.tool-cta) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.tool-nav > a:not(.tool-cta):hover {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: var(--teal);
}

.tool-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: box-shadow var(--motion-quick) var(--ease);
}

.tool-cta:hover {
  color: var(--white);
  box-shadow: inset 0 -3px 0 var(--teal);
}

/* Telefon: wie auf der Website die Sprache oben rechts, darunter Rückweg oder Anfrage. */
@media (max-width: 640px) {
  .site-header--tool .site-header__inner {
    flex-wrap: nowrap;
    gap: 0 12px;
  }

  .site-header--tool .tool-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0;
  }

  .site-header--tool .tool-nav .language-switch {
    order: -1;
  }
}

@media (max-width: 400px) {
  .tool-cta {
    padding-inline: 12px;
    font-size: 0.875rem;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none !important;
  }
}
