.demo-wrap { max-width: 1040px; margin: 0 auto; }
.radio-frame { width: 100%; position: relative; margin-top: 8px; }

/* Hero gallery */
.gallery { display: flex; flex-direction: column; align-items: center; }
.g-stage { position: relative; width: 100%; height: 440px; }
.g-slide { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; opacity: 0; transition: opacity 1s ease, transform 1.2s cubic-bezier(.2,.7,.2,1); transform: scale(.94); pointer-events: none; }
.g-slide.on { opacity: 1; transform: none; }
.g-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.55)); }
.g-cap { margin: 14px 0 12px; text-align: center; font-size: 15px; color: var(--muted); }
.g-cap strong { color: var(--text); }
.g-dots { display: flex; gap: 9px; }
.g-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, 0.22); cursor: pointer; transition: width 0.25s, background 0.25s; }
.g-dots button.on { width: 26px; background: #3b7ef0; }
.hero-art.gallery img { width: auto; max-width: 100%; height: auto; max-height: 100%; filter: drop-shadow(0 24px 34px rgba(0, 0, 0, 0.55)); }
.g-stage { height: 420px; }
.hero-art.gallery .g-slide img { max-height: 420px; min-height: 0; }
.g-slide { overflow: hidden; }

/* Two demo radios side by side */
.demo-pair { display: flex; align-items: flex-start; justify-content: center; gap: 28px; margin-top: 8px; }
.demo-pair .radio-frame { flex: none; margin-top: 0; }
.demo-pair iframe { border: 0; background: transparent; transform-origin: 0 0; display: block; }
.demo-pair.stacked { flex-direction: column; align-items: center; gap: 20px; }
.demo-col { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.demo-col .radio-frame[data-role="top"] { margin-left: 40px; }
.demo-pair.stacked .demo-col { align-items: center; }
.demo-pair.stacked .demo-col .radio-frame[data-role="top"] { margin-left: 0; }

/* the handheld slides in from the right; keep that from widening the page */
#demo { overflow-x: clip; }

/* ---- hero slideshow: signal rings behind the radio and labelled hotspots on its parts ---- */
.g-stage { isolation: isolate; }
.g-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: -1; }
.g-rings i { position: absolute; border-radius: 50%; border: 1.5px solid rgba(110, 162, 255, .35); width: 300px; height: 300px; animation: g-ring 4.8s ease-out infinite; }
.g-rings i:nth-child(2) { width: 440px; height: 440px; opacity: .6; animation-delay: .6s; }
.g-rings i:nth-child(3) { width: 580px; height: 580px; opacity: .35; animation-delay: 1.2s; }
.g-rings i:nth-child(4) { width: 720px; height: 720px; opacity: .18; animation-delay: 1.8s; }
.g-rings::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, rgba(59, 126, 240, .35), transparent); }
@keyframes g-ring { 0% { border-color: rgba(110, 162, 255, .35); } 12% { border-color: rgba(140, 185, 255, .75); } 40%, 100% { border-color: rgba(110, 162, 255, .35); } }
.g-hs { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.g-hs.in { opacity: 1; }
.g-hs .hs { position: absolute; width: 0; height: 0; }
.g-hs.in .hs { animation: hs-in .45s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes hs-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hs-dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: #3b7ef0; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(59, 126, 240, .35), 0 4px 12px rgba(0, 0, 0, .5); }
.hs-dot::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid rgba(110, 162, 255, .7); animation: hs-pulse 2.2s ease-out infinite; }
.hs.red .hs-dot { background: #ef4444; box-shadow: 0 0 0 6px rgba(239, 68, 68, .35), 0 4px 12px rgba(0, 0, 0, .5); }
.hs.red .hs-dot::after { border-color: rgba(248, 113, 113, .7); }
@keyframes hs-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.hs-ln { position: absolute; left: 0; top: -1px; height: 2px; transform-origin: 0 50%; background: linear-gradient(90deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .18)); }
.hs-lb { position: absolute; transform: translateY(-50%); white-space: nowrap; padding: 8px 12px; border-radius: 12px; background: rgba(18, 20, 24, .92); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 28px rgba(0, 0, 0, .5); font-size: 13px; line-height: 1.3; color: #c9ccd3; text-align: center; }
.hs-lb.l { transform: translate(-100%, -50%); }
.hs-lb b { display: block; color: #fff; font-size: 14px; }
@media (max-width: 1100px) { .hs-lb, .hs-ln { display: none; } }
@media (max-width: 700px) { .g-rings i:nth-child(n+3) { display: none; } }
@media (prefers-reduced-motion: reduce) { .g-rings i, .hs-dot::after, .g-hs.in .hs { animation: none; } }
/* the rings are wider than small screens; keep them from widening the page */
.hero { overflow-x: clip; }
