/* Legal pages: Impressum and Datenschutz (ke-legal__*) — tokens and base classes come from main.css */

/* ---------- Hero ---------- */
.ke-legal__hero {
  position: relative;
  padding: 52px 0 60px;
  background-color: var(--ke-navy);
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1.5px, transparent 2px);
  background-size: 20px 20px;
  color: var(--ke-soft);
  overflow: hidden;
}
.ke-legal__hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--ke-orange);
}
.ke-legal__crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 30px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ke-soft);
}
.ke-legal__crumbs a { color: var(--ke-soft); transition: color .2s ease; }
.ke-legal__crumbs a:hover { color: var(--ke-orange); text-decoration: underline; }
.ke-legal__crumbs a:focus-visible { color: var(--ke-orange); outline-offset: 3px; }
.ke-legal__crumbs-sep { color: var(--color-text-muted-2); }
.ke-legal__hero-body { max-width: 780px; }
.ke-legal__eyebrow {
  display: block;
  margin-bottom: 10px;
  font-family: var(--ke-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ke-orange);
}
.ke-legal__title {
  margin: 0 0 16px;
  font-size: 44px;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: #ffffff;
}
.ke-legal__lead {
  max-width: 680px;
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ke-soft);
}

/* ---------- Main ---------- */
.ke-legal__main { padding: 70px 0 100px; background: #ffffff; }
.ke-legal__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.ke-legal__layout > * { min-width: 0; }
.ke-legal__layout--toc {
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}
.ke-legal__body { max-width: 800px; }

/* Table of contents */
.ke-legal__toc {
  position: sticky;
  top: 120px;
  padding: 26px 24px;
  border-top: 4px solid var(--ke-orange);
  border-radius: var(--radius-1);
  background: #ffffff;
  box-shadow: var(--shadow-1);
}
.ke-legal__toc-title {
  margin: 0 0 14px;
  font-family: var(--ke-head);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ke-navy);
}
.ke-legal__toc-list { display: grid; gap: 2px; counter-reset: legal-toc; }
.ke-legal__toc-list li { counter-increment: legal-toc; }
.ke-legal__toc-list a {
  display: block;
  padding: 6px 0 6px 28px;
  position: relative;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ke-text);
  transition: color .2s ease, padding-left .2s ease;
}
.ke-legal__toc-list a::before {
  content: counter(legal-toc) ".";
  position: absolute;
  left: 0;
  top: 6px;
  width: 22px;
  font-family: var(--ke-head);
  font-weight: 600;
  color: var(--ke-orange);
}
.ke-legal__toc-list a:hover { color: var(--ke-navy); padding-left: 32px; }
.ke-legal__toc-list a:focus-visible { color: var(--ke-navy); outline-offset: 2px; }

/* Facts panel (address, contact) */
.ke-legal__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}
.ke-legal__fact {
  min-width: 0;
  padding: 28px 30px;
  border-left: 4px solid var(--ke-orange);
  border-radius: var(--radius-1);
  background: #f7f7f7;
}
.ke-legal__fact-title {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ke-navy);
}
.ke-legal__fact p { margin: 0 0 6px; font-size: 16px; line-height: 1.65; color: var(--ke-text); overflow-wrap: anywhere; }
.ke-legal__fact p:last-child { margin-bottom: 0; }
.ke-legal__fact strong { color: var(--ke-navy); }

/* Text sections */
.ke-legal__section { margin: 0 0 44px; scroll-margin-top: 130px; }
.ke-legal__section:last-child { margin-bottom: 0; }
.ke-legal__h2 {
  position: relative;
  margin: 0 0 22px;
  padding-bottom: 14px;
  font-size: 28px;
  line-height: 1.3;
  color: var(--ke-navy);
}
.ke-legal__h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  background: var(--ke-orange);
}
.ke-legal__h3 {
  margin: 26px 0 8px;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ke-navy);
}
.ke-legal__text {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ke-text);
  overflow-wrap: anywhere;
}
.ke-legal__text:last-child { margin-bottom: 0; }
.ke-legal__text strong { color: var(--ke-navy); }
.ke-legal__list { display: grid; gap: 8px; margin: 0 0 16px; }
.ke-legal__list li {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ke-text);
  overflow-wrap: anywhere;
}
.ke-legal__list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 8px;
  height: 8px;
  background: var(--ke-orange);
  transform: rotate(45deg);
}
.ke-legal__list li strong { color: var(--ke-navy); }

/* Key-value rows (company data) */
.ke-legal__rows { margin: 0 0 16px; border-top: 1px solid var(--ke-line); }
.ke-legal__row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--ke-line);
}
.ke-legal__row > * { min-width: 0; }
.ke-legal__row dt {
  margin: 0;
  font-family: var(--ke-head);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ke-navy);
}
.ke-legal__row dd { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ke-text); overflow-wrap: anywhere; }

/* Note / highlight */
.ke-legal__note {
  margin: 18px 0 0;
  padding: 20px 24px;
  border-left: 4px solid var(--ke-orange);
  border-radius: var(--radius-1);
  background: #f7f7f7;
}
.ke-legal__note p { margin: 0 0 10px; font-size: 16px; line-height: 1.7; color: var(--ke-text); overflow-wrap: anywhere; }
.ke-legal__note p:last-child { margin-bottom: 0; }
.ke-legal__note strong { color: var(--ke-navy); }

/* Links in text */
.ke-legal__link {
  color: #c4560f;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: color .2s ease, text-decoration-color .2s ease;
}
.ke-legal__link:hover { color: var(--ke-navy); text-decoration-thickness: 2px; }
.ke-legal__link:focus-visible { color: var(--ke-navy); outline-offset: 3px; }
a[href^="tel:"].ke-legal__link { text-decoration: none; font-weight: 500; }
a[href^="tel:"].ke-legal__link:hover { text-decoration: underline; }

/* Back links */
.ke-legal__back { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--ke-line); }

/* ---------- Breakpoints ---------- */
@media (max-width: 1200px) {
  .ke-legal__layout--toc { grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
  .ke-legal__title { font-size: 40px; }
}
@media (max-width: 1024px) {
  .ke-legal__main { padding: 56px 0 90px; }
  .ke-legal__layout--toc { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .ke-legal__toc { position: static; }
  .ke-legal__toc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .ke-legal__body { max-width: none; }
}
@media (max-width: 768px) {
  .ke-legal__hero { padding: 40px 0 46px; }
  .ke-legal__crumbs { margin-bottom: 22px; }
  .ke-legal__title { font-size: 34px; }
  .ke-legal__lead { font-size: 16px; }
  .ke-legal__main { padding: 44px 0 80px; }
  .ke-legal__facts { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-bottom: 38px; }
  .ke-legal__h2 { font-size: 24px; }
  .ke-legal__row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; }
  .ke-legal__section { margin-bottom: 36px; }
}
@media (max-width: 480px) {
  .ke-legal__title { font-size: 29px; }
  .ke-legal__toc { padding: 22px 18px; }
  .ke-legal__toc-list { grid-template-columns: minmax(0, 1fr); }
  .ke-legal__fact { padding: 22px 20px; }
  .ke-legal__h2 { font-size: 22px; }
  .ke-legal__note { padding: 18px 18px; }
  .ke-legal__back { flex-direction: column; }
  .ke-legal__back .ke-btn { width: 100%; }
}
@media (max-width: 375px) {
  .ke-legal__title { font-size: 26px; }
  .ke-legal__eyebrow { font-size: 13px; }
  .ke-legal__text, .ke-legal__list li { font-size: 15px; }
}
