/* ==========================================================================
   Plex Invest — Interim-Website
   Design-Tokens nach Brand Book v0.1 (Juli 2026)
   ========================================================================== */

:root {
  /* Farben */
  --c-text:          #292929;  /* Primär / Überschriften */
  --c-text-2:        #3C3C3B;  /* Text sekundär */
  --c-body:          #6A6A69;  /* Body-Copy */
  --c-muted:         #6A6A69;  /* Captions – s. Hinweis Kontrast unten */
  --c-accent:        #6A7288;  /* Akzent (Labels, Hover) – s. Hinweis Kontrast unten */
  --c-accent-rule:   #838BA0;  /* Akzent als Fläche/Linie (kein Text) */
  --c-line:          #E2E6EE;  /* Linien & Flächen */
  --c-surface:       #E2E6EE;  /* Buttonfläche */
  --c-surface-hover: #CACFDA;
  --c-bg-alt:        #F8FAFC;
  --c-bg:            #FBFCFD;
  --c-backdrop:      rgba(41, 41, 41, .28);

  /* Typografie */
  --f-head: 'Barlow Semi Condensed', 'Arial Narrow', 'Helvetica Neue', system-ui, sans-serif;
  --f-body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --pad-x: 56px;
  --dur: 120ms;
}

/* --------------------------------------------------------------------------
   Kontrast-Hinweis
   Das Brand Book sieht #838BA0 für Labels und #949493 für Captions vor.
   Beide erreichen auf #FBFCFD nicht die 4,5:1 der WCAG 2.1 AA für Fließtext.
   Für Text werden daher die minimal abgedunkelten Werte --c-accent (#6A7288,
   4,67:1) und --c-body (#6A6A69, 5,74:1) verwendet; als Linie/Fläche bleibt
   #838BA0 exakt erhalten (--c-accent-rule). Der optische Eindruck ist
   praktisch unverändert, die Seite erfüllt damit WCAG 2.1 AA.
   -------------------------------------------------------------------------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 30px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--c-line); color: var(--c-text); }

/* Sichtbarer Fokus – nie entfernen */
:focus-visible {
  outline: 2px solid var(--c-text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--c-text);
  color: #fff;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Animation
   ========================================================================== */

@keyframes plexFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.fade { animation: plexFade .8s ease both; }
.fade-1 { animation-delay: .10s; }
.fade-2 { animation-delay: .18s; }
.fade-3 { animation-delay: .26s; }
.fade-4 { animation-delay: .32s; }
.fade-5 { animation-delay: .36s; }
.fade-6 { animation-delay: .40s; }

/* ==========================================================================
   Grundgerüst
   ========================================================================== */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  position: relative;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px var(--pad-x);
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}

.logo { display: block; }
.logo img { height: 64px; width: auto; }

.nav { position: relative; }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 12px;
  background: var(--c-surface);
  border: 0;
  cursor: pointer;
  transition: background var(--dur) ease;
}
.burger:hover { background: var(--c-surface-hover); }
.burger span {
  display: block;
  height: 1px;
  background: var(--c-text);
}

.menu {
  position: absolute;
  top: 60px;
  right: 0;
  min-width: 220px;
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-top: 2px solid var(--c-text);
  display: flex;
  flex-direction: column;
  z-index: 30;
  animation: plexFade .25s ease both;
}
.menu[hidden] { display: none; }
.menu a {
  padding: 16px 24px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-line);
  transition: background var(--dur) ease, color var(--dur) ease;
}
.menu a:last-child { border-bottom: 0; }
.menu a:hover,
.menu a[aria-current="page"] { background: var(--c-bg-alt); color: var(--c-accent); }

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
}

/* ==========================================================================
   Main — Startseite
   ========================================================================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px var(--pad-x) 64px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: var(--f-head);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin: 0 0 20px;
  padding-left: .34em; /* optischer Ausgleich für Sperrung */
}

.hero h1 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: .01em;
  margin: 0;
  color: var(--c-text);
}

.rule {
  width: 40px;
  height: 2px;
  background: var(--c-accent-rule);
  margin: 24px 0;
}

.lead {
  max-width: 560px;
  margin: 0;
  font-size: 18px;
  line-height: 30px;
  font-weight: 300;
  color: var(--c-body);
  text-wrap: pretty;
}
.lead + .lead { margin-top: 20px; }

/* Kontaktblock */
.contact {
  font-style: normal;
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 240px));
  margin-top: 56px;
  text-align: left;
  border-top: 1px solid var(--c-line);
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 32px;
  border-right: 1px solid var(--c-line);
}
.contact-item:first-child { padding-left: 0; }
.contact-item:last-child  { padding-right: 0; border-right: 0; }

.contact-label {
  font-family: var(--f-head);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.contact-value {
  font-size: 18px;
  line-height: 27px;
  color: var(--c-text);
  font-weight: 300;
}
a.contact-value { transition: color var(--dur) ease; }
a.contact-value:hover { color: var(--c-accent); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px var(--pad-x);
  border-top: 1px solid var(--c-line);
  background: var(--c-bg);
  position: relative;
  z-index: 1;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-body);
}

.footer-links {
  display: flex;
  gap: 32px;
}
.footer-links a {
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-text-2);
  transition: color var(--dur) ease;
  /* Trefferfläche auf 44 px erhöhen, ohne das Layout zu verändern */
  padding: 12px 0;
  margin: -12px 0;
}
.footer-links a:hover { color: var(--c-accent); }

/* ==========================================================================
   Overlay (Datenschutz / Impressum)
   ========================================================================== */

.overlay {
  position: fixed;
  inset: 0;
  background: var(--c-backdrop);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 60;
}
.overlay[hidden] { display: none; }

.overlay-panel {
  background: var(--c-bg);
  width: 100%;
  max-width: 860px;
  max-height: 78vh;
  overflow: auto;
  padding: 56px 64px 64px;
  border-top: 2px solid var(--c-text);
  animation: plexFade .35s ease both;
}

.overlay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.overlay-head h2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  margin: 0;
  color: var(--c-text);
}
.overlay-close {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  color: var(--c-accent);
  padding: 8px;
  margin: -8px -8px 0 0;
  flex: none;
  transition: color var(--dur) ease;
}
.overlay-close:hover { color: var(--c-text); }

body.is-locked { overflow: hidden; }

/* ==========================================================================
   Rechtstexte (Overlay-Body und Standalone-Seite teilen dieses Styling)
   ========================================================================== */

.legal-body {
  font-size: 16px;
  line-height: 26px;
  font-weight: 300;
  color: var(--c-body);
}

.legal-body h2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: .01em;
  color: var(--c-text);
  margin: 36px 0 12px;
}
.legal-body h2:first-child { margin-top: 0; }

.legal-body p { margin: 0 0 16px; max-width: 68ch; }
.legal-body p:last-child { margin-bottom: 0; }

.legal-body strong { font-weight: 600; color: var(--c-text); }

.legal-body a {
  color: var(--c-text);
  border-bottom: 1px solid var(--c-line);
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.legal-body a:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }

.legal-body ul {
  margin: 0 0 16px;
  padding-left: 20px;
  max-width: 68ch;
}
.legal-body li { margin-bottom: 6px; }

/* Definitionsliste für Firmendaten */
.legal-body .data-list {
  margin: 0 0 24px;
  border-top: 1px solid var(--c-line);
}
.legal-body .data-list > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 11px 0;
  border-bottom: 1px solid var(--c-line);
}
.legal-body .data-list dt {
  font-family: var(--f-head);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-accent);
  line-height: 26px;
}
.legal-body .data-list dd {
  margin: 0;
  color: var(--c-text);
  font-weight: 300;
}

.legal-body .note {
  border-left: 6px solid var(--c-text);
  background: var(--c-bg-alt);
  padding: 20px 24px;
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 25px;
}
.legal-body .note p:last-child { margin-bottom: 0; }

.legal-body .meta {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--c-line);
  font-size: 14px;
  color: var(--c-body);
}

/* Standalone-Rechtsseite */
.legal-page {
  padding: 64px var(--pad-x) 96px;
  position: relative;
  z-index: 1;
}
.legal-inner { max-width: 860px; margin: 0 auto; }

.legal-page .eyebrow { text-align: left; }

.legal-page h1 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: 48px;
  line-height: 1;
  letter-spacing: .01em;
  margin: 0 0 32px;
  color: var(--c-text);
}

.back-link {
  display: inline-block;
  margin-top: 48px;
  font-size: 16px;
  font-weight: 600;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-accent-rule);
  padding-bottom: 2px;
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.back-link:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }

/* Fehlerseite */
.error-page { text-align: center; }
.error-page .lead { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
    max-width: 420px;
    width: 100%;
  }
  .contact-item {
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid var(--c-line);
  }
  .contact-item:last-child { border-bottom: 0; }

  .legal-body .data-list > div {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }
  .legal-body .data-list dt { line-height: 1.4; }
}

@media (max-width: 640px) {
  :root { --pad-x: 24px; }

  .site-header { padding: 20px var(--pad-x); }
  .logo img { height: 52px; }

  .hero { padding: 24px var(--pad-x) 48px; }
  .hero h1 { font-size: 36px; }
  .eyebrow { font-size: 12px; letter-spacing: .28em; }
  .lead { font-size: 17px; line-height: 28px; }

  .site-footer { padding: 24px var(--pad-x); gap: 16px; }
  .footer-links { gap: 24px; }

  .overlay-panel {
    max-height: 88vh;
    padding: 32px 24px 40px;
  }
  .overlay-head h2 { font-size: 32px; }

  .legal-page { padding: 40px var(--pad-x) 64px; }
  .legal-page h1 { font-size: 36px; }
}

/* ==========================================================================
   Bewegungsreduktion & Druck
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .overlay, .skip-link, .back-link { display: none !important; }
  body { font-size: 11pt; line-height: 1.5; color: #000; }
  .legal-page { padding: 0; }
}
