/* Server absichern – Animationen dieser Seite. Alles ruht bei „Bewegung reduzieren“. */

.shield-stage { position: relative; width: min(420px, 80vw); aspect-ratio: 1; margin: 30px auto 0; }
.shield-stage svg { width: 100%; height: 100%; overflow: visible; }
.ring { fill: none; stroke-width: 2; transform-origin: 210px 210px; }
.ring.r1 { stroke: #0a84ff; stroke-dasharray: 6 10; animation: spin 26s linear infinite; }
.ring.r2 { stroke: #30d158; stroke-dasharray: 2 14; animation: spin 18s linear infinite reverse; }
.ring.r3 { stroke: #ff9f0a; stroke-dasharray: 22 18; animation: spin 34s linear infinite; }
.ring.r4 { stroke: #bf5af2; stroke-dasharray: 1 9; animation: spin 14s linear infinite reverse; }
.ring-label { font: 600 12px/1 system-ui, sans-serif; fill: var(--muted); letter-spacing: .08em; }
.shield { fill: url(#schildfarbe); stroke: #fff; stroke-width: 3; stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 2.4s ease-out .3s forwards, pulse 3.2s ease-in-out 2.8s infinite; transform-origin: 210px 210px; }
.shield-check { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw 0.9s ease-out 2.2s forwards; }
.scan { fill: url(#scanfarbe); animation: scan 4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(10,132,255,0)); } 50% { transform: scale(1.03); filter: drop-shadow(0 0 22px rgba(10,132,255,.55)); } }
@keyframes scan { 0% { transform: translateY(-140px); opacity: 0; } 20%, 80% { opacity: .7; } 100% { transform: translateY(140px); opacity: 0; } }

/* the one button */
.one-button { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 30px; }
.big-button { position: relative; border: 0; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 21px; line-height: 1; color: #fff; padding: 22px 38px; border-radius: 999px;
  background: linear-gradient(135deg, #0a84ff, #5e5ce6 55%, #bf5af2); box-shadow: 0 10px 40px rgba(94,92,230,.45); transition: transform .2s; }
.big-button:hover { transform: translateY(-3px) scale(1.02); }
.big-button::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; border: 2px solid rgba(94,92,230,.6); animation: ripple 2.2s ease-out infinite; }
@keyframes ripple { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.18); opacity: 0; } }
.big-button.done { background: linear-gradient(135deg, #30d158, #0a84ff); }
.sha { font-size: 13px; color: var(--muted); text-align: center; max-width: 720px; }
.sha > code { word-break: break-all; }

/* the terminal writes itself */
.typing pre span.line { display: block; opacity: 0; animation: appear .01s forwards paused; }
.typing.in pre span.line { animation-play-state: running; }
.typing pre span.line:nth-child(1) { animation-delay: .3s; }  .typing pre span.line:nth-child(2) { animation-delay: .9s; }
.typing pre span.line:nth-child(3) { animation-delay: 1.4s; } .typing pre span.line:nth-child(4) { animation-delay: 1.9s; }
.typing pre span.line:nth-child(5) { animation-delay: 2.4s; } .typing pre span.line:nth-child(6) { animation-delay: 2.9s; }
.typing pre span.line:nth-child(7) { animation-delay: 3.4s; } .typing pre span.line:nth-child(8) { animation-delay: 3.9s; }
.typing pre span.line:nth-child(9) { animation-delay: 4.4s; } .typing pre span.line:nth-child(10) { animation-delay: 4.9s; }
.typing pre span.line:nth-child(11) { animation-delay: 5.4s; } .typing pre span.line:nth-child(12) { animation-delay: 5.9s; }
.typing pre span.line:nth-child(13) { animation-delay: 6.4s; } .typing pre span.line:nth-child(14) { animation-delay: 6.9s; }
@keyframes appear { to { opacity: 1; } }
.typing pre { white-space: pre-wrap; }
.terminal .c { color: #8e8e93; }
.ok { color: #30d158; } .no { color: #ff453a; } .warn { color: #ffd60a; }

/* language switch (as on the start page) */
.apps .wrap { position: relative; }
.lang-switch { position: absolute; right: 22px; display: flex; gap: 12px; }
.lang-switch a[aria-current], .lang-foot a[aria-current] { color: #fff; opacity: 1; font-weight: 600; }
.lang-foot { display: flex; gap: 14px; justify-content: center; padding-top: 18px; font-size: 13px; }
.lang-foot a[aria-current] { color: inherit; }

/* risk matrix after MIL-STD-882E */
.matrix { display: grid; grid-template-columns: 150px repeat(4, 1fr); gap: 6px; max-width: 760px; margin: 30px auto 0; font-size: 14px; }
.matrix div { padding: 12px 8px; border-radius: 10px; text-align: center; min-width: 0; overflow-wrap: break-word; hyphens: manual; }
.matrix .h { color: var(--muted); font-weight: 600; background: none; }
.matrix .cell { color: #fff; font-weight: 700; opacity: 0; transform: scale(.6); transition: opacity .4s, transform .4s cubic-bezier(.2,1.6,.4,1); }
.matrix.in .cell { opacity: 1; transform: none; }
.matrix .hoch { background: #ff453a; } .matrix .ernst { background: #ff9f0a; } .matrix .mittel { background: #ffd60a; color: #1c1c1e; } .matrix .niedrig { background: #30d158; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* step list */
.steps-list { counter-reset: schritt; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 30px; }
.steps-list > * { min-width: 0; }
.steps-list > .reveal { counter-increment: schritt; position: relative; padding-left: 64px; }
.steps-list > .reveal::before { content: counter(schritt); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #0a84ff, #5e5ce6); }
.steps-list h3 { margin: 6px 0 6px; font-size: 21px; }
.steps-list p { color: var(--muted); margin: 0 0 12px; }
.ref { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); margin-left: 6px; vertical-align: 2px; }

/* the three watchdogs */
.guards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.guard { border-radius: 22px; padding: 28px; background: var(--card, rgba(127,127,127,.06)); border: 1px solid var(--line); position: relative; overflow: hidden; }
.guard .eye { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; position: relative; }
.guard .eye::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; animation: ripple 2.6s ease-out infinite; }
.guard.g1 .eye { background: rgba(48,209,88,.15); color: #30d158; }
.guard.g2 .eye { background: rgba(10,132,255,.15); color: #0a84ff; }
.guard.g3 .eye { background: rgba(255,69,58,.15); color: #ff453a; }
.guard h3 { font-size: 22px; margin: 0 0 8px; }
.guard p, .guard li { color: var(--muted); font-size: 15px; }
.guard ul { padding-left: 18px; }
.guard .files { font-size: 14px; margin-top: 12px; }

/* alarm timeline */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 30px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 4%; right: 4%; top: 27px; height: 4px; border-radius: 2px; background: var(--line); }
.timeline::after { content: ""; position: absolute; left: 4%; top: 27px; height: 4px; border-radius: 2px; width: 0; background: linear-gradient(90deg, #ffd60a, #ff9f0a, #ff453a);
  animation: fuse 10s linear infinite; }
@keyframes fuse { 0% { width: 0; } 85%, 100% { width: 92%; } }
.tl { text-align: center; position: relative; z-index: 1; }
.tl .dot { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; background: var(--bg, #fff); border: 3px solid var(--line);
  animation: light 10s linear infinite; }
.tl:nth-child(1) .dot { animation-delay: 0s; } .tl:nth-child(2) .dot { animation-delay: 2s; } .tl:nth-child(3) .dot { animation-delay: 4s; }
.tl:nth-child(4) .dot { animation-delay: 6s; } .tl:nth-child(5) .dot { animation-delay: 8s; }
@keyframes light { 0% { border-color: #ff453a; box-shadow: 0 0 0 0 rgba(255,69,58,.6); transform: scale(1.12); } 12% { box-shadow: 0 0 0 16px rgba(255,69,58,0); transform: scale(1); } 100% { border-color: #ff453a; } }
.tl b { display: block; font-size: 15px; } .tl span { color: var(--muted); font-size: 13px; }

/* circuit */
.circuit { width: 100%; height: auto; margin-top: 26px; }
.circuit .box { fill: var(--card); stroke: var(--line); stroke-width: 1.5; }
.circuit text { font: 600 13px/1.2 system-ui, sans-serif; fill: currentColor; }
.circuit .small { font-weight: 400; font-size: 11px; fill: var(--muted); }
.circuit .wire { fill: none; stroke: #8e8e93; stroke-width: 2.5; }
.circuit .flow { fill: none; stroke-width: 3; stroke-dasharray: 8 12; animation: flow 1.2s linear infinite; }
.circuit .f-sens { stroke: #ffd60a; } .circuit .f-zig { stroke: #bf5af2; } .circuit .f-uart { stroke: #0a84ff; } .circuit .f-dns { stroke: #30d158; } .circuit .f-power { stroke: #ff453a; }
@keyframes flow { to { stroke-dashoffset: -40; } }
.circuit .wave { fill: none; stroke: #bf5af2; stroke-width: 2; opacity: 0; animation: wave 2.4s ease-out infinite; transform-box: fill-box; transform-origin: left center; }
.circuit .wave.w2 { animation-delay: .6s; } .circuit .wave.w3 { animation-delay: 1.2s; }
@keyframes wave { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }
.circuit .cut { animation: cut 6s steps(1) infinite; }
@keyframes cut { 0%, 60% { opacity: 1; } 61%, 100% { opacity: .15; } }

.check-table { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 15px; }
.check-table th, .check-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.check-table th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.check-table td:first-child { font-weight: 600; white-space: nowrap; }
.note { font-size: 14px; color: var(--muted); }
.caution { border-left: 4px solid #ff9f0a; padding: 12px 16px; border-radius: 8px; background: rgba(255,159,10,.08); margin-top: 22px; font-size: 15px; }

@media (max-width: 900px) {
  .guards { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; } .timeline::before, .timeline::after { display: none; }
  .lang-switch { display: none; }
  .matrix { grid-template-columns: 78px repeat(4, minmax(0, 1fr)); gap: 4px; font-size: 11px; }
  .matrix div { padding: 9px 3px; }
  .check-table thead { display: none; }
  .check-table, .check-table tbody, .check-table tr, .check-table td { display: block; }
  .check-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .check-table td { border: 0; padding: 3px 0; white-space: normal; }
  .check-table td:first-child { white-space: normal; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .shield, .shield-check { stroke-dashoffset: 0; }
  .typing pre span.line, .matrix .cell { opacity: 1; transform: none; }
  .timeline::after { width: 92%; }
}
