/* orbit: integrations orbiting a central SMSBlast tile.
   Default rules are the live orbit (positions come from orbit.js). The block at the end
   turns the stage into a plain pill cloud when there is no JS, the scene failed, or
   reduced motion meets a phone-sized stage. */

.orb { overflow: clip; background: radial-gradient(ellipse 36% 44% at 74% 52%, rgba(54, 173, 224, .07), transparent); }
.orb-grid { display: grid; grid-template-columns: minmax(0, 1fr) min(640px, 58%); gap: clamp(24px, 4vw, 56px); align-items: center; }

/* ---------- copy ---------- */
.orb-copy { min-width: 0; }
.orb-copy .lede { max-width: 44ch; text-wrap: pretty; }
.orb-checks { list-style: none; margin: 0 0 clamp(24px, 3vw, 34px); padding: 0; display: grid; gap: 4px; }
.orb-checks li { position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 0 -12px; padding: 9px 12px; border-radius: var(--r-sm); font-size: 1rem; font-weight: 500; line-height: 1.35; color: var(--ink); }
.orb-checks li::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); opacity: 0; transition: opacity .25s ease; }
.orb-checks li > * { position: relative; }
.orb-checks li span { text-wrap: balance; }
.orb-checks li svg { flex: none; width: 24px; height: 24px; padding: 2px; border-radius: 50%; color: var(--brand-light); background: var(--brand-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent); transition: background .25s ease, color .25s ease, transform .4s var(--e-spring); }
@media (hover: hover) {
  .orb-checks li::after { content: ""; position: relative; flex: 1; min-width: 12px; height: 1px; margin-left: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 45%, transparent), transparent); transform-origin: 0 50%; transform: scaleX(0); transition: transform .5s var(--e-out); }
  .orb-checks li:hover::before { opacity: 1; }
  .orb-checks li:hover svg { background: var(--sky); color: var(--navy); transform: scale(1.1); }
  .orb-checks li:hover::after { transform: scaleX(1); }
}
.orb-cta .btn { gap: 10px; }
.orb-arrow { transition: transform .3s var(--e-out); }
.orb-cta .btn:hover .orb-arrow { transform: translateX(4px); }

/* ---------- stage ---------- */
.orb-viz { position: relative; min-width: 0; display: grid; justify-items: center; }
.orb-stage { position: relative; z-index: 2; width: min(100%, 640px); aspect-ratio: 1; perspective: 1000px; -webkit-tap-highlight-color: transparent; }
.orb-stage::before { content: ""; position: absolute; inset: -4%; pointer-events: none; background-image: radial-gradient(circle, color-mix(in srgb, var(--brand) 26%, transparent) 1px, transparent 1.6px); background-size: 22px 22px; background-position: center; -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent 98%); mask-image: radial-gradient(closest-side, #000 20%, transparent 98%); opacity: .55; }
.orb-glow { position: absolute; inset: -10%; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--sky-2) 24%, transparent) 0%, color-mix(in srgb, var(--sky-2) 9%, transparent) 34%, color-mix(in srgb, var(--bloom) 7%, transparent) 62%, transparent 100%); will-change: transform; }

.orb-plane { position: absolute; inset: 0; pointer-events: none; will-change: transform; transition: opacity .9s ease; }
.orb-rings, .orb-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.orb-track { fill: none; stroke: color-mix(in srgb, var(--sky) 12%, transparent); stroke-width: 1; }
.orb-ring { fill: none; stroke: color-mix(in srgb, var(--sky) 62%, transparent); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1 9; }
.orb-ring[data-orb-ring="1"] { stroke-dasharray: 7 9; stroke-width: 1.25; stroke: color-mix(in srgb, var(--sky) 44%, transparent); }
.orb-ring[data-orb-ring="2"] { stroke-dasharray: 2 10; stroke: color-mix(in srgb, var(--peach) 55%, transparent); }
.orb-stage.is-two .orb-ring[data-orb-ring="1"] { stroke-dasharray: 2 9; stroke-width: 1.5; stroke: color-mix(in srgb, var(--peach) 55%, transparent); }
.orb-wave { fill: color-mix(in srgb, var(--brand) 5%, transparent); stroke: var(--brand-light); stroke-width: 2; opacity: 0; }
.orb-sat { fill: var(--brand); }
.orb-sat-h { fill: color-mix(in srgb, var(--brand-light) 30%, transparent); }
.orb-bead { stroke: var(--bg); stroke-width: 1.6; paint-order: stroke; }
/* a slow sweep over the plane, like a sync pass */
.orb-sweep { position: absolute; left: 50%; top: 50%; width: var(--orb-sw, 560px); height: var(--orb-sh, 560px); margin: calc(var(--orb-sh, 560px) / -2) 0 0 calc(var(--orb-sw, 560px) / -2); border-radius: 50%; background: conic-gradient(from 0deg, transparent 0deg, transparent 268deg, color-mix(in srgb, var(--brand-light) 13%, transparent) 346deg, transparent 360deg); -webkit-mask-image: radial-gradient(closest-side, transparent 22%, #000 40%, #000 99%, transparent 100%); mask-image: radial-gradient(closest-side, transparent 22%, #000 40%, #000 99%, transparent 100%); }
.orb-stage.is-on .orb-sweep { animation: fx-spin 14s linear infinite; }

/* hidden until the stage scrolls in; the scene then flies everything out from the centre */
.js .orb:not(.scene-failed) .orb-stage:not(.is-in) .orb-plane { opacity: 0; }
.js .orb:not(.scene-failed) .orb-stage:not(.is-in) .orb-core { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
.js .orb:not(.scene-failed) .orb-stage:not(.is-in) .orb-hud { opacity: 0; }

/* ---------- wires ---------- */
.orb-link, .orb-link-glow { fill: none; stroke-linecap: round; opacity: 0; transition: opacity .25s ease; }
.orb-link { stroke-width: 2; stroke-dasharray: 5 7; }
.orb-link-glow { stroke: color-mix(in srgb, var(--brand) 16%, transparent); stroke-width: 9; }
.orb-stage.has-hot .orb-link, .orb-stage.has-hot .orb-link-glow { opacity: 1; }
.orb-stage.has-hot.is-on .orb-link { animation: orb-flow .7s linear infinite; }
.orb-pulse { visibility: hidden; }
.orb-pulse.is-on { visibility: visible; }
.orb-wire { fill: none; stroke-width: 1; stroke-linecap: round; stroke-dasharray: 1 5; }
.orb-trail { fill: none; stroke-width: 3; stroke-linecap: round; }
.orb-head { fill: #fff; stroke-width: 2; }

/* ---------- tiles ---------- */
.orb-tiles { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; }
.orb-tile { --orb-c: var(--brand); position: absolute; left: 50%; top: 50%; z-index: 3; display: inline-flex; align-items: center; gap: .5em; margin: 0; padding: .62em .86em .62em .68em; border-radius: 999px; background: rgba(11, 24, 60, .88); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 8px 20px rgba(0, 0, 0, .32); font-family: var(--f-sans); font-size: var(--orb-fs, .78rem); font-weight: 500; line-height: 1; letter-spacing: -.005em; color: var(--ink); white-space: nowrap; cursor: default; user-select: none; -webkit-user-select: none; opacity: 0; transform: translate(-50%, -50%); will-change: transform, opacity; transition: border-color .3s ease, box-shadow .3s ease, background .3s ease; }
.orb-tile[data-kind="store"] { --orb-c: var(--mint); }
.orb-tile[data-kind="crm"] { --orb-c: var(--brand); }
.orb-tile[data-kind="mail"] { --orb-c: var(--violet); }
.orb-tile[data-kind="site"] { --orb-c: var(--amber); }
.orb-tile[data-kind="form"], .orb-tile[data-kind="book"] { --orb-c: var(--rose); }
.orb-tile[data-kind="pay"] { --orb-c: var(--brand-light); }
.orb-tile[data-kind="dev"] { --orb-c: var(--ink); }
.orb-dot { flex: none; width: .62em; height: .62em; border-radius: 50%; background: var(--orb-c); box-shadow: 0 0 0 .22em color-mix(in srgb, var(--orb-c) 16%, transparent); }
.orb-desc { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.orb-tile.is-lit { border-color: color-mix(in srgb, var(--orb-c) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orb-c) 12%, transparent), 0 8px 22px color-mix(in srgb, var(--orb-c) 22%, transparent); }
.orb-tile.is-hot { border-color: color-mix(in srgb, var(--sky) 75%, transparent); background: rgba(16, 34, 80, .96); box-shadow: 0 0 0 5px color-mix(in srgb, var(--sky) 14%, transparent), 0 14px 34px rgba(54, 173, 224, .28); }
.orb-tile.is-hot .orb-dot { animation: orb-dot 1s ease-in-out infinite; }

/* ---------- core ---------- */
.orb-core { position: absolute; left: 50%; top: 50%; z-index: 7; width: var(--orb-core, 88px); height: var(--orb-core, 88px); transform: translate(-50%, -50%); transition: opacity .6s ease, transform .9s var(--e-spring); pointer-events: none; }
.orb-chip { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 29%; color: var(--sky-3); background: linear-gradient(150deg, #fff 30%, var(--sky) 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -10px 18px rgba(2, 151, 222, .2), 0 0 0 1px rgba(255, 255, 255, .3), 0 14px 34px rgba(0, 0, 0, .45), 0 0 60px rgba(124, 203, 236, .45); overflow: hidden; }
.orb-chip svg { position: relative; width: 44%; height: 44%; filter: drop-shadow(0 2px 5px rgba(2, 151, 222, .35)); }
.orb-chip::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 80% at 30% 0%, rgba(255, 255, 255, .34), transparent 60%); }
.orb-chip::after { content: ""; position: absolute; inset: -20%; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .5) 50%, transparent 60%); transform: translateX(-120%); }
.orb-stage.is-on .orb-chip::after { animation: orb-sheen 5.5s ease-in-out infinite; }
.orb-flash { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(closest-side, #fff, rgba(255, 255, 255, .2) 80%); opacity: 0; }
.orb-ping { position: absolute; inset: 0; border-radius: 29%; border: 1.5px solid color-mix(in srgb, var(--brand) 50%, transparent); opacity: 0; }
.orb-stage.is-on .orb-ping { animation: orb-ping 3.9s cubic-bezier(.2, .6, .3, 1) infinite; }
.orb-stage.is-on .orb-ping:nth-child(2) { animation-delay: -1.3s; }
.orb-stage.is-on .orb-ping:nth-child(3) { animation-delay: -2.6s; }
.orb-burst { position: absolute; inset: 0; border-radius: 29%; border: 2px solid var(--brand-light); opacity: 0; }
.orb-charge { position: absolute; left: 50%; top: 50%; width: 140%; height: 140%; margin: -70% 0 0 -70%; overflow: visible; transform: rotate(-90deg); }
.orb-stage.is-on .orb-charge { animation: orb-turn 48s linear infinite; }
.orb-seg { fill: none; stroke: color-mix(in srgb, var(--sky) 18%, transparent); stroke-width: 2.6; stroke-linecap: round; transition: stroke .35s ease, stroke-width .35s var(--e-spring), filter .35s ease; }
.orb-seg.is-lit { stroke: var(--sky); stroke-width: 3.6; filter: drop-shadow(0 0 4px rgba(54, 173, 224, .75)); }
.orb-charge.is-full .orb-seg { stroke: var(--sun-2); filter: drop-shadow(0 0 5px rgba(252, 115, 77, .6)); }

/* ---------- tooltip ---------- */
.orb-tip { --orb-nub: 0px; position: absolute; left: 50%; top: 50%; z-index: 12; margin: 0; max-width: min(232px, calc(100% - 8px)); width: max-content; text-wrap: balance; padding: 9px 13px 10px; border-radius: 11px; background: #fff; color: #3d4a60; font-size: .82rem; line-height: 1.35; letter-spacing: 0; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
.orb-tip b { color: var(--navy); font-weight: 600; }
.orb-tip::after { content: ""; position: absolute; left: calc(50% + var(--orb-nub)); top: 100%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #fff; border-radius: 2px; transform: rotate(45deg); }
.orb-tip.is-below::after { top: 0; }
.orb-tip.is-on { opacity: 1; visibility: visible; }

/* ---------- HUD corners + feed ---------- */
.orb-hud { position: absolute; z-index: 1; margin: 0; font-size: .62rem; letter-spacing: 0; line-height: 1.7; white-space: nowrap; pointer-events: none; transition: opacity .8s ease .5s; }
.orb-hud b { font-weight: 500; color: var(--brand-light); font-variant-numeric: tabular-nums; }
.orb-hud .dot { width: 6px; height: 6px; margin-right: 8px; color: var(--mint); vertical-align: 1px; }
.orb-hud--tl { left: 0; top: 0; }
.orb-hud--tr { right: 0; top: 0; text-align: right; }
.orb-hud--bl { left: 0; bottom: 0; }
.orb-hud--br { right: 0; bottom: 0; text-align: right; }
.orb-hud--br b { font-size: 1.05rem; letter-spacing: .04em; line-height: 1.2; color: var(--ink); }
.orb-stage:not(.is-on) .dot.live, .orb-feed:not(.is-on) .dot.live { animation-play-state: paused; }

.orb-feed { display: flex; align-items: center; gap: 12px; width: min(100%, 440px); margin: clamp(18px, 2.4vw, 28px) 0 0; padding: 10px 16px 10px 12px; border-radius: 999px; background: var(--surface); -webkit-backdrop-filter: var(--glass); backdrop-filter: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow-1); font-size: .66rem; letter-spacing: 0; white-space: nowrap; }
.orb-feed-k { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); font-weight: 500; }
.orb-feed-k .dot { width: 6px; height: 6px; }
.orb-feed-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }

@keyframes orb-ping { 0% { transform: scale(1); opacity: 0; } 12% { opacity: .6; } 100% { transform: scale(2.5); opacity: 0; } }
@keyframes orb-sheen { 0%, 62% { transform: translateX(-120%); } 82%, 100% { transform: translateX(120%); } }
@keyframes orb-turn { to { transform: rotate(270deg); } }
@keyframes orb-flow { to { stroke-dashoffset: -12; } }
@keyframes orb-dot { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--orb-c) 16%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--orb-c) 26%, transparent); } }

/* ---------- responsive ---------- */
@media (max-width: 1060px) {
  .orb-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .orb-copy .lede { max-width: 56ch; }
}
/* phones: a portrait stage with two elliptical orbits */
@media (max-width: 567px) {
  .orb-stage { aspect-ratio: 1 / 1.2; perspective: 900px; }
  .orb-stage::before { inset: 0 -4%; }
  .orb-glow { inset: -4% -12%; }
  .orb-tile { padding: .6em .82em .6em .66em; gap: .48em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 5px 14px rgba(0, 0, 0, .3); }
  .orb-hud { font-size: .56rem; letter-spacing: 0; }
  .orb-hud--br b { font-size: .9rem; }
  .orb-checks li { font-size: .95rem; padding: 7px 12px; }
  .orb-tip { font-size: .78rem; }
  .orb-feed { font-size: .58rem; letter-spacing: .05em; gap: 9px; padding: 8px 12px 8px 9px; }
  .orb-feed-k { padding: 3px 8px; }
  .orb-cta .btn { width: 100%; }
}

/* ---------- reduced motion: a still system ---------- */
.orb-stage.is-static :is(.orb-hud--bl, .orb-hud--br) { display: none; }
@media (prefers-reduced-motion: reduce) {
  .orb-ping, .orb-burst, .orb-sweep { display: none; }
  .orb-stage .orb-chip::after, .orb-stage .orb-charge, .orb-stage .orb-link, .orb-tile.is-hot .orb-dot { animation: none !important; }
  .orb-core, .orb-plane, .orb-hud, .orb-tile, .orb-tip, .orb-checks li::before, .orb-checks li svg, .orb-checks li::after { transition: none; }
  .orb .dot.live { animation: none; }
}

/* ---------- fallback: no JS, a failed scene, or reduced motion on a phone ---------- */
:is(html:not(.js) .orb, .orb.scene-failed, .orb.orb-cloud) .orb-stage { aspect-ratio: auto; perspective: none; display: grid; justify-items: center; gap: 34px; padding: 56px 0 8px; }
:is(html:not(.js) .orb, .orb.scene-failed, .orb.orb-cloud) :is(.orb-plane, .orb-wires, .orb-tip, .orb-hud, .orb-feed) { display: none; }
:is(html:not(.js) .orb, .orb.scene-failed, .orb.orb-cloud) .orb-glow { inset: -40px -6% auto; height: 280px; }
:is(html:not(.js) .orb, .orb.scene-failed, .orb.orb-cloud) .orb-stage::before { inset: -30px 0 auto; height: 260px; }
:is(html:not(.js) .orb, .orb.scene-failed, .orb.orb-cloud) .orb-core { position: relative; left: auto; top: auto; order: -1; transform: none; opacity: 1; }
:is(html:not(.js) .orb, .orb.scene-failed, .orb.orb-cloud) .orb-tiles { position: relative; inset: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
:is(html:not(.js) .orb, .orb.scene-failed, .orb.orb-cloud) .orb-tile { position: static; transform: none; opacity: 1; }
