/* =========================================================
   MilX – milx.css
   Design-Updates passieren NUR hier. Struktur (HTML) bleibt.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Farben – Basis ist Schwarz/Weiß */
  --ink: #121212;
  --muted: #5C5C58;
  --line: #D6D4CE;
  --paper: #ECE8DF;
  --surface: #FFFFFF;
  --surface-2: #F2F1EE;

  /* EVENT-FARBE: nur das X ändert seine Farbe.
     Standard = --ink. Für einen Anlass einfach ersetzen, z. B.:
     --x-color: #1F5BA6;   Blau
     --x-color: #C62828;   Rot (z. B. Feuerwehr)
     --x-color: #E0691A;   Orange                               */
  --x-color: var(--ink);

  /* Schrift */
  --font-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-type: "Courier Prime", "Courier New", monospace;

  /* Maße */
  --page-pad: clamp(20px, 5vw, 64px);
  --section-pad: clamp(56px, 8vw, 96px);
  --maxw: 1280px;
}

/* ---------- 2. Schriften (selbst gehostet, DSGVO) ---------- */
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- 3. Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Wortmarke: Basis + X getrennt einfärbbar */
.wm-base { fill: var(--ink); }
.wm-x { fill: var(--x-color); }
.x { color: var(--x-color); }

/* Dokument-Kennung im Field-Manual-Stil */
.doc { font-family: var(--font-type); font-size: 14px; color: var(--muted); }

/* ---------- 4. Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 84px; padding: 16px var(--page-pad);
  border-bottom: 1px solid var(--line);
}
.brand .wordmark { width: 109px; height: auto; }
.main-nav { display: flex; gap: clamp(16px, 3vw, 36px); flex-wrap: wrap; }
.main-nav a { text-decoration: none; font-weight: 500; font-size: 15px; }
.lang { font-family: var(--font-type); font-size: 13px; color: var(--muted); }
.lang a { color: var(--muted); }
.lang [aria-current] { color: var(--ink); }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(72px, 10vw, 120px) var(--page-pad) clamp(72px, 9vw, 110px);
  border-bottom: 1px solid var(--line);
}
.hero-x {
  position: absolute; right: -6%; top: 50%; transform: translateY(-50%);
  width: min(44vw, 600px); height: auto;
}
.hero-text { position: relative; max-width: 640px; display: flex; flex-direction: column; gap: 28px; }
.kicker { font-family: var(--font-type); font-size: 14px; color: var(--muted); }
.hero h1 { font-size: clamp(48px, 7vw, 84px); letter-spacing: -0.03em; line-height: 1; }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 56ch; }
.button {
  align-self: flex-start; font-weight: 600; font-size: 16px; text-decoration: none;
  padding: 14px 22px; border: 1.5px solid var(--ink); background: var(--surface);
}
.button:hover { background: var(--ink); color: var(--surface); }

/* ---------- 6. Sektionen ---------- */
.products, .services, .explained, .contact {
  padding: var(--section-pad) var(--page-pad);
  border-bottom: 1px solid var(--line);
}
section h2 { font-size: clamp(30px, 3.4vw, 40px); }
section p:not(.doc):not(.kicker) { color: var(--muted); }

.products { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 64px; align-items: center; }
.products-text { display: flex; flex-direction: column; gap: 14px; }
.product-image {
  margin: 0; min-height: 320px; background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; padding: 40px;
}
.product-image img { width: 100%; max-width: 620px; height: auto; }

.services { display: flex; flex-direction: column; gap: 14px; }
.services h2 { margin-bottom: 26px; max-width: 22ch; }
.service-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.service { border-top: 1.5px solid var(--ink); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.service h3 { font-size: 20px; letter-spacing: -0.01em; }
.service p { font-size: 15px; }

.explained { background: var(--paper); display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 64px; align-items: center; }
.explained-text { display: flex; flex-direction: column; gap: 14px; }
.explained h2 { font-family: var(--font-type); font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.sketch { width: 100%; height: auto; }
.sk-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.sk-dash { stroke-dasharray: 7 6; }
.sk-t { font-family: var(--font-type); font-size: 18px; fill: var(--ink); }
.sk-s { font-family: var(--font-type); font-size: 13px; fill: var(--muted); }

.contact { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; border-bottom: 0; }
.contact > div { display: flex; flex-direction: column; gap: 14px; }
.contact h2 a { text-decoration: none; }
.wordmark-lg { width: 156px; height: auto; }

/* ---------- 7. Footer ---------- */
.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 24px var(--page-pad); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.site-footer .legal { display: flex; gap: 24px; }
.site-footer a { color: var(--muted); }

/* ---------- 8. Rechtliche Seiten ---------- */
.legal-page { max-width: 760px; padding: var(--section-pad) var(--page-pad); }
.legal-page h1 { font-size: 40px; margin-bottom: 32px; }
.legal-page h2 { font-size: 20px; margin: 28px 0 8px; }
.facts { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 10px 24px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

/* ---------- 9. Responsive ---------- */
@media (max-width: 960px) {
  .products, .explained { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-x { opacity: 0.12; width: 90vw; right: -20%; }
}
@media (max-width: 600px) {
  .site-header { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; }
  .service-list { grid-template-columns: minmax(0, 1fr); }
  .product-image { min-height: 0; padding: 24px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts dd { margin-bottom: 8px; }
}

/* ---------- 10. Druck ---------- */
@media print {
  .hero-x, .skip, .lang { display: none; }
  .explained { background: none; }
}
