/* ============================================================
   PLUmaster Website
   Richtung: Präzisionsinstrument, B2B, kühles Near-Black,
   ein Fluent-Blau-Akzent, IBM Plex Sans (lokal gehostet).
   Palette: Neutrale Basis + 1 Akzent (R-29).
   ============================================================ */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f1216;
  --surface: #161b22;
  --surface-2: #1b222b;
  --border: #2a323d;
  --border-strong: #3a4a5c;
  --text: #e6edf3;
  --muted: #9aa7b4;
  --accent: #4a9eff;
  --accent-strong: #2f7fe0;
  --on-accent: #08131f;
  --danger-text: #e8a3a3;
  --muted-neg: #d99595;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;

  --wrap: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --transition: 160ms ease;
}

[data-theme="light"] {
  --bg: #f1f3f6;
  --surface: #ffffff;
  --surface-2: #e8ecf1;
  --border: #cfd6de;
  --border-strong: #b3bdc8;
  --text: #1a1f26;
  --muted: #4f5c69;
  --accent: #0b6acb;
  --accent-strong: #08539e;
  --on-accent: #ffffff;
  --danger-text: #a3231b;
  --muted-neg: #a3231b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand-mark { border-radius: var(--r-sm); }

.nav { display: flex; gap: clamp(0.75rem, 2vw, 1.75rem); }
.nav-link {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding-block: 0.35rem;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text); }

.nav-controls { display: flex; align-items: center; gap: 0.5rem; }

/* ---------- Typografie ---------- */
.kicker {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.9rem;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.95rem); }
h3 { font-size: clamp(1.1rem, 1.7vw, 1.3rem); }
p { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.4rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: var(--gap);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(2.5rem, 5vw, 5rem);
}
.hero-copy h1 { margin-bottom: 1.25rem; max-width: 22ch; }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.15rem); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.hero-shot {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.hero-shot img { width: 100%; }

/* ---------- Kompatible Waagen ---------- */
.scales { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.scales-head { max-width: 36ch; margin-bottom: 1.25rem; }
.scales-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.scales-list li {
  background: var(--surface);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
}
.scale-name { font-weight: 600; }

/* ---------- Warum am PC ---------- */
.why { padding-block: clamp(2.5rem, 6vw, 4rem); }
.why-head { max-width: 34ch; margin-bottom: 2.25rem; }
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.why-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.why-col-accent { border-color: var(--accent-strong); }
.col-title { margin-bottom: 1.1rem; }
.compare-list { list-style: none; display: grid; gap: 0.9rem; }
.compare-list li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.6rem;
  color: var(--muted);
}
.mark {
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}
.mark-neg { color: var(--muted-neg); }
.mark-pos { color: var(--accent); }
.why-col-accent .compare-list li { color: var(--text); }

/* ---------- Abschnitts-Kopf ---------- */
.section-head { max-width: 36ch; margin-bottom: 2.5rem; }

/* ---------- Funktionen (Text/Bild im Wechsel) ---------- */
.features { padding-block: clamp(2.5rem, 6vw, 4rem); }
.feature-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--gap);
  align-items: center;
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}
.feature-row + .feature-row { border-top: 1px solid var(--border); margin-top: 1.5rem; }
.feature-row-reverse { grid-template-columns: 1.15fr 0.85fr; }
.feature-row-reverse .feature-text { order: 2; }
.feature-row-reverse .feature-shot { order: 1; }
.feature-text h3 { margin-bottom: 0.85rem; }
.feature-text p { max-width: 40ch; }
.feature-shot {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.feature-shot img { width: 100%; }

/* ---------- Einblicke ---------- */
.insights { padding-block: clamp(2.5rem, 6vw, 4rem); }
.insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
.insight-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
}
.insight-card img { width: 100%; }
.insight-card figcaption {
  padding: 0.9rem 1.1rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- Betrieb ---------- */
.ops {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--gap);
  align-items: start;
}
.ops-head h2 { max-width: 16ch; }
.ops-body { display: grid; gap: 1.1rem; max-width: 56ch; }
.ops-body p { font-size: 1.05rem; }

/* ---------- Kontakt ---------- */
.contact {
  padding-block: clamp(3rem, 7vw, 5rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: start;
}
.contact-copy h2 { margin-bottom: 1rem; max-width: 18ch; }
.contact-lead { max-width: 38ch; margin-bottom: 2rem; }
.contact-details { display: grid; gap: 1.25rem; }
.contact-details dt {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.contact-details dd { font-weight: 500; }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  display: grid;
  gap: 1.1rem;
}
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field input, .field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0.7rem 0.85rem;
  transition: border-color var(--transition);
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.form-status { font-size: 0.9rem; color: var(--muted); min-height: 1.2em; }
.form-status.is-error { color: var(--danger-text); }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Fußzeile ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-note { font-size: 0.9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.footer-break { display: none; }
.footer-nav a { font-size: 0.9rem; color: var(--muted); transition: color var(--transition); }
.footer-nav a:hover { color: var(--text); }

/* ---------- Theme-Umschalter ---------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle .theme-icon { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }

/* ---------- Mobiles Menü ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle .bar {
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; }
.mobile-nav[hidden] { display: none; }
.mobile-nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.mobile-nav-panel {
  position: relative;
  width: min(320px, 86vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}
.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mobile-nav-close {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.mobile-nav-close:hover { border-color: var(--border-strong); }
.mobile-nav-links { display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav-links .nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 1.05rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.mobile-nav-links .nav-link:hover { color: var(--accent); }

/* ---------- Screenshot-Trigger ---------- */
.shot-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: inherit;
  overflow: hidden;
}
.shot-trigger img { width: 100%; }
.shot-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.shot-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(9, 14, 20, 0.78);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  opacity: 0.9;
  transition: opacity var(--transition), transform var(--transition);
}
.shot-trigger:hover .shot-zoom,
.shot-trigger:focus-visible .shot-zoom {
  opacity: 1;
  transform: scale(1.06);
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 4vw, 3rem);
  border: 0;
  background: transparent;
  color: #e6edf3;
  overflow: hidden;
}
.lightbox[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
}
.lightbox::backdrop { background: rgba(4, 7, 11, 0.88); }
.lightbox-image {
  max-width: 94vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0f1216;
}
.lightbox-caption {
  color: #cfd8e2;
  font-size: 0.9rem;
  text-align: center;
  max-width: 80ch;
}
.lightbox-close {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--r-md);
  background: rgba(16, 22, 30, 0.9);
  color: #ffffff;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.lightbox-close:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(26, 34, 44, 0.95); }
.lightbox-close:focus-visible { outline: 2px solid #7fb8ff; outline-offset: 2px; }

html.has-dialog { overflow: hidden; }

/* ---------- Spamfalle ---------- */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Rechtstexte ---------- */
.legal {
  max-width: 74ch;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.legal h1 { margin-bottom: 0.75rem; }
.legal h2 { margin-top: 2rem; margin-bottom: 0.6rem; font-size: 1.15rem; }
.legal p, .legal li { color: var(--muted); }
.legal p + p { margin-top: 0.8rem; }
.legal ul { margin: 0.5rem 0 0 1.2rem; display: grid; gap: 0.4rem; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal-note {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  margin-block: 1.25rem;
}
.legal-updated { font-size: 0.85rem; }
.legal-header { border-bottom: 1px solid var(--border); }
.legal-header .header-inner { justify-content: space-between; }

/* ---------- Fokus (R-32) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ---------- Interaktions-Hinweise (R-39) ---------- */
a[href], button, .btn { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.6; }

/* ---------- Reduzierte Bewegung (R-39) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero-shot { order: 2; }
  .why-grid { grid-template-columns: 1fr; }
  .feature-row, .feature-row-reverse { grid-template-columns: 1fr; }
  .feature-row-reverse .feature-text { order: 0; }
  .feature-row-reverse .feature-shot { order: 0; }
  .insights-grid { grid-template-columns: 1fr; }
  .ops { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .scales-list { grid-template-columns: 1fr; }
  .nav { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-nav { justify-content: center; gap: 0.4rem 1rem; }
  .footer-break { display: block; flex-basis: 100%; height: 0; }
}