/* Shared base for all three sites. Themes set the custom properties. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); line-height: 1.1; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---- language visibility (lang.js sets html[data-lang]) ---- */
html[data-lang="de"] [data-l="en"],
html[data-lang="en"] [data-l="de"] { display: none !important; }
/* without JS: German only */
html:not([data-lang]) [data-l="en"] { display: none !important; }

/* ---- utilities ---- */
.wrap { width: min(100% - 2.5rem, var(--max, 72rem)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .75rem 1rem; background: var(--fg); color: var(--bg); text-decoration: none;
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* ---- header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a { text-decoration: none; font-size: .95rem; padding: .5rem 0; }
.nav a:hover { text-decoration: underline; text-underline-offset: .35em; }
.header-tools { display: flex; align-items: center; gap: .75rem; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); }
.lang-switch button {
  min-width: 2.75rem; min-height: 2.25rem; padding: 0 .6rem; border: 0; background: transparent;
  cursor: pointer; font-family: var(--font-label); font-size: .8rem; letter-spacing: .08em;
}
.lang-switch button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.nav-toggle {
  display: none; min-width: 2.75rem; min-height: 2.75rem; border: 1px solid var(--line-strong);
  background: transparent; cursor: pointer;
}
.nav-toggle span { display: block; width: 1.1rem; height: 2px; margin: 4px auto; background: currentColor; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3rem; padding: .75rem 1.5rem; border: 1px solid var(--fg);
  text-decoration: none; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.btn-primary:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--fg); color: var(--bg); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---- contact form ---- */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .4rem; }
.field label, .field .label { font-family: var(--font-label); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 3rem; padding: .7rem .9rem;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 0;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 1.2rem) 55%, calc(100% - .85rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; padding-right: 2.5rem; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--fg); outline: none; box-shadow: 0 0 0 1px var(--fg); }
[aria-invalid="true"] { border-color: var(--error) !important; box-shadow: 0 0 0 1px var(--error) !important; }
.check { display: flex; gap: .75rem; align-items: flex-start; font-size: .92rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; accent-color: var(--fg); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.6em; margin: 0; font-size: .95rem; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--error); }
.optional { text-transform: none; letter-spacing: 0; opacity: .8; }

/* ---- legal pages ---- */
.legal { padding: 4rem 0 6rem; }
.legal .wrap { --max: 46rem; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 2rem; }
.legal h2 { font-size: 1.25rem; margin: 2.5rem 0 .75rem; }
.legal h3 { font-size: 1.05rem; margin: 1.5rem 0 .5rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1em; }
.legal address { font-style: normal; }

/* ---- links page (linktree style) ---- */
.links-page { padding: 3rem 0 4rem; }
.links-page .wrap { --max: 30rem; }
.links-profile { display: grid; justify-items: center; gap: 1rem; text-align: center; margin-bottom: 2rem; }
.links-avatar { width: 6rem; height: 6rem; border: 1px solid var(--line-strong); }
.links-list { display: grid; gap: .75rem; margin: 1.5rem 0 2rem; }
.links-list a {
  display: flex; align-items: center; gap: 1rem; min-height: 3.5rem; padding: .75rem 1.1rem;
  border: 1px solid var(--line-strong); background: var(--surface); text-decoration: none; font-weight: 600;
  transition: border-color .2s;
}
.links-list a:hover { border-color: var(--fg); }
.links-list svg { width: 1.25rem; height: 1.25rem; flex: none; }
.links-list .arrow { margin-left: auto; opacity: .7; }
.qr { display: grid; justify-items: center; gap: .75rem; padding: 1.5rem; border: 1px solid var(--line); margin-bottom: 1.5rem; text-align: center; }
.qr img { width: 11rem; background: #fff; padding: .6rem; }
.contact-lines { display: grid; gap: .35rem; }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { text-decoration: underline; }
.links-save { width: 100%; margin-bottom: .5rem; }
.links-save svg { width: 1.25rem; height: 1.25rem; }
.links-page .form-card h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.links-page h1 { font-size: 2rem; }
.links-page .label { margin-top: .5rem; }

/* ---- cookie notice (consent.js) ---- */
.cookie-banner { position: fixed; inset: auto 0 0 0; z-index: 60; background: var(--surface); border-top: 2px solid var(--btn-bg); color: var(--fg); }
.cookie-banner[hidden] { display: none; }
.cookie-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding: 1.25rem 0; }
.cookie-text { flex: 1 1 32rem; font-size: .92rem; }
.cookie-text strong { display: block; margin-bottom: .25rem; font-family: var(--font-label); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.cookie-text p { margin: 0; }
.cookie-text a { color: inherit; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.cookie-actions .btn { min-height: 2.75rem; padding: .6rem 1.25rem; }
.link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; text-decoration: underline; cursor: pointer; }
html:not(.js) [data-cookie-settings] { display: none; }
@media (max-width: 600px) { .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1 1 auto; } }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .88rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .6rem .75rem; border: 1px solid var(--line-strong); }
.legal th { font-family: var(--font-label); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.legal td:first-child { font-family: var(--font-label); font-size: .8rem; white-space: nowrap; }
