/* shared styles for the legal pages (agb, impressum, datenschutz) */

/* inter is self-hosted – no connection to google fonts */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("inter-latin.woff2") format("woff2");
}

:root {
  --green-900: #16301f;
  --green-800: #1f5c34;
  --green-700: #2c6b3e;
  --green-500: #3b8f53;
  --green-100: #9fe0a8;
  --bg: #f4f7f2;
  --text: #16301f;
  --muted: #4f6356;
  --line: #dfe7dc;
  --header-h: 84px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex; flex-direction: column; min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

/* header */
.header {
  position: sticky; top: 0; z-index: 20;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 clamp(16px, 4vw, 56px);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; flex: none; }
.logo img { height: 60px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 12px; }

.btn {
  font: inherit; font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-outline { background: transparent; color: var(--green-700); border-color: var(--green-700); }
.btn-outline:hover { background: var(--green-700); color: #fff; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); box-shadow: 0 8px 20px -8px rgba(44, 107, 62, .7); }
.btn:focus-visible, a:focus-visible, .lang button:focus-visible {
  outline: 3px solid var(--green-100); outline-offset: 2px;
}

/* language switch */
.lang {
  display: inline-flex; padding: 3px; margin-left: 4px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.lang button {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  border: none; background: transparent; color: var(--muted);
  padding: 7px 11px; border-radius: 999px; cursor: pointer;
  transition: background .2s, color .2s;
}
.lang button[aria-pressed="true"] { background: var(--green-700); color: #fff; }
.lang button:not([aria-pressed="true"]):hover { color: var(--green-700); }

/* content */
.page {
  flex: 1 0 auto;
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px) 64px;
}
.legal {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(22px, 4vw, 44px);
  font-size: 15px; line-height: 1.65; color: #2c3d31;
  overflow-wrap: break-word;
}
.legal h1 {
  font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.02em;
  font-weight: 600; color: var(--text); margin: 0 0 8px;
}
.legal h2 { font-size: 18px; font-weight: 600; color: var(--text); margin: 30px 0 8px; }
.legal h3 { font-size: 15.5px; font-weight: 600; color: var(--text); margin: 20px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; }
.legal li { margin-bottom: 4px; }
.legal a { color: var(--green-700); }
.legal .stand { color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.legal .cl { display: grid; grid-template-columns: 44px 1fr; }
.legal .no { font-weight: 600; color: var(--green-700); }
.legal ol.sub { list-style: none; margin: -2px 0 12px 44px; padding: 0; }
.legal ol.sub li { display: grid; grid-template-columns: 56px 1fr; margin-bottom: 6px; }
.legal .formula {
  display: inline-flex; flex-direction: column; align-items: center; margin: 4px 0 14px 44px;
  padding: 10px 16px; background: var(--bg); border-radius: 10px; font-size: 14px;
}
.legal .formula span:first-child { border-bottom: 1px solid var(--text); padding-bottom: 4px; margin-bottom: 4px; }
.legal .tbl { margin: 4px 0 14px 44px; overflow-x: auto; }
.legal table { border-collapse: collapse; width: 100%; font-size: 14px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.legal th { background: var(--bg); font-weight: 600; }
.legal .optout {
  margin: 6px 0 14px; padding: 12px 16px;
  background: var(--bg); border-radius: 10px; font-size: 14px;
}
.legal .optout:empty { display: none; }

/* footer stays visible at the bottom while scrolling */
.footer {
  position: sticky; bottom: 0; z-index: 20;
  min-height: 64px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: var(--green-900); color: rgba(255, 255, 255, .7); font-size: 14px;
}
.footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer a { color: #fff; text-decoration: none; opacity: .85; }
.footer a:hover, .footer a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 600px) {
  :root { --header-h: 64px; }
  .header { gap: 8px; }
  .logo img { height: 40px; }
  .nav { gap: 6px; }
  .btn { padding: 8px 11px; font-size: 13px; }
  .nav .btn svg { display: none; }
  .btn .lbl-long { display: none; }
  .lang { margin-left: 0; }
  .lang button { padding: 6px 7px; font-size: 12px; }
  .footer { justify-content: center; text-align: center; min-height: 0; padding: 10px 16px; gap: 4px; font-size: 13px; }
  .footer nav { justify-content: center; gap: 4px 16px; }
  .legal .cl { grid-template-columns: 1fr; }
  .legal ol.sub, .legal .tbl, .legal .formula { margin-left: 0; }
  .legal ol.sub li { grid-template-columns: 1fr; }
}
@media (min-width: 601px) { .btn .lbl-short { display: none; } }
@media print {
  .header, .footer, .optout { display: none !important; }
  .legal { border: none; padding: 0; }
}
