/* =========================================================
   40 Demo (Signature Moment) + 50 Systemaufbau
   ========================================================= */
.demo { padding-bottom: clamp(40px, 5vw, 72px); --demo-edge: rgba(255,255,255,.18); --on-laser: #04210F; }
.demo .section-head { margin-bottom: clamp(32px, 4vw, 56px); }

.demo-grid { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); gap: clamp(20px, 2.5vw, 32px); align-items: start; }
@media (max-width: 900px) { .demo-grid { grid-template-columns: minmax(0, 1fr); } }
.demo-pane__label { display: flex; align-items: baseline; gap: 10px; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--on-night); margin-bottom: 14px; }
.demo-pane__label .mono { color: var(--on-night-2); }

/* ---------- Arbeitstisch ---------- */
.demo-sim { border-radius: var(--r-lg); outline-offset: 4px; }
.demo-svg { width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: 0 24px 60px -24px rgba(0,0,0,.6); }
.demo-hint { margin-top: 12px; font-size: .875rem; color: var(--on-night-2); }

.d-table { fill: var(--night-2); stroke: var(--demo-edge); stroke-width: 1; }
.d-gridline { fill: none; stroke: rgba(255,255,255,.05); stroke-width: 1; }
.d-bin rect { fill: none; stroke: var(--demo-edge); stroke-width: 1.5; transition: stroke 300ms var(--ease), fill 300ms var(--ease); }
.d-bin text, .d-label { fill: var(--on-night-2); font-size: 12px; letter-spacing: .04em; }
.d-bin-fill rect, .d-bin-fill circle { fill: none; stroke: rgba(159,180,198,.45); stroke-width: 1.25; }
.d-fix-bed { fill: rgba(255,255,255,.03); stroke: var(--demo-edge); stroke-width: 1.5; }
.d-fix-plate { fill: rgba(159,180,198,.12); stroke: var(--on-night-2); stroke-width: 1.5; }
.d-fix-hole { fill: var(--night); stroke: var(--on-night-2); stroke-width: 1.25; }
.d-fix-block { fill: rgba(32,155,216,.18); stroke: var(--blue); stroke-width: 1.5; }
.d-fix-pin { stroke: var(--blue); stroke-width: 2; stroke-linecap: round; }
.d-tray-bg { fill: rgba(255,255,255,.03); stroke: var(--demo-edge); stroke-width: 1.5; stroke-dasharray: 4 5; }
.d-tool-fill { fill: rgba(159,180,198,.18); stroke: var(--on-night-2); stroke-width: 1.5; transition: stroke 300ms var(--ease); }

/* aktuelles Ziel: Kontur im Signalgrün */
.d-bin.is-target rect, .d-fixture.is-target .d-fix-bed, .d-tool.is-target .d-tool-fill { stroke: var(--laser); }
.d-bin.is-target rect { fill: rgba(44,255,107,.06); }
.d-bin.is-target text { fill: var(--on-night); }

/* Taster */
.d-taster { cursor: pointer; outline: none; }
.d-taster-base { fill: var(--night); stroke: var(--demo-edge); stroke-width: 2; }
.d-taster-cap { fill: var(--blue-ink); stroke: var(--blue); stroke-width: 1.5; }
.d-taster-shine { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1.5; }
.d-taster-cap-g { transition: transform 120ms var(--ease); transform-box: fill-box; transform-origin: center; }
.d-taster.is-pressed .d-taster-cap-g { transform: translateY(3px) scale(.94); }
.d-taster-focus { fill: none; stroke: transparent; stroke-width: 3; }
.d-taster:focus-visible .d-taster-focus { stroke: var(--blue); }
.d-taster:hover .d-taster-cap { fill: var(--blue); }

/* Laser */
.d-laser { transform: translate(85px, 52px); transition: transform 600ms var(--ease); pointer-events: none; }
.d-beam { stroke-linecap: round; }
.d-dot { filter: drop-shadow(0 0 3px var(--laser)); }
.d-ring { fill: none; stroke: var(--laser); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; animation: d-ring 2.4s var(--ease) infinite; }
.d-ring--2 { animation-delay: 1.2s; }
@keyframes d-ring { 0% { transform: scale(.5); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
.demo.is-reduced .d-laser { transition: none; }
.demo.is-reduced .d-ring { animation: none; opacity: .35; transform: scale(1.4); }
.demo.is-reduced .d-ring--2 { display: none; }

/* ---------- Panel ---------- */
.demo-device { background: var(--night); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-lg); padding: 14px; box-shadow: 0 24px 60px -24px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.04); }
.demo-screen { position: relative; background: var(--surface); color: var(--ink); border-radius: 12px; padding: 16px 18px 18px; min-height: 440px; overflow: hidden; display: flex; flex-direction: column; }
.demo-topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.demo-brand { font-size: .8125rem; font-weight: 650; color: var(--navy); letter-spacing: -.005em; }
.demo-order { font-size: .75rem; color: var(--ink-2); }
.demo-run, .demo-done { display: flex; flex-direction: column; flex: 1; }
.demo-run[hidden], .demo-done[hidden] { display: none; }

.demo-steps { list-style: none; margin: 0 0 18px; padding: 0; display: flex; gap: 6px; }
.pill { position: relative; flex: 1; min-width: 0; height: 36px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--ink-2); display: grid; place-items: center; font-size: .8125rem; font-weight: 600; transition: background-color 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease); }
.pill .pill-check { display: none; width: 18px; height: 18px; }
.pill.is-done { background: var(--navy); border-color: var(--navy); color: #fff; }
.pill.is-done .pill-num { display: none; }
.pill.is-done .pill-check { display: block; }
.pill.is-current { background: var(--laser); border-color: var(--laser); color: var(--on-laser); box-shadow: 0 0 0 3px rgba(44,255,107,.22), 0 0 14px 2px rgba(44,255,107,.5); }
.pill-flag { position: absolute; top: -9px; right: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--alert); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.pill-flag[hidden] { display: none; }
.pill-flag svg { width: 14px; height: 14px; stroke-width: 2.25; }

.demo-step { min-height: 138px; }
.demo-step__id { font-size: .75rem; color: var(--ink-2); letter-spacing: .06em; margin-bottom: 6px; }
.demo-step__title { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.2; color: var(--navy); margin-bottom: 8px; }
.demo-step__text { color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.demo-step__light { margin-top: 12px; font-size: .8125rem; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.demo-step__light .laser-dot { flex: none; }

.demo-actions { display: grid; gap: 10px; margin-top: 18px; }
.demo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 20px; border-radius: 14px; font-weight: 600; font-size: 1rem; cursor: pointer; border: 1.5px solid transparent; transition: background-color 200ms var(--ease), border-color 200ms var(--ease), transform 150ms var(--ease); }
.demo-btn:active { transform: scale(.98); }
.demo-btn svg { width: 24px; height: 24px; flex: none; }
.demo-btn--primary { background: var(--navy); color: #fff; min-height: 56px; font-size: 1.0625rem; }
.demo-btn--primary:hover { background: var(--navy-700); }
.demo-btn--alert { background: transparent; color: var(--alert); border-color: rgba(232,89,12,.45); }
.demo-btn--alert:hover, .demo-btn--alert[aria-expanded="true"] { background: var(--alert-tint); border-color: var(--alert); }

.demo-alert-box { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--alert-tint); }
.demo-alert-box[hidden] { display: none; }
.demo-alert-box__q { font-size: .875rem; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid rgba(232,89,12,.45); color: var(--ink); font-size: .9375rem; font-weight: 500; cursor: pointer; transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.demo-chip:hover { border-color: var(--alert); background: var(--surface-2); }

.demo-sub { display: flex; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 14px; }
.demo-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; margin-inline: -10px; background: none; border: 0; border-radius: 10px; color: var(--blue-ink); font-size: .9375rem; font-weight: 600; cursor: pointer; }
.demo-link:hover { background: var(--blue-tint); }
.demo-link:disabled { color: var(--ink-2); opacity: .5; cursor: default; background: none; }
.demo-link svg { width: 20px; height: 20px; }

.demo-doc { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 14px 8px 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); animation: demo-rise 300ms var(--ease); }
.demo-doc[hidden] { display: none; }
.demo-doc__body { display: flex; align-items: center; gap: 12px; flex: 1; font-size: .9375rem; }
.demo-doc__tag { padding: 3px 8px; border-radius: 6px; background: var(--blue-tint); color: var(--navy); font-size: .75rem; font-weight: 500; }
.demo-doc__close { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); border-radius: 50%; cursor: pointer; }
.demo-doc__close:hover { background: var(--surface-2); color: var(--ink); }
@keyframes demo-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.demo-toast { position: absolute; left: 12px; right: 12px; top: 12px; z-index: 4; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: .9375rem; font-weight: 500; display: flex; align-items: center; gap: 10px; opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 250ms var(--ease), transform 250ms var(--ease); }
.demo-toast.is-on { opacity: 1; transform: none; }
.demo-toast svg { width: 24px; height: 24px; flex: none; color: #FFB27F; }

/* Abschluss */
.demo-done { align-items: flex-start; gap: 16px; animation: demo-rise 400ms var(--ease); }
.demo-done__badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--laser); color: var(--on-laser); box-shadow: var(--laser-glow); }
.demo-done__badge svg { width: 28px; height: 28px; }
.demo-done__title { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); line-height: 1.2; color: var(--navy); outline: none; }
.demo-log { list-style: none; margin: 0; padding: 0; width: 100%; font-size: .8125rem; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.demo-log li { padding: 10px 14px; display: flex; gap: 10px; align-items: baseline; }
.demo-log li + li { border-top: 1px solid var(--line); }
.demo-log .is-alert { color: var(--alert); }
.demo-log svg { width: 16px; height: 16px; flex: none; align-self: center; }
.demo-done .demo-btn { margin-top: auto; width: 100%; }

/* Zeile darunter */
.demo-captions { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 20px 0 0; border-top: 1px solid var(--night-line); display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 16px 24px; }
.demo-captions li { display: flex; align-items: center; gap: 12px; color: var(--on-night-2); font-size: .875rem; }
.demo-captions svg { width: 24px; height: 24px; color: var(--blue); flex: none; }
@media (max-width: 760px) { .demo-captions { grid-template-columns: 1fr; } }

/* =========================================================
   50 Systemaufbau
   ========================================================= */
.system { padding-top: 0; }
.system__inner { padding-top: clamp(72px, 8vw, 120px); }
.sys-media { position: relative; background: var(--night-2); box-shadow: none; border: 1px solid var(--night-line); }
.sys-media picture, .sys-media img { display: block; width: 100%; height: auto; }
.sys-hotspots { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.hs { position: absolute; width: 32px; height: 32px; transform: translate(-50%, -50%); }
.hs__btn { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; background: var(--blue-ink); color: #fff; font-size: .8125rem; font-weight: 500; cursor: pointer; display: grid; place-items: center; padding: 0; box-shadow: 0 2px 10px rgba(0,0,0,.45); transition: transform 200ms var(--ease), background-color 200ms var(--ease); }
/* 44px Trefferfläche ohne die Optik zu vergrößern */
.hs__btn::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.hs:hover .hs__btn, .hs.is-hl .hs__btn, .hs.is-open .hs__btn { transform: scale(1.15); background: var(--blue); }
.hs__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hs__pop { position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 12px); width: 250px; transform: translate(-50%, 6px); padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); color: var(--ink-2); font-size: .9375rem; line-height: 1.45; box-shadow: var(--shadow-2); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 200ms; }
.hs__pop strong { display: block; color: var(--navy); font-size: 1rem; margin-bottom: 2px; }
.hs--below .hs__pop { bottom: auto; top: calc(100% + 12px); transform: translate(-50%, -6px); }
.hs:hover .hs__pop, .hs.is-open .hs__pop, .hs:focus-within .hs__pop { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.hs:hover, .hs:focus-within, .hs.is-open { z-index: 6; }

.sys-list { list-style: none; margin: clamp(28px, 4vw, 48px) 0 0; padding: 0; }
.sys-item { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--r-lg); background: var(--night-2); border: 1px solid var(--night-line); transition: border-color 200ms var(--ease), background-color 200ms var(--ease); }
.sys-item:hover, .sys-item.is-hl { border-color: var(--blue); background: rgba(32,155,216,.08); }
.sys-item:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: var(--r-lg); }
.sys-item__name { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; line-height: 1.25; letter-spacing: -.01em; }
.sys-item__n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-ink); border: 1.5px solid #fff; color: #fff; font-size: .75rem; }
.sys-item p { margin-top: 8px; font-size: .9375rem; line-height: 1.5; color: var(--on-night-2); }

@media (max-width: 699px) {
  .hs__pop { display: none; }
  .hs, .hs__btn { width: 28px; height: 28px; }
}

/* Design-Review: Tastatur-Tipp auf Touch-Geräten nur für Screenreader */
@media (max-width: 700px) { #demo-hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; } }
