.hero-inner { grid-template-columns: minmax(0,.92fr) minmax(0,1.08fr); gap: clamp(16px,2.5vw,38px); }
.defense-demo { position: relative; margin-block: 38px; min-width: 0; border: 1px solid #45403b; border-radius: 8px; background: #0f1112; box-shadow: 0 20px 55px #0004; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid #303232; }
.demo-kicker { display: block; color: var(--orange); font: 550 9px/1.2 var(--mono); letter-spacing: .13em; }
.demo-bar h2 { margin-top: 5px; font-size: 18px; line-height: 1.5; letter-spacing: -.035em; font-weight: 680; }
.demo-buttons { display: none; }
.demo-ready .demo-buttons { display: flex; }
.transport { gap: 6px; align-items: center; }
.transport button { border: 1px solid #464849; border-radius: 4px; min-height: 35px; min-width: 35px; padding: 6px 8px; background: #191b1d; color: #dfdfdf; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; }
.transport button:hover { border-color: #b57b52; color: var(--orange-hover); }
.transport svg { width: 14px; height: 14px; }
.transport .pause-icon { stroke-width: 2.5; }
.transport .play-icon { fill: currentColor; stroke: none; }
[data-playing="true"] .play-icon, [data-playing="false"] .pause-icon { display: none; }

.demo-map { position: relative; isolation: isolate; height: clamp(200px,17vw,254px); overflow: hidden; background-color: #0c0f10; background-image: radial-gradient(ellipse at 63% 68%, #67412438, transparent 51%), radial-gradient(#4c4f4d75 .8px, transparent .8px); background-size: auto, 13px 13px; }
.demo-wires { position: absolute; inset: 0; height: 100%; width: 100%; }
.demo-wires use { vector-effect: non-scaling-stroke; }
.route { --flow: #ff984a; color: var(--flow); }
.route .trace { stroke: #454749; stroke-width: 1.1; }
.route .signal { stroke: var(--flow); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 4 96; stroke-dashoffset: -44; opacity: 0; }
.route-log .trace, .route-alert .trace { stroke-dasharray: 3 2; }
.route-control .trace { stroke-dasharray: 1.8 2.5; }
.map-node { --icon-size: 42px; position: absolute; transform: translate(-50%,-50%); height: var(--icon-size); min-width: var(--icon-size); text-align: center; }
.map-icon { display: grid; place-items: center; width: var(--icon-size); height: var(--icon-size); border: 1px solid #595c5b; border-radius: 9px; background: linear-gradient(135deg,#2a2d2f,#171a1c); box-shadow: 0 4px 12px #0004; color: #c2c6c6; }
.map-icon svg { width: 23px; height: 23px; stroke-width: 1.45; }
.map-node b { position: absolute; display: inline-block; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); color: #c8c9c9; white-space: nowrap; font: 600 11.5px/1.6 var(--font); text-shadow: 0 1px 4px #000,0 0 8px #101112; }
.n-source, .n-waf, .n-server { top: 22.96%; }
.n-source { left: 13.333%; }
.n-waf { left: 50%; }
.n-server { left: 86.667%; }
.n-policy { left: 19.333%; top: 67.4%; }
.n-core { --icon-size: clamp(73px,6.5vw,99px); left: 63.33%; top: 67.4%; }
.core-image { height: 100%; display: block; position: relative; }
.core-image img { display: block; height: 100%; width: auto; mix-blend-mode: lighten; mask-image: radial-gradient(ellipse, black 54%, transparent 79%); }
.n-core b { top: calc(100% - 2px); }
[data-step="1"] :is(.route-in,.route-pass),
[data-step="2"] .route-log, [data-step="3"] .route-log,
[data-step="4"] .route-alert, [data-step="5"] .route-control, [data-step="5"] .route-in { --active-route: 1; }
.path-direction { stroke: #82807b; stroke-width: 1.4; }
.route .signal { opacity: var(--active-route,0); }
[data-step="1"] :is(.route-in,.route-pass) .trace, [data-step="2"] .route-log .trace,
[data-step="3"] .route-log .trace, [data-step="4"] .route-alert .trace,
[data-step="5"] :is(.route-control,.route-in) .trace { stroke: #b6784b; }
[data-step="1"] :is(.route-in,.route-pass) .signal,
[data-step="2"] .route-log .signal, [data-step="3"] .route-log .signal,
[data-step="4"] .route-alert .signal, [data-step="5"] :is(.route-control,.route-in) .signal {
  animation: packet-flow 1.9s linear -.8s infinite;
  animation-play-state: var(--demo-play-state, paused);
}
.defense-demo[data-moving="true"] { --demo-play-state: running; }
[data-step="1"] .route-pass .signal { animation-delay: -1.5s; }
[data-step="5"] .route-control .signal { animation-duration: 2.4s; }
@keyframes packet-flow { from { stroke-dashoffset: 4; } to { stroke-dashoffset: -96; } }
[data-step="1"] :is(.n-source,.n-waf) .map-icon, [data-step="2"] .n-server .map-icon,
[data-step="4"] .n-policy .map-icon, [data-step="5"] .n-waf .map-icon { border-color: #df8e50; background: linear-gradient(145deg,#553624,#2a2019); color: #ffb279; box-shadow: 0 0 16px #e979292b; }
[data-step="2"] .n-core, [data-step="3"] .n-core { filter: drop-shadow(0 1px 7px #e9803c4f); }
.n-core::after { content: ""; position: absolute; pointer-events: none; inset: 22% 2%; border: 1px solid var(--orange); border-radius: 50%; opacity: 0; }
[data-step="3"] .n-core::after { opacity: .55; }
[data-step="3"] .n-core::after { animation: detection-pulse 2s ease-out infinite; animation-play-state: var(--demo-play-state, paused); }
@keyframes detection-pulse { from { opacity: .7; transform: scale(.75); } to { opacity: 0; transform: scale(1.2); } }
[data-step="5"] .n-waf::after { content: "制限"; position: absolute; top: -7px; right: -19px; border: 1px solid #ffac71; border-radius: 3px; padding: 0 4px; background: #3f2516; color: #ffcca5; font-size: 9px; font-weight: 700; }

.demo-readout { border-top: 1px solid #35332f; padding: 13px 20px 8px; }
.readout-heading { display: flex; align-items: baseline; gap: 10px; }
.demo-counter { flex: none; color: var(--orange); font: 600 10px/1.6 var(--mono); letter-spacing: .03em; }
.readout-heading h3 { margin: 0; font-size: clamp(14px,1.12vw,18px); letter-spacing: -.025em; line-height: 1.5; }
#demo-description { min-height: 3.5em; margin-top: 5px; color: #c0c3c4; font-size: 12.5px; line-height: 1.75; }
.demo-steps { margin: 0 20px; display: none; gap: 5px; }
.demo-step { flex: 1; min-width: 0; padding: 6px 3px; border: 1px solid #3b3e3f; border-radius: 4px; background: #161819; color: #c5c8c9; font: 600 11px/1.45 var(--font); }
.demo-step small { margin-right: 5px; font: 500 9px/1.3 var(--mono); color: #a3a8aa; }
.demo-step[aria-current="step"] { background: #34241a; border-color: #b16c3a; color: #ffc599; }
.demo-step[aria-current="step"] small { color: var(--orange); }
.demo-step:hover { border-color: var(--orange); }
.demo-note, .demo-static { margin: 7px 20px 11px; color: #a2a6a8; font-size: 10px; line-height: 1.6; }
@media (min-width: 1500px) { .defense-demo { margin-block: 46px; } }
@media (min-width: 761px) and (max-width: 1050px) {
  .hero-inner { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); gap: 15px; }
  .hero-copy { padding-block: 36px; }
  .defense-demo { margin-block: 28px; }
  .demo-bar { padding: 12px 15px; }
  .demo-readout { padding-inline: 15px; }
  .demo-steps, .demo-note { margin-inline: 15px; }
  .demo-step small { display: none; }
}
@media (max-width: 760px) {
  .hero-inner { display: flex; flex-direction: column; align-items: stretch; padding-bottom: 25px; }
  .hero-copy { padding: 32px 0 0; }
  .defense-demo { margin: 25px 0 0; }
  .demo-map { height: clamp(200px,45vw,236px); }
  .demo-steps { gap: 4px; }
  .demo-step { min-height: 35px; }
}
@media (max-width: 450px) {
  .demo-bar { padding: 12px; }
  .demo-bar h2 { font-size: 16px; }
  .transport button { min-height: 34px; min-width: 34px; padding-inline: 6px; }
  .demo-readout { padding-inline: 12px; }
  #demo-description { font-size: 12px; min-height: 5.25em; }
  .readout-heading { gap: 7px; }
  .readout-heading h3 { font-size: 13px; }
  .map-node { --icon-size: 36px; }
  .map-node.n-core { --icon-size: 65px; }
  .map-node b { font-size: 10px; }
  .map-icon svg { width: 20px; height: 20px; }
  .demo-steps, .demo-note { margin-inline: 12px; }
  .demo-step { font-size: 10.5px; }
  .demo-step small { display: block; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .defense-demo .signal, .defense-demo .n-core::after { animation: none !important; }
}
