/* ============================================================
   MARCUS WERTZ — DESIGN SYSTEM  (Stand 2026-10-16)
   Basis: braendar.com (gleiches Raster, gleiche Typografie)
   Vier Schriftgrößen: Headline · Copy-Text · Button · Footer/Sternchentext
   Breakpoints: Desktop ≥1024px · Tablet 600–1023px · Mobile ≤599px
   ============================================================ */

/* --- Font Declarations --- */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter24pt-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter24pt-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter24pt-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Familienname für die in die SVG-Grafiken eingebettete Schrift (Fallback, falls inline genutzt) */
@font-face {
  font-family: 'Inter24pt-Light';
  src: url('/assets/fonts/Inter24pt-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* --- Design Tokens --- */
:root {
  --color-bg:      #FFFFFF;
  --color-surface: #F2F2F2;
  --color-accent:  #F2F0EA;   /* Beige: Startseite, 11-%-Studie, Kontakt, Rechtliches */
  --color-ink:     #000000;
  --color-line:    #DFDFDF;
  --color-muted:   #595959;
  --color-muted-2: #A5A5A5;

  /* Seitenflächen der Cases */
  --color-case:      #F7F7F7;
  --color-quovadis:  #EE0033;
  --color-conciso:   #00BEBF;
  --color-schwalbe:  #DAEBF7;

  --gutter: clamp(10px, 1.875vw, 27px);
  --gv: var(--gutter);       /* vertikaler Rhythmus; auf Mobil = Desktop-Wert */
  --radius-block: 10px;
  --radius-card: 20px;     /* weiße Karten, Kacheln, Bilder */
  --radius-btn: 999px;
  --logo-h: 21px;

  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  --fw-light:   300;
  --fw-regular: 400;
  --fw-bold:    700;

  /* Die vier Schriftgrößen */
  --t-headline: clamp(26px, 3.15vw, 41px);
  --t-body:     clamp(19px, 1.5vw, 22px);
  --t-btn:      clamp(12px, 1vw, 14px);
  --t-sm:       clamp(11px, 0.9vw, 13px);
  --t-claim:    calc(var(--t-headline) * 2);   /* Positionierungs-Aussage: 2× Headline */

  --lh-body: 1.55;

  /* Akzentfarbe der Claims (pro Seite überschrieben) */
  --claim: var(--color-ink);
  /* Kartenfarbe (pro Seite überschrieben) */
  --card-bg: var(--color-bg);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  font-weight: var(--fw-light);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding-top: 0;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
strong, b { font-weight: var(--fw-regular); }

/* --- Layout --- */
.page-wrapper { padding: var(--gutter); }

/* Logo→Headline-Abstand: gutter*8 unter dem Logo */
main > .block:first-child {
  padding-top: calc(var(--gutter) * 8 + var(--logo-h));
}

/* --- Blocks --- */
.block {
  border-radius: var(--radius-block);
  padding: calc(var(--gv) * 2) calc(var(--gutter) * 2);
  margin-bottom: var(--gv);
}
.block:last-child { margin-bottom: 0; }

/* Durchgehende, eckige Farbflächen */
.block--beige, .block--case { border-radius: 0; }
.block--beige { background: var(--color-accent); }
.block--case  { background: var(--color-case); }
.block--quovadis { --claim: var(--color-quovadis); }
.block--conciso  { --claim: var(--color-conciso); }
.block--schwalbe { --claim: var(--color-ink); --card-bg: var(--color-schwalbe); }

/* Abschnitt ohne Hintergrund (Abschluss, „Weitere Cases“) */
.block--plain { margin-top: calc(var(--gv) * 6); }
.block--plain-tight { margin-top: calc(var(--gv) * 3); }

/* --- Site Header --- */
.site-header {
  position: fixed;
  top: calc(var(--gutter) * 3);
  left: calc(var(--gutter) * 3);
  right: calc(var(--gutter) * 3);
  height: auto;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0;
  pointer-events: none;
}
.site-header > * { pointer-events: all; }

.logo { display: flex; align-items: flex-start; line-height: 0; }
.logo img { height: var(--logo-h); width: auto; }

/* --- Menu Toggle --- */
.menu-toggle {
  display: flex; align-items: flex-start; justify-content: center;
  width: auto; height: auto;
  border-radius: var(--radius-btn);
  color: var(--color-ink);
  cursor: pointer;
  position: relative;
  padding: 0;
  background: transparent;
}
.menu-toggle:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }

.dots-group {
  transform-origin: 11px 11px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.menu-toggle[aria-expanded="true"] .dots-group { transform: rotate(45deg); }

/* --- Nav Overlay --- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0,0,0,0.12);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: calc(var(--gutter) * 2) calc(var(--gutter) * 2) var(--gutter);
}
.nav-overlay[hidden] { display: none; }

.nav-panel {
  background: var(--color-bg);
  border-radius: var(--radius-block);
  padding: var(--gutter);
  width: min(430px, calc(100vw - var(--gutter) * 2));
  box-shadow: 0 8px 40px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

.nav-links { display: flex; flex-direction: column; gap: 16px; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border: 1.5px solid var(--color-ink);
  border-radius: var(--radius-btn);
  font-family: var(--font-ui);
  font-weight: var(--fw-regular);
  font-size: var(--t-btn);
  letter-spacing: 0.05em;
  color: var(--color-ink);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  text-align: center;
}
.nav-btn:hover { background: var(--color-ink); color: var(--color-bg); }
.nav-btn:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 2px; }

.nav-btn--full {
  width: auto;
  align-self: flex-start;
  /* unter dem Logo (Header liegt über dem Menü) */
  margin-top: calc(var(--logo-h) + var(--gutter) * 0.75);
  margin-bottom: 32px;
}

.nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* --- Buttons / CTAs --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 11px 24px;
  border-radius: var(--radius-btn);
  font-family: var(--font-ui);
  font-weight: var(--fw-regular);
  font-size: var(--t-btn);
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
  border: 1.5px solid var(--color-ink);
  background: transparent;
  color: var(--color-ink);
}
.btn:hover { background: var(--color-ink); color: var(--color-bg); }
.btn:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 3px; }

.btn--outline { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn--outline:hover { background: var(--color-ink); color: var(--color-bg); }

/* Glas-Button auf Bildkacheln */
.btn--glass {
  background: rgba(0,0,0,0.45);
  color: var(--color-bg);
  border-color: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.btn--glass:hover { background: var(--color-bg); color: var(--color-ink); border-color: var(--color-bg); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: calc(var(--gv) * 1);
}

/* --- Typography --- */
h1, h2 { font-size: var(--t-headline); font-weight: var(--fw-light); line-height: 1.15; }
h3 { font-size: var(--t-body); font-weight: var(--fw-light); line-height: var(--lh-body); }
p  { font-size: var(--t-body); line-height: var(--lh-body); max-width: 65ch; }
p.wide { max-width: none; }
.copy { font-size: var(--t-body); line-height: var(--lh-body); }
.sm { font-size: var(--t-sm); color: var(--color-muted); }
.link-underline { text-decoration: underline; text-underline-offset: 0.15em; }
.w-wide { max-width: 80%; }
@media (max-width: 599px) { .w-wide { max-width: none; } }

/* Breiten-begrenzte Headlines: Desktop+Tablet, Mobile 100% */
.headline-50   { max-width: 50%; }
.headline-wide { max-width: 65%; }
.headline-75   { max-width: 75%; }
@media (max-width: 1023px) and (min-width: 600px) { .headline-50 { max-width: 70%; } }
@media (max-width: 599px) {
  .headline-50, .headline-wide, .headline-75 { max-width: 100%; }
}

/* Manuelle Umbrüche nur auf Desktop (Tablet/Mobil: natürlicher Umbruch) */
.br-d { display: inline; }
@media (max-width: 1023px) { .br-d { display: none; } }

/* --- Spacing helpers --- */
.mt-1 { margin-top: calc(var(--gv) * 0.5); }
.mt-2 { margin-top: var(--gv); }
.mt-3 { margin-top: calc(var(--gv) * 1.5); }
.mt-4 { margin-top: calc(var(--gv) * 2); }
.mt-5 { margin-top: calc(var(--gv) * 3); }
.mt-6 { margin-top: calc(var(--gv) * 4); }
.mt-section { margin-top: calc(var(--gv) * 6); }
.mt-section-lg { margin-top: calc(var(--gv) * 8); }

/* ============================================================
   BILDER UND KACHELN
   ============================================================ */

/* Bildrahmen */
.media {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--color-surface);
}
.media img { width: 100%; height: auto; display: block; }
.media--cover img { height: 100%; object-fit: cover; }

/* Raster aus Bildern */
.media-stack { display: flex; flex-direction: column; gap: var(--gv); }
.media-pair  { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gv) var(--gutter); }
.media--fill, .media-pair .media { display: flex; }
.media--fill img, .media-pair .media img { flex: 1; min-width: 0; width: 100%; height: auto; object-fit: cover; }
.media-pair .media { aspect-ratio: var(--pair-ratio, 0.75); }

/* Kacheln (Bild + Glas-Button, ganze Fläche klickbar) */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gv) var(--gutter);
}
.tile {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 1.13 / 1;
  background: var(--color-surface);
  container-type: inline-size;
}
.tile--short { aspect-ratio: 3 / 2; }
.tile--wide  { aspect-ratio: 8 / 3; }
.tile > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile .btn {
  position: absolute;
  left: calc(var(--gutter) * 1.3);
  bottom: calc(var(--gutter) * 1.3);
  z-index: 1;
}
/* ganze Kachel klickbar */
.tile .btn::after { content: ""; position: absolute; inset: calc(-1 * var(--gutter) * 20); }
.tile:hover .btn--glass { background: var(--color-bg); color: var(--color-ink); border-color: var(--color-bg); }

/* Große Kennzahl auf der Kachel (echter Text, Inter Bold) */
.tile-figure {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ui);
  font-weight: var(--fw-bold);
  font-size: 20vw;                 /* Fallback ohne Container-Units */
  font-size: 23.4cqw;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-bg);
  white-space: nowrap;
  pointer-events: none;
}

/* ============================================================
   KARTEN (Cases, Studie)
   ============================================================ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: calc(var(--gv) * 2) calc(var(--gutter) * 2);
}
.card + .card { margin-top: var(--gv); }
/* Textbreite = Anteil der ganzen Kachel (inkl. Innenabstand) */
.card p { max-width: calc((100% + var(--gutter) * 4) * 0.6); }
.card .claim-block { margin-top: calc(var(--gv) * 3); }
.card--white { background: var(--color-bg); }

/* Claim + Schlagworte */
.claim {
  font-size: var(--t-claim);
  font-weight: var(--fw-light);
  line-height: 1.1;
  color: var(--claim);
  overflow-wrap: anywhere;
}
.keywords { margin-top: calc(var(--gv) * 2); color: var(--claim); }
.keywords li { font-size: var(--t-body); line-height: var(--lh-body); }

/* Abschnittstitel über Karten */
.section-title { margin-top: calc(var(--gv) * 8); }
.section-title + .card, .section-title + .media-stack { margin-top: var(--gv); }

/* Logo-Karte (Markenauftritt) */
.card--logo { display: flex; flex-direction: column; }
.card--logo .logo-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--gv) * 4) 0 calc(var(--gv) * 3);
}
.card--logo .logo-stage img { width: auto; height: auto; max-height: clamp(70px, 11vw, 150px); max-width: 60%; }
/* Desktop: Logo mindestens 50 % der Seitenbreite */
@media (min-width: 1024px) {
  .card--logo .logo-stage img { width: 50vw; max-width: 100%; max-height: none; }
}

/* Farbfelder */
.swatches {
  display: grid;
  grid-template-columns: repeat(var(--swatch-cols, 3), 1fr);
  gap: var(--gutter);
  margin-top: calc(var(--gv) * 2);
}
.swatch { aspect-ratio: var(--swatch-ratio, 1.46 / 1); border-radius: var(--radius-block); }
.swatches--2 { --swatch-cols: 2; --swatch-ratio: 2.9 / 1; }
.swatches--4 { --swatch-cols: 4; --swatch-ratio: 1.46 / 1; }

/* Abschluss einer Fläche */
.surface-end { margin-top: calc(var(--gv) * 2); }

/* ============================================================
   STARTSEITE
   ============================================================ */
.outline-list { display: flex; flex-direction: column; gap: calc(var(--gv) * 0.45); margin-top: calc(var(--gv) * 1.5); }
.outline-card {
  display: flex;
  align-items: center;
  gap: calc(var(--gutter) * 1.5);
  border: 1px solid var(--color-ink);
  border-radius: var(--radius-card);
  padding: calc(var(--gv) * 1.5) calc(var(--gutter) * 1.8);
  transition: background-color 0.2s ease;
}
.outline-card:hover { background: rgba(255,255,255,0.7); }
.outline-card:focus-visible { outline: 2px solid var(--color-ink); outline-offset: 3px; }
.outline-card p { max-width: none; }
.shape { display: block; width: clamp(24px, 2.4vw, 34px); height: clamp(24px, 2.4vw, 34px); flex-shrink: 0; }
.shape svg { width: 100%; height: 100%; display: block; }

/* Referenz-Tabelle: Überschrift mit kräftiger Linie, Einträge mit dünnen Linien */
.ref-table {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--gutter);
  margin-top: calc(var(--gv) * 1.5);
  align-items: start;
}
.ref-table--3 { grid-template-columns: repeat(3, 1fr); }
.ref-head {
  font-size: var(--t-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  padding: 0.1em 0.1em 0.5em;
  border-bottom: 3px solid var(--color-ink);
}
.ref-lists { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.ref-list li {
  font-size: var(--t-body);
  line-height: var(--lh-body);
  padding: 0.55em 0.1em 0.7em;
  border-bottom: 1px solid var(--color-ink);
}
.ref-list li:last-child { border-bottom: none; }
.ref-intro { max-width: 65ch; margin-top: calc(var(--gv) * 1.5); }

/* ============================================================
   11-%-STUDIE
   ============================================================ */
.study-card {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  padding: calc(var(--gv) * 2) calc(var(--gutter) * 2);
}
.study-card img { width: 100%; height: auto; }
.study-note { margin-top: calc(var(--gv) * 1.5); }
.study-note p + p { margin-top: calc(var(--gv) * 1); }
.black-box {
  background: var(--color-ink);
  color: var(--color-bg);
  border-radius: var(--radius-card);
  padding: calc(var(--gv) * 2) calc(var(--gutter) * 2);
}
.black-box p { max-width: 62ch; }
.black-box p + p { margin-top: calc(var(--gv) * 1); }

/* ============================================================
   KONTAKT
   ============================================================ */
.contact-lines p { margin-top: var(--gv); max-width: none; }
.contact-lines a { text-decoration: underline; text-underline-offset: 0.15em; }

/* ============================================================
   LEGAL (Impressum + Datenschutz)
   ============================================================ */
.legal-content {
  max-width: 740px;
  display: flex;
  flex-direction: column;
  gap: calc(var(--gutter) * 1.5);
  margin-top: calc(var(--gv) * 2);
}
.legal-content h2 { font-size: var(--t-body); margin-top: var(--gutter); }
.legal-content p, .legal-content li {
  font-size: var(--t-body);
  line-height: var(--lh-body);
  color: var(--color-muted);
  max-width: none;
}
.legal-content ul { padding-left: 1.5em; list-style: disc; }
.legal-content a { text-decoration: underline; }
.legal-content strong { font-weight: var(--fw-regular); color: var(--color-ink); }
.legal-section { scroll-margin-top: calc(var(--gutter) * 2); }
.legal-section + .legal-section { margin-top: calc(var(--gv) * 6); }

/* ============================================================
   FOOTER
   Desktop: Logo | – | – | Startseite | Rechtliches
   ============================================================ */
.site-footer {
  background: var(--color-surface);
  border-radius: 0;
  padding: calc(var(--gutter) * 2);
  margin-top: calc(var(--gv) * 4);
  display: grid;
  grid-template-columns: 2.3fr 1fr 1.2fr 1fr 1fr;
  gap: var(--gutter);
  align-items: start;
}
.footer-group { display: contents; }
.footer-logo { display: flex; align-items: flex-start; line-height: 0; grid-column: 1; }
.footer-logo img { height: 11px; width: auto; }
.footer-group--2 .footer-col { grid-column: 4; }
.footer-group--3 .footer-col { grid-column: 5; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-label {
  font-size: var(--t-sm);
  color: var(--color-ink);
  margin-bottom: 4px;
}
a.footer-label:hover { text-decoration: underline; }
.footer-link {
  font-size: var(--t-sm);
  color: var(--color-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: var(--fw-light);
  text-align: left;
  padding: 0;
  transition: color 0.2s ease;
}
.footer-link:hover { color: var(--color-ink); }
.footer-social { display: inline-flex; width: 24px; height: 24px; color: var(--color-ink); margin-top: 4px; }
.footer-social svg { width: 100%; height: 100%; display: block; }
.footer-copy {
  grid-column: 1 / -1;
  font-size: var(--t-sm);
  color: var(--color-muted-2);
  margin-top: calc(var(--gutter) * 1.5);
}

/* --- Utility --- */
.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;
}
.text-muted { color: var(--color-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet + Mobil */
@media (max-width: 1023px) {
  :root { --t-body: clamp(16px, 2vw, 21px); }

  .site-footer { grid-template-columns: 1fr 1fr 1fr; }
  .footer-group { display: flex; flex-direction: column; gap: var(--gutter); }
  .footer-logo, .footer-group--2 .footer-col, .footer-group--3 .footer-col { grid-column: auto; }

  .card p { max-width: calc((100% + var(--gutter) * 4) * 0.8); }
  .section-title { margin-top: calc(var(--gv) * 6); }
}

/* Tablet */
@media (max-width: 1023px) and (min-width: 600px) {
  .tile--wide { aspect-ratio: 2 / 1; }
}

/* Mobil */
@media (max-width: 599px) {
  :root {
    --t-headline: clamp(20.8px, 5.6vw, 32.8px);   /* −20 % */
    --t-body:     clamp(16px, 4vw, 20px);
    --t-btn:      clamp(9.6px, 2.56vw, 11.2px);   /* −20 % */
    --t-sm:       clamp(11px, 2.9vw, 13px);
    --logo-h: 15px;
    --gv: 27px;
  }
  main > .block:first-child { padding-top: calc(var(--gutter) * 15.5 + var(--logo-h)); }   /* Abstand unter dem Logo +50 % */
  /* Logo und Menü-Icon linksbündig/rechtsbündig zum Content */
  .site-header { left: calc(var(--gutter) * 2); right: calc(var(--gutter) * 2); }
  /* Link-Pillen −20 % */
  .btn, .nav-btn { padding: 8.8px 19.2px; }
  .block { padding: calc(var(--gv) * 1.5) var(--gutter); }
  .block--plain { margin-top: calc(var(--gv) * 5); }
  .btn { width: auto; align-self: flex-start; }
  .btn-row { flex-direction: column; align-items: flex-start; }

  .tile-grid, .media-pair { grid-template-columns: 1fr; }
  .media-pair--keep { grid-template-columns: 1fr 1fr; }
  .tile--wide { aspect-ratio: 4 / 3; }
  .card { padding: calc(var(--gv) * 1.2) calc(var(--gutter) * 1.5); }
  .card p { max-width: none; }
  .study-card, .black-box { padding: calc(var(--gv) * 1.2) calc(var(--gutter) * 1.5); }
  .swatches { gap: calc(var(--gutter) * 0.6); }
  .card--logo .logo-stage img { width: 72vw; max-width: none; max-height: none; }
  .card--logo .logo-stage { padding: calc(var(--gv) * 2) 0; }

  .ref-table, .ref-table--3 { grid-template-columns: 1fr; gap: calc(var(--gv) * 1.2); }
  .ref-lists { gap: var(--gutter); }

  .site-footer { grid-template-columns: 1fr; margin-top: calc(var(--gv) * 4.5); }
  .footer-group--1 { gap: 30px; }
  .nav-grid { grid-template-columns: 1fr; }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
