:root {
  --plum: #511d3e;
  --ink: #2f2f2f;
  --cream: #ffffe5;
  --warm-fallback: #f4c364;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--plum);
  background-color: var(--warm-fallback);
  background-image: url("/assets/img/motiv_1440x960.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(2rem, 6vh, 4rem) 1.25rem 1.5rem;
}

.logo {
  display: block;
  width: clamp(180px, 28vw, 320px);
  height: auto;
}

.message {
  margin-top: clamp(1.5rem, 5vh, 3rem);
  text-align: center;
  max-width: 36rem;
  color: var(--plum);
}

.message h1 {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 1.75rem);
  line-height: 1.3;
}

.message p {
  margin: 0.5rem 0 0;
  font-weight: 400;
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink);
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 0.65rem 1.25rem;
  background-color: var(--plum);
  color: var(--cream);
  font-size: 0.85rem;
}

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

footer a:hover,
footer a:focus-visible {
  text-decoration: underline;
}

/* Legal pages (Impressum, Datenschutz, AGB) */
body.legal main {
  padding-bottom: clamp(2rem, 6vh, 4rem);
}

/* Long text pages (AGB, Datenschutz): solid background instead of the motiv */
body.legal-plain {
  background-color: #fdf9c8;
  background-image: none;
}

body.legal .logo {
  width: clamp(140px, 18vw, 220px);
}

.legal-content {
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  width: 100%;
  max-width: 46rem;
  background-color: rgba(255, 255, 229, 0.95);
  border-radius: 12px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--ink);
  line-height: 1.6;
}

.legal-content h1 {
  margin: 0 0 1rem;
  color: var(--plum);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.3;
}

.legal-content h2 {
  margin: 1.75rem 0 0.5rem;
  color: var(--plum);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.3;
}

.legal-content h3 {
  margin: 1.25rem 0 0.5rem;
  color: var(--plum);
  font-size: 1.05rem;
  line-height: 1.3;
}

.legal-content p {
  margin: 0 0 0.75rem;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 0.75rem;
  padding-left: 1.4rem;
}

.legal-content a {
  color: var(--plum);
}

.legal-content .doc-meta {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.legal-content .table-wrap {
  overflow-x: auto;
  margin: 0 0 0.75rem;
}

.legal-content table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

.legal-content th,
.legal-content td {
  border: 1px solid rgba(81, 29, 62, 0.25);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.legal-content th {
  background-color: rgba(81, 29, 62, 0.08);
  color: var(--plum);
}

/* Text rendered as image (anti-scraping); generated at 2x (pointsize 32).
   Displayed at 1.13em so DejaVu's x-height matches the page font, and shifted
   down by the font descent (23% of image height) to sit on the baseline. */
.legal-content .name-img {
  height: 1.13em;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  vertical-align: -0.26em;
}

.legal-content .form-box {
  border: 1px dashed rgba(81, 29, 62, 0.4);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0 0 0.75rem;
}
