/* CNC Technik Wappler GmbH — zentrales Stylesheet der Website.
   Basis: freigegebene Vorlage (vorlage/vorlage.css); PDF-Export-Regeln dort belassen.
   Design-Entscheidungen dokumentiert in der Vault: 20-Website/Design-System.md */

:root {
  --bg: #101214;
  --bg-2: #15181a;
  --line: #24292b;
  --line-2: #32393b;
  --ink: #e8ebe9;
  --soft: #c0c7c4;
  --muted: #8f9a96;
  --faint: #566160;
  --brand: #00826e;
  --brand-2: #0a9680;
  --accent: #35bda2;
  --radius: 4px;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); }

::selection { background: var(--brand); color: #fff; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(16, 18, 20, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand { display: flex; align-items: center; text-decoration: none; }

/* Original-Logo, weiße Variante (img/logo-weiss.png, aus img/logo.png erzeugt) */
.brand img { height: 3rem; width: auto; display: block; }

.site-nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }

.site-nav a {
  color: #b9c1be;
  text-decoration: none;
  font-size: 0.93rem;
}

.site-nav a:hover { color: #fff; }

/* ---------- Mobile Navigation (Burger-Menü) ---------- */

/* Progressive Enhancement: js/main.js setzt die Klasse "js" auf <html>.
   Nur dann greifen Burger + Panel - ohne JS wrappen die Links wie bisher. */

.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  background: none;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 860px) {
  .js .nav-toggle { display: inline-flex; }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.4rem 1.5rem 1.5rem;
    background: var(--bg); /* deckend - halbtransparent + Blur griff unterm Sticky-Header nicht zuverlässig */
    border-bottom: 1px solid var(--line);
  }

  .js .site-nav.open { display: flex; }

  .js .site-nav a {
    padding: 0.95rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }

  .js .site-nav .btn {
    margin-top: 1.3rem;
    padding: 0.78rem 1.6rem;
    text-align: center;
    border-bottom: none;
  }

  /* Burger wird zum X, wenn das Menü offen ist */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.78rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  background: none; /* auch für <button>-Elemente (UA-Default wäre hell) */
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

/* .btn als <button> (z. B. im Consent-Banner): Browser-Defaults angleichen */
button.btn { font-family: inherit; cursor: pointer; }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }

.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.site-nav .btn { padding: 0.52rem 1.2rem; }

/* Schmale Screens: sobald Buttons umbrechen würden, nicht ungleich breit
   stehen lassen, sondern alle Content-Buttons auf volle Contentbreite
   (Leons Vorgabe 2026-10-29). Realer Umbruchpunkt der Hero-Buttons: 427 px
   Viewport - 450 deckt auch Desktop-Scrollbars ab. Header-Button unberührt. */
@media (max-width: 450px) {
  .hero-actions { flex-direction: column; }
  main .btn { display: block; width: 100%; text-align: center; }
}

/* ---------- Typo / Sektionen ---------- */

section { padding: 6.5rem 0; scroll-margin-top: 4.8rem; }

section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

h1, h2, h3 { line-height: 1.18; letter-spacing: -0.015em; margin: 0 0 1.1rem; color: #fff; }

h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }

p { color: var(--soft); }

.lead { font-size: 1.12rem; color: var(--soft); max-width: 46rem; }

.section-head { max-width: 46rem; margin-bottom: 1rem; }

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

.hero {
  padding: 7rem 0 5.5rem;
  border-bottom: 1px solid var(--line);
  background-image:
    radial-gradient(640px 420px at 16% 18%, rgba(0, 130, 110, 0.15), transparent 70%),
    linear-gradient(rgba(53, 189, 162, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 189, 162, 0.04) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}

/* Hero-Highlight (Raster + Glow) als wiederverwendbare Klassen für Sektionen */
section.grid-bg {
  background-image:
    radial-gradient(640px 420px at 85% 18%, rgba(0, 130, 110, 0.14), transparent 70%),
    linear-gradient(rgba(53, 189, 162, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 189, 162, 0.04) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}

section.grid-bg--left {
  background-image:
    radial-gradient(640px 420px at 14% 24%, rgba(0, 130, 110, 0.14), transparent 70%),
    linear-gradient(rgba(53, 189, 162, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 189, 162, 0.04) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.hero .lead { margin: 1.4rem 0 0; }

.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2.4rem; }

.hero-drawing { padding: 0.5rem; }

@media (max-width: 860px) { .hero-drawing { max-width: 400px; margin: 0 auto; } }

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4.5rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) { .hero-facts { grid-template-columns: 1fr; gap: 1.2rem; } }

.hero-facts strong { display: block; color: #fff; font-size: 1rem; margin-bottom: 0.2rem; }

.hero-facts p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* ---------- Bilder ---------- */

.figure {
  margin: 0; /* figure-Default (1em 40px) entfernen — sonst wirken die Bilder eingerückt */
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-2);
}

.figure img { width: 100%; height: 100%; object-fit: cover; }

.figure--band { margin-top: 4.5rem; aspect-ratio: 21 / 9; }

.figure--wide { margin-top: 3.5rem; aspect-ratio: 21 / 8; }

.figure--portrait { aspect-ratio: 4 / 5; }

.figure--photo { margin-top: 2.5rem; aspect-ratio: 4 / 3; max-width: 34rem; }

@media (max-width: 640px) {
  .figure--band, .figure--wide { aspect-ratio: 16 / 10; }
}

/* ---------- Leistungs-Abschnitte (je Nummer + Bild) ---------- */

.services { margin-top: 2rem; }

.svc {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4.5rem;
  align-items: center;
  padding: 4.5rem 0;
  border-top: 1px solid var(--line);
}

.svc .num {
  display: block;
  color: var(--faint);
  font-size: 2.4rem;
  font-weight: 200;
  line-height: 1;
  margin-bottom: 1.1rem;
}

.svc .num::after { content: ""; display: block; width: 2.4rem; height: 2px; background: var(--brand); margin-top: 0.8rem; }

.svc h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-bottom: 0.3rem; }

.svc .sub { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.2rem; }

.svc p { margin: 0 0 1rem; }

.svc ul { margin: 1.2rem 0 0; padding: 0; list-style: none; }

.svc li {
  position: relative;
  padding-left: 1.2rem;
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.svc li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 0.45rem; height: 1px; background: var(--accent); }

.svc-media { align-self: stretch; min-width: 0; }

@media (min-width: 861px) {
  .svc:nth-child(even) .svc-media { order: -1; }
}

@media (max-width: 860px) {
  .svc { grid-template-columns: 1fr; gap: 1.8rem; padding: 3rem 0; }
  .svc-media { aspect-ratio: 4 / 3; }
}

/* ---------- Arbeitsweise ---------- */

.principles { margin-top: 3rem; display: grid; gap: 0; border-top: 1px solid var(--line); }

.principle {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3.5rem;
  padding: 2.6rem 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 820px) { .principle { grid-template-columns: 1fr; gap: 0.8rem; } }

.principle h3 { margin: 0; }

.principle p { margin: 0; }

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

.steps { margin: 3rem 0 0; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--line); }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 2rem;
  padding: 2.2rem 0;
  border-bottom: 1px solid var(--line);
}

.steps li::before {
  content: "0" counter(step);
  color: var(--faint);
  font-size: 1.9rem;
  font-weight: 300;
  line-height: 1.1;
}

.steps h3 { margin-bottom: 0.4rem; font-size: 1.08rem; }

.steps p { margin: 0; color: var(--muted); max-width: 40rem; }

@media (max-width: 640px) { .steps li { grid-template-columns: 56px 1fr; gap: 1.2rem; } }

/* ---------- Über uns ---------- */

.about { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 4rem; align-items: start; margin-top: 2.5rem; }

@media (max-width: 860px) { .about { grid-template-columns: 1fr; gap: 2.5rem; } }

.about-text p { margin: 0 0 1.1rem; }

.cv { margin: 2.2rem 0 0; border-top: 1px solid var(--line); }

.cv div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }

.cv dt { color: var(--muted); font-size: 0.88rem; padding-top: 0.1rem; }

.cv dd { margin: 0; color: var(--soft); font-size: 0.95rem; }

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

.faq { margin-top: 2.5rem; border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.25rem 0;
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
}

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

.faq summary::after { content: "+"; color: var(--accent); font-weight: 400; font-size: 1.3rem; line-height: 1; transition: transform 0.15s; }

.faq details[open] summary::after { transform: rotate(45deg); }

.faq details p { margin: 0 0 1.4rem; color: var(--muted); max-width: 52rem; }

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

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; margin-top: 2.5rem; }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 2rem; } }

.contact-grid .btn { margin-top: 1.4rem; }

.contact-list { border-top: 1px solid var(--line); }

.contact-list > div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-list .label { color: var(--muted); font-size: 0.88rem; padding-top: 0.12rem; }

.contact-list p { margin: 0; color: var(--ink); }

.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.site-footer a { color: #b9c1be; text-decoration: none; margin-left: 1.4rem; }
.site-footer a:first-child { margin-left: 0; }
.site-footer a:hover { color: #fff; }

/* ---------- Unterseiten ---------- */

/* Oberkante wie der Hero der Startseite (7rem), damit der Inhalt beim
   Seitenwechsel an derselben Stelle beginnt (Leons Vorgabe 2026-10-29) */
.page { padding: 7rem 0 5.5rem; min-height: 50vh; }

/* Rechtstexte (Impressum / Datenschutz): ruhige, schmale Textspalte */
.legal { max-width: 52rem; }
.legal h2 { font-size: 1.15rem; margin: 2.8rem 0 0.8rem; }
.legal p { margin: 0 0 1rem; }
.legal a { text-decoration: none; }
.legal a:hover { text-decoration: underline; }

/* ---------- Scroll-Reveal (dezentes Einblenden beim Scrollen) ---------- */

/* Nur mit JS (html.js, gesetzt von js/main.js) - ohne JS ist alles sofort
   sichtbar. Nutzer mit reduzierter Bewegung bekommen keine Animation. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }

  .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Cookie-Consent-Banner ---------- */

.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--bg-2);
  border-top: 1px solid var(--line-2);
  padding: 1.1rem 0 1.2rem;
  box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.45);
}

.consent .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
}

.consent p { margin: 0; font-size: 0.92rem; color: var(--muted); max-width: 44rem; }

.consent strong { color: #fff; }

.consent-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.consent .btn { padding: 0.6rem 1.3rem; }

@media (max-width: 640px) {
  .consent-actions { width: 100%; }
  .consent-actions .btn { flex: 1; text-align: center; }
}

/* ---------- Platzhalter (vor Launch: grep 'todo') ---------- */

.todo { border-bottom: 1px dashed rgba(53, 189, 162, 0.5); }
