/* ============================================================
   KATRIN OKUPNIK — LANDINGPAGE
   Implementation of "Katrin Okupnik Landingpage.dc.html".
   Component styles (.btn, .label, .card, .icon-box, form
   controls) mirror the design-system components 1:1.
   ============================================================ */

/* ---------- Base ------------------------------------------ */

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: var(--text-link-hover);
}

:where(a, button, input, textarea, summary):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

em.accent {
  font-family: var(--font-serif-accent);
  font-style: italic;
  font-weight: 400;
  color: var(--kobalt);
}

.icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Layout ---------------------------------------- */

.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.sec {
  padding-top: var(--space-section-mobile);
  padding-bottom: var(--space-section-mobile);
  /* Sticky nav is ~81px tall — keep anchor targets clear of it. */
  scroll-margin-top: 48px;
}

@media (min-width: 900px) {
  .sec {
    padding-top: var(--space-section);
    padding-bottom: var(--space-section);
  }
}

.sec-head {
  max-width: 60ch;
  margin-bottom: 48px;
}

.sec-head--center {
  max-width: 62ch;
  margin: 0 auto 48px;
  text-align: center;
}

.sec-title {
  font-size: var(--text-h1);
  font-weight: var(--fw-h1);
  letter-spacing: var(--ls-h1);
  line-height: var(--lh-h1);
  margin-top: 16px;
  text-wrap: balance;
}

.sec-lead {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
  margin-top: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 800px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

@media (min-width: 720px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Design-system components ----------------------- */

/* Label — uppercase eyebrow with a leading dot */
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-label);
  font-weight: var(--fw-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--koralle-dark);
}

.label::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: currentColor;
  display: inline-block;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  font-family: var(--font-sans);
  font-weight: var(--fw-button);
  letter-spacing: var(--ls-button);
  font-size: var(--text-button);
  padding: 13px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.btn--sm {
  padding: 9px 16px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: 19px 36px;
  font-size: 1.125rem;
  border-radius: var(--radius-md);
}

.btn--block {
  width: 100%;
}

.btn--primary {
  background: var(--kobalt);
  color: #fff;
  border: 1.5px solid var(--kobalt);
}

.btn--primary:hover {
  background: var(--kobalt-dark);
  border-color: var(--kobalt-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--tinte);
  border: 1.5px solid var(--tinte);
}

.btn--secondary:hover {
  background: var(--tinte);
  color: var(--papier);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

/* Card */
.card {
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  color: var(--tinte);
  border: 1px solid transparent;
}

.card--calm {
  background: var(--lavendel);
}

.card--warm {
  background: var(--rose);
}

.card--lime {
  background: var(--limette);
}

.card__title {
  margin: 16px 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
}

.card__text {
  color: var(--text-muted);
  line-height: 1.6;
}

.card--lime .card__text {
  color: var(--tinte);
  opacity: 0.75;
}

/* IconContainer — rounded tile holding a single line icon */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.icon-box--sm {
  width: 40px;
  height: 40px;
}

.icon-box--lavender {
  background: var(--lavendel);
  color: var(--kobalt);
}

.icon-box--lime {
  background: var(--limette);
  color: var(--tinte);
}

.icon-box--rose {
  background: var(--rose);
  color: var(--tinte);
}

/* The three Problem cards force the icon to brand blue. */
.icon-box--ink-brand {
  color: var(--kobalt);
}

/* Form controls */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--tinte);
}

.field .req {
  color: var(--koralle-dark);
}

.control {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  color: var(--tinte);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  outline: none;
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.control:focus {
  border-color: var(--kobalt);
  box-shadow: 0 0 0 4px rgba(49, 66, 240, 0.14);
}

textarea.control {
  resize: vertical;
  line-height: 1.5;
}

/* Image frame — replicates the design's <image-slot> crop.
   Sizing/offset of the <img> is set by js/site.js. */
.imgframe {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--kobalt-tint);
}

.imgframe img {
  position: absolute;
  max-width: none;
  transform: translate(-50%, -50%);
  /* Fallback before the crop script runs. */
  width: 100%;
  height: 100%;
  left: 50%;
  top: 50%;
  object-fit: cover;
}

/* ---------- Nav -------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  background: var(--papier);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px -12px rgba(31, 29, 43, 0.28);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: 20px clamp(20px, 5vw, 80px);
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--tinte);
  flex-shrink: 0;
}

.wordmark::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--limette);
  display: inline-block;
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: var(--text-nav);
  font-weight: 600;
  color: var(--tinte);
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}

.nav-links a:hover {
  border-bottom-color: var(--kobalt);
}

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

/* ---------- Hero ------------------------------------------- */

.hero {
  padding-top: clamp(40px, 6vw, 88px);
}

.hero__title {
  font-size: var(--text-hero);
  line-height: var(--lh-hero);
  letter-spacing: var(--ls-hero);
  font-weight: var(--fw-hero);
  margin-top: 20px;
  max-width: 17ch;
  text-wrap: balance;
}

.hero__lead {
  font-size: var(--text-intro);
  line-height: var(--lh-intro);
  color: var(--text-muted);
  max-width: var(--measure-intro);
  margin: 28px 0 36px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero__trust {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--border);
}

.hero__trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--tinte-soft);
  font-weight: 500;
}

.hero__trust .icon {
  width: 20px;
  height: 20px;
  color: var(--kobalt);
}

/* ---------- Angebot ---------------------------------------- */

.feature {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.feature__name {
  font-weight: 700;
}

.feature__desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ---------- Portfolio-Galerie ------------------------------ */

.gallery {
  position: relative;
  overflow: hidden;
  /* Höhe setzt js/site.js auf die der mittleren Karte; der Wert hier
     greift nur, bis das Skript läuft. */
  height: 448px;
}

.gallery__slide {
  position: absolute;
  top: 50%;
  left: 0;
  /* Die sichtbare Kartenmitte liegt an der Slide-Oberkante (siehe
     translateY auf .gallery__card) — scale() muss um diesen Punkt drehen. */
  transform-origin: 50% 0;
  transition:
    opacity 900ms var(--ease-standard),
    transform 900ms var(--ease-standard),
    width 900ms var(--ease-standard);
  will-change: transform, opacity;
}

.gallery__card {
  position: relative;
  /* Die Karten sind unterschiedlich breit und dadurch unterschiedlich
     hoch — vertikal zentriert stehen sie ausgewogen nebeneinander.
     Das -50% muss hier stehen, nicht im animierten Transform des Slides:
     Safari löst Prozentwerte in einem transitionierenden Transform nur
     einmal (gegen die Höhe beim Animationsstart) auf — die Karte hinge
     während der Fahrt zu tief und spränge am Ende nach oben. */
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  padding: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  font-family: inherit;
  width: 100%;
}

/* Bildfläche im Seitenverhältnis der Hero-Screenshots (1440 × 900).
   Weil Bild und Fläche dasselbe Verhältnis haben, wird innerhalb der
   Karte nichts beschnitten — der Hero ist komplett zu sehen. Bei den
   seitlichen Karten schneidet erst der Rand der Bahn ab, sodass dort
   der jeweils zugewandte Teil des Heros sichtbar bleibt. */
.gallery__card .imgframe {
  width: 100%;
  aspect-ratio: 1440 / 900;
  flex: none;
}

.gallery__slide--center .gallery__card {
  box-shadow: var(--shadow-md);
}

/* "Beispiel ansehen" — nur auf der mittleren, klickbaren Karte */
.gallery__cta {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: rgba(25, 24, 27, 0.82);
  color: var(--papier);
  font-size: 0.875rem;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition:
    background var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard);
}

.gallery__cta .icon {
  width: 16px;
  height: 16px;
}

.gallery__slide--center .gallery__cta {
  display: inline-flex;
}

.gallery__slide--center .gallery__card:hover .gallery__cta,
.gallery__slide--center .gallery__card:focus-visible .gallery__cta {
  background: var(--kobalt);
  transform: translateY(-2px);
}

.gallery__caption {
  display: block;
  padding: 16px 18px;
}

.gallery__name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--tinte);
}

.gallery__cat {
  display: block;
  font-size: 0.82rem;
  color: rgba(25, 24, 27, 0.65);
  margin-top: 2px;
}

.gallery__nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.gallery__arrow {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--tinte);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast) var(--ease-standard);
}

.gallery__arrow:hover {
  background: var(--kobalt-tint);
}

.gallery__arrow .icon {
  width: 18px;
  height: 18px;
}

.gallery__detail {
  max-width: 62ch;
  margin: 44px auto 0;
  text-align: center;
  min-height: 132px;
}

.gallery__detail h3 {
  margin-bottom: 12px;
  font-size: 1.5rem;
  font-weight: 700;
}

.gallery__detail p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---------- Über mich -------------------------------------- */

.about {
  align-items: center;
}

.about .imgframe {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-width: 420px;
  border-radius: 28px;
}

.about p + p {
  margin-top: 16px;
}

.about__text p {
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--text-muted);
}

.about__text p:first-of-type {
  margin-top: 22px;
}

/* ---------- Ablauf ----------------------------------------- */

.ablauf-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: start;
}

@media (min-width: 900px) {
  .ablauf-split {
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(48px, 7vw, 104px);
  }
}

.ablauf__lead {
  font-size: var(--text-intro);
  line-height: var(--lh-intro);
  color: var(--text-muted);
  max-width: 34ch;
  margin: 24px 0 36px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  display: flex;
  align-items: baseline;
  gap: clamp(20px, 3vw, 44px);
  padding: clamp(14px, 1.6vw, 18px) 0;
  border-top: 1px solid var(--border);
}

.steps li:first-child {
  padding-top: 0;
  border-top: none;
}

.steps li:last-child {
  padding-bottom: 0;
}

.steps__n {
  flex: none;
  font-family: var(--font-serif-accent);
  font-style: italic;
  font-size: 2.2rem;
  min-width: 1.4ch;
}

.steps li:nth-child(1) .steps__n {
  color: var(--kobalt);
}

.steps li:nth-child(2) .steps__n {
  color: var(--koralle);
}

.steps li:nth-child(3) .steps__n {
  color: var(--limette-dark);
}

.steps li:nth-child(4) .steps__n {
  color: var(--koralle-dark);
}

.steps p {
  line-height: 1.65;
  color: var(--text-muted);
}

.steps strong {
  color: var(--tinte);
  font-weight: 700;
}

/* ---------- Kontakt ---------------------------------------- */

.kontakt__panel {
  background: var(--kobalt-tint);
  border-radius: var(--radius-2xl);
  padding: clamp(32px, 5vw, 72px);
}

.kontakt__title {
  font-size: var(--text-h1);
  font-weight: var(--fw-h1);
  letter-spacing: var(--ls-h1);
  line-height: var(--lh-h1);
  margin-top: 16px;
  max-width: 18ch;
  text-wrap: balance;
}

.kontakt__lead {
  font-size: var(--text-intro);
  line-height: var(--lh-intro);
  color: var(--text-muted);
  margin-top: 22px;
  max-width: 40ch;
}

.kontakt__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
}

/* Honeypot — für Menschen unsichtbar, für Bots ein ausfüllbares Feld.
   Nicht display:none: manche Bots überspringen ausgeblendete Felder. */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin: -8px 0 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.form-status {
  margin: 0;
  color: var(--kobalt);
  font-weight: 600;
  font-size: 0.9375rem;
}

.form-status--error {
  color: var(--koralle-dark);
}

.form-status[hidden] {
  display: none;
}

.btn[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- FAQ -------------------------------------------- */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
}

.faq {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.0625rem;
  list-style: none;
}

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

.faq-chevron {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-base) var(--ease-standard);
}

.faq[open] .faq-chevron {
  transform: rotate(180deg);
}

.faq p {
  margin-top: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Abschließender Handlungsaufruf unter den Fragen */
.faq-cta {
  margin-top: clamp(32px, 4vw, 48px);
}

/* ---------- Portfolio-Vorschau (Popup) ---------------------- */

.preview[hidden] {
  display: none;
}

.preview {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
}

.preview__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 24, 27, 0.66);
  border: none;
  animation: preview-fade var(--duration-base) var(--ease-standard);
}

.preview__window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  /* Nicht breiter als die Beispielseiten rendern (DESKTOP_WIDTH in
     js/site.js) — sonst bliebe seitlich der schwarze Grund der Bühne
     stehen. Beide Werte gehören zusammen. */
  max-width: 1440px;
  max-height: 100%;
  background: var(--papier);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: preview-in var(--duration-base) var(--ease-standard);
}

@keyframes preview-fade {
  from {
    opacity: 0;
  }
}

@keyframes preview-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.browser-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  display: inline-block;
}

.preview__chrome {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
  padding: 12px 14px 12px 18px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.preview__dots {
  display: flex;
  gap: 8px;
  flex: none;
}

.preview__label {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-close {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--tinte);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.modal-close:hover {
  background: var(--tinte);
  color: var(--papier);
}

.modal-close .icon {
  width: 18px;
  height: 18px;
}

/* Bühne: der Iframe rendert immer als Desktop-Browserfenster und wird
   per transform herunterskaliert, damit auf jedem Gerät dasselbe
   Desktop-Layout zu sehen ist. Höhe und Maßstab setzt js/site.js —
   das Seitenverhältnis bleibt dabei desktop-typisch, sonst würden
   100vh-Bereiche der Beispielseiten in die Länge gezogen. */
.preview__stage {
  position: relative;
  flex: none;
  height: 60vh;
  overflow: hidden;
  background: #000;
}

/* Die Beispielseite wird erst eingeblendet, wenn sie fertig aufgebaut ist —
   das überdeckt das Aufblitzen, während die Bundle-Seiten sich entpacken.
   Die Klasse setzt js/site.js. */
.preview__stage iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: top left;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-standard);
}

.preview__stage iframe.is-ready {
  opacity: 1;
}

/* Seite hinter einem Popup nicht mitscrollen lassen. `overflow: hidden`
   allein hält auf iOS nicht — der Body wird zusätzlich fixiert. Den
   Versatz (top) und das Zurückscrollen beim Schließen setzt js/site.js. */
body.scroll-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

/* Doppeltipp-Zoom auf den Popups unterbinden (die Pinch-Geste fängt
   js/site.js ab). */
.preview,
.legal {
  touch-action: manipulation;
}

/* ---------- Rechtliches (Impressum / Datenschutz) ----------- */

/* Button, der wie ein Textlink aussieht — für Impressum, Datenschutz
   und den Verweis unter dem Formular. */
.linkbutton {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.linkbutton:hover {
  color: var(--text-link-hover);
}

.legal[hidden] {
  display: none;
}

.legal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vw, 40px);
}

.legal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 24, 27, 0.66);
  border: none;
  animation: preview-fade var(--duration-base) var(--ease-standard);
}

.legal__window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  max-height: 100%;
  background: var(--papier);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: preview-in var(--duration-base) var(--ease-standard);
}

.legal__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  padding: 16px 16px 16px clamp(24px, 4vw, 40px);
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.legal__title {
  flex: 1;
  min-width: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--tinte);
}

.legal__content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 40px);
}

/* Fließtext im Popup — die Basis der Seite setzt Überschriften und
   Absätze auf margin 0, hier braucht es wieder Abstände. */
.legal__doc {
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.legal__doc[hidden] {
  display: none;
}

.legal__doc h2 {
  margin: 32px 0 12px;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--tinte);
}

.legal__doc h3 {
  margin: 24px 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tinte);
}

.legal__doc h4 {
  margin: 18px 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--tinte);
}

.legal__doc > :first-child {
  margin-top: 0;
}

.legal__doc p {
  margin: 0 0 12px;
}

.legal__doc ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

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

.legal__doc a {
  word-break: break-word;
}

.footer__legal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

.footer {
  padding: 40px clamp(20px, 5vw, 80px) 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer .wordmark {
  font-size: 1.05rem;
}

.footer .wordmark::after {
  width: 7px;
  height: 7px;
}
