@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/poppins-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/poppins-500-latin.woff2") format("woff2");
}
:root {
  color-scheme: light;
  --ink: #111216;
  --ink-soft: #424449;
  --accent: #349dff;
  --bg: #ffffff;
  --line: #e3e5e8;
  --fill: #eef0f2;
  --panel: #ffffff;
}
html[data-theme="dark"] {
  --ink: #f2f3f5;
  --ink-soft: #a7acb4;
  --bg: #0e0f12;
  --line: #26282d;
  --fill: #1a1c20;
  --panel: #15171b;
  color-scheme: dark;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--bg); transition: background .35s ease; }
html { scroll-behavior: smooth; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
}
.hero-section, .content { background: var(--bg); transition: background .35s ease; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Navbar: Logo mittig ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  padding: 15px 24px;
  background: var(--bg);
  transition: background .35s ease;
}
.topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
}
.topbar-inner .nav-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-logo { display: block; line-height: 0; }
.home-page .nav-logo img {
  display: block;
  width: 30px;
  height: 30px;
  filter: brightness(0);
  transition: filter .3s ease, opacity .3s ease;
}
html[data-theme="dark"] .home-page .nav-logo img { filter: brightness(0) invert(1); }
.home-page .nav-logo:hover img { opacity: .72; }
/* ---------- Globale Steuerung in der Navbar ---------- */
.nav-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}
.nav-control-theme { left: 0; }
.nav-control-language { right: 0; }
.theme-toggle {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px;
  border: none;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .2s ease, scale .28s cubic-bezier(.22,.61,.36,1);
}
.theme-toggle .theme-option {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, scale .28s cubic-bezier(.22,.61,.36,1);
}
.lang-toggle .language-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.lang-toggle:hover, .theme-toggle:hover { background: var(--line); }
.lang-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
html[data-theme="light"] .theme-toggle .option-sun,
html[data-theme="dark"] .theme-toggle .option-moon {
  color: var(--ink);
  background: var(--panel);
}
.nav-logo svg {
  width: 30px;
  height: 30px;
  fill: var(--ink);
  transition: fill .3s ease;
}
.nav-logo:hover svg { fill: var(--ink-soft); }
.nav-logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 7px; }
/* Hero-Sektion: füllt den ersten Viewport, darunter beginnt der Inhalt */

.hero-section {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}
#stage { position: absolute; inset: 0; display: block; contain: strict; }

.hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  pointer-events: none;
  padding: 24px;
}
.hero > * { pointer-events: auto; }

h1 {
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* ---------- Textbereich unter dem Hero ---------- */
.content {
  /* 600px − 48px Padding = 552px Zeilenlänge ≈ 66 Zeichen
     bei 15px Poppins (Bringhursts Ideal) */
  max-width: 600px;
  margin: 0 auto;
  padding: 45px 24px 0;   /* oben: 2× Zeilenhöhe, wie vor jeder H2 */
  position: relative;
}

.content h2 {
  /* 20/15 = 1.333 — exakt die Quarte */
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  /* Überschrift bindet sich an ihren Absatz: großer Abstand nach oben,
     kleiner nach unten */
  margin: 45px 0 9px;   /* 2× Zeilenhöhe — Untergrenze des Korridors */
}
.content section:first-of-type h2 { margin-top: 0; }
.content section { scroll-margin-top: 96px; }
.content p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 16px;
}
/* ---------- CTA unter dem Manifest ---------- */
.cta {
  display: inline-block;
  margin-top: 44px;
  padding: 13px 30px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  /* Hover: sanft eine Nuance dunkler */
  transition: background .3s ease, scale .28s cubic-bezier(.22,.61,.36,1);
}
.cta:hover { background: var(--line); }
.cta:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover,
  .lang-toggle:hover,
  .back-button:hover,
  .cta:hover { scale: 1.04; }

  .theme-toggle:active,
  .lang-toggle:active,
  .back-button:active,
  .cta:active {
    scale: .985;
    transition-duration: .1s;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  --footer-width: 600px;
  margin-top: 45px;
}
.footer-bar {
  width: 100%;
  max-width: var(--footer-width);
  margin: 0 auto;
  padding: 0 24px 72px;
  font-size: 13px;
  text-align: left;
  color: var(--ink-soft);
}
.footer-bar a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}
.footer-bar a:hover { color: var(--ink); }
.footer-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}
.footer-legal {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
  white-space: nowrap;
}
.footer-copy {
  white-space: nowrap;
}
@media (max-width: 640px) {
  .footer-bar { padding-bottom: 64px; }
  .footer-meta { gap: 16px; }
  .footer-legal { gap: 16px; }
  .theme-toggle, .lang-toggle { height: 34px; }
  .theme-toggle .theme-option { width: 26px; height: 26px; }
  .lang-toggle { padding: 0 12px; font-size: 11px; }
}
/* ---------- Abschnittsaufbau: H2 und Absatz leicht überlappend ---------- */
.content h2 .ch {
  display: inline-block;
  opacity: 0;
  filter: blur(5px);
  transform: translateY(5px);
  transition: opacity .38s ease-out, filter .38s ease-out, transform .38s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--i) * 18ms);
}
.content h2.in-view .ch {
  opacity: 1;
  filter: blur(0);
  transform: none;
}
.content p .wd {
  display: inline;
  opacity: 0;
  filter: blur(4px);
  transition: opacity .32s ease-out, filter .32s ease-out;
  transition-delay: calc(var(--i) * 10ms);
}
.content p.in-view .wd {
  opacity: 1;
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
  .content h2 .ch { opacity: 1; filter: none; transform: none; transition: none; }
  .content p .wd { opacity: 1; filter: none; transition: none; }
}

/* ---------- Scroll-Reveal: Text baut sich beim Hereinscrollen auf ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1), scale .28s cubic-bezier(.22,.61,.36,1), background .3s ease;
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
h1 .sub { display: block; color: var(--ink); font-weight: 500; }

/* ---------- AI-Hinweis: Caption für das generierte Hero-Artwork ---------- */
.ai-note {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  margin: 0;
  font-family: inherit;
  white-space: nowrap;
}
.ai-note .ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  /* 5:4 */
  width: 30px;
  height: 24px;
  border: 1.5px solid var(--ink);
  border-radius: 7px;
  background: transparent;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .025em;
  line-height: 1;
  color: var(--ink);
}
.ai-note .ai-text {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;                 /* exakt mittig zum Badge */
  color: var(--ink-soft);
}
@media (max-width: 640px) {
  .ai-note {
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
  }
  .ai-note .ai-badge { width: 25px; height: 20px; font-size: 9.5px; } /* 5:4 */
  .ai-note .ai-text { font-size: 12px; }
}
@media (max-width: 640px) {
  /* klein genug, dass beide Zeilen ohne Umbruch stehen bleiben */
  h1 { font-size: clamp(22px, 7vw, 32px); }
  /* Hero moderat flacher (Position der Logo-Art wie zuvor abgestimmt);
     der Textbereich zieht sich zusätzlich per negativem Margin in den
     leeren unteren Hero-Bereich hoch — die Wolke bleibt, wo sie ist */
  .hero-section {
    height: 74vh;
    height: 74svh;
    min-height: 470px;
  }
  .content {
    position: relative;
    z-index: 2;
    padding-top: 28px;   /* = mobiler H2-Vorabstand, analog zur Desktop-Logik */
  }
  /* Typo-Hierarchie passend zur Mobile-Headline (max. 32px):
     Zwischenüberschriften und Fließtext eine Stufe kleiner */
  .content h2 {
    font-size: 15.5px;
    margin: 28px 0 6px;
  }
  .content p {
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0 0 12px;
  }
}

/* ---------- Rechtliche Seiten ---------- */
body.legal-site {
  min-height: 100%;
  font-size: 14px;
  line-height: 1.7;
}

.legal-site a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}
.legal-site .legal-page a:hover { color: var(--ink); }

.legal-site .topbar-inner { min-height: 36px; }
.legal-site .nav-logo {
  z-index: 1;
  width: 30px;
  height: 30px;
  cursor: pointer;
}
.legal-site .nav-logo img {
  display: block;
  width: 100%;
  height: 100%;
  filter: brightness(0);
  transition: filter .3s ease, opacity .3s ease;
}
html[data-theme="dark"] .legal-site .nav-logo img {
  filter: brightness(0) invert(1);
}
.legal-site .nav-logo:hover img { opacity: .74; }
html[data-theme="dark"] .legal-site .nav-logo:hover img { opacity: .64; }

.legal-site .nav-control-left {
  left: 0;
  gap: 7px;
}
.legal-site .theme-toggle,
.legal-site .back-button {
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: background .2s ease, scale .28s cubic-bezier(.22,.61,.36,1);
}
.legal-site .theme-toggle { color: var(--ink-soft); }
.legal-site .back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
}
.legal-site .back-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}
.legal-site .back-button:hover { background: var(--line); }
.legal-site .theme-toggle:focus-visible,
.legal-site .back-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.legal-page {
  width: 100%;
  max-width: 600px;
  min-height: calc(100vh - 180px);
  margin: 0 auto;
  padding: 142px 24px 0;
}
.legal-site .eyebrow {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}
.legal-site h1 {
  margin: 0 0 54px;
  font-size: clamp(38px, 8vw, 64px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.legal-site h2 {
  margin: 44px 0 12px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}
.legal-site p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}
.legal-site ul {
  margin: 0 0 18px;
  padding-left: 20px;
  color: var(--ink-soft);
}
.legal-site li + li { margin-top: 5px; }
.legal-site address {
  color: var(--ink-soft);
  font-style: normal;
}
.legal-site .footer-bar { line-height: normal; }

@media (max-width: 640px) {
  .legal-site .topbar { padding: 15px 18px; }
  .legal-page { padding: 120px 20px 0; }
  .legal-site .footer-bar { padding: 0 20px 64px; }
  .legal-site .back-button {
    height: 34px;
    padding: 0 12px;
    font-size: 11px;
  }
  .legal-site h1 { margin-bottom: 40px; }
}

@media (max-width: 520px) {
  .legal-site .back-button {
    width: 34px;
    padding: 0;
  }
  .legal-site .back-button-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .legal-site .nav-control-left { gap: 5px; }
}
