.brand:has(.zd-logo) { min-height: 2.75rem; }
.zd-logo { display: block; width: clamp(8rem, 34vw, 8.9rem); max-width: 100%; height: auto; }
.site-footer .zd-logo { width: 8rem; }
@media (min-width: 52rem) {
  .zd-logo { width: 10.3rem; }
  .site-footer .zd-logo { width: 9rem; }
}

.motion-panel {
  --circuit: #639f94;
  --signal: #dbf8be;
  container-type: inline-size;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: clamp(.8rem, 2.25vw, 1.65rem);
  overflow: hidden;
  border: 1px solid #284c52;
  border-radius: .9rem;
  color: #eaf6ec;
  background:
    radial-gradient(ellipse at 50% 56%, #19554c 0%, transparent 61%),
    linear-gradient(128deg, #173d44, #0f2937 63%, #102a35);
}
.motion-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(#9bcec134 .8px, transparent 1px);
  background-position: center;
  background-size: 1rem 1rem;
  mask-image: linear-gradient(120deg, black, #0004 60%, #0009);
}
.motion-caption { grid-column: 1; color: #d6e9de; font: 600 clamp(.66rem, 2.25cqw, .8rem)/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.motion-switch, .motion-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.motion-control { grid-column: 2; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; color: #d6e9de; cursor: pointer; }
.motion-control > span { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid #63847c; border-radius: 50%; background: #173940; }
.motion-control:hover > span { background: #27534e; border-color: #b7ddc4; }
.motion-switch:focus-visible + .motion-control { outline: 2px solid var(--signal); outline-offset: 1px; border-radius: .4rem; }
.motion-pause::before { content: ""; width: .5rem; height: .66rem; border-inline: 2px solid currentColor; }
.motion-play::before { content: ""; margin-left: 2px; border-block: .37rem solid transparent; border-left: .53rem solid currentColor; }
.motion-control .motion-play, .motion-switch:checked + .motion-control .motion-pause { display: none; }
.motion-switch:checked + .motion-control .motion-play { display: grid; }

.motion-field { grid-column: 1 / -1; display: grid; justify-items: center; min-width: 0; padding: .75rem 0 clamp(.65rem, 3cqw, 1.25rem); }
.motion-input, .motion-outputs > span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .55em;
  max-width: 100%;
  padding: .54em .8em;
  border: 1px solid #577d77;
  border-radius: .45rem;
  background: #173a40;
  color: #e2f4e8;
  font: 520 clamp(.8rem, 3.2cqw, 1rem)/1.35 var(--sans);
  text-align: center;
  overflow-wrap: anywhere;
}
.motion-input { border-radius: 3rem; }
.motion-input i { flex: none; width: .5em; height: .5em; border: 1px solid #c0e4c4; border-radius: 50%; background: #80b99f; }
.motion-intake { position: relative; width: 1px; height: clamp(1.45rem, 6.3cqw, 2.15rem); background: var(--circuit); }
.motion-packet { position: absolute; z-index: 1; left: 50%; top: 0; width: 5px; height: 5px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--signal); box-shadow: 0 0 7px 1px #bdf8b5aa; opacity: 0; }
.motion-engine { position: relative; width: 100%; height: clamp(5.45rem, 23cqw, 8.1rem); isolation: isolate; }
.motion-engine::before {
  content: "";
  position: absolute;
  inset: -5% 0 -3%;
  z-index: -1;
  background: repeating-radial-gradient(ellipse at center, transparent 0 14%, #89c9ae2b 14.1% 14.6%, transparent 15% 21%);
  mask-image: radial-gradient(ellipse, black 34%, transparent 74%);
}
.motion-wafer {
  position: absolute;
  left: 50%;
  width: clamp(4.45rem, 21cqw, 7.25rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scaleY(.5) rotate(45deg);
  border: 1.5px solid;
  border-radius: 17%;
}
.wafer-base { top: 66%; border-color: #4a9b8c; background: linear-gradient(135deg, #386e68, #1c4a4b 55%, #28605a); box-shadow: 4px 4px 0 #153a3f, 8px 8px 0 #122e35; }
.wafer-middle { top: 49%; border-color: #85c6a9; background: linear-gradient(135deg, #6dafa0, #4a897d 58%, #54978a); box-shadow: 4px 4px 0 #2f7169, 8px 8px 0 #1f5653; }
.wafer-crown { top: 32%; border-color: #d7f4d0; background: linear-gradient(140deg, #e0f2c9, #acdcb1 57%, #8ac8a4); box-shadow: 4px 4px 0 #80b597, 8px 8px 0 #679c84; }
.wafer-crown::before, .wafer-crown::after { content: ""; position: absolute; border: 1.5px solid #5e947b; border-radius: 17%; }
.wafer-crown::before { inset: 16%; }
.wafer-crown::after { inset: 33%; background: #a3d6ab; box-shadow: 0 0 0 3px #e2f5d68a; }
.motion-core { max-width: 100%; color: #ecf6e3; font: 600 clamp(1.15rem, 4.75cqw, 1.6rem)/1.25 var(--sans); letter-spacing: -.03em; text-align: center; }
.motion-fork, .motion-outputs { width: min(100%, 28rem); }
.motion-fork { position: relative; height: clamp(2.7rem, 10cqw, 3.5rem); margin-top: .35rem; }
.motion-fork::before { content: ""; position: absolute; top: 0; bottom: 65%; left: 50%; border-left: 1px solid var(--circuit); }
.motion-fork::after { content: ""; position: absolute; top: 35%; bottom: 0; left: 25%; width: 50%; border: 1px solid var(--circuit); border-bottom: 0; border-radius: .5rem .5rem 0 0; }
.motion-outputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: center; align-items: start; }
.motion-outputs > span { max-width: calc(100% - .22rem); }
.motion-outputs i { width: .4em; height: .4em; flex: none; border-radius: 1px; background: #9bc5aa; }

@media (prefers-reduced-motion: no-preference) {
  .motion-intake .motion-packet { animation: zd-input 5s linear infinite; }
  .motion-fork .motion-packet { animation: zd-distribute 5s linear infinite; }
  .packet-service { --destination: 25%; }
  .packet-finance { --destination: 75%; }
  .wafer-crown::after { animation: zd-process 5s ease-in-out infinite; }
  .motion-outputs i { animation: zd-output 5s ease-in-out infinite; }
  .motion-switch:checked ~ .motion-field *,
  .motion-switch:checked ~ .motion-field *::after { animation-play-state: paused; }
}
@keyframes zd-input {
  0%, 2% { top: 0; opacity: 0; }
  5% { opacity: 1; }
  22% { top: 100%; opacity: 1; }
  25%, 100% { top: 100%; opacity: 0; }
}
@keyframes zd-process {
  0%, 17%, 55%, 100% { background: #a3d6ab; }
  28%, 38% { background: #e4ffc9; }
}
@keyframes zd-distribute {
  0%, 37% { left: 50%; top: 0; opacity: 0; }
  41% { left: 50%; top: 0; opacity: 1; }
  48% { left: 50%; top: 35%; }
  67% { left: var(--destination); top: 35%; }
  79% { left: var(--destination); top: 100%; opacity: 1; }
  82%, 100% { left: var(--destination); top: 100%; opacity: 0; }
}
@keyframes zd-output {
  0%, 75%, 97%, 100% { background: #9bc5aa; }
  82%, 89% { background: #efffd5; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-control, .motion-switch { display: none; }
  .motion-caption { min-height: 2.75rem; display: flex; align-items: center; }
}
@media (forced-colors: active) {
  .motion-panel, .motion-control > span, .motion-input, .motion-outputs > span, .motion-wafer { border-color: CanvasText; }
  .motion-fork::before, .motion-fork::after { border-color: CanvasText; }
  .motion-intake { border-left: 1px solid CanvasText; }
}
