/* F. Gewalt – Softwareengineering
   Layout: eine Inhaltsspalte (max. 1180px), fester Kopf, Startseite mit Hero (Text | Kontaktplan),
   Unterseiten mit Kopfband und Prosa. Keine externen Ressourcen, keine Webfonts. */

:root {
  --bg: #F3F4F8;
  --surface: #FFFFFF;
  --surface-2: #E9EAF3;
  --ink: #151432;
  --muted: #55557A;
  --line: #D6D7E6;
  --brand: #4A33AE;
  --brand-ink: #FFFFFF;
  --brand-soft: #E8E4F8;
  --signal: #E39A00;
  --foot-bg: #151432;
  --foot-ink: #ECECF7;
  --foot-muted: #A9A9C8;
  --foot-line: #34345A;

  --font-display: Bahnschrift, "DIN Alternate", "DIN 1451 Std", "Roboto Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", ui-monospace, Consolas, "SF Mono", Menlo, monospace;
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0F1E;
    --surface: #181832;
    --surface-2: #1F1F3D;
    --ink: #ECECF7;
    --muted: #A9A9C8;
    --line: #2E2E52;
    --brand: #A292FF;
    --brand-ink: #0F0F1E;
    --brand-soft: #27234F;
    --signal: #FFC233;
    --foot-bg: #0A0A16;
    --foot-ink: #ECECF7;
    --foot-muted: #A9A9C8;
    --foot-line: #26264A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F0F1E;
  --surface: #181832;
  --surface-2: #1F1F3D;
  --ink: #ECECF7;
  --muted: #A9A9C8;
  --line: #2E2E52;
  --brand: #A292FF;
  --brand-ink: #0F0F1E;
  --brand-soft: #27234F;
  --signal: #FFC233;
  --foot-bg: #0A0A16;
  --foot-ink: #ECECF7;
  --foot-muted: #A9A9C8;
  --foot-line: #26264A;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--surface);
  z-index: 30;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0; text-wrap: balance; letter-spacing: 0.002em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: var(--brand-ink); padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Kopf ---------- */
.site-head {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 28px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand svg { flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.05; }
.brand-sub { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.02em; }
.nav { display: flex; flex-wrap: wrap; gap: 2px 22px; list-style: none; }
.nav a { display: block; padding: 8px 0 6px; color: var(--ink); text-decoration: none; font-size: 0.97rem; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--brand); font-weight: 600; }
@media (max-width: 720px) {
  .site-head { position: static; }
  body::before { display: none; }
}

/* ---------- Bausteine ---------- */
.section { padding-block: 72px; }
.section + .section { padding-top: 0; }
.section-title { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; max-width: 22ch; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 32px; }
.more { font-weight: 600; }
.lead { font-size: 1.2rem; line-height: 1.55; max-width: 62ch; }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1em; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 4px; font-weight: 600; text-decoration: none; border: 2px solid var(--brand); line-height: 1.2; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ghost { color: var(--brand); background: transparent; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.ticks { list-style: none; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 9px; background: var(--brand); }

/* ---------- Hero ---------- */
.hero { padding-block: 64px 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.hero .lead { margin-top: 24px; }
.hero .btn-row { margin-top: 32px; }
.plc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px; }
.plc svg { width: 100%; height: auto; display: block; }
.plc figcaption { margin-top: 12px; font-size: 0.875rem; color: var(--muted); }
.plc .rail { stroke: var(--ink); stroke-width: 4; fill: none; stroke-linecap: square; }
.plc .wire { stroke: var(--line); stroke-width: 3; fill: none; }
.plc .sym { stroke: var(--ink); stroke-width: 3; fill: none; stroke-linecap: butt; }
.plc .live { stroke: var(--signal); stroke-width: 3.5; fill: none; stroke-dasharray: 11 7; animation: flow 1.3s linear infinite; }
.plc .addr { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; fill: var(--brand); }
.plc .cmt { font-family: var(--font-body); font-size: 13.5px; fill: var(--muted); }
@keyframes flow { to { stroke-dashoffset: -18; } }
@media (prefers-reduced-motion: reduce) { .plc .live { animation: none; stroke-dasharray: none; } html { scroll-behavior: auto; } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } .hero { padding-block: 40px 40px; } }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.facts dd { margin: 4px 0 0; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 720px) { .facts { grid-template-columns: minmax(0, 1fr); margin-top: 40px; } }

/* ---------- Leistungen (Startseite) ---------- */
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.area { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.area h3 { font-size: 1.6rem; }
.area .ticks { margin-top: 4px; }
@media (max-width: 800px) { .areas { grid-template-columns: minmax(0, 1fr); } .area { padding: 24px; } }

.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; list-style: none; }
.principles li { padding: 22px 0; border-top: 1px solid var(--line); font-size: 1.1rem; }
@media (max-width: 800px) { .principles { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Produkte ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--brand); }
.tile-img { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.tile-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.tile-img img.small { position: static; inset: auto; width: auto; height: auto; max-width: 70%; object-fit: initial; border: 1px solid var(--line); }
.tile-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 6px; }
.tile h3 { font-size: 1.4rem; }
.tile p { color: var(--muted); }
.tile .go { margin-top: 10px; color: var(--brand); font-weight: 600; }
@media (max-width: 900px) { .tiles { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Kunden ---------- */
.clients { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 14px; }
.clients li { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; padding: 8px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }

/* ---------- Kontaktband ---------- */
.cta { background: var(--brand); color: var(--brand-ink); }
.cta .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 32px 56px; align-items: center; padding-block: 56px; }
.cta h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.cta a { color: inherit; }
.cta address { font-style: normal; line-height: 1.7; }
.cta .btn { background: var(--brand-ink); color: var(--brand); border-color: var(--brand-ink); margin-top: 18px; }
.cta .btn:hover { background: transparent; color: var(--brand-ink); }
@media (max-width: 800px) { .cta .wrap { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Unterseiten ---------- */
.page-head { padding-block: 40px 40px; border-bottom: 1px solid var(--line); background: var(--surface); }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.crumbs li + li::before { content: "/"; margin-right: 10px; color: var(--line); }
.crumbs a { color: var(--muted); }
.page-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 700; }
.page-head .lead { margin-top: 16px; }
.page { padding-block: 56px 80px; }
.page > .wrap > * + * { margin-top: 56px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.split h2 { font-size: 1.8rem; margin-bottom: 18px; }
.split .ticks { margin-top: 18px; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

.photo { margin: 0; }
.photo img { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; width: 100%; }
.photo figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); }

.price { background: var(--brand-soft); border-radius: var(--radius); padding: 32px; display: grid; grid-template-columns: minmax(0, 0.45fr) minmax(0, 1fr); gap: 16px 40px; align-items: center; }
.price h2 { font-size: 1.8rem; }
.price strong { font-family: var(--font-display); font-size: 1.5rem; }
@media (max-width: 800px) { .price { grid-template-columns: minmax(0, 1fr); padding: 24px; } }

.refs { list-style: none; border-bottom: 1px solid var(--line); }
.refs li { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 4px 28px; padding: 18px 0; border-top: 1px solid var(--line); align-items: baseline; }
.refs .what { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.refs .what small { font-family: var(--font-body); font-weight: 400; font-size: 0.9rem; color: var(--muted); margin-left: 6px; }
.refs .who { color: var(--muted); }
.refs .who a { color: var(--ink); }
.refs .prod { font-weight: 600; font-size: 0.95rem; justify-self: end; }
@media (max-width: 720px) { .refs li { grid-template-columns: minmax(0, 1fr); } }

/* Produktseiten */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: start; }
.intro figure { margin: 0; }
.intro img { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
@media (max-width: 720px) { .intro { grid-template-columns: minmax(0, 1fr); } .intro figure { max-width: 220px; } }
.toc { display: flex; flex-wrap: wrap; gap: 8px 10px; list-style: none; }
.toc a { display: block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); text-decoration: none; color: var(--ink); font-size: 0.95rem; }
.toc a:hover { border-color: var(--brand); color: var(--brand); }
.step { scroll-margin-top: 96px; display: grid; gap: 18px; }
.step h2 { font-size: 1.9rem; }
.step .shots { display: grid; gap: 28px; }
.shot { margin: 0; display: grid; gap: 12px; justify-items: start; }
.shot img { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 0 var(--line); }
.shot p { max-width: 68ch; }
.methods { list-style: none; display: grid; gap: 28px; counter-reset: m; }
.pager { display: flex; flex-wrap: wrap; gap: 12px 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.facts-inline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; max-width: 560px; }
.facts-inline dt { color: var(--muted); font-size: 0.9rem; }
.facts-inline dd { margin: 0; font-weight: 600; }

/* Downloads */
.revisions { display: grid; gap: 40px; }
.rev { padding-top: 28px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.rev h2 { font-size: 1.3rem; }
.rev .date { color: var(--muted); font-size: 0.95rem; }
.note { background: var(--brand-soft); padding: 14px 18px; border-radius: var(--radius); max-width: 68ch; }

/* Kontakt + Formulare */
.contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.contact address { font-style: normal; display: grid; gap: 16px; }
.contact dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.contact dt { color: var(--muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form .full { grid-column: 1 / -1; }
.form label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.form input, .form textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--muted); border-radius: 4px; padding: 11px 12px; }
.form textarea { min-height: 150px; resize: vertical; }
.form .hint { font-size: 0.9rem; color: var(--muted); }
.form .req { color: var(--brand); }
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); padding: 20px; } }

.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal ul { max-width: 72ch; }
.legal p + p, .legal p + ul, .legal ul + p, .legal h2 + p { margin-top: 0.9em; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-top: 0.3em; }
.legal a { overflow-wrap: anywhere; }

/* ---------- Fuß ---------- */
.site-foot { background: var(--foot-bg); color: var(--foot-ink); margin-top: 0; }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; padding-block: 48px 40px; }
.site-foot h2 { font-size: 1.05rem; margin-bottom: 12px; }
.site-foot address { font-style: normal; color: var(--foot-muted); line-height: 1.7; }
.site-foot a { color: var(--foot-ink); }
.site-foot ul { list-style: none; display: grid; gap: 6px; }
.site-foot .copy { grid-column: 1 / -1; border-top: 1px solid var(--foot-line); padding-top: 20px; color: var(--foot-muted); font-size: 0.9rem; }
@media (max-width: 800px) { .site-foot .wrap { grid-template-columns: minmax(0, 1fr); } }
