/* Phase 2: conceptual backend architecture scrollytelling.
   The scene remains understandable when JavaScript or animation is unavailable. */
.systems-story{position:relative;isolation:isolate;overflow:clip;background:#0b1210;color:#f0f8ee;border-top:1px solid #b8ff8c1b;border-bottom:1px solid #b8ff8c1b}
.systems-story:before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 72% 46%,#27432b55,transparent 58%)}
.systems-stage{position:relative;min-height:720px;display:flex;align-items:center;padding:105px 0;overflow:hidden}
.systems-stage:after{content:"";position:absolute;inset:0;pointer-events:none;opacity:.32;background-image:linear-gradient(#aaffaa0a 1px,transparent 1px),linear-gradient(90deg,#aaffaa0a 1px,transparent 1px);background-size:72px 72px;mask-image:linear-gradient(90deg,transparent 12%,#000 76%)}
.systems-shell{position:relative;z-index:1;display:grid;grid-template-columns:minmax(320px,.9fr) minmax(0,1.1fr);gap:32px;align-items:center}
.systems-copy{position:relative;z-index:2;max-width:570px}
.systems-copy .eyebrow{color:#b8ff8c;margin-bottom:22px;font-size:11px;letter-spacing:.14em}
.systems-copy h2{font-size:clamp(49px,5.6vw,82px);letter-spacing:-.075em;line-height:1.01;margin:0 0 25px}
.systems-lead{font-size:clamp(16px,1.65vw,21px);color:#dbe8d8;line-height:1.55;max-width:520px;margin:0 0 35px}
.systems-steps{list-style:none;padding:0;margin:0 0 27px;max-width:490px;border-top:1px solid #b8ff8c29}
.systems-step{display:grid;grid-template-columns:42px minmax(0,1fr);gap:13px;padding:16px 0;border-bottom:1px solid #b8ff8c29;color:#819a84;transition:color .35s ease}
.systems-step span{font:12px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;color:#78a47d}
.systems-step strong{font-size:15px;font-weight:600;display:block;color:#dbefdc;letter-spacing:-.02em}
.systems-step p{font-size:12px;line-height:1.6;margin:5px 0 0;color:#a4b5a6}
.systems-story.story-motion[data-story-step="0"] .systems-step:nth-child(1),
.systems-story.story-motion[data-story-step="1"] .systems-step:nth-child(2),
.systems-story.story-motion[data-story-step="2"] .systems-step:nth-child(3){color:#b8ff8c}
.systems-story.story-motion[data-story-step="0"] .systems-step:nth-child(1) strong,
.systems-story.story-motion[data-story-step="1"] .systems-step:nth-child(2) strong,
.systems-story.story-motion[data-story-step="2"] .systems-step:nth-child(3) strong{color:#b8ff8c}
.systems-story.story-motion[data-story-step="0"] .systems-step:nth-child(1) span,
.systems-story.story-motion[data-story-step="1"] .systems-step:nth-child(2) span,
.systems-story.story-motion[data-story-step="2"] .systems-step:nth-child(3) span{color:#b8ff8c}
.systems-disclaimer{font:11px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace;color:#78907c;max-width:485px;margin:0 0 27px}
.systems-explore{display:inline-flex;gap:14px;align-items:center;padding:5px 0;border-bottom:1px solid #b8ff8c72;color:#d9eed9;font-size:13px;font-weight:600}
.systems-explore:hover{color:var(--accent)}
.systems-visual{width:100%;min-width:0;margin:0}
.systems-graph{position:relative;aspect-ratio:680 / 610;min-height:460px;max-width:680px;margin:0 auto;transform-style:preserve-3d;will-change:auto;--camera-x:0deg;--camera-y:0deg;--camera-scale:1;transform:perspective(1200px) rotateX(var(--camera-x)) rotateY(var(--camera-y)) scale(var(--camera-scale));transition:transform .15s linear}
.systems-graph:before{content:"";position:absolute;inset:6% 8%;border:1px solid #adffaa19;border-radius:50%;transform:rotate(-23deg) scaleY(.6);box-shadow:0 0 100px #90ffb012}
.systems-graph:after{content:"";position:absolute;inset:18% 18%;border:1px dashed #b8ff8c29;border-radius:50%;transform:rotate(26deg) scaleY(.85)}
.systems-cloud{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;opacity:.78;filter:drop-shadow(0 0 11px #a8ff9944)}
.systems-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;filter:drop-shadow(0 0 8px #a4ffa731)}
.systems-lines path{fill:none;stroke:#a3fda4;stroke-width:1.2;stroke-dasharray:1;stroke-dashoffset:0;opacity:.52;transition:stroke-dashoffset .9s ease,opacity .6s}
.systems-lines .line-hot{stroke-width:2.4;opacity:.88;stroke-dasharray:5 13;stroke-dashoffset:0;animation:signal-dash 5s linear infinite}
@keyframes signal-dash{to{stroke-dashoffset:-180}}
.system-node{position:absolute;z-index:1;left:var(--node-x);top:var(--node-y);width:clamp(126px,11vw,169px);transform:translate(-50%,-50%) translateZ(var(--node-z,0px));border:1px solid #b5ffbd47;border-radius:14px;padding:17px 17px 15px;background:linear-gradient(150deg,#1c3628f5,#0a1710f5);box-shadow:0 12px 38px #0008, inset 0 1px #d3ffd017;transition:opacity .65s, transform .7s cubic-bezier(.22,1,.36,1), border-color .45s}
.system-node:before{content:"";position:absolute;inset:-6px;border:1px solid #b8ff8c0f;border-radius:19px;pointer-events:none}
.system-node .node-type{display:block;color:#93b99a;font:10px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.09em;text-transform:uppercase}
.system-node .node-title{display:block;color:#f5fff3;font-size:clamp(18px,1.55vw,23px);letter-spacing:-.05em;font-weight:620;line-height:1.15;margin:14px 0 8px}
.system-node .node-subtitle{display:block;color:#a5c8ad;font:11px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}
.system-node--core{--node-x:50%;--node-y:50%;--node-z:70px;width:clamp(178px,17vw,230px);background:linear-gradient(145deg,#3c7548,#112d20);border-color:#b8ff8cb0;padding:26px;box-shadow:0 0 80px #5dea7825,0 24px 75px #0009}
.system-node--core .node-title{font-size:clamp(23px,2.3vw,33px);margin-top:18px}
.system-node--core .node-type{color:#cbffb4}.system-node--core .node-subtitle{color:#d1f5d2}
.system-node--api{--node-x:19%;--node-y:25%;--node-z:10px}
.system-node--bpm{--node-x:81%;--node-y:25%;--node-z:19px}
.system-node--data{--node-x:19%;--node-y:75%;--node-z:7px}
.system-node--kafka{--node-x:81%;--node-y:75%;--node-z:15px}
.systems-caption{font:10px/1.7 ui-monospace,SFMono-Regular,Consolas,monospace;color:#7e9984;letter-spacing:.07em;text-align:center;margin:10px 0 0}
.systems-story.story-motion{min-height:280svh}
.systems-story.story-motion .systems-stage{position:sticky;top:80px;height:calc(100svh - 80px);min-height:560px;padding:25px 0}
.systems-story.story-motion[data-story-step="0"] .system-node:not(.system-node--core){opacity:0;transform:translate(-50%,-50%) translateZ(-130px) scale(.45);pointer-events:none}
.systems-story.story-motion[data-story-step="1"] .system-node--data,
.systems-story.story-motion[data-story-step="1"] .system-node--kafka{opacity:0;transform:translate(-50%,-50%) translateZ(-110px) scale(.55);pointer-events:none}
.systems-story.story-motion[data-story-step="0"] .systems-lines path,
.systems-story.story-motion[data-story-step="1"] .systems-lines path[data-link="2"]{stroke-dashoffset:1;opacity:0}
.systems-story.story-motion[data-story-step="0"] .systems-lines .line-hot,
.systems-story.story-motion[data-story-step="1"] .systems-lines .line-hot[data-link="2"]{opacity:0}
.systems-story.story-motion[data-story-step="2"] .system-node--kafka{border-color:#b8ff8ca8;box-shadow:0 0 48px #a0ff9522,0 12px 38px #0008}
@media(max-width:1200px){
 .systems-shell{grid-template-columns:minmax(290px,.95fr) minmax(0,1.05fr);gap:6px}
 .systems-copy h2{font-size:clamp(47px,5vw,65px)}
 .system-node{width:130px;padding:13px}
 .system-node--core{width:180px;padding:21px}
}
@media(max-width:959px),(max-height:649px){
 .systems-stage{min-height:0;padding:95px 0 90px}
 .systems-shell{grid-template-columns:1fr;gap:30px}
 .systems-copy{max-width:720px}
 .systems-graph{max-width:680px;min-height:0}
 .systems-visual{margin-top:20px}
 .systems-story.story-motion{min-height:0}
 .systems-story.story-motion .systems-stage{position:relative;top:auto;height:auto;min-height:0;padding:95px 0 90px}
}
@media(max-width:600px){
 .systems-stage{padding:80px 0}
 .systems-copy h2{font-size:clamp(43px,11vw,64px)}
 .systems-lead{font-size:17px}
 .systems-graph{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;aspect-ratio:auto;min-height:0;max-width:440px;transform:none!important;padding:10px 0 0}
 .systems-graph:before,.systems-graph:after,.systems-lines,.systems-cloud{display:none}
 .system-node,.system-node--core{position:relative;inset:auto;width:auto;min-height:116px;transform:none!important;opacity:1!important;padding:17px}
 .system-node .node-title{font-size:21px;margin:12px 0 6px}
 .system-node--core{grid-column:1/-1;min-height:140px}
 .system-node--core .node-title{font-size:28px}
 .systems-caption{text-align:left;padding-top:12px}
 .systems-story.story-motion .systems-stage{padding:80px 0}
}
@media(prefers-reduced-motion:reduce){
 .systems-story,.systems-stage,.system-node,.systems-graph,.systems-lines path,.systems-step{scroll-behavior:auto!important;animation:none!important;transition:none!important}
 .systems-story.story-motion{min-height:0!important}
 .systems-story.story-motion .systems-stage{position:relative;top:auto;height:auto;min-height:0;padding:95px 0}
 .systems-story.story-motion .system-node{opacity:1;transform:translate(-50%,-50%) translateZ(var(--node-z,0px))}
 .systems-story.story-motion .systems-lines path{opacity:.52;stroke-dashoffset:0}
}
@media print{
 .systems-story{background:#fff!important;color:#000;overflow:visible}
 .systems-story:before,.systems-stage:after,.systems-graph:before,.systems-graph:after,.systems-lines,.systems-cloud{display:none}
 .systems-stage,.systems-story.story-motion .systems-stage{min-height:0;height:auto;position:static;padding:22px 0}
 .systems-shell{display:block}
 .systems-copy h2,.systems-lead,.systems-step strong{color:#000}
 .systems-steps{max-width:none}
 .systems-step{padding:6px 0;border-color:#ccc}
 .systems-step p,.systems-disclaimer{color:#444}
 .systems-visual,.systems-explore{display:none}
}
