/* ==========================================================================
   Simutec — global stylesheet (light, clean technical theme)
   css/style.css – Stylesheet der öffentlichen Website (auch Grundlage des Admins, siehe admin/admin.css)
   Aufbau: Variablen (:root) → Grundelemente → Kopf/Fuss → Knöpfe → Hero → Kacheln/Karten → Galerie →
   Viewer → Über uns → Sprachumschalter. Farben und Abstände nur über CSS-Variablen (--accent usw.), damit
   ein Farbwechsel an einer Stelle genügt. Kein Präprozessor, kein Build-Schritt.
   ========================================================================== */
:root {
  --bg: #f6f7f9;
  --bg-2: #eef1f4;
  --panel: #ffffff;
  --panel-2: #f3f5f8;
  --border: #e1e6ec;
  --border-strong: #c9d1db;
  --text: #1f2a37;            /* graphite (logo) */
  --text-2: #3b4757;
  --muted: #64748b;
  --accent: #ff6a1a;          /* Simutec orange (logo) */
  --accent-ink: #d9530b;      /* orange for text/links (better contrast) */
  --accent-2: #0f8b8d;        /* teal secondary */
  --accent-soft: rgba(255, 106, 26, 0.10);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(31, 42, 55, 0.10);
  --shadow-sm: 0 1px 2px rgba(31, 42, 55, 0.06), 0 2px 8px rgba(31, 42, 55, 0.04);
  --maxw: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* category colours */
  --cat-industry: #ea580c;
  --cat-safety: #d97706;
  --cat-equipment: #7c3aed;
  --cat-science: #0f8b8d;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
/* clamp(min, bevorzugt, max): Schriftgrösse wächst mit der Fensterbreite (vw), bleibt aber in Grenzen. */
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .9em; background: var(--panel-2); padding: .1em .35em; border-radius: 4px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head p { color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow { font-family: var(--mono); font-size: .8rem; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .12em; margin-bottom: .75em; display: block; }

/* ---------- Kopfzeile (Header) ---------- */
.site-header {
  /* sticky: Kopfzeile bleibt beim Scrollen oben; backdrop-filter macht den Hintergrund dahinter unscharf
       (die -webkit-Variante für Safari). */
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; font-size: 1.15rem; letter-spacing: .02em; }
.logo:hover { text-decoration: none; }
.logo img { height: 50px; width: auto; display: block; margin: -4px 0; }
@media (max-width: 760px) { .logo img { height: 42px; } }
/* Optischer Bündigsatz des Logos: Das dunkle «s» von «simutec» soll exakt auf der linken Content-Kante stehen
   (gleiche x-Position wie Eyebrow und Headline darunter); das blasse Sechseck davor ragt in den Seitenrand.
   Gemessen am gerenderten assets/logo.svg: Der linke Rand des «s» liegt bei 34 % der Logo-HÖHE ab der linken
   Bildkante (bei 50px Höhe = 17px, bei 42px mobil = 14.3px). Die Verschiebung wird darum aus der Höhe berechnet
   (--logo-h) und passt sich automatisch an. Mobil ist der Container-Innenabstand 20px > 14.3px – das Sechseck
   wird also nie abgeschnitten. */
.logo { --logo-h: 50px; margin-left: calc(var(--logo-h) * -0.34); }
.logo img { height: var(--logo-h); }
@media (max-width: 760px) { .logo { --logo-h: 42px; } }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a.active { color: var(--accent-ink); background: var(--accent-soft); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 6px 10px; font-size: 1.1rem; cursor: pointer; }

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--panel); border-bottom: 1px solid var(--border); padding: 8px 20px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
}

/* ---------- Fusszeile (Footer) ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--panel); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-ink); }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--panel-2); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(255,106,26,.28); }
.btn-primary:hover { background: #f25c0c; border-color: #f25c0c; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-icon { padding: 6px 10px; font-size: .9rem; min-width: 36px; justify-content: center; }

/* ---------- Hero (Startseite, 3D-Hintergrund aus js/heroes/) ---------- */
.hero { background: linear-gradient(180deg, #ffffff, #f3f5f8); position: relative; overflow: hidden; border-bottom: 1px solid var(--border); min-height: 520px; display: flex; align-items: center; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
/* !important überstimmt die width/height-Inline-Styles, die three.js beim setSize setzen kann. */
.hero-bg canvas { display: block; width: 100% !important; height: 100% !important; }
/* Halbtransparenter Verlauf ÜBER der 3D-Szene, damit der Text links lesbar bleibt; pointer-events: none
   lässt Mausereignisse durch. Stapelung: Szene z0 < Verlauf z1 < Text z2. */
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.75) 45%, rgba(255,255,255,.05) 100%); }
.hero .container { width: 100%; position: relative; z-index: 2; padding-top: 80px; padding-bottom: 80px; }
.hero-content { max-width: 620px; }
.hero h1 .hl { color: var(--accent); }
.hero p.lead { font-size: 1.15rem; color: var(--text-2); max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Kategorie-Kacheln (Startseite) ---------- */
/* repeat(auto-fill, minmax(200px, 1fr)): so viele Spalten wie passen, jede mindestens 200px – responsiv ohne Media Query. */
/* Kompakte Kacheln: auto-fit (leere Spalten fallen weg, die Kacheln füllen die Breite) + minmax(170px, 1fr) – bei Desktop-Breite (Inhalt ~1100px) passen alle 5 Kategorien in eine Zeile,
   auf schmaleren Bildschirmen brechen sie automatisch um. */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.cat-tile {
  --c: var(--accent);
  display: block; padding: 12px 14px 14px 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
  position: relative; overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; box-shadow: var(--shadow-sm);
}
.cat-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.cat-tile:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: var(--shadow); text-decoration: none; }
/* Symbol links neben dem Titel. Die Anzahl steht oben rechts in einer eigenen schmalen Zeile (margin-top),
   damit lange Titel wie «Strassenverkehr» bei 5 Kacheln pro Zeile nicht unter die Anzahl laufen. */
.cat-tile .cat-head { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; }
.cat-tile .cat-head h3 { min-width: 0; hyphens: auto; }
.cat-tile .icon { font-size: 1.15rem; line-height: 1; flex: none; }
.cat-tile h3 { font-size: 1rem; line-height: 1.25; margin: 0; }
.cat-tile p { color: var(--muted); font-size: .82rem; line-height: 1.45; margin: 0; }
.cat-tile .count { position: absolute; top: 10px; right: 12px; font-family: var(--mono); font-size: .75rem; color: var(--c); }

/* ---------- Demo-Karten (Galerie + Startseite, HTML aus demo_card()) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.demo-card {
  display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform .2s, border-color .2s, box-shadow .2s; box-shadow: var(--shadow-sm);
}
.demo-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); text-decoration: none; }
/* aspect-ratio hält das Bildformat fest, bevor das Bild geladen ist (kein Springen des Layouts);
   object-fit: cover füllt die Fläche und schneidet überstehende Ränder ab. */
.demo-thumb { aspect-ratio: 16 / 9; background: var(--bg-2); position: relative; overflow: hidden; }
.demo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder {
  --c: var(--accent);
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--c) 30%, transparent), transparent 60%),
    linear-gradient(rgba(31,42,55,.05) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(31,42,55,.05) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg-2);
}
.thumb-placeholder span { font-size: 2.6rem; filter: drop-shadow(0 4px 10px rgba(31,42,55,.18)); }
.demo-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.demo-card h3 { margin: 0; }
.demo-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.demo-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }
.badge-2d3d { font-family: var(--mono); font-size: .72rem; color: var(--muted); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; }

.tag {
  --c: var(--accent);
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: color-mix(in srgb, var(--c) 85%, #000); background: color-mix(in srgb, var(--c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  padding: 2px 8px; border-radius: 999px; width: fit-content;
}

/* ---------- Galerie: Filter + Suche ---------- */
.page-head { padding: 48px 0 8px; }
.page-head p { color: var(--muted); max-width: 640px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 24px 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: inherit; font-size: .88rem; font-weight: 500; cursor: pointer; }
.filter-btn:hover { color: var(--text); border-color: var(--border-strong); }
.filter-btn.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.search { position: relative; min-width: 240px; flex: 0 1 320px; }
.search input {
  width: 100%; padding: 9px 14px 9px 36px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font: inherit; font-size: .95rem;
}
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search::before { content: "⌕"; position: absolute; left: 12px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 1.1rem; }
.empty { padding: 48px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }

/* ---------- Viewer (demo.php): Fenster mit Titelleiste, iframe, Kommentar ---------- */
.viewer-page { padding: 28px 0 56px; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-ink); }
/* minmax(0, 1fr) statt 1fr: erlaubt der Spalte, schmaler als ihr Inhalt zu werden (sonst drückt das iframe
   die Seitenleiste aus dem Bild). Unter 960px: eine Spalte, Kommentar unter der Demo. */
.viewer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
@media (max-width: 960px) { .viewer-layout { grid-template-columns: 1fr; } }

.sim-window { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.sim-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.sim-titlebar .dots { display: flex; gap: 6px; }
.sim-titlebar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #c9d1db; display: block; }
.sim-titlebar .dots i:nth-child(1) { background: #f87171; }
.sim-titlebar .dots i:nth-child(2) { background: #fbbf24; }
.sim-titlebar .dots i:nth-child(3) { background: #34d399; }
.sim-titlebar .title { font-family: var(--mono); font-size: .82rem; color: var(--muted); flex: 1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-controls { display: flex; gap: 6px; }
.sim-stage { position: relative; aspect-ratio: 16 / 10; background: #eef1f4; }
.sim-stage > canvas { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; }
.sim-stage .loading, .sim-stage .error { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-family: var(--mono); font-size: .9rem; padding: 20px; text-align: center; }
.sim-stage .error { color: #b91c1c; }
.sim-hint { padding: 8px 12px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--border); font-family: var(--mono); }
/* Vollbild (Fullscreen API auf .sim-window): Bühne füllt den Rest der Höhe statt 16:10. */
.sim-window:fullscreen { border-radius: 0; display: flex; flex-direction: column; width: 100vw; height: 100vh; }
.sim-window:fullscreen .sim-stage { flex: 1; aspect-ratio: auto; }

.commentary { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px 22px 18px; }
.commentary h1 { font-size: 1.6rem; margin-bottom: .4em; }
.commentary .tag { margin-bottom: 12px; }
.commentary .intro { color: var(--text-2); font-size: 1.02rem; }
.commentary h2 { font-size: 1.05rem; margin-top: 1.4em; color: var(--text); }
.commentary h3 { font-size: .95rem; margin-top: 1.2em; }
.commentary p, .commentary li { color: var(--text-2); font-size: .95rem; }
.commentary ul, .commentary ol { padding-left: 1.2em; margin: 0 0 1em; }
.commentary .key-points { background: var(--bg-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 12px 16px; margin: 1em 0; }
.commentary .key-points h3 { margin-top: 0; font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); }
.commentary .key-points ul { margin: 0; }
.commentary .note { font-size: .88rem; color: var(--muted); border-top: 1px dashed var(--border); padding-top: 10px; margin-top: 1em; }

.demo-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.demo-nav a { display: block; padding: 14px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.demo-nav a:hover { border-color: var(--accent); text-decoration: none; }
.demo-nav small { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.demo-nav .next { text-align: right; }

/* ---------- Über uns ---------- */
.prose { max-width: 720px; }
.prose p { color: var(--text-2); }
.contact-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-top: 24px; }
.contact-card dl { display: grid; grid-template-columns: 120px 1fr; gap: 8px 16px; margin: 0; }
.contact-card dt { color: var(--muted); }
.contact-card dd { margin: 0; }

/* --- Ergänzungen der PHP-Version --- */
/* .demo-card hat display: flex o. ä. – das überstimmt das hidden-Attribut; darum hier explizit ausblenden. */
.demo-card[hidden] { display: none; }
.sim-stage > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.commentary .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.commentary .tags span { font-size: .78rem; background: var(--panel-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; color: var(--muted); }

/* ---------- Sprachumschalter ---------- */
.site-header .nav { margin-left: auto; }
.lang-switch { display: flex; align-items: center; gap: 2px; margin-left: 14px; font-size: .85rem; color: var(--border-strong, #c9ced6); }
.lang-switch a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); padding: 4px 6px; border-radius: 6px; font-weight: 600; letter-spacing: .03em; }
.lang-switch a:hover { color: var(--text); text-decoration: none; background: var(--panel); }
.lang-switch .flag { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.14); object-fit: cover; flex: none; opacity: .85; }
.lang-switch a:hover .flag, .lang-switch a.active .flag { opacity: 1; }
@media (max-width: 420px) { .lang-switch a { padding: 4px 4px; gap: 3px; } .lang-switch { margin-right: 4px; } }
.lang-switch a.active { color: var(--accent-ink); background: var(--accent-soft); }
@media (max-width: 720px) {
  .lang-switch { margin-left: auto; margin-right: 8px; }
  .nav-toggle { order: 3; }
}

/* Kontaktadresse (<address>): Browser setzen sie kursiv – hier normal, wie der übrige Text */
address.postal, .footer-address { font-style: normal; }
address.postal { line-height: 1.5; }
.site-footer .footer-address { flex-basis: 100%; }

/* ===================================================================================================
   Leistungen (services): grosse Kacheln auf Startseite und leistungen.php, Detailseite leistung.php
   =================================================================================================== */
/* Drei grosse Kacheln nebeneinander; auf schmalen Bildschirmen automatisch untereinander (auto-fit). */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.svc-tile {
  --c: var(--accent);
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--border); color: var(--text); box-shadow: var(--shadow-sm);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.svc-tile:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: var(--shadow); text-decoration: none; }
/* Kopf der Kachel: Titelbild oder – ohne Bild – farbiger Verlauf mit grossem Symbol */
.svc-media { aspect-ratio: 16 / 7; background: var(--panel-2); }
.svc-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Dezenter Kachelkopf passend zu den Kategorie-Karten (.cat-tile): sehr helles Neutralgrau statt Farbfläche,
   Farbe der Leistung (--c aus dem Admin) nur im Streifen links und im Ring um das grosse Symbol. */
.svc-tile { position: relative; }
.svc-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); z-index: 1; }
.svc-media-icon { display: grid; place-items: center; font-size: 3.2rem; background: #f8fafc; border-bottom: 1px solid var(--border); }
/* Grosses Symbol (Emoji, behält seine eigenen Farben) auf weissem Kreis mit Ring in der Farbe der Leistung */
.svc-media-icon span { display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; color: var(--c);
  background: #fff; border: 2px solid color-mix(in srgb, var(--c) 45%, #fff); box-shadow: var(--shadow-sm); }
.svc-tile:hover .svc-media-icon span { border-color: var(--c); }
.svc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.svc-body h3 { font-size: 1.25rem; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.svc-body p { color: var(--text-2); margin: 0 0 14px; flex: 1; }
.svc-more { color: var(--c); font-weight: 600; }
/* Detailseite */
.svc-head h1 { display: flex; align-items: center; gap: 12px; }
.svc-head { border-bottom: 3px solid var(--c, var(--accent)); padding-bottom: 20px; margin-bottom: 28px; }
.svc-hero-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.svc-sub { margin-top: 40px; }
.svc-page .prose { max-width: 820px; }
/* Einbettung (Video/iframe) responsiv im Seitenverhältnis 16:9 */
.svc-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.svc-embed iframe, .svc-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.svc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.svc-gallery figure { margin: 0; }
.svc-gallery img, .svc-gallery video { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.svc-gallery figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }
.svc-downloads { list-style: none; padding: 0; display: grid; gap: 8px; }
.svc-downloads li { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
/* Kontakt-Aufforderung */
.svc-cta { margin-top: 48px; padding: 24px 28px; border-radius: var(--radius); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.svc-cta h2 { margin: 0 0 4px; font-size: 1.3rem; }
.svc-cta p { margin: 0; color: var(--text-2); }
.svc-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- VR & 3D-Scans: Hinweis, Ablauf und schematische Illustrationen ---------- */
.vr-notice { margin: 28px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--panel-2);
  border: 1px dashed var(--border-strong); color: var(--text-2); font-size: .95rem; }
.vr-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: none; }
.vr-flow li { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; }
.vr-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 40%; color: var(--accent); font-weight: 700; font-size: 1.2rem; }
.vr-flow svg { width: 52px; height: 52px; }
.vr-flow span { color: var(--text-2); font-size: .93rem; }
.vr-block { display: grid; grid-template-columns: 1fr 1.15fr; gap: 32px; align-items: center; margin-top: 48px;
  padding-top: 32px; border-top: 1px solid var(--border); }
.vr-rev .vr-text { order: 2; }
.vr-text h2 { margin-top: 0; }
.vr-text ul { padding-left: 1.2em; color: var(--text-2); }
.vr-svg { width: 100%; height: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
/* Linienstil der Illustrationen: Grafit für Umrisse, Orange (Akzent) für Sensoren/Laser, Blau für Daten/Verbindungen */
.vr-svg .ln, .vr-flow .ln { fill: none; stroke: var(--text-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.vr-svg .fill { fill: var(--panel-2); }
.vr-svg .thick { stroke-width: 4; }
.vr-svg .dash { stroke-dasharray: 6 5; }
.vr-svg .ac, .vr-flow .ac { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; }
.vr-svg .ac-f, .vr-flow .ac-f { fill: var(--accent); }
.vr-svg .bl { fill: none; stroke: #2563eb; stroke-width: 2.2; }
.vr-svg .bl-f { fill: #2563eb; }
.vr-svg .lead-ln path { stroke: var(--muted); stroke-width: 1; fill: none; }
.vr-svg .lbl, .vr-svg .lbl text { font: 600 13px var(--font); fill: var(--text); }
.vr-svg .bl-t { fill: #2563eb; }
.vr-svg .cap circle { fill: #2563eb; }
.vr-svg .cap-t text { fill: #fff; font: 700 12px var(--font); text-anchor: middle; }
/* Laser-Schwenk: die Strahlen pendeln leicht um den Sensor, die Messpunkte pulsieren */
.vr-svg .laser path { stroke: var(--accent); stroke-width: 1.4; opacity: .75; }
.vr-svg .laser { transform-origin: 267px 162px; animation: vr-sweep 4s ease-in-out infinite alternate; }
.vr-svg .pts { animation: vr-pulse 2s ease-in-out infinite; }
@keyframes vr-sweep { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes vr-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .vr-svg .laser, .vr-svg .pts { animation: none; } }
.vr-facts { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 12px 0 6px; }
.vr-facts th, .vr-facts td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.vr-facts th { color: var(--muted); font-weight: 600; }
@media (max-width: 860px) {
  .vr-block { grid-template-columns: 1fr; }
  .vr-rev .vr-text { order: 0; }
  .vr-flow { grid-template-columns: 1fr; }
  .vr-flow li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -18px; }
}

/* Platzhalter für noch fehlende Videos (Leistungsseiten): Poster bzw. neutrale Fläche + Hinweis «Video folgt» */
.svc-video-pending { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--panel-2); }
.svc-video-pending img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.svc-video-generic { aspect-ratio: 16 / 9; display: grid; place-items: center; font-size: 3rem; color: var(--muted); background: linear-gradient(135deg, var(--panel-2), var(--bg-2)); }
.svc-video-badge { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.72); color: #fff; font-size: .8rem; padding: 3px 10px; border-radius: 999px; }
.svc-gallery .svc-video-pending img, .svc-gallery .svc-video-generic { aspect-ratio: 4 / 3; }
.svc-embed .svc-video-pending { position: absolute; inset: 0; }
.svc-embed .svc-video-pending img, .svc-embed .svc-video-generic { height: 100%; aspect-ratio: auto; }

/* Nur für Screenreader sichtbar (Überschrift bleibt in der Dokumentgliederung, wird aber nicht angezeigt) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Startseite: Abschnittskopf ohne grossen Titel – Eyebrow direkt über der Beschreibung, Knopf rechts bündig */
.section-head--compact { align-items: center; margin-bottom: 18px; }
.section-head--compact .eyebrow { margin-bottom: .35em; }
.section-head--compact p { max-width: 62ch; }

/* Unterseiten ohne sichtbaren h1-Titel: Eyebrow direkt über der Einleitung, weniger Leerraum oben/unten */
.page-head--compact { padding: 40px 0 12px; }
.page-head--compact .eyebrow { margin-bottom: .35em; }
.page-head--compact p { margin-top: 0; }
.page-head--compact .breadcrumb { margin-bottom: 6px; }
.svc-head.page-head--compact { padding-bottom: 14px; margin-bottom: 24px; }

/* Startseite – Hero kompakter: Überschrift «Komplexe Abläufe, sichtbar gemacht.» auf ca. 55–60 % der bisherigen
   Grösse (vorher bis 3.4rem), damit sie nicht grösser wirkt als das Logo. Zweifarbig bleibt sie über .hl.
   clamp(min, bevorzugt, max) hält sie responsiv. Weniger Innenabstand und kleinere Mindesthöhe → Hero kürzer. */
.hero { min-height: 400px; }
.hero .container { padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(1.8rem, 2.6vw, 2.6rem); line-height: 1.15; margin-bottom: .45em; }
.hero p.lead { font-size: 1.08rem; }
.hero-actions { margin-top: 22px; }
@media (max-width: 640px) { .hero { min-height: 0; } .hero .container { padding-top: 40px; padding-bottom: 40px; } }

/* GPU-Demos (type gpu) ------------------------------------------------------------------------------------------
   Badge über dem Thumbnail der Kachel: dezent, dunkel halbtransparent mit Chip-Symbol (inline SVG). */
.demo-thumb { position: relative; }
.gpu-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px;
  background: rgba(15, 23, 42, .78); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: 3px 9px 3px 7px; border-radius: 999px; backdrop-filter: blur(4px); }
.gpu-badge svg { flex: none; }
.filter-btn.filter-type { display: inline-flex; align-items: center; gap: 6px; }
/* Detailseite: Video bzw. Ersatzbild füllt die Bühne wie sonst das iframe; Play/Reset sind ohne iframe sinnlos */
.sim-stage .gpu-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; display: block; }
.sim-stage .gpu-pending { position: absolute; inset: 0; border-radius: 0; }
.sim-stage .gpu-pending img, .sim-stage .gpu-pending .svc-video-generic { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.sim-window.is-gpu #btn-play, .sim-window.is-gpu #btn-reset { display: none; }
.gpu-download { margin-top: 16px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); border-radius: var(--radius-sm); }
.gpu-download .gpu-dl-btn { margin-bottom: 10px; }
.gpu-download .gpu-dl-btn small { font-weight: 400; opacity: .85; }
.gpu-download p { margin: 0; color: var(--text-2); }

/* ---------- Typografie-Hierarchie (max. 3 Grössen) -------------------------------------------------------------
   Stufe 1: .page-title = sichtbarer Seitentitel der Unterseiten (Leistungen, Leistungsseite, Demos/Kategorien,
            Über uns), mittelgross und kräftig, deutlich kleiner als Logo und Hero der Startseite.
   Stufe 2: alle Zwischentitel im Fliesstext (h2/h3 aus Markdown-Beschreibungen wie «Was Sie bekommen»,
            «Typische Einsätze», Kontakt-Kasten, CTA, VR-Extras) einheitlich klein und fett.
   Stufe 3: Fliesstext (unverändert). Sektionen werden mit dem kleinen orangen .eyebrow-Label markiert.
   Die Demo-Detailseite (.commentary) hat bereits 1.6rem/1.05rem und bleibt so. */
.page-title { font-size: clamp(1.5rem, 2.2vw, 1.75rem); font-weight: 750; line-height: 1.2; margin: .1em 0 .4em; }
.page-head--compact .page-title + p { margin-top: 0; }
.prose h2, .prose h3, .svc-page h2, .svc-page h3, .vr-text h2, .contact-card h2, .svc-cta h2 {
  font-size: 1.1rem; font-weight: 700; letter-spacing: 0; margin: 1.4em 0 .45em; }
.prose > h2:first-child, .contact-card h2, .svc-cta h2, .vr-text h2 { margin-top: 0; }
/* Hervorhebungskasten «Was Sie bekommen» in Leistungstexten: wie in .commentary als Eyebrow-Label */
.prose .key-points h3 { font-family: var(--mono); font-size: .78rem; font-weight: 400; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-ink); margin-top: 0; }
/* h2, die als Eyebrow-Label erscheinen (z. B. «Live-Vorschau», «Galerie»): Schrift des .eyebrow statt h2-Stil */
h2.eyebrow, .svc-page h2.eyebrow { font-family: var(--mono); font-size: .8rem; font-weight: 400; text-transform: uppercase; letter-spacing: .12em; color: var(--accent-ink); line-height: 1.4; }
/* Kartentitel: keine automatische Silbentrennung («Prozes-se», «Unfall-verhütung»), Wörter bleiben ganz;
   dafür minimal kleinere Schrift in den schmalen Kategorie-Kacheln. Lange Wörter brechen nur im Notfall. */
.cat-tile h3, .cat-tile .cat-head h3, .demo-card h3, .svc-body h3 { hyphens: manual; -webkit-hyphens: manual; word-break: normal; overflow-wrap: break-word; }
.cat-tile h3 { font-size: .95rem; }
.svc-body h3 { font-size: 1.1rem; }

/* Vollbild-Knopf der Demo-Titelleiste (demo.php #btn-fs): inline SVG statt Unicode-Zeichen (fehlte in vielen
   Schriften). Normal sichtbar: «Vergrössern»-Symbol; im Vollbild des Viewer-Fensters: «Verkleinern»-Symbol. */
.btn-icon .fs-icon { display: block; flex: none; }
.btn-icon .fs-exit { display: none; }
.sim-window:fullscreen .btn-icon .fs-enter { display: none; }
.sim-window:fullscreen .btn-icon .fs-exit { display: block; }

/* Play/Pause-Knopf (demo.php #btn-play): beide SVGs im Knopf, viewer.js setzt .is-paused, wenn die Demo steht */
.btn-icon svg { display: block; flex: none; }
#btn-play .pp-play, #btn-play.is-paused .pp-pause { display: none; }
#btn-play.is-paused .pp-play { display: block; }

/* ---------- Hero-Animation (js/heroBackground.js, three.js, 8 isometrische Szenen) im flacheren Hero --------
   Desktop: Die Animationsfläche belegt die rechten 56 % des Heros in voller Höhe, der Text steht links. Eine Maske
   blendet nur den linken Rand der Fläche weich aus – kein harter Übergang, kein Leerraum.
   Jede Szene liegt in einer eigenen Ebene .hero-layer (absolut übereinander); .is-on blendet sie per Transition ein
   (1.4 s, passend zu FADE in heroBackground.js) – Überblendung ohne leeres Zwischenbild.
   Tablet/Mobil (< 900px): Fläche rutscht als eigener Streifen (Höhe 200–240px) UNTER den Text, ohne Maske. */
.hero::after { display: none; }
.hero-bg { left: auto; right: 0; top: 0; bottom: 0; width: 56%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%); mask-image: linear-gradient(90deg, transparent 0%, #000 22%); }
.hero-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-layer.is-on { opacity: 1; }
.hero-layer canvas { display: block; width: 100% !important; height: 100% !important; }
.hero-content { max-width: 560px; }
@media (min-width: 1500px) { .hero-bg { width: 52%; } }
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: stretch; }
  .hero .container { padding-bottom: 8px; }
  .hero-bg { position: relative; order: 2; width: 100%; height: clamp(200px, 42vw, 240px); -webkit-mask-image: none; mask-image: none; }
}
@media (prefers-reduced-motion: reduce) { .hero-layer { transition: none; } }

/* ---------- Kompakte Leistungs-Kacheln (Startseite + leistungen.php, service_card() in includes/services.php) -----
   Ähnlich den Kategorie-Karten, aber mit eigenem Aufbau: farbiger Streifen links (bleibt, ::before oben), heller
   Hintergrund, kleines Symbol (38px) im farbigen Ring neben dem Titel, Titel 1.05rem fett, volle Beschreibung
   (0.92rem, nicht gekürzt – Leistungen haben mehr Text als Kategorien), «Mehr erfahren →» klein darunter.
   Etwas mehr Luft als die Kategorie-Karten, damit die Kacheln einen eigenen, ruhigen Charakter behalten. Desktop 3 Spalten, ab 900px 2, mobil 1 Spalte. */
.svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: 1fr; } }
.svc-tile { background: var(--panel); }
.svc-tile:hover { transform: translateY(-2px); }
.svc-body { padding: 18px 20px 16px 22px; }
.svc-title { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.svc-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  font-size: 1.1rem; line-height: 1; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }
.svc-body h3, .svc-title h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.25; margin: 0; }
.svc-body p { font-size: .92rem; line-height: 1.55; margin: 0 0 12px; color: var(--text-2); }
.svc-more { font-size: .85rem; }
