/* Gathery – gemeinsames Stylesheet für Startseite, Rechtstexte und 404 */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --line: rgba(0, 0, 0, 0.1);
  --accent: #6b3fd4;
  --accent-hover: #5a2fc2;
  --on-accent: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --shadow-card:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.03),
    0 12px 32px rgba(0, 0, 0, 0.06);
  --brand: linear-gradient(120deg, #f8b21c 0%, #ee4c8f 30%, #a63ec9 55%, #4f72e0 80%, #1cddb4 100%);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable Display",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: max(22px, env(safe-area-inset-left));
  --maxw: 1024px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #101012;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --text-3: #86868b;
    --line: rgba(255, 255, 255, 0.14);
    --accent: #b79cff;
    --accent-hover: #c9b5ff;
    --on-accent: #12082b;
    --nav-bg: rgba(22, 22, 23, 0.72);
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 10px;
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  color: var(--text);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  gap: 26px;
  font-size: 13px;
  letter-spacing: -0.01em;
}

.nav-links a {
  color: var(--text);
  opacity: 0.8;
  transition: opacity 150ms ease;
}

.nav-links a:hover {
  opacity: 1;
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
}

/* ---------- Sprachmenü ---------- */

.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 8px 0 10px;
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 150ms ease;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  background: var(--bg-alt);
}

.lang-menu summary .chevron {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: rotate 200ms var(--ease-out);
}

.lang-menu[open] summary .chevron {
  rotate: 180deg;
}

.flag {
  width: 20px;
  height: 14px;
  flex: none;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--line);
}

.lang-menu ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-card), 0 16px 40px rgba(0, 0, 0, 0.12);
  transform-origin: top right;
  animation: lang-menu-in 160ms var(--ease-out);
}

@keyframes lang-menu-in {
  from {
    opacity: 0;
    scale: 0.96;
  }
}

.lang-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 15px;
}

.lang-menu li a:hover {
  background: var(--bg-alt);
  text-decoration: none;
}

.lang-menu li a[aria-current="true"]::after {
  content: "✓";
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition-property: background-color, scale;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.btn:active {
  scale: 0.96;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn-sm {
  min-height: 30px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 500;
}

.btn-lg {
  min-height: 52px;
  padding: 0 28px;
}

/* Die App ist noch nicht bei Google Play: sieht aus wie der Button, ist aber keiner */
.btn-soon,
.btn-soon:hover {
  background: var(--bg-alt);
  color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: default;
}

.btn-soon:active {
  scale: 1;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
}

.link-arrow::after {
  content: "›";
  font-size: 1.25em;
  line-height: 1;
  transform: translateY(-1px);
}

/* ---------- Typografie ---------- */

.eyebrow {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-2);
}

.gradient-text {
  background: var(--brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.headline {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-title {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead {
  margin: 18px 0 0;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.38;
  letter-spacing: -0.02em;
  color: var(--text-2);
  text-wrap: pretty;
}

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

.footer {
  background: var(--bg-alt);
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
}

.footer a {
  color: var(--text-2);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li + li::before {
  content: "|";
  margin: 0 10px;
  color: var(--line);
}

/* ---------- Rechtstexte ---------- */

.legal-hero {
  padding: 72px 0 36px;
  border-bottom: 1px solid var(--line);
}

.legal-hero .headline {
  font-size: clamp(36px, 5.5vw, 56px);
}

.legal {
  max-width: 720px;
  padding-block: 40px 96px;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.legal h2 {
  margin: 56px 0 14px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.legal section:first-of-type h2 {
  margin-top: 8px;
}

.legal .toc + section h2 {
  margin-top: 48px;
}

.legal h3 {
  margin: 32px 0 8px;
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.legal h4 {
  margin: 24px 0 6px;
  font-size: 17px;
  font-weight: 600;
}

.legal p {
  margin: 0 0 14px;
  color: var(--text);
}

.legal ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.toc {
  margin: 0 0 8px;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--bg-alt);
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--text-3);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2 240px;
  column-gap: 24px;
}

.toc li {
  margin: 0;
  padding: 4px 0;
  break-inside: avoid;
}

.toc a {
  text-decoration: none;
  font-size: 15px;
}

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

.card {
  padding: 26px 28px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

/* ---------- Cookie-Hinweis ---------- */

.cookie-banner {
  position: fixed;
  z-index: 60;
  right: var(--gutter);
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 460px;
  padding: 14px 14px 14px 18px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-card), 0 16px 40px rgba(0, 0, 0, 0.14);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
  opacity: 0;
  translate: 0 12px;
  transition-property: opacity, translate;
  transition-duration: 300ms;
  transition-timing-function: var(--ease-out);
}

.cookie-banner.in {
  opacity: 1;
  translate: 0 0;
}

.cookie-banner p {
  margin: 0;
}

.cookie-banner .btn {
  flex: none;
}

@media (max-width: 520px) {
  .cookie-banner {
    left: var(--gutter);
  }
}

/* ---------- Kontaktformular ---------- */

.contact-form {
  display: flex;
  flex-direction: column;
  margin-top: 28px;
}

/* display: flex würde das hidden-Attribut nach dem Senden überstimmen */
.contact-form[hidden] {
  display: none;
}

.contact-form label,
.contact-form legend {
  margin: 18px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.contact-form .optional {
  color: var(--text-3);
  font-weight: 400;
}

.contact-form input:not([type="radio"], [type="checkbox"]),
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  transition: border-color 150ms ease-out;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form :is(input, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.contact-form .count {
  align-self: flex-end;
  margin-top: 4px;
  color: var(--text-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Themen als Pills: das Radio-Feld bleibt für Tastatur und Screenreader da, nur unsichtbar */
.topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.topics legend {
  margin-top: 0;
  margin-bottom: 10px;
  padding: 0;
}

.contact-form .topics label {
  position: relative;
  margin: 0;
}

.topics input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.topics span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-2);
  font-weight: 600;
  transition-property: background-color, border-color, color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.topics input:checked + span {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--text);
}

.topics input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) {
  .topics label:hover span {
    border-color: var(--accent);
  }
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .consent {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.contact-form .form-error {
  margin: 14px 0 0;
  color: #d70015;
  font-size: 15px;
}

.contact-form .form-error:empty {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .contact-form .form-error {
    color: #ff6961;
  }
}

.contact-form .btn {
  align-self: flex-start;
  margin-top: 22px;
}

.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.contact-form .recaptcha-note,
.legal .contact-alt {
  margin-top: 14px;
  color: var(--text-3);
  font-size: 13px;
}

/* Der Badge wird durch den Hinweistext ersetzt (von Google erlaubt) */
.grecaptcha-badge {
  visibility: hidden;
}

.contact-done {
  margin-top: 28px;
  padding: 28px;
  border-radius: 18px;
  background: var(--bg-alt);
  text-align: center;
}

.contact-done:focus {
  outline: none;
}

.contact-done svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  padding: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  animation: pop 400ms var(--ease-out);
}

.legal .contact-done h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

@keyframes pop {
  from {
    scale: 0.6;
    opacity: 0;
  }
}

@media (max-width: 520px) {
  .contact-form .btn {
    align-self: stretch;
  }
}

/* ---------- Bewegung ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
